JP2023034823A - Image processing apparatus, and control method, and program for image processing apparatus - Google Patents
Image processing apparatus, and control method, and program for image processing apparatus Download PDFInfo
- Publication number
- JP2023034823A JP2023034823A JP2021141259A JP2021141259A JP2023034823A JP 2023034823 A JP2023034823 A JP 2023034823A JP 2021141259 A JP2021141259 A JP 2021141259A JP 2021141259 A JP2021141259 A JP 2021141259A JP 2023034823 A JP2023034823 A JP 2023034823A
- Authority
- JP
- Japan
- Prior art keywords
- ruled
- pixels
- handwritten character
- image
- line
- 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.)
- Pending
Links
Images
Abstract
Description
本発明は、画像処理装置、画像処理装置の制御方法およびプログラムに関する。 The present invention relates to an image processing apparatus, an image processing apparatus control method, and a program.
スキャナやカメラにより読み込んだ文書画像に対して、文字認識処理を行う技術が知られている。また、文字認識処理の方式として、認識精度を向上させるために印字された活字と手書き文字とを分離し、活字や手書き文字などの文字種毎に特化した認識処理を行う技術が知られている。
特許文献1では、文書画像に対して認識対象を特定する前処理を適用した後、前処理後の画像から手書き文字と活字文字とを分離する技術が開示されている。
2. Description of the Related Art Techniques for performing character recognition processing on document images read by a scanner or camera are known. As a method of character recognition processing, a technology is known in which printed characters and handwritten characters are separated in order to improve recognition accuracy, and recognition processing is performed specifically for each type of character such as printed characters and handwritten characters. .
Japanese Patent Application Laid-Open No. 2004-201001 discloses a technique of applying preprocessing for specifying a recognition target to a document image, and then separating handwritten characters and printed characters from the preprocessed image.
しかしながら、特許文献1に記載の技術では、罫線に手書き文字が重畳する場合について考慮されていない。具体的には、特許文献1に記載の技術では、文字認識の前処理において文字認識のノイズである罫線を除去しているが、手書き文字が重畳する罫線が存在する場合に罫線を除去すると、手書き文字の一部を分断した画像が生成されることになる。手書き文字の一部が分断されてしまうと、手書き文字の分離処理および手書き文字認識の精度を低下させてしまう可能性がある。
However, the technique described in
本発明は、上記の課題に鑑みてなされたものであり、手書き文字が罫線に重畳する場合に、文字認識の精度を下げることのないように、罫線を特定・除去することができるようにすることを目的としている。 SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and provides a method for specifying and removing ruled lines without lowering the accuracy of character recognition when handwritten characters are superimposed on the ruled lines. It is intended to
本発明に係る画像処理装置は、画像から手書き文字に該当する画素を抽出し、前記抽出した画素を除去した非手書き文字画像を取得する抽出手段と、前記非手書き文字画像および前記抽出した手書き文字に該当する画素に基づいて、前記手書き文字の画素の少なくとも一部を含んだ罫線判定用情報を生成する生成手段と、前記生成手段により生成した罫線判定用情報から罫線画素を特定する特定手段と、前記非手書き文字画像から前記特定手段により特定した罫線画素を除去する除去手段と、を有する。 An image processing apparatus according to the present invention includes extraction means for extracting pixels corresponding to handwritten characters from an image and obtaining a non-handwritten character image from which the extracted pixels are removed; generating means for generating ruled-line determination information including at least a portion of the pixels of the handwritten character based on the pixels corresponding to (1); and specifying means for specifying ruled-line pixels from the ruled-line determination information generated by the generating means and a removing means for removing the ruled line pixels specified by the specifying means from the non-handwritten character image.
本発明によれば、手書き文字が罫線に重畳する場合に、文字認識の精度を下げることのないように、罫線を特定・除去することができる。 According to the present invention, when a handwritten character is superimposed on a ruled line, the ruled line can be identified and removed without lowering the accuracy of character recognition.
(第1の実施形態)
以下、図面を用いて本発明を実施するための形態について説明する。
図1は、第1の実施形態に係る情報処理システムの構成例を示すブロック図である。
情報処理システム1は、読み取り装置100と、情報処理装置110とを有している。読み取り装置100は、スキャナ101と、通信部102とを有している。スキャナ101は、文書の読み取りを行い、スキャン画像を生成する。通信部102は、ネットワークを介して情報処理装置110などの外部装置と通信を行う。
(First embodiment)
EMBODIMENT OF THE INVENTION Hereinafter, the form for implementing this invention is demonstrated using drawing.
FIG. 1 is a block diagram showing a configuration example of an information processing system according to the first embodiment.
The
情報処理装置110は、システム制御部111と、ROM112と、RAM113と、HDD114と、表示部115と、入力部116と、通信部117とを有している。本実施形態に係る情報処理装置110は、画像処理装置の一例である。
システム制御部111は、ROM112に記憶された制御プログラムを読み出して各種処理を実行する。RAM113は、システム制御部111の主メモリ、ワークエリアなどの一時記憶装置として用いられる。HDD114は、各種データや各種プログラムなどを記憶する。なお、後述する情報処理装置110の機能や処理は、システム制御部111がROM112又はHDD114に格納されているプログラムを読み出し、このプログラムを実行することにより実現されるものである。
The
通信部117は、ネットワークを介して読み取り装置100などの外部装置と通信を行う。表示部115は、各種情報を表示する。入力部116は、キーボードやマウスを有し、ユーザによる各種操作を受け付ける。なお、表示部115および入力部116は、タッチパネルのように一体に設けられてもよい。また、表示部115は、プロジェクタによる投影を行うものであってもよく、入力部116は、投影された画像に対する指先の位置をカメラで認識するものであってもよい。
本実施形態においては、読み取り装置100のスキャナ101が帳票などの紙文書を読み取り、スキャン画像を生成する。スキャン画像のデータは、通信部102により情報処理装置110に送信される。情報処理装置110では、通信部117がスキャン画像のデータを受信し、受信したスキャン画像のデータをHDD114などの記憶装置に記憶する。
A
In this embodiment, the
次に、図2のフローチャートを用いて、本実施形態におけるOCR処理の一例について説明する。本フローチャートの処理は、ROM112に格納されたプログラムに従って情報処理装置110のシステム制御部111が実行することによって実現される。ユーザが読み取り装置100を操作して紙文書をスキャナ101でスキャンすることにより本処理が開始される。
まず、S200において、システム制御部111は、スキャナ101がユーザによる指示に従い紙文書をスキャンして送信してきたスキャン画像のデータを、通信部117を介して受信する。そして、システム制御部111は、受信したスキャン画像のデータをHDD114などの記憶部に格納する。図3(a)は、S200の処理により得られたスキャン画像301の一例を示す図である。スキャン画像301は、手書き文字302および罫線303を含んでいる。
Next, an example of OCR processing in this embodiment will be described using the flowchart of FIG. The processing of this flowchart is implemented by the
First, in S<b>200 , the
S210において、システム制御部111は、HDD114などの記憶部に格納されたスキャン画像を読み出し、そのスキャン画像に対して二値化処理を行う。そして、システム制御部111は、処理結果である二値画像をRAM113に格納する。二値化処理は、多値の階調値からなる画像データを0と1などの二値データに量子化する処理であり、既知の二値化手法を用いることができる。例えば、既知の二値化手法として判別分析法などの方法が知られている。図3(b)は、スキャン画像301に対する二値化処理により得られた二値画像304の一例を示す図である。手書き文字302および罫線303についても二値化されている。
上記の二値化手法は一例であって、二値データに量子化することができれば具体的な手法は問わない。例えば、あらかじめ階調値に対する閾値を決めておき、閾値を用いて二値データを生成することも可能である。
In S210, the
The above binarization method is just an example, and any specific method can be used as long as it can be quantized into binary data. For example, it is possible to determine thresholds for gradation values in advance and generate binary data using the thresholds.
S220において、システム制御部111は、S210において生成された二値画像に対して、手書き文字画素の抽出処理を行う。そして、システム制御部111は、抽出された手書き文字画素を二値画像から除去した非手書き文字画像と、手書き文字画素のみで構成された手書き文字画像とを生成し、RAM113に格納する。図3(c)は、二値画像304に対して、抽出処理を実施した結果の一例を示す図である。抽出処理により、二値画像304に対する非手書き文字画像305と、二値画像304に対する手書き文字画像306とが生成される。
ここで、非手書き文字画像305は手書き文字画素が除かれているため、手書き文字が罫線と重なっていた部分307では、罫線が分断されることになる。図3(d)は、S220の処理前後における、手書き文字が罫線と重なっていた部分307に該当する領域を示す図である。二値画像304から抜粋した手書き部分画像308に対して手書き文字画素を除去すると、非手書き画像の部分画像309となり、罫線が細かく分断されていることがわかる。
In S220, the
Here, since the handwritten character pixels are removed from the
なお、手書き文字画素抽出は、スキャン画像のなかから手書き文字に該当する画素のみを抽出する処理であり、既知の手書き文字画素抽出手法を用いることができる。例えば、既知の手書き文字画素抽出の手法として、深層学習を使った手法が知られている。なお、深層学習を使った手書き文字画素抽出処理は一例であって、スキャン画像から手書き文字画素が抽出できれば具体的な手法は問わない。例えば、連結した画素を解析して手書き文字の特徴を持つ連結画素を手書き文字画素として特定することも可能である。連結画素を解析して手書き文字と判定する技術は、特開平10-162102号公報などで開示されている。 Note that handwritten character pixel extraction is a process of extracting only pixels corresponding to handwritten characters from the scanned image, and a known handwritten character pixel extraction method can be used. For example, a method using deep learning is known as a known handwritten character pixel extraction method. Note that the handwritten character pixel extraction processing using deep learning is an example, and any specific method may be used as long as handwritten character pixels can be extracted from a scanned image. For example, it is also possible to analyze connected pixels and identify connected pixels having handwritten character characteristics as handwritten character pixels. A technique of analyzing connected pixels and determining handwritten characters is disclosed in Japanese Patent Application Laid-Open No. 10-162102.
S230において、システム制御部111は、S220において生成された非手書き文字画像に対して、手書き文字画像を用いて罫線除去処理を行い、処理結果の画像を活字文字画像としてRAM113に格納する。罫線除去処理の詳細については、図4を用いて後述する。図3(e)は、非手書き文字画像305に対する罫線除去処理の結果として得られた活字文字画像の一例を示す図である。罫線に相当する画素は、罫線除去処理によって除去されている。
S240において、システム制御部111は、S220において生成された手書き文字画像に対して手書きOCR処理を行い、処理結果を手書きOCR結果としてRAM113に格納する。手書きOCR処理は、手書き文字画像に対して、手書き文字画像に含まれる文字に該当する文字コードを特定する処理であり、既知の手書きOCR手法を用いることができる。例えば、パターンマッチングを用いた手書き文字認識の手法が知られており、特開平10-124618号公報などで開示されている。なお、上記の手書き文字認識処理は一例であって、画像中の文字に該当する部分の文字コードを特定する処理であれば具体的な手法は問わない。
In S230,
In S240,
S250において、システム制御部111は、S230において生成された活字文字画像に対して活字OCR処理を行い、処理結果を活字OCR結果としてRAM113に格納する。活字OCR処理は、活字画像に含まれる文字に対して、活字文字に該当する文字コードを特定する処理であり、既知の活字OCR手法を用いることができる。例えば、手書きOCRと同様に、パターンマッチングを用いた活字認識の手法が知られている。なお、上記の活字認識処理は一例であって、画像中の文字に該当する部分の文字コードを特定する処理であれば具体的な手法は問わない。
S260において、システム制御部111は、S240において生成された手書き文字認識結果および、S250において生成された活字認識結果に対して統合処理を行い、スキャン画像に対するOCR結果としてRAM113に格納する。
In S250, the
In S260, the
以上の処理により、手書き文字と活字文字とが混在し、罫線も存在する帳票においても、手書き文字と活字文字、それぞれに最適なOCR処理を適用することが可能となり、OCR精度を向上させることができる。
なお、上記処理において、S240の手書きOCR処理およびS250の活字OCR処理は、異なる順番で実施してもよい。手書きOCR処理はS220の手書き文字画素抽出が終了したタイミング以降であり、S260のOCR結果統合処理以前であれば、どのタイミングで実施してもよい。同様に、活字OCRはS230の罫線除去が終了したタイミング以降であり、S260のOCR結果統合処理以前であれば、どのタイミングで実施してもよい。例えば、S230の罫線除去処理とS240の手書きOCR処理との順番を変更しても、期待する結果を得ることができる。
With the above processing, it is possible to apply the optimum OCR processing to each of the handwritten characters and the printed characters, even in a form in which both handwritten characters and printed characters are mixed and ruled lines exist, thereby improving the OCR accuracy. can.
In the above process, the handwritten OCR process of S240 and the printed character OCR process of S250 may be performed in a different order. The handwritten OCR process may be performed at any timing after the handwritten character pixel extraction in S220 and before the OCR result integration process in S260. Similarly, printed character OCR may be performed at any timing after the completion of ruled line removal in S230 and before the OCR result integration processing in S260. For example, even if the order of the ruled line removal processing in S230 and the handwritten OCR processing in S240 is changed, expected results can be obtained.
続いて、図4のフローチャートを用いて、図2のS230における罫線除去処理の詳細について説明する。図4は本実施形態における、罫線除去処理の一例を示すフローチャートである。本フローチャートの処理は、ROM112に格納されたプログラムに従って情報処理装置110のシステム制御部111が実行することによって実現される。
Next, details of the ruled line removal process in S230 of FIG. 2 will be described using the flowchart of FIG. FIG. 4 is a flowchart showing an example of ruled line removal processing in this embodiment. The processing of this flowchart is implemented by the
S400において、システム制御部111は、RAM113を参照し、非手書き文字画像および手書き文字画像を取得する。さらに、システム制御部111は、取得した非手書き文字画像と手書き文字画像とを解析することによって、罫線判定用情報を生成しRAM113に格納する。罫線判定用情報は、罫線候補のみから構成される画像である。
In S400, the
図6(a)は、罫線判定用情報の一例を示す図である。領域601に示すように、罫線候補には、罫線に加えて、罫線と重畳する手書き文字画素の一部も含まれている。非手書き文字画像における罫線の候補である画像に加えて、罫線候補に関連する手書き文字画像の画素を統合することによって、手書き文字が重畳した罫線も分断されずに画像として表現される。また、罫線に加えて余計に含まれている手書き文字画素の一部は、後述するS410の罫線画素の特定処理により、罫線ではないと判定されるため、この段階で手書き文字画素の一部が罫線候補として含まれることは問題ない。
罫線判定用情報生成処理の詳細については、図5を用いて後述する。
FIG. 6A is a diagram showing an example of ruled line determination information. As shown in
Details of the ruled line determination information generation process will be described later with reference to FIG.
S410において、システム制御部111は、RAM113を参照し、罫線判定用情報を取得する。さらに、システム制御部111は、取得した罫線判定用情報を解析して、除去対象である罫線を特定し、特定された罫線情報をRAM113に格納する。
罫線画素の特定処理は、罫線判定用情報である画像に対して、画素の細らせ・太らせ処理を実施し、細らせ・太らせ処理の結果における連結画素塊を解析することによって行う。具体的には例えば、罫線判定用情報である画像に対して、罫線として想定する長さよりも短い成分が消えるように画素を細らせ、太らせの順で処理する。すなわち、罫線として想定する長さの最小値分、細らせ処理を適用し、罫線以外の画素である手書き文字画素の一部を除去する。その後、細らせ処理結果に対して、細らせたサイズと同値の太らせ処理を適用することによって、消えなかった罫線については、元の画素サイズに戻すことができる。
In S410, the
Ruled line pixel identification processing is performed by thinning and thickening pixels on an image that is information for determining a ruled line, and analyzing connected pixel clusters as a result of the thinning and thickening processing. . Specifically, for example, the image, which is the information for determining ruled lines, is processed in the order of thinning and thickening pixels so that components shorter than the assumed length of ruled lines disappear. That is, the thinning process is applied by the minimum value of the length assumed for the ruled line, and some of the handwritten character pixels, which are pixels other than the ruled line, are removed. After that, by applying a thickening process with the same value as the thinning size to the result of the thinning process, the ruled lines that did not disappear can be returned to the original pixel size.
続いて、上記細らせ・太らせ処理により生成された画像に対して、連結画素塊を抽出し、抽出した連結画素塊の形状とサイズとを用いて、連結画素塊が罫線となりうるのか否かを判定する。例えば、連結画素塊が細長いものであれば、罫線として判定することができる。
また、罫線画素の特定処理において、表罫線のように連結画素塊としては大きなサイズであり、細長い形状とならないケースに対しては、直線検出を利用して判定することもできる。具体的には例えば、抽出した連結画素塊に対して直線検出処理を適用し、検出された直線長と数および配置関係を用いて、表罫線を構成するものか否かを判定する。
Subsequently, connected pixel blocks are extracted from the image generated by the thinning/thickening process, and the shapes and sizes of the extracted connected pixel blocks are used to determine whether the connected pixel blocks can form ruled lines. determine whether For example, if a connected pixel block is elongated, it can be determined as a ruled line.
In addition, in the ruled line pixel specifying process, straight line detection can also be used for a case where the connected pixel cluster is large in size and does not have an elongated shape, such as a table ruled line. Specifically, for example, straight line detection processing is applied to the extracted connected pixel clusters, and whether or not they form a table ruled line is determined using the detected straight line length, number, and arrangement relationship.
なお、本実施形態では、非手書き文字画像に対して細らせ・太らせ処理を適用した画像を用いて連結画素塊の解析を行ったが、細らせ・太らせ処理を適用していない画像に対して連結画素塊の解析を行ってもよい。例えば、破線などが存在する場合、細らせ処理によって、破線を構成する画素塊が消失してしまう可能性があるが、細らせ・太らせ処理を適用しない画像を用いることで、この問題を回避することができる。具体的には例えば、単一の連結画素塊だけを見ると、微小点である場合も、周囲の連結画素塊に動揺の特徴を持つ連結画素塊が一定間隔で直線状に配置されている場合、該当する連結画素塊群を罫線候補として判定する。連結画素塊の解析処理によって、破線など罫線が細かく分断されているケースにおいても罫線候補を特定することができる。 Note that in the present embodiment, an image obtained by applying thinning/thickening processing to a non-handwritten character image is used to analyze connected pixel blocks, but thinning/thickening processing is not applied. A connected pixel block analysis may be performed on the image. For example, if there is a dashed line, the thinning process may cause the pixel blocks that make up the dashed line to disappear. can be avoided. Specifically, for example, when looking only at a single connected pixel block, even if it is a minute point, when connected pixel blocks having fluctuation characteristics are arranged in a straight line at regular intervals in the surrounding connected pixel blocks , the corresponding connected pixel block group is determined as a ruled line candidate. By analyzing connected pixel clusters, it is possible to identify ruled line candidates even in cases where ruled lines such as dashed lines are finely divided.
図6(b)は、図6(a)に示す罫線判定用情報に対して罫線画素の特定処理を行うことにより特定された罫線情報の一例を示す図である。図6(a)において手書き文字画素の一部を含んでいた領域601も、手書き文字画素がない罫線602として特定されていることがわかる。
S420において、システム制御部111は、RAM113を参照し、非手書き文字画像および罫線情報を取得する。さらに、システム制御部111は、非手書き文字画像から罫線情報が示す罫線画素を除去し、罫線が除去された非手書き文字画像を生成してRAM113に格納する。
FIG. 6(b) is a diagram showing an example of ruled-line information specified by performing ruled-line pixel specifying processing on the ruled-line determination information shown in FIG. 6(a). It can be seen that a
In S420, the
続いて、図5のフローチャートを用いて、図4のS400における罫線判定用情報生成処理の詳細について説明する。図5は本実施形態における、罫線候補領域の関連情報の取得処理の一例を示すフローチャートである。本フローチャートの処理は、ROM112に格納されたプログラムに従って情報処理装置110のシステム制御部111が実行することによって実現される。
S500において、システム制御部111は、RAM113を参照し、非手書き文字画像を取得する。さらに、システム制御部111は、非手書き文字画像を解析することによって、罫線の候補である領域を特定し、特定された罫線候補領域および罫線候補領域を含む罫線候補画像をRAM113に格納する。
Next, details of the ruled line determination information generation process in S400 of FIG. 4 will be described with reference to the flowchart of FIG. FIG. 5 is a flow chart showing an example of a process of acquiring information related to a ruled-line candidate area according to the present embodiment. The processing of this flowchart is implemented by the
In S500, the
罫線候補の特定処理は、非手書き文字画像に対して、連結画素塊を解析することによって実現する。具体的には例えば、非手書き文字画像に対して、連結画素塊を抽出し、抽出した連結画素塊の形状とサイズとを用いて、連結画素塊が罫線の候補となりうるのか否かを判定する。図4のS410における罫線画素の特定処理と同様に、連結画素塊が細長ければ、罫線候補として特定することができる。また、大きな連結画素塊についても、図4のS410における罫線画素の特定処理と同様に、直線検出を用いて表罫線を構成するものかを特定することができる。
さらに、罫線候補の特定処理では、図4のS410における罫線画素の特定処理とは異なる観点でも罫線候補を判定する。具体的には例えば、微小な連結画素塊が直線状に並んでいる場合にも、該当する連結画素塊群を罫線候補として判定する。この処理の結果、手書き文字画素の重畳により細かく分断されてしまった非手書き文字画像における罫線画素についても罫線候補として抽出することができる。
The ruled-line candidate identification process is realized by analyzing connected pixel clusters in the non-handwritten character image. Specifically, for example, a connected pixel block is extracted from a non-handwritten character image, and the shape and size of the extracted connected pixel block are used to determine whether or not the connected pixel block can be a ruled line candidate. . Similar to the ruled-line pixel specifying process in S410 of FIG. 4, if the connected pixel cluster is elongated, it can be specified as a ruled-line candidate. Also, for large connected pixel clusters, it is possible to identify whether or not they constitute table ruled lines using straight line detection in the same manner as the ruled line pixel identification processing in S410 of FIG.
Furthermore, in the ruled-line candidate specifying process, ruled-line candidates are determined from a different perspective from the ruled-line pixel specifying process in S410 of FIG. Specifically, for example, even when minute connected pixel blocks are arranged in a straight line, the relevant connected pixel block group is determined as a ruled line candidate. As a result of this process, ruled line pixels in the non-handwritten character image that have been finely segmented due to superimposition of handwritten character pixels can also be extracted as ruled line candidates.
続いて、上記処理により特定した罫線候補である連結画素塊又は連結画素塊群の外接矩形を取得し、外接矩形に所定のマージンを設定した領域を罫線候補領域として設定する。
図7(a)は、図3(c)の非手書き文字画像305に対して、罫線候補領域の特定処理をして得られた罫線候補画像の一例を示す図である。領域701および領域702が罫線候補として特定された領域を示す。手書き文字画素により分断された罫線も連結画素塊群として罫線候補として特定され、領域702も罫線候補領域と設定されていることがわかる。
Subsequently, the circumscribing rectangle of the connected pixel block or connected pixel block group, which is the ruled line candidate specified by the above process, is obtained, and the area obtained by setting a predetermined margin to the circumscribing rectangle is set as the ruled line candidate area.
FIG. 7A is a diagram showing an example of a ruled-line candidate image obtained by subjecting the
S510において、システム制御部111は、RAM113を参照し、罫線候補領域および手書き文字画像を取得する。さらに、システム制御部111は、罫線候補領域に関連する手書き文字画像の画素情報を取得し、罫線候補領域の関連情報としてRAM113に格納する。
罫線候補領域に関連する手書き文字画像の画素情報取得処理は、手書き文字画像において、罫線候補領域に対応する領域の画素を取得することにより実施する。
例えば、図7(a)の領域702に対応する手書き文字画像の領域は、図7(b)の罫線候補領域の関連情報703になる。一方、図7(a)の領域701が示す手書き文字画像は、有効な黒画素が存在しないため、関連する手書き文字画像の画素情報としては設定されない。
In S510, the
The pixel information acquisition process of the handwritten character image related to the ruled line candidate area is performed by acquiring the pixels of the area corresponding to the ruled line candidate area in the handwritten character image.
For example, the area of the handwritten character image corresponding to the
S520において、システム制御部111は、RAM113を参照し、罫線候補画像および罫線候補領域の関連情報を取得する。さらに、システム制御部111は、罫線候補画像と罫線候補領域の関連情報とを統合し、統合結果画像をRAM113に格納する。
図7(b)は、S510の統合処理の一例を説明するための図である。図7(b)において、図7(a)の領域702に対応する罫線候補画像704、および図7(a)の領域702に対応する罫線候補領域の関連情報703を統合した結果が、統合結果画像705である。
なお、本実施形態における罫線候補領域のマージンは、罫線として想定される幅および高さを満たす範囲で設定すれば十分である。広くマージンを取ると、関連性の低い手書き文字画素が関連情報として扱われる可能性が高くなり、図4のS410に示す罫線画素の特定処理において精度を低下させてしまう可能性がある。
In S<b>520 , the
FIG. 7B is a diagram for explaining an example of the integration processing of S510. In FIG. 7B, the result of integrating the ruled-
Note that it is sufficient to set the margin of the ruled-line candidate area in the present embodiment within a range that satisfies the expected width and height of the ruled line. If a wide margin is provided, there is a high possibility that handwritten character pixels with low relevance will be treated as related information, and there is a possibility that accuracy will be lowered in the process of identifying ruled line pixels shown in S410 of FIG.
以上のように本実施形態によれば、手書き文字が罫線に重畳する場合も、非手書き文字画像から罫線候補を特定し、特定された罫線候補情報を使って非手書き文字画像に手書き文字画像の一部を統合することによって、罫線を精度よく除去することができる。 As described above, according to the present embodiment, even when a handwritten character is superimposed on a ruled line, ruled line candidates are specified from a non-handwritten character image, and the specified ruled line candidate information is used to convert the handwritten character image into the non-handwritten character image. By integrating a part, ruled lines can be removed with high accuracy.
(第2の実施形態)
第1の実施形態では、罫線候補領域に該当する手書き文字画像を罫線候補領域の関連情報として扱った。しかし、単に罫線候補領域に該当する手書き文字画像を関連情報とするのではなく、罫線候補領域に含まれる罫線画素と手書き文字画素の関連性を用いて、最終的に関連情報とするか否かの判定を行ってもよい。
本ケースについて、図8を用いて説明する。図8は、本実施形態における罫線判定用情報の生成処理を示すフローチャートであり、図4のS400における罫線判定用情報生成処理の詳細である。なお、図4のS400における罫線判定用情報生成処理以外の処理については、第1の実施形態と同様のため説明は省略する。
(Second embodiment)
In the first embodiment, the handwritten character image corresponding to the ruled-line candidate area is treated as related information of the ruled-line candidate area. However, instead of simply using the handwritten character image corresponding to the ruled-line candidate area as the related information, it is possible to determine whether or not the related information is finally obtained by using the relevance between the ruled-line pixels and the handwritten character pixels included in the ruled-line candidate area. may be determined.
This case will be described with reference to FIG. FIG. 8 is a flowchart showing the ruled line determination information generation process in this embodiment, and shows the details of the ruled line determination information generation process in S400 of FIG. Note that processing other than the ruled line determination information generation processing in S400 of FIG. 4 is the same as in the first embodiment, and thus description thereof is omitted.
S800は、図5におけるS500と同一の処理であるため、説明を省略する。
S810は、図5におけるS510と同一の処理であるため、説明を省略する。
S820において、システム制御部111は、RAM113を参照し、罫線候補領域に含まれる罫線画素、および罫線候補領域に関連する手書き文字画像の画素情報を取得する。さらに、システム制御部111は、取得した手書き文字画像の画素情報(以降、本実施形態において、単に関連情報と記載する)を解析し、最終的な関連情報として採用するか否かを判定する。システム制御部111は、最終的な関連情報として採用しないと判定した場合は、RAM113から該当する関連情報を削除する。
Since S800 is the same processing as S500 in FIG. 5, description thereof is omitted.
Since S810 is the same processing as S510 in FIG. 5, description thereof is omitted.
In S820, the
関連情報の採用判定処理は、罫線候補領域に含まれる罫線画素と関連情報との関連性を用いて行う。具体的には例えば、システム制御部111は、罫線画素と関連情報とが画素として連結するか否かを判定する。システム制御部111は、罫線画素と関連情報とが画素として連結する場合は、関連性があると判定する。一方、システム制御部111は、罫線画素と関連情報とが画素として連結しない場合は、関連性がないと判定する。
以下、図9を用いて、関連情報の採用判定処理例について説明する。図9(a)は、文書画像において罫線に手書き文字が重畳している部分を抜き出した部分画像例を示す図である。図9(b)は、図9(a)の部分画像に対する手書き文字画像例を示す図である。図9(c)は、図9(a)の部分画像に対する罫線候補画像例を示す図であり、罫線候補領域901を含んでいる。図9(d)は、S820で取得される罫線候補領域901の関連情報例を示す図であり、本来罫線とは関係のない手書き文字画素塊の一部902も含んでいる。
The related information adoption determination process is performed using the relationship between the ruled line pixels included in the ruled line candidate area and the related information. Specifically, for example, the
An example of the relevant information adoption determination process will be described below with reference to FIG. 9 . FIG. 9A is a diagram showing an example of a partial image extracted from a document image where handwritten characters are superimposed on ruled lines. FIG. 9(b) is a diagram showing an example of a handwritten character image for the partial image of FIG. 9(a). FIG. 9C is a diagram showing an example of a ruled line candidate image for the partial image of FIG. 9A, including a ruled
関連情報の採用判定処理において、手書き文字画素塊の一部902は、どの罫線画素とも連結しないため、システム制御部111は、関連情報として適切でないと判定し、RAM113に格納される関連情報から削除する。図9(e)は、図9(d)に対して関連情報の採用判定処理を適用した結果の一例である。前述のように、図9(e)では手書き文字画素塊の一部902が削除されている。
S830は、図5におけるS520と同一の処理であるため、説明を省略する。
In the relevant information adoption determination process, the
Since S830 is the same processing as S520 in FIG. 5, description thereof is omitted.
以上説明したように、罫線候補領域の関連情報を取得する際、罫線候補領域に含まれる罫線画素との関連性を用いて、採用可否を判定することによって、手書き文字の一部を罫線候補として抽出してしまう可能性を低減することが可能になる。例えば、図8を用いて例示したように、手書き文字画素の一部だけ着目すると細長い線形状となり、罫線と類似する特徴を持つ場合がある。罫線と類似する特徴を持つ関連情報を統合し、図4のS410における罫線の特定処理を実施すると、罫線として誤抽出されてしまう可能性がある。本課題に対して、本実施形態における処理を適用することによって、罫線とは関係しない関連情報を除いたうえで、罫線の特定処理ができるようになる。 As described above, when acquiring information related to a ruled-line candidate area, the association with ruled-line pixels included in the ruled-line candidate area is used to determine whether or not to adopt a part of a handwritten character as a ruled-line candidate. It is possible to reduce the possibility of extraction. For example, as exemplified using FIG. 8, if only some of the handwritten character pixels are focused on, they may have an elongated line shape and have characteristics similar to ruled lines. If related information having characteristics similar to ruled lines is integrated and the ruled line specifying process in S410 of FIG. By applying the processing of the present embodiment to this problem, it is possible to perform processing for specifying ruled lines after removing related information unrelated to the ruled lines.
(その他の実施形態)
本発明は、前述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by processing to It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.
111 システム制御部 111 system control unit
Claims (7)
前記非手書き文字画像および前記抽出した手書き文字に該当する画素に基づいて、前記手書き文字の画素の少なくとも一部を含んだ罫線判定用情報を生成する生成手段と、
前記生成手段により生成した罫線判定用情報から罫線画素を特定する特定手段と、
前記非手書き文字画像から前記特定手段により特定した罫線画素を除去する除去手段と、
を有する画像処理装置。 Extraction means for extracting pixels corresponding to handwritten characters from an image and obtaining a non-handwritten character image from which the extracted pixels are removed;
generating means for generating ruled line determination information including at least part of the pixels of the handwritten character based on the non-handwritten character image and the extracted pixels corresponding to the handwritten character;
specifying means for specifying ruled line pixels from the ruled line determination information generated by the generating means;
a removing means for removing the ruled line pixels identified by the identifying means from the non-handwritten character image;
An image processing device having
前記非手書き文字画像および前記抽出した手書き文字に該当する画素に基づいて、前記手書き文字の画素の少なくとも一部を含んだ罫線判定用情報を生成する生成工程と、
前記生成工程により生成した罫線判定用情報から罫線画素を特定する特定工程と、
前記非手書き文字画像から前記特定工程により特定した罫線画素を除去する除去工程と、
を有する画像処理装置の制御方法。 an extraction step of extracting pixels corresponding to handwritten characters from an image and obtaining a non-handwritten character image from which the extracted pixels are removed;
a generation step of generating ruled line determination information including at least a portion of the pixels of the handwritten character based on the non-handwritten character image and the extracted pixels corresponding to the handwritten character;
an identifying step of identifying ruled-line pixels from the ruled-line determination information generated in the generating step;
a removing step of removing ruled line pixels identified by the identifying step from the non-handwritten character image;
A control method for an image processing apparatus having
前記非手書き文字画像および前記抽出した手書き文字に該当する画素に基づいて、前記手書き文字の画素の少なくとも一部を含んだ罫線判定用情報を生成する生成工程と、
前記生成工程により生成した罫線判定用情報から罫線画素を特定する特定工程と、
前記非手書き文字画像から前記特定工程により特定した罫線画素を除去する除去工程と、
をコンピュータに実行させるためのプログラム。 an extraction step of extracting pixels corresponding to handwritten characters from an image and obtaining a non-handwritten character image from which the extracted pixels are removed;
a generation step of generating ruled line determination information including at least a portion of the pixels of the handwritten character based on the non-handwritten character image and the extracted pixels corresponding to the handwritten character;
an identifying step of identifying ruled-line pixels from the ruled-line determination information generated in the generating step;
a removing step of removing ruled line pixels identified by the identifying step from the non-handwritten character image;
A program that causes a computer to run
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021141259A JP2023034823A (en) | 2021-08-31 | 2021-08-31 | Image processing apparatus, and control method, and program for image processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021141259A JP2023034823A (en) | 2021-08-31 | 2021-08-31 | Image processing apparatus, and control method, and program for image processing apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2023034823A true JP2023034823A (en) | 2023-03-13 |
Family
ID=85504886
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021141259A Pending JP2023034823A (en) | 2021-08-31 | 2021-08-31 | Image processing apparatus, and control method, and program for image processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2023034823A (en) |
-
2021
- 2021-08-31 JP JP2021141259A patent/JP2023034823A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5410611A (en) | Method for identifying word bounding boxes in text | |
JP3904840B2 (en) | Ruled line extraction device for extracting ruled lines from multi-valued images | |
JP6080259B2 (en) | Character cutting device and character cutting method | |
JP5357612B2 (en) | Underline removal device | |
JP2001297303A (en) | Method and device for recognizing document image and computer readable recording medium | |
JP4100885B2 (en) | Form recognition apparatus, method, program, and storage medium | |
JP2001358925A (en) | Unit and method for image processing and recording medium | |
US7796817B2 (en) | Character recognition method, character recognition device, and computer product | |
JP2002288589A (en) | Image processing method, image processor and computer readable recording medium recording program for executing the image processing method by computer | |
JP2005148987A (en) | Object identifying method and device, program and recording medium | |
JP2000207489A (en) | Character extracting method and device and record medium | |
JP4049560B2 (en) | Halftone dot removal method and system | |
JP2002015280A (en) | Device and method for image recognition, and computer- readable recording medium with recorded image recognizing program | |
JP2023034823A (en) | Image processing apparatus, and control method, and program for image processing apparatus | |
JP2020047138A (en) | Information processing apparatus | |
JP4078045B2 (en) | Image processing apparatus, method, program, and storage medium | |
JP2020154449A (en) | Image processing system and program | |
JP2020087320A (en) | Image processing apparatus, image processing method and program | |
JP4204185B2 (en) | Character recognition device, character recognition method, and recording medium | |
JP2022054632A (en) | Program and device for recognizing license plate | |
JP2003123023A (en) | Character recognition method, character recognition device, character recognition program and recording medium having the program recorded thereon | |
JP3756660B2 (en) | Image recognition method, apparatus and recording medium | |
JP3566738B2 (en) | Shaded area processing method and shaded area processing apparatus | |
KR20220168787A (en) | Method to extract units of Manchu characters and system | |
JPH0535914A (en) | Picture inclination detection method |