JP7106672B2 - Image processing device, control method and control program - Google Patents
Image processing device, control method and control program Download PDFInfo
- Publication number
- JP7106672B2 JP7106672B2 JP2020554629A JP2020554629A JP7106672B2 JP 7106672 B2 JP7106672 B2 JP 7106672B2 JP 2020554629 A JP2020554629 A JP 2020554629A JP 2020554629 A JP2020554629 A JP 2020554629A JP 7106672 B2 JP7106672 B2 JP 7106672B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- brightness
- ruled
- region
- characters
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/10—Image acquisition
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Character Input (AREA)
Description
本開示は、画像処理装置、制御方法及び制御プログラムに関し、特に、低輝度背景上の高輝度文字を含む原稿の画像を処理する画像処理装置、制御方法及び制御プログラムに関する。 The present disclosure relates to an image processing apparatus, control method, and control program, and more particularly to an image processing apparatus, control method, and control program for processing an original image including high-brightness characters on a low-brightness background.
請求書等の帳票を担当者が手作業によりデータ化している会社では、膨大な数の帳票のデータ化が必要である場合に担当者の業務負担が大きくなるため、帳票のデータ化作業の効率化に対する要望が高まっている。帳票のデータ化作業の効率化を図るためには、帳票に記載されている文字をコンピュータが正しく認識する必要がある。このような帳票において、黒色等の輝度が低い低輝度背景上に、白色等の輝度が高い高輝度文字が配置されている場合がある。一般的に、OCR(Optical Character Recognition)ソフトウェアは、文字の輝度が背景の輝度よりも低いものとして、文字を認識する。そのため、そのような帳票を読み取った画像において、低輝度背景の領域の階調値と高輝度文字の領域の階調値との関係を逆転させてから、文字を認識することが望ましい。 In a company where the person in charge manually converts forms such as invoices into data, the work burden on the person in charge becomes large when it is necessary to convert a huge number of forms into data. There is a growing demand for In order to improve the efficiency of the form data conversion work, it is necessary for the computer to correctly recognize the characters written on the form. In such a form, high-brightness characters such as white may be placed on a low-brightness background such as black. In general, OCR (Optical Character Recognition) software recognizes characters as if the luminance of the characters is lower than the luminance of the background. Therefore, in an image obtained by reading such a form, it is desirable to reverse the relationship between the gradation values of the low-brightness background area and the gradation values of the high-brightness character area before recognizing the characters.
画像の白抜き文字部を検出して、検出された白抜き文字部を白黒反転し、反転された画像部分について、文字認識処理を行う文字認識装置が開示されている(特許文献1)。 A character recognition apparatus is disclosed that detects a white character portion of an image, reverses the detected white character portion, and performs character recognition processing on the reversed image portion (Patent Document 1).
低輝度背景上に高輝度文字が配置された帳票を撮像した画像において、低輝度背景の領域の階調値と高輝度文字の領域の階調値との関係を逆転させるためには、低輝度背景の領域を正しく特定する必要がある。特に、そのような帳票に罫線が含まれる場合、その帳票を撮像した画像において、低輝度背景の領域を正しく特定するためには、罫線の成分を良好に除去する必要がある。 In an image of a form in which high-brightness characters are arranged on a low-brightness background, in order to reverse the relationship between the gradation value of the low-brightness background area and the gradation value of the high-brightness character area, the low-brightness You need to correctly identify the background area. In particular, when such a form includes ruled lines, the components of the ruled lines must be removed satisfactorily in order to correctly identify the low-brightness background area in the captured image of the form.
画像処理装置、制御方法及び制御プログラムの目的は、低輝度背景と、低輝度背景上の高輝度文字と、罫線とを含む原稿の画像から文字を良好に検出することを可能とすることにある。 An object of an image processing apparatus, a control method, and a control program is to make it possible to satisfactorily detect characters from an image of a document including a low-luminance background, high-luminance characters on the low-luminance background, and ruled lines. .
実施形態の一側面に係る画像処理装置は、低輝度背景と、低輝度背景上の高輝度文字と、複数の罫線とを含む原稿を撮像した多値画像を取得する取得部と、多値画像を二値化した二値画像を生成する二値画像生成部と、二値画像から複数の罫線の成分を除去した罫線除去画像を生成する罫線除去画像生成部と、罫線除去画像内で黒色画素が連結する連結領域を検出する領域検出部と、領域検出部により検出された複数の連結領域の大きさの関係、複数の連結領域の位置の関係、又は、複数の連結領域の間の距離の内の少なくとも一つに基づいて、複数の連結領域を結合する結合部と、多値画像において、結合された連結領域に対応する領域内の低輝度背景領域の階調値と高輝度文字領域の階調値との関係を逆転させた逆転画像を生成する逆転画像生成部と、逆転画像から文字を検出する文字検出部と、検出された文字に関する情報を出力する出力部と、を有する。 An image processing apparatus according to an aspect of an embodiment includes an acquisition unit that acquires a multi-valued image of a document including a low-brightness background, high-brightness characters on the low-brightness background, and a plurality of ruled lines; , a ruled-line-removed image generation unit that generates a ruled-line-removed image by removing a plurality of ruled-line components from the binary image, and black pixels in the ruled-line-removed image. and the relationship between the sizes of the plurality of connected regions detected by the region detection unit, the relationship between the positions of the plurality of connected regions, or the distance between the plurality of connected regions and a combining unit that combines a plurality of connected regions based on at least one of: It has a reversed image generation unit that generates a reversed image with a reversed relationship with the gradation value, a character detection unit that detects characters from the reversed image, and an output unit that outputs information about the detected characters.
また、実施形態の一側面に係る制御方法は、出力部を有する画像処理装置の制御方法であって、画像処理装置が、低輝度背景と、低輝度背景上の高輝度文字と、複数の罫線とを含む原稿を撮像した多値画像を取得し、多値画像を二値化した二値画像を生成し、二値画像から複数の罫線の成分を除去した罫線除去画像を生成し、罫線除去画像内で黒色画素が連結する連結領域を検出し、検出された複数の連結領域の大きさの関係、複数の連結領域の位置の関係、又は、複数の連結領域の間の距離の内の少なくとも一つに基づいて、複数の連結領域を結合し、多値画像において、結合された連結領域に対応する領域内の低輝度背景領域の階調値と高輝度文字領域の階調値との関係を逆転させた逆転画像を生成し、逆転画像から文字を検出し、検出された文字に関する情報を出力部から出力することを含む。 A control method according to an aspect of the embodiment is a control method for an image processing apparatus having an output unit, wherein the image processing apparatus controls a low-brightness background, high-brightness characters on the low-brightness background, and a plurality of ruled lines. acquire a multivalued image of a document containing Detecting connected regions in which black pixels are connected in an image, and determining at least one of the size relationship of the detected connected regions, the positional relationship of the detected connected regions, or the distance between the detected connected regions Based on one, a plurality of connected regions are combined, and in a multilevel image, the relationship between the grayscale value of the low-luminance background region and the grayscale value of the high-luminance character region in the region corresponding to the combined connected region. generating a reversed image in which the is reversed; detecting characters from the reversed image; and outputting information about the detected characters from an output unit.
また、実施形態の一側面に係る制御プログラムは、出力部を有するコンピュータの制御プログラムであって、低輝度背景と、低輝度背景上の高輝度文字と、複数の罫線とを含む原稿を撮像した多値画像を取得し、多値画像を二値化した二値画像を生成し、二値画像から複数の罫線の成分を除去した罫線除去画像を生成し、罫線除去画像内で黒色画素が連結する連結領域を検出し、検出された複数の連結領域の大きさの関係、複数の連結領域の位置の関係、又は、複数の連結領域の間の距離の内の少なくとも一つに基づいて、複数の連結領域を結合し、多値画像において、結合部により結合された連結領域に対応する領域内の低輝度背景領域の階調値と高輝度文字領域の階調値との関係を逆転させた逆転画像を生成し、逆転画像から文字を検出し、検出された文字に関する情報を出力部から出力することをコンピュータに実行させる。 A control program according to one aspect of an embodiment is a control program for a computer having an output unit, and an image of a document including a low-brightness background, high-brightness characters on the low-brightness background, and a plurality of ruled lines is captured. Acquire a multi-valued image, generate a binary image by binarizing the multi-valued image, generate a ruled-line-removed image by removing multiple ruled-line components from the binary image, and connect black pixels in the ruled-line-removed image. based on at least one of the size relationship of the plurality of detected connected regions, the positional relationship of the plurality of connected regions, or the distance between the plurality of connected regions. , and reverses the relationship between the gradation values of the low-brightness background area and the gradation value of the high-brightness character area in the multivalued image corresponding to the connected areas joined by the joining part A computer is caused to generate a reversed image, detect characters from the reversed image, and output information about the detected characters from an output unit.
本実施形態によれば、画像処理装置、制御方法及び制御プログラムは、低輝度背景と、低輝度背景上の高輝度文字と、罫線とを含む原稿の画像から文字を良好に検出することが可能となる。 According to the present embodiment, the image processing apparatus, control method, and control program can satisfactorily detect characters from an image of a document including a low-luminance background, high-luminance characters on the low-luminance background, and ruled lines. becomes.
本発明の目的及び効果は、特に請求項において指摘される構成要素及び組み合わせを用いることによって認識され且つ得られるだろう。前述の一般的な説明及び後述の詳細な説明の両方は、例示的及び説明的なものであり、特許請求の範囲に記載されている本発明を制限するものではない。 The objects and advantages of the invention may be realized and obtained by means of the elements and combinations particularly pointed out in the claims. Both the foregoing general description and the following detailed description are exemplary and explanatory, and are not limiting of the invention as claimed.
以下、本開示の一側面に係る画像処理装置、制御方法及び制御プログラムについて図を参照しつつ説明する。但し、本発明の技術的範囲はそれらの実施の形態に限定されず、特許請求の範囲に記載された発明とその均等物に及ぶ点に留意されたい。 An image processing apparatus, a control method, and a control program according to one aspect of the present disclosure will be described below with reference to the drawings. However, it should be noted that the technical scope of the present invention is not limited to those embodiments, but extends to the invention described in the claims and equivalents thereof.
図1は、実施形態に従った画像処理システムの概略構成を示す図である。図1に示すように、画像処理システム1は、画像読取装置100と、情報処理装置200とを有する。
FIG. 1 is a diagram showing a schematic configuration of an image processing system according to an embodiment. As shown in FIG. 1, the
画像読取装置100は、例えばスキャナ装置等である。画像読取装置100は、情報処理装置200に接続されている。情報処理装置200は、画像処理装置の一例であり、例えばパーソナルコンピュータ等である。
The image reading device 100 is, for example, a scanner device. The image reading device 100 is connected to the
画像読取装置100は、第1インタフェース装置101と、撮像装置102と、第1記憶装置110と、第1CPU(Control Processing Unit)120とを有する。
The image reading device 100 has a
第1インタフェース装置101は、USB(Universal Serial Bus)等のシリアルバスに準じるインタフェース回路を有し、情報処理装置200と電気的に接続して画像データ及び各種の情報を送受信する。また、第1インタフェース装置101の代わりに、無線信号を送受信するアンテナと、所定の通信プロトコルに従って、無線通信回線を通じて信号の送受信を行うための無線通信インタフェース回路とを有する通信装置が用いられてもよい。所定の通信プロトコルは、例えば無線LAN(Local Area Network)である。
The
撮像装置102は、主走査方向に直線状に配列されたCCD(Charge Coupled Device)による撮像素子を備える縮小光学系タイプの撮像センサを有する。さらに、撮像装置102は、光を照射する光源と、撮像素子上に像を結ぶレンズと、撮像素子から出力された電気信号を増幅してアナログ/デジタル(A/D)変換するA/D変換器とを有する。撮像装置102において、撮像センサは、搬送される原稿の表面を撮像してアナログの画像信号を生成して出力し、A/D変換器は、このアナログの画像信号をA/D変換してデジタルの入力画像を生成して出力する。入力画像は、各画素データが、例えばRGB各色毎に8bitで表される計24bitのR(赤色)値、G(緑色)値、B(青色)値からなるカラー多値画像である。なお、CCDの代わりにCMOS(Complementary Metal Oxide Semiconductor)による撮像素子を備える等倍光学系タイプのCIS(Contact Image Sensor)が用いられてもよい。
The
第1記憶装置110は、RAM(Random Access Memory)、ROM(Read Only Memory)等のメモリ装置、ハードディスク等の固定ディスク装置、又はフレキシブルディスク、光ディスク等の可搬用の記憶装置等を有する。また、第1記憶装置110には、画像読取装置100の各種処理に用いられるコンピュータプログラム、データベース、テーブル等が格納される。コンピュータプログラムは、コンピュータ読み取り可能な可搬型記録媒体から公知のセットアッププログラム等を用いて第1記憶装置110にインストールされてもよい。可搬型記録媒体は、例えばCD-ROM(compact disk read only memory)、DVD-ROM(digital versatile disk read only memory)等である。また、第1記憶装置110は、撮像装置102により生成された入力画像等を記憶する。
The
第1CPU120は、予め第1記憶装置110に記憶されているプログラムに基づいて動作する。なお、第1CPU120に代えて、DSP(digital signal processor)、LSI(large scale integration)等が用いられてよい。また、第1CPU120に代えて、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programming Gate Array)等が用いられてもよい。
The
第1CPU120は、第1インタフェース装置101、撮像装置102及び第1記憶装置110等と接続され、これらの各部を制御する。第1CPU120は、撮像装置102の原稿読取制御、第1インタフェース装置101を介した情報処理装置200とのデータ送受信制御等を行う。
The
情報処理装置200は、第2インタフェース装置201と、入力装置202と、表示装置203と、第2記憶装置210と、第2CPU220と、処理装置230とを有する。以下、情報処理装置200の各部について詳細に説明する。
The
第2インタフェース装置201は、画像読取装置100の第1インタフェース装置101と同様のインタフェース回路を有し、情報処理装置200と画像読取装置100とを接続する。また、第2インタフェース装置201の代わりに、無線信号を送受信するアンテナと、無線LAN等の所定の通信プロトコルに従って、無線通信回線を通じて信号の送受信を行うための無線通信インタフェース回路とを有する通信装置が用いられてもよい。
The
入力装置202は、キーボード、マウス等の入力装置及び入力装置から信号を取得するインタフェース回路を有し、利用者の操作に応じた信号を第2CPU220に出力する。
The
表示装置203は、出力部の一例である。表示装置203は、液晶、有機EL等から構成されるディスプレイ及びディスプレイに画像データを出力するインタフェース回路を有し、第2記憶装置210と接続されて第2記憶装置210に保存されている画像データをディスプレイに表示する。
The
第2記憶装置210は、画像読取装置100の第1記憶装置110と同様のメモリ装置、固定ディスク装置、可搬用の記憶装置等を有する。第2記憶装置210には、情報処理装置200の各種処理に用いられるコンピュータプログラム、データベース、テーブル等が格納される。コンピュータプログラムは、例えばCD-ROM、DVD-ROM等のコンピュータ読み取り可能な可搬型記録媒体から、公知のセットアッププログラム等を用いて第2記憶装置210にインストールされてもよい。また、第2記憶装置210は、画像読取装置100から受信した入力画像、及び、処理装置230により入力画像に対して画像処理がなされた各種の処理画像等を記憶する。
The
第2CPU220は、予め第2記憶装置210に記憶されているプログラムに基づいて動作する。なお、第2CPU220に代えて、DSP、LSI、ASIC、FPGA等が用いられてもよい。
The
第2CPU220は、第2インタフェース装置201、入力装置202、表示装置203、第2記憶装置210及び処理装置230等と接続され、これらの各部を制御する。第2CPU220は、第2インタフェース装置201を介した画像読取装置100とのデータ送受信制御、入力装置202の入力制御、表示装置203の表示制御、処理装置230による画像処理の制御等を行う。
The
処理装置230は、入力画像に対して所定の画像処理を実行する。処理装置230は、CPU、DSP、LSI、ASIC又はFPGA等で構成される。
The
図2は、第2記憶装置210及び第2CPU220の概略構成を示す図である。
FIG. 2 is a diagram showing a schematic configuration of the
図2に示すように第2記憶装置210には、取得プログラム211、二値画像生成プログラム212、罫線除去画像生成プログラム213、領域検出プログラム214、結合プログラム215、逆転画像生成プログラム216、逆転二値画像生成プログラム217、文字検出プログラム218及び出力制御プログラム219等の各プログラムが記憶される。これらの各プログラムは、プロセッサ上で動作するソフトウェアにより実装される機能モジュールである。第2CPU220は、第2記憶装置210に記憶された各プログラムを読み取り、読み取った各プログラムに従って動作する。これにより、第2CPU220は、取得部221、二値画像生成部222、罫線除去画像生成部223、領域検出部224、結合部225、逆転画像生成部226、逆転二値画像生成部227、文字検出部228及び出力制御部229として機能する。
As shown in FIG. 2, the
図3は、画像読取装置100による画像読取処理の動作を示すフローチャートである。以下、図3に示したフローチャートを参照しつつ、画像読取処理の動作を説明する。なお、以下に説明する動作のフローは、予め第1記憶装置110に記憶されているプログラムに基づき主に第1CPU120により画像読取装置100の各要素と協働して実行される。
FIG. 3 is a flowchart showing the operation of image reading processing by the image reading apparatus 100. As shown in FIG. The operation of the image reading process will be described below with reference to the flowchart shown in FIG. The operation flow described below is executed mainly by the
最初に、撮像装置102は、原稿として、請求書等の帳票を撮像した入力画像を生成し、第1記憶装置110に保存する(ステップS101)。
First, the
この原稿には、少なくとも、黒色等の輝度が低い低輝度背景と、低輝度背景上に配置された、白色等の輝度が高い高輝度文字と、複数の罫線とが含まれている。低輝度背景の輝度は所定輝度より低く、高輝度文字の輝度は低輝度背景の輝度より高い。即ち、入力画像において、低輝度背景領域の輝度値は所定輝度値(例えば128)より低く、高輝度文字領域の輝度値は低輝度背景領域の輝度値より高い。また、罫線の輝度は、低輝度背景の輝度と同様に、高輝度文字の輝度より低く、入力画像において、罫線領域の輝度値は、所定輝度値より低く、且つ、高輝度文字領域の輝度値より低い。 This document includes at least a low-brightness background such as black, high-brightness characters such as white placed on the low-brightness background, and a plurality of ruled lines. The brightness of the low-brightness background is lower than the predetermined brightness, and the brightness of the high-brightness characters is higher than the brightness of the low-brightness background. That is, in the input image, the brightness value of the low-brightness background area is lower than a predetermined brightness value (eg, 128), and the brightness value of the high-brightness character area is higher than the brightness value of the low-brightness background area. Similarly to the luminance of the low-luminance background, the luminance of the ruled lines is lower than the luminance of the high-luminance characters. Lower.
この原稿には、さらに、白色等の輝度が高い高輝度背景と、高輝度背景上に配置された、黒色等の輝度が低い低輝度文字とが含まれていてもよい。高輝度背景の輝度は所定輝度より高く、低輝度文字の輝度は高輝度背景の輝度より低い。即ち、入力画像において、高輝度背景領域の輝度値は所定輝度値より高く、低輝度文字領域の輝度値は高輝度背景領域の輝度値より高い。 The document may further include a high-brightness background, such as white, and low-brightness characters, such as black, placed on the high-brightness background. The brightness of the high-brightness background is higher than the predetermined brightness, and the brightness of the low-brightness characters is lower than the brightness of the high-brightness background. That is, in the input image, the brightness value of the high-brightness background area is higher than the predetermined brightness value, and the brightness value of the low-brightness character area is higher than the brightness value of the high-brightness background area.
次に、第1CPU120は、第1記憶装置110に保存された入力画像を第1インタフェース装置101を介して情報処理装置200に送信し(ステップS102)、一連のステップを終了する。
Next, the
図4は、情報処理装置200による認識処理の動作を示すフローチャートである。以下、図4に示したフローチャートを参照しつつ、認識処理の動作を説明する。なお、以下に説明する動作のフローは、予め第2記憶装置210に記憶されているプログラムに基づき主に処理装置230により情報処理装置200の各要素と協同して実行される。
FIG. 4 is a flow chart showing the operation of recognition processing by the
最初に、取得部221は、入力画像を多値画像として第2インタフェース装置201を介して画像読取装置100から取得し、第2記憶装置210に保存する(ステップS201)。なお、取得部221は、カラー多値画像である入力画像から、白黒の多値画像を生成し、多値画像として取得してもよい。その場合、取得部221は、入力画像内の各画素毎に、以下の式に従って輝度値を算出し、算出した輝度値を各画素に対応する画素の階調値とする白黒多値画像を生成する。
輝度値=0.299×(R値)+0.587×(G値)+0.114×(B値)First, the
Luminance value = 0.299 x (R value) + 0.587 x (G value) + 0.114 x (B value)
図5Aは、多値画像500の一例を示す模式図である。
FIG. 5A is a schematic diagram showing an example of a
図5Aに示すように、多値画像500には、高輝度背景領域501と、低輝度文字領域502と、低輝度背景領域503と、高輝度文字領域504と、複数の罫線領域505とが含まれる。高輝度背景領域501は、白色を有し且つ高い輝度を有する。低輝度文字領域502は、黒色を有し且つ高輝度背景領域501が有する輝度より低い輝度を有し、高輝度背景領域501上に配置されている。低輝度背景領域503は、黒色を有し且つ低い輝度を有する。高輝度文字領域504は、白色を有し且つ低輝度背景領域503が有する輝度より高い輝度を有し、低輝度背景領域503上に配置されている。罫線領域505は、黒色を有し且つ低い輝度を有し、低輝度背景領域503と連なっている。低輝度文字502領域及び高輝度文字領域504の少なくとも一部は、罫線領域505で囲まれる範囲内に配置されている。
As shown in FIG. 5A, a
次に、二値画像生成部222は、取得した多値画像を二値化した二値画像を生成する(ステップS202)。二値画像生成部222は、多値画像内で階調値が第1閾値以上である画素を白色画素とし、階調値が第1閾値未満である画素を黒色画素とした画像を二値画像として生成する。第1閾値は、事前の実験により、一般的な背景を形成する画素の階調値と文字を形成する画素の階調値の間の値に設定される。これにより、二値画像では、多値画像内の低輝度文字、低輝度背景及び罫線に対応する画素が黒色画素となり、高輝度背景及び高輝度文字に対応する画素が白色画素となる。
Next, the
なお、第1閾値は、大津の二値化処理により決定されてもよい。一般に、帳票毎に低輝度背景及び高輝度文字の輝度は異なる。情報処理装置200は、大津の二値化処理により第1閾値を決定することにより、多値画像において、低輝度背景の輝度と、高輝度文字の輝度とがどのような関係を有していても、低輝度背景と高輝度文字とを良好に識別することが可能となる。
Note that the first threshold may be determined by Otsu's binarization process. In general, the brightness of the low-brightness background and high-brightness characters differs for each form. The
図5Bは、二値画像510の一例を示す模式図である。
FIG. 5B is a schematic diagram showing an example of a
図5Bは、図5Aに示す多値画像500を二値化した二値画像510を示す。図5Bに示すように、二値画像510において、高輝度背景領域501に対応する領域511の画素と、高輝度文字領域504に対応する領域514の画素は、白色画素である。一方、二値画像510において、低輝度文字領域502に対応する領域512の画素と、低輝度背景領域503に対応する領域513の画素と、罫線領域505に対応する領域515の画素とは、黒色画素である。
FIG. 5B shows a
次に、罫線除去画像生成部223は、二値画像において、二値画像内で黒色画素が連結する第1連結領域の内、水平及び垂直方向の長さが第2閾値未満の領域を白色画素に変換することにより、二値画像から低輝度文字の成分を除去する(ステップS203)。
Next, in the binary image, the ruled-line-removed
罫線除去画像生成部223は、ラベリングにより、二値画像内で黒色画素をグループ化することにより、第1連結領域を特定する。罫線除去画像生成部223は、特定した各第1連結領域の内、水平方向の長さ及び垂直方向の長さが第2閾値未満である第1連結領域を除去対象領域として抽出する。第2閾値は、一般的な帳票で使用される文字の水平及び垂直方向の最大の長さ(例えば40ポイント)に相当する画像上の長さに設定される。なお、第1連結領域の水平方向の長さと比較する第2閾値と、垂直方向の長さと比較する第2閾値は、それぞれ異なる値に設定されてもよい。罫線除去画像生成部223は、二値画像において、抽出した各除去対象領域(黒色画素)を白色画素に変換する。
The ruled-line-removed
図6Aは、低輝度文字の成分が除去された二値画像600の一例を示す模式図である。
FIG. 6A is a schematic diagram showing an example of a
図6Aに示す二値画像600は、図5Bに示す二値画像510から低輝度文字の成分が除去された画像である。図6Aに示すように、二値画像600では、低輝度背景領域503に対応する領域603の画素、及び、罫線領域505に対応する領域605の画素のみが黒色画素として残っている。一方、二値画像600では、低輝度文字領域502に対応する領域602の画素は白色画素に変換されている。
A
次に、罫線除去画像生成部223は、二値画像から複数の罫線の成分を除去した罫線除去画像を生成する(ステップS204)。罫線除去画像生成部223は、低輝度文字の成分が除去された二値画像に残っている第1連結領域内の、水平又は垂直方向の長さが所定値以下である部分を白色画素に変換することにより、罫線除去画像を生成する。所定値は、例えば一般的な帳票で使用される罫線の最大幅(例えば3ポイント)に相当する画像上の長さに設定される。例えば、罫線除去画像生成部223は、第1連結領域内の各黒色画素から所定値の長さの範囲内に白色画素が存在する場合、その黒色画素を白色画素に変換することにより、白色画素を膨張させる。罫線除去画像生成部223は、二値画像内の白色画素を膨張させることにより、効率良く罫線成分を除去することができ、罫線除去画像の生成処理における処理負荷を低減させることができる。
Next, the ruled-line-removed
なお、罫線除去画像生成部223は、各第1連結領域から、水平又は垂直方向の長さが所定値以下である部分を抽出し、抽出した各部分を白色画素に変換することにより、罫線除去画像を生成してもよい。
Note that the ruled-line-removed
図6Bは、罫線除去画像610の一例を示す模式図である。
FIG. 6B is a schematic diagram showing an example of a ruled line removed
図6Bに示す罫線除去画像610は、図6Aに示す二値画像600から罫線の成分が除去された画像である。図6Bに示すように、罫線除去画像610では、低輝度背景領域503に対応する領域613の画素のみが黒色画素として残り、罫線領域505に対応する領域615の画素は、わずかな領域616の画素を除いて、白色画素に変換されている。罫線除去画像610では、高輝度背景領域に対応する領域とともに、高輝度文字領域504に対応する領域614も膨張している。特に、罫線除去画像610では、高輝度文字領域に対応する領域617が膨張していることにより、低輝度背景領域に対応する領域618と領域619とが分離している。
A ruled-line-removed
次に、罫線除去画像生成部223は、生成した罫線除去画像からノイズ成分を除去する(ステップS205)。
Next, the ruled-line-removed
例えば、罫線除去画像生成部223は、罫線除去画像において、水平又は垂直方向に連続する長さが所定画素数(例えば2画素)以下である黒色画素をノイズ成分として抽出し、白色画素に変換することにより除去する。これにより、罫線除去画像生成部223は、罫線除去画像において、わずかに残った罫線の成分を除去することができる。
For example, the ruled-line-removed
また、罫線除去画像生成部223は、罫線除去画像において黒色画素が連結する領域の内、水平又は垂直方向の長さが所定長さ(例えば5ポイントに相当する長さ)以下である領域をノイズ成分として抽出し、白色画素に変換することにより除去してもよい。これによっても、罫線除去画像生成部223は、罫線除去画像において、わずかに残った罫線の成分を除去することができる。
In addition, the ruled-line-removed
また、罫線除去画像生成部223は、罫線除去画像において黒色画素が連結する領域の内、その領域で囲まれた領域の全画素数に対する黒色画素数の割合が所定割合未満である領域をノイズ成分として抽出し、白色画素に変換することにより除去してもよい。所定割合は、例えば一般に使用される印鑑における文字又は文様部分の割合の最大値(例えば33%)に設定される。これにより、罫線除去画像生成部223は、罫線除去画像において、印鑑等の成分を除去することができる。
In addition, the ruled-line-removed
図7Aは、ノイズ成分が除去された罫線除去画像700の一例を示す模式図である。
FIG. 7A is a schematic diagram showing an example of a ruled-line-removed
図7Aに示す罫線除去画像700は、図6Bに示す罫線除去画像610からノイズ成分が除去された画像である。図7Aに示すように、罫線除去画像700では、低輝度背景領域503に対応する領域703の画素のみが黒色画素として残り、罫線領域505に対応する領域706の画素は全て白色画素に変換されている。
A ruled-line-removed
次に、領域検出部224は、罫線除去画像内で黒色画素が連結する第2連結領域を検出する(ステップS206)。以下では、第2連結領域を単に連結領域と称する。罫線除去画像生成部223は、ラベリングにより、ノイズ成分が除去された罫線除去画像内で黒色画素をグループ化することにより、連結領域を検出する。
Next, the
次に、結合部225は、領域検出部224により検出された複数の連結領域を結合する(ステップS207)。結合部225は、各連結領域の大きさの関係、各連結領域の位置の関係、又は、各連結領域の間の距離の内の少なくとも一つに基づいて、各連結領域を結合する。
Next, the combining
結合部225は、検出された連結領域の内の二つの連結領域に係る全ての組合せを抽出する。結合部225は、抽出した組合せ毎に、各組合せに係る二つの連結領域が所定条件を満たすか否かを判定する。所定条件の内の第1条件は、所定方向において二つの連結領域の長さの差が所定差(例えば2画素)以下であることである。所定条件の内の第2条件は、所定方向において二つの連結領域の中心位置の間の距離が第1所定距離(例えば2画素)以下であることである。所定条件の内の第3条件は、所定方向と直交する方向において二つの連結領域が重複せず且つ二つの連結領域の間の距離が第2所定距離(例えば3画素)以下であることである。所定方向は水平方向及び/又は垂直方向であり、所定方向が水平方向である場合、所定方向と直交する方向は垂直方向であり、所定方向が垂直方向である場合、所定方向と直交する方向は水平方向である。所定条件は、第1条件、第2条件及び第3条件の内の任意の一つの条件又は二つの条件でもよい。
The
連結領域は、連結領域内の高輝度文字領域が膨張することにより二つの連結領域に分割する可能性があり、その場合、二つの連結領域の間の距離は、連結領域内の文字のサイズ以下となる可能性が高い。そのため、第2所定距離は、例えば一般的な帳票で使用される文字の水平及び垂直方向の最小の長さ(例えば40ポイント)に相当する画像上の長さに設定される。なお、所定方向における連結領域の長さ(連結領域の幅)は、連結領域内の高輝度文字領域の一辺より大きいため、第2所定距離は、所定方向における連結領域の長さに設定されてもよい。 A concatenated region may be split into two concatenated regions by dilating a bright character region within the concatenated region, in which case the distance between the two concatenated regions is less than or equal to the size of the characters in the concatenated region. is likely to be Therefore, the second predetermined distance is set, for example, to a length on the image corresponding to the minimum horizontal and vertical lengths (eg, 40 points) of characters used in general forms. Since the length of the connected area in the predetermined direction (the width of the connected area) is greater than one side of the high-brightness character area in the connected area, the second predetermined distance is set to the length of the connected area in the predetermined direction. good too.
図7Aに示す例では、垂直方向において連結領域708の長さL1と連結領域708の長さL2の差は十分に小さいため、連結領域708と連結領域709は第1条件を満たす。また、垂直方向において連結領域708の中心位置P1と連結領域709の中心位置P2の間の距離は十分に小さいため、連結領域708と連結領域709は第2条件を満たす。また、水平方向において連結領域708と連結領域709は重複せず且つ連結領域708と連結領域709の間の距離D1は十分に小さいため、連結領域708と連結領域709は第3条件を満たす。そのため、連結領域708と連結領域709は結合される。
In the example shown in FIG. 7A, the difference between the length L1 of the
一方、垂直方向において連結領域708の長さL1と連結領域710の長さL3の差は十分に小さいため、連結領域708と連結領域710は第1条件を満たす。しかしながら、垂直方向において連結領域708の中心位置P1と連結領域710の中心位置P3の間の距離は十分に大きいため、連結領域708と連結領域710は第2条件を満たさない。また、水平方向において連結領域708と連結領域710は重複しているため、連結領域708と連結領域710は第3条件も満たさない。
On the other hand, since the difference between the length L1 of the
また、水平方向において連結領域708の長さL4と連結領域710の長さL5の差は十分に大きいため、連結領域708と連結領域710は第1条件を満たさない。また、水平方向において連結領域708の中心位置P4と連結領域710の中心位置P5の間の距離は十分に大きいため、連結領域708と連結領域710は第2条件も満たさない。また、垂直方向において連結領域708と連結領域710の間の距離D2は十分に大きいため、連結領域708と連結領域710は第3条件も満たさない。そのため、連結領域708と連結領域710は結合されない。
Also, since the difference between the length L4 of the
結合部225は、所定の条件を満たす組合せが存在する場合、その組合せに係る二つの連結領域を結合する。なお、結合部225は、特定の連結領域に対して、所定の条件を満たす組合せが複数存在する場合、特定の連結領域と、所定の条件を満たす組合せに係る全ての連結領域とを結合する。
If there is a combination that satisfies a predetermined condition, the joining
結合部225は、結合対象の二つの連結領域に含まれる黒色画素に対応する画素のみを有効画素とする画像内で、各画素から第3所定距離内に有効画素が存在する場合、その画素を有効画素に変換することにより、有効画素を膨張させる。第3所定距離は、例えば上記の第3条件で設定された第2所定距離と同じ距離に設定される。また、結合部225は、その画像内で、各有効画素から第3所定距離内に無効画素が存在する場合、その画素を無効画素に変換することにより、有効画素を収縮させる。そして、結合部225は、その画像内の有効画素に対応する罫線除去画像内の白色画素を黒色画素に変換することにより、二つの連結領域を結合する。
If there is an effective pixel within a third predetermined distance from each pixel in an image in which only pixels corresponding to black pixels included in two connected regions to be combined are effective pixels, the combining
なお、結合部225は、結合対象の二つの連結領域を包含する外接矩形で囲まれた領域の全ての白色画素を黒色画素に変換することにより、二つの連結領域を結合してもよい。
Note that the combining
さらに、結合部225は、全ての連結領域内の白色画素を黒色画素に変換する。結合部225は、全ての連結領域について、各連結領域に含まれる黒色画素に対応する画素のみを有効画素とする画像内で、各画素から第4所定距離内に有効画素が存在する場合、その画素を有効画素に変換することにより、有効画素を膨張させる。第4所定距離は、一般的な帳票で使用される文字の水平又は垂直方向の最大の長さ(例えば40ポイント)に相当する画像上の長さに設定される。また、結合部225は、その画像内で、各有効画素から第4所定距離内に無効画素が存在する場合、その画素を無効画素に変換することにより、有効画素を収縮させる。そして、結合部225は、その画像内の有効画素に対応する罫線除去画像内の白色画素を黒色画素に変換することにより、連結領域内の白色画素を黒色画素に変換する。
In addition,
なお、結合部225は、各連結領域を包含する外接矩形で囲まれた領域の全ての白色画素を黒色画素に変換することにより、連結領域内の白色画素を黒色画素に変換してもよい。
Note that the combining
図7Bは、連結領域が結合された罫線除去画像720の一例を示す模式図である。
FIG. 7B is a schematic diagram showing an example of a ruled-line-removed
図7Bに示す罫線除去画像720は、図7Aに示す罫線除去画像700において連結領域が結合された画像である。図7Bに示すように、罫線除去画像720では、罫線除去画像700の連結領域708と連結領域709が結合されるとともに、連結領域708及び連結領域709内の白色画素が黒色画素に変換されて、連結領域721が形成されている。また、罫線除去画像700の連結領域710は他の連結領域と結合されていないが、罫線除去画像720では、連結領域710内の白色画素が黒色画素に変換されて、連結領域722が形成されている。
A ruled-line-removed
次に、逆転画像生成部226は、多値画像において、連結領域に対応し、且つ、所定サイズ以上である高輝度文字が含まれる領域を、低輝度背景領域の階調値と高輝度文字領域の階調値との関係を逆転させる反転対象領域として抽出する(ステップS208)。この連結領域は、ステップS207において、内部の白色画素が黒色画素に変換された領域であり、結合部225により結合された連結領域、及び、結合部225により結合されていない連結領域の両方を含む。
Next, the reversed
まず、逆転画像生成部226は、多値画像において、罫線除去画像の各連結領域に対応する対応領域内の画素の階調値を、階調範囲の最大値から各画素の階調値を減算した減算値に変換することにより反転させた変換画像を生成する。次に、逆転画像生成部226は、変換画像を二値化した変換二値画像を生成する。逆転画像生成部226は、二値画像生成部222と同様にして、変換画像内で階調値が第1閾値以上である画素を白色画素とし、階調値が第1閾値未満である画素を黒色画素とした画像を変換二値画像として生成する。
First, the reversed
次に、逆転画像生成部226は、変換二値画像において、各対応領域に対応する第2対応領域毎に、ラベリングにより、各第2対応領域内で黒色画素をグループ化することにより、黒色画素が連結する第3連結領域を特定する。逆転画像生成部226は、各第2対応領域毎に、水平方向の長さ及び/又は垂直方向の長さが第3閾値以上である第3連結領域が含まれるか否かを判定する。第3閾値は、一般的な帳票で使用される文字の水平及び垂直方向の最小の長さ(例えば8ポイント)に相当する画像上の長さに設定される。なお、第3連結領域の水平方向の長さと比較する第3閾値と、垂直方向の長さと比較する第3閾値は、それぞれ異なる値に設定されてもよい。逆転画像生成部226は、水平方向の長さ及び/又は垂直方向の長さが第3閾値以上である第3連結領域を、所定サイズ以上である高輝度文字に対応する領域とみなす。逆転画像生成部226は、水平方向の長さ及び/又は垂直方向の長さが第3閾値以上である第3連結領域が含まれる第2対応領域に対応する多値画像の対応領域を、反転対象領域として抽出する。
Next, the reversed
次に、逆転画像生成部226は、多値画像において、各反転対象領域内の低輝度背景領域の階調値と高輝度文字領域の階調値との関係を逆転させた逆転画像を生成する(ステップS209)。逆転画像生成部226は、多値画像において、各反転対象領域内の各画素の階調値を、階調範囲の最大値から各画素の階調値を減算した減算値に変換することにより反転させて、逆転画像を生成する。
Next, the reversed
図8Aは、逆転画像800の一例を示す模式図である。
FIG. 8A is a schematic diagram showing an example of a reversed
図8Aに示す逆転画像800は、図5Aに示す多値画像500から生成された画像である。図8Aに示すように、逆転画像800では、低輝度背景領域503に対応する領域803の階調値と、高輝度文字領域504に対応する領域804の階調値との関係が逆転している。即ち、逆転画像800では、高輝度背景領域501に対応する領域801、低輝度文字領域502に対応する領域802、及び、罫線領域505に対応する領域805の階調値は、多値画像500に対して変化していない。一方、逆転画像800では、低輝度背景領域503に対応する領域803、及び、高輝度文字領域504に対応する領域804は、領域804の輝度値が領域803の輝度値より低くなるように変化している。
A reversed
また上記したように、逆転画像生成部226は、多値画像において、連結領域に対応する領域内に、所定サイズ以上である高輝度文字が含まれる場合に限り、その対応する領域内の低輝度背景領域の階調値と高輝度文字領域の階調値との関係を逆転させる。各連結領域において、背景は低輝度を有すると推定されるが、背景が濃い灰色を有し且つ文字が黒色を有する場合のように、各連結領域において、文字が背景よりさらに低輝度を有する可能性がある。逆転画像生成部226は、所定サイズ以上である高輝度文字が含まれる対応領域のみを反転対象領域として抽出することにより、白色を有する文字、即ち背景より高輝度を有する文字が含まれる対応領域のみを反転対象領域として抽出する。これにより、逆転画像生成部226は、文字が背景より低輝度を有する領域において、背景の階調値と文字の階調値との関係を逆転させることを防止することが可能となる。
In addition, as described above, the reversed
次に、逆転二値画像生成部227は、逆転画像を二値化した逆転二値画像を生成する(ステップS210)。逆転二値画像生成部227は、二値画像生成部222と同様に、逆転画像内で階調値が第1閾値以上である画素を白色画素とし、階調値が第1閾値未満である画素を黒色画素とした画像を逆転二値画像として生成する。逆転二値画像では、逆転画像内の文字及び罫線に対応する画素が黒色画素となり、背景に対応する画素が白色画素となる。
Next, the reversed
図8Bは、逆転二値画像810の一例を示す模式図である。
FIG. 8B is a schematic diagram showing an example of an inverted
図8Bは、図8Aに示す逆転画像800を二値化した逆転二値画像810を示す。図8Bに示すように、逆転二値画像810において、多値画像500の高輝度背景領域501に対応する領域811の画素と、低輝度背景領域503に対応する領域813の画素とは、白色画素である。一方、逆転二値画像810において、低輝度文字領域502に対応する領域812の画素と、高輝度文字領域504に対応する領域814の画素と、罫線領域505に対応する領域815の画素とは、黒色画素である。
FIG. 8B shows an inverted
次に、文字検出部228は、逆転画像から生成された逆転二値画像から文字を検出する(ステップS211)。文字検出部228は、公知のOCR(Optical Character Recognition)技術を利用して、逆転二値画像から文字を検出する。
Next, the
次に、出力制御部229は、検出された文字を表示装置203に表示し(ステップS212)、一連のステップを終了する。なお、出力制御部229は、検出された文字に関する情報として、検出された文字に代えて又は加えて、逆転画像又は逆転二値画像を表示装置203に表示してもよい。また、出力制御部229は、検出された文字、逆転画像又は逆転二値画像を不図示の通信装置を介して不図示のサーバ等に送信してもよい。このように、出力制御部229は、検出された文字に関する情報を出力する。
Next, the
なお、罫線除去画像生成部223は、ステップS203の処理を省略し、ステップS204において、ステップS202で生成された二値画像から罫線除去画像を生成してもよい。また、罫線除去画像生成部223は、ステップS205の処理を省略し、領域検出部224は、ステップS206において、ステップS204で生成された罫線除去画像から連結領域を検出してもよい。また、逆転画像生成部226は、ステップS208の処理を省略し、ステップS209において、多値画像における全ての連結領域内の低輝度背景領域の階調値と高輝度文字領域の階調値との関係を逆転させることにより逆転画像を生成してもよい。また、逆転二値画像生成部227は、ステップS210の処理を省略し、文字検出部228は、ステップS211において、逆転画像から文字を検出してもよい。
Note that the ruled-line-removed
以上詳述したように、図5に示したフローチャートに従って動作することによって、情報処理装置200は、低輝度背景と、低輝度背景上の高輝度文字と、罫線とを含む原稿の画像から文字を良好に検出することが可能となった。
As described in detail above, by operating according to the flowchart shown in FIG. 5, the
情報処理装置200は、罫線成分、特に低輝度背景領域と連なる罫線成分を除去することにより、低輝度背景領域を良好に特定することが可能となった。また、情報処理装置200は、罫線成分を除去する際に膨張した高輝度文字領域によって分断された低輝度背景領域を再結合することにより、低輝度背景領域を誤って特定することを抑制することが可能となった。情報処理装置200は、低輝度背景領域を良好に特定することにより、低輝度背景領域の階調値と高輝度文字領域の階調値を良好に反転させることが可能となった。
The
一般に、帳票には、様々な濃度を有する文字が含まれている可能性がある。文字認識処理において、様々な濃度を有する各文字を認識可能にするためには、文字認識処理の対象とする二値画像において、各文字に対応する画素が黒色画素に変換されている必要がある。そのため、二値画像は、画像内の各画素がより黒色画素に変換され易くなるように生成されることが好ましい。しかし、そのように生成された二値画像では、白色文字の一部も黒色画素に変換される可能性があり、そのように生成された二値画像から白色文字を検出するために二値画像内の白色画素と黒色画素の関係を逆転させると、白色文字が掠れてしまう可能性が高い。情報処理装置200は、多値画像を二値化してから階調値を反転させるのでなく、多値画像から逆転画像を生成してから逆転二値画像を生成することにより、逆転二値画像において文字が掠れてしまうことを防止することが可能となった。
In general, a form may contain characters with various densities. In character recognition processing, in order to be able to recognize each character with various densities, pixels corresponding to each character must be converted to black pixels in the binary image to be subjected to character recognition processing. . Therefore, binary images are preferably generated such that each pixel in the image is more likely to be converted to a black pixel. However, in the binary image so generated, some of the white characters may also be converted to black pixels. If the relationship between the white pixels and the black pixels inside is reversed, there is a high possibility that the white characters will be blurred. The
また、一般に、汎用的なOCRソフトウェアは、高輝度背景上に配置された低輝度文字を検出するように構成されている。情報処理装置200は、低輝度背景領域と高輝度文字領域の階調値を反転させることにより、低輝度背景上の高輝度文字を含む原稿の画像から、高輝度背景上に配置された低輝度文字を検出するように構成されたOCRソフトウェアを用いて文字を検出できる。また、情報処理装置200は、低輝度背景上の高輝度文字と、高輝度背景上の低輝度文字とを含む原稿の画像から、高輝度文字又は低輝度文字の何れか一方のみを検出するように構成されたOCRソフトウェアを用いて文字を検出できる。
Also, general-purpose OCR software is generally configured to detect low-brightness characters placed on a high-brightness background. The
また、情報処理装置200は、画像内で黒色画素が連結する連結領域を検出し、検出した連結領域毎に低輝度背景領域と高輝度文字領域の階調値を反転させる。これにより、情報処理装置200は、高輝度背景上に低輝度文字が配置されたセルと、低輝度背景上に高輝度文字が配置されたセルとが混合した帳票の画像から、文字を良好に検出することが可能となる。
Further, the
なお、情報処理装置200は、図5Aに示す多値画像500に対して、各背景、文字及び罫線の階調値の関係を反転させたような多値画像から、高輝度背景領域の階調値と低輝度文字領域の階調値との関係を逆転させた逆転画像を生成してもよい。その場合、罫線除去画像生成部223は、二値画像から高輝度の罫線の成分を除去した罫線除去画像を生成し、領域検出部224は、罫線除去画像内で白色画素が連結する連結領域を検出する。結合部225は、分断された連結領域を結合し、逆転画像生成部226は、多値画像において、連結領域に対応する領域内の高輝度背景領域の階調値と低輝度文字領域の階調値との関係を逆転させた逆転画像を生成する。
Note that the
図9は、他の実施形態に係る情報処理装置における処理装置230の概略構成を示すブロック図である。
FIG. 9 is a block diagram showing a schematic configuration of a
処理装置230は、第2CPU220の代わりに、認識処理を実行する。処理装置230は、取得回路231、二値画像生成回路232、罫線除去画像生成回路233、領域検出回路234、結合回路235、逆転画像生成回路236、逆転二値画像生成回路237、文字検出回路238及び出力制御回路239等を有する。
The
取得回路231は、取得部の一例であり、取得部221と同様の機能を有する。取得回路231は、入力画像を多値画像として第2インタフェース装置201を介して画像読取装置100から取得し、第2記憶装置210に保存する。
The
二値画像生成回路232は、二値画像生成部の一例であり、二値画像生成部222と同様の機能を有する。二値画像生成回路232は、第2記憶装置210から多値画像を読み出し、多値画像から二値画像を生成し、第2記憶装置210に保存する。
The binary
罫線除去画像生成回路233は、罫線除去画像生成部の一例であり、罫線除去画像生成部223と同様の機能を有する。罫線除去画像生成回路233は、第2記憶装置210から二値画像を読み出し、二値画像から罫線除去画像を生成し、第2記憶装置210に保存する。
The ruled-line-removed
領域検出回路234は、領域検出部の一例であり、領域検出部224と同様の機能を有する。領域検出回路234は、第2記憶装置210から罫線除去画像を読み出し、罫線除去画像内で連結領域を検出し、検出結果を第2記憶装置210に保存する。
The
結合回路235は、結合部の一例であり、結合部225と同様の機能を有する。結合回路235は、第2記憶装置210から、罫線除去画像と、連結領域の検出結果とを読み出し、検出結果に基づいて、罫線除去画像において連結領域を結合し、第2記憶装置210に保存する。
The
逆転画像生成回路236は、逆転画像生成部の一例であり、逆転画像生成部226と同様の機能を有する。逆転画像生成回路236は、第2記憶装置210から多値画像及び罫線除去画像を読み出し、読み出した各画像から逆転画像を生成し、第2記憶装置210に保存する。
The reversed
逆転二値画像生成回路237は、逆転二値画像生成部の一例であり、逆転二値画像生成部227と同様の機能を有する。逆転二値画像生成回路237は、第2記憶装置210から逆転画像を読み出し、逆転画像から逆転二値画像を生成し、表示装置203に出力する。
The reverse binary
文字検出回路238は、文字検出部の一例であり、文字検出部228と同様の機能を有する。文字検出回路238は、第2記憶装置210から逆転画像又は逆転二値画像を読み出し、読み出した画像から文字を検出し、検出結果を第2記憶装置210に保存する。
The
出力制御回路239は、出力制御部の一例であり、出力制御部229と同様の機能を有する。出力制御回路239は、第2記憶装置210から文字の検出結果、逆転画像又は逆転二値画像を読み出し、読み出した情報を表示装置203に出力する。
The
以上詳述したように、情報処理装置は、処理装置230を用いる場合も、低輝度背景と、低輝度背景上の高輝度文字と、罫線とを含む原稿の画像から文字を良好に検出することが可能となった。
As described in detail above, the information processing apparatus can satisfactorily detect characters from an image of a document including a low-brightness background, high-brightness characters on a low-brightness background, and ruled lines, even when the
以上、好適な実施形態について説明してきたが、実施形態はこれらに限定されない。例えば、画像読取装置100と情報処理装置200の機能分担は、図1に示す画像処理システム1の例に限られず、画像読取装置100及び情報処理装置200の各部を画像読取装置100と情報処理装置200の何れに配置するかは適宜変更可能である。または、画像読取装置100と情報処理装置200を一つの装置で構成してもよい。
Although the preferred embodiments have been described above, the embodiments are not limited to these. For example, the division of functions between the image reading device 100 and the
例えば、画像読取装置100の第1記憶装置110が、情報処理装置200の第2記憶装置210に記憶された各プログラムを記憶し、画像読取装置100の第1CPU120が、情報処理装置200の第2CPU120により実現される各部として動作してもよい。また、画像読取装置100が、情報処理装置200の処理装置230と同様の処理装置を有してもよい。
For example, the
その場合、画像読取装置100は表示装置203と同様の表示装置を有する。認識処理は画像読取装置100で実行されるため、ステップS102、S201の入力画像の送受信処理は省略される。ステップS202~S212の各処理は、画像読取装置100の第1CPU120又は処理装置によって実行される。これらの処理の動作は、情報処理装置200の第2CPU220又は処理装置230によって実行される場合と同様である。
In that case, the image reading device 100 has a display device similar to the
また、画像処理システム1において、第1インタフェース装置101と第2インタフェース装置201は、インターネット、電話回線網(携帯端末回線網、一般電話回線網を含む)、イントラネット等のネットワークを介して接続してもよい。その場合、第1インタフェース装置101及び第2インタフェース装置201に、接続するネットワークの通信インタフェース回路を備える。また、その場合、クラウドコンピューティングの形態で画像処理のサービスを提供できるように、ネットワーク上に複数の情報処理装置を分散して配置し、各情報処理装置が協働して、認識処理等を分担するようにしてもよい。これにより、画像処理システム1は、複数の画像読取装置が読み取った入力画像について、効率よく認識処理を実行できる。
In the
1 画像処理システム
200 情報処理装置
221 取得部
222 二値画像生成部
223 罫線除去画像生成部
224 領域検出部
225 結合部
226 逆転画像生成部
227 逆転二値画像生成部
228 文字検出部
229 出力制御部1
Claims (6)
前記低輝度背景に対応する画素が黒色画素となり、前記高輝度文字に対応する画素が白色画素となるように前記多値画像を二値化した二値画像を生成する二値画像生成部と、
前記二値画像から前記複数の罫線の成分を除去した罫線除去画像を生成する罫線除去画像生成部と、
前記罫線除去画像内で黒色画素が連結する連結領域を検出する領域検出部と、
前記領域検出部により検出された複数の連結領域の大きさの関係、前記複数の連結領域の位置の関係、又は、前記複数の連結領域の間の距離の内の少なくとも一つに基づいて、前記複数の連結領域を結合する結合部と、
前記多値画像において、前記結合部により結合された連結領域に対応する領域内の低輝度背景領域の階調値と高輝度文字領域の階調値との関係を逆転させた逆転画像を生成する逆転画像生成部と、
前記逆転画像から文字を検出する文字検出部と、
前記検出された文字に関する情報を出力する出力部と、
を有することを特徴とする画像処理装置。 an acquisition unit that acquires a multivalued image obtained by imaging a document including a low-brightness background, high-brightness characters on the low-brightness background, and a plurality of ruled lines;
a binary image generation unit that generates a binary image by binarizing the multivalued image such that the pixels corresponding to the low-luminance background are black pixels and the pixels corresponding to the high-luminance characters are white pixels ;
a ruled-line-removed image generating unit that generates a ruled-line-removed image by removing components of the plurality of ruled lines from the binary image;
an area detection unit that detects a connected area where black pixels are connected in the ruled-line-removed image;
Based on at least one of the size relationship of the plurality of connected regions detected by the region detection unit, the positional relationship of the plurality of connected regions, or the distance between the plurality of connected regions, a connecting portion that connects a plurality of connecting regions;
In the multi-valued image, a reversed image is generated by reversing the relationship between the gradation values of the low-luminance background region and the gradation values of the high-luminance character region in the region corresponding to the connected region combined by the combining unit. a reverse image generator;
a character detection unit that detects characters from the reversed image;
an output unit that outputs information about the detected characters;
An image processing device comprising:
前記文字検出部は、前記逆転二値画像から前記文字を検出する、請求項1~3の何れか一項に記載の画像処理装置。 further comprising a reversed binary image generator that generates a reversed binary image by binarizing the reversed image;
4. The image processing apparatus according to claim 1, wherein said character detection unit detects said characters from said reversed binary image.
低輝度背景と、前記低輝度背景上の高輝度文字と、複数の罫線とを含む原稿を撮像した多値画像を取得し、
前記低輝度背景に対応する画素が黒色画素となり、前記高輝度文字に対応する画素が白色画素となるように前記多値画像を二値化した二値画像を生成し、
前記二値画像から前記複数の罫線の成分を除去した罫線除去画像を生成し、
前記罫線除去画像内で黒色画素が連結する連結領域を検出し、
前記検出された複数の連結領域の大きさの関係、前記複数の連結領域の位置の関係、又は、前記複数の連結領域の間の距離の内の少なくとも一つに基づいて、前記複数の連結領域を結合し、
前記多値画像において、前記結合された連結領域に対応する領域内の低輝度背景領域の階調値と高輝度文字領域の階調値との関係を逆転させた逆転画像を生成し、
前記逆転画像から文字を検出し、
前記検出された文字に関する情報を前記出力部から出力する、
ことを含むことを特徴とする制御方法。 A control method for an image processing device having an output unit, the image processing device comprising:
Acquiring a multivalued image of a document containing a low-brightness background, high-brightness characters on the low-brightness background, and a plurality of ruled lines,
generating a binary image by binarizing the multivalued image such that pixels corresponding to the low-brightness background are black pixels and pixels corresponding to the high-brightness characters are white pixels ;
generating a ruled-line-removed image by removing components of the plurality of ruled lines from the binary image;
Detecting connected regions where black pixels are connected in the ruled-line-removed image;
the plurality of connected regions based on at least one of the size relationship of the detected plurality of connected regions, the positional relationship of the plurality of connected regions, or the distance between the plurality of connected regions; and
generating a reversed image by reversing the relationship between the gradation values of the low-luminance background region and the gradation value of the high-luminance character region in the region corresponding to the combined connected region in the multivalued image;
detecting characters from the reversed image;
outputting information about the detected characters from the output unit;
A control method comprising:
低輝度背景と、前記低輝度背景上の高輝度文字と、複数の罫線とを含む原稿を撮像した多値画像を取得し、
前記低輝度背景に対応する画素が黒色画素となり、前記高輝度文字に対応する画素が白色画素となるように前記多値画像を二値化した二値画像を生成し、
前記二値画像から前記複数の罫線の成分を除去した罫線除去画像を生成し、
前記罫線除去画像内で黒色画素が連結する連結領域を検出し、
前記検出された複数の連結領域の大きさの関係、前記複数の連結領域の位置の関係、又は、前記複数の連結領域の間の距離の内の少なくとも一つに基づいて、前記複数の連結領域を結合し、
前記多値画像において、前記結合された連結領域に対応する領域内の低輝度背景領域の階調値と高輝度文字領域の階調値との関係を逆転させた逆転画像を生成し、
前記逆転画像から文字を検出し、
前記検出された文字に関する情報を前記出力部から出力する、
ことを前記コンピュータに実行させることを特徴とする制御プログラム。 A control program for a computer having an output unit,
Acquiring a multivalued image of a document containing a low-brightness background, high-brightness characters on the low-brightness background, and a plurality of ruled lines,
generating a binary image by binarizing the multivalued image such that pixels corresponding to the low-brightness background are black pixels and pixels corresponding to the high-brightness characters are white pixels ;
generating a ruled-line-removed image by removing components of the plurality of ruled lines from the binary image;
Detecting connected regions where black pixels are connected in the ruled-line-removed image;
the plurality of connected regions based on at least one of the size relationship of the detected plurality of connected regions, the positional relationship of the plurality of connected regions, or the distance between the plurality of connected regions; and
generating a reversed image by reversing the relationship between the gradation values of the low-luminance background region and the gradation value of the high-luminance character region in the region corresponding to the combined connected region in the multivalued image;
detecting characters from the reversed image;
outputting information about the detected characters from the output unit;
A control program characterized by causing the computer to execute:
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2018/040188 WO2020089985A1 (en) | 2018-10-29 | 2018-10-29 | Image processing device, control method, and control program |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2020089985A1 JPWO2020089985A1 (en) | 2021-05-13 |
JP7106672B2 true JP7106672B2 (en) | 2022-07-26 |
Family
ID=70463590
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020554629A Active JP7106672B2 (en) | 2018-10-29 | 2018-10-29 | Image processing device, control method and control program |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7106672B2 (en) |
WO (1) | WO2020089985A1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001109844A (en) | 1999-10-06 | 2001-04-20 | Internatl Business Mach Corp <Ibm> | Character string extracting method, handwritten character extracting method, character string extraction device, and image processor |
JP2002279345A (en) | 2001-03-16 | 2002-09-27 | Ricoh Co Ltd | Image processing device and method, and computer- readable storage medium with stored program |
JP2004199622A (en) | 2002-12-20 | 2004-07-15 | Ricoh Co Ltd | Apparatus and method for image processing, recording media, and program |
JP2005071088A (en) | 2003-08-25 | 2005-03-17 | Canon Inc | Image processor, image processing method, and program, and storage medium |
-
2018
- 2018-10-29 WO PCT/JP2018/040188 patent/WO2020089985A1/en active Application Filing
- 2018-10-29 JP JP2020554629A patent/JP7106672B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001109844A (en) | 1999-10-06 | 2001-04-20 | Internatl Business Mach Corp <Ibm> | Character string extracting method, handwritten character extracting method, character string extraction device, and image processor |
JP2002279345A (en) | 2001-03-16 | 2002-09-27 | Ricoh Co Ltd | Image processing device and method, and computer- readable storage medium with stored program |
JP2004199622A (en) | 2002-12-20 | 2004-07-15 | Ricoh Co Ltd | Apparatus and method for image processing, recording media, and program |
JP2005071088A (en) | 2003-08-25 | 2005-03-17 | Canon Inc | Image processor, image processing method, and program, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
JPWO2020089985A1 (en) | 2021-05-13 |
WO2020089985A1 (en) | 2020-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5701182B2 (en) | Image processing apparatus, image processing method, and computer program | |
JP6970835B2 (en) | Image processing device, control method and control program | |
JP5826081B2 (en) | Image processing apparatus, character recognition method, and computer program | |
KR101172399B1 (en) | Image forming apparatus and image improvement method thereof | |
JP7185477B2 (en) | Image processing device, control method and control program | |
JP2015195549A (en) | Image processing system and image processing method | |
US10354352B2 (en) | Image processing apparatus, image processing method, and storage medium | |
US10970579B2 (en) | Image processing apparatus for placing a character recognition target region at a position of a predetermined region in an image conforming to a predetermined format | |
JP2013042413A (en) | Image processing apparatus, image processing method, and computer program | |
JP2016054564A (en) | Image processing system and image processing method | |
JP7106672B2 (en) | Image processing device, control method and control program | |
WO2020065980A1 (en) | Image processing device, control method and control program | |
US10896344B2 (en) | Information processing apparatus, information processing method, and computer program | |
JP2021149452A (en) | Image processing device, control method and control program | |
JP7022847B2 (en) | Image processing device, control method and control program | |
WO2020157938A1 (en) | Image processing device, control method, and control program | |
US10931852B2 (en) | Image processing apparatus, image processing method, and storage medium, with determining whether or not character clipping rectangle determined to be non-character region is character region | |
WO2020157937A1 (en) | Image processing device, control method, and control program | |
JP2006003993A (en) | License plate recognition device | |
JP2023008183A (en) | Imaging apparatus, control method, program, and storage medium | |
JP2021149459A (en) | Image processor, control method, and control program | |
JP3723150B2 (en) | Image reading device | |
JPH04257980A (en) | Picture binarizing system | |
JPH03149967A (en) | Image processing method | |
JP2003244430A (en) | Image processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201022 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20211207 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220202 |
|
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: 20220628 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220713 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7106672 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |