JP6438369B2 - Form image determination program, form image determination method, and form image determination system - Google Patents

Form image determination program, form image determination method, and form image determination system Download PDF

Info

Publication number
JP6438369B2
JP6438369B2 JP2015186721A JP2015186721A JP6438369B2 JP 6438369 B2 JP6438369 B2 JP 6438369B2 JP 2015186721 A JP2015186721 A JP 2015186721A JP 2015186721 A JP2015186721 A JP 2015186721A JP 6438369 B2 JP6438369 B2 JP 6438369B2
Authority
JP
Japan
Prior art keywords
form image
straight line
determination
control unit
clear
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
Application number
JP2015186721A
Other languages
Japanese (ja)
Other versions
JP2017062574A (en
Inventor
昌昭 小澤
昌昭 小澤
弘 西世古
弘 西世古
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Frontech Ltd
Original Assignee
Fujitsu Frontech 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 Frontech Ltd filed Critical Fujitsu Frontech Ltd
Priority to JP2015186721A priority Critical patent/JP6438369B2/en
Publication of JP2017062574A publication Critical patent/JP2017062574A/en
Application granted granted Critical
Publication of JP6438369B2 publication Critical patent/JP6438369B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、帳票画像判定プログラム、帳票画像判定方法および帳票画像判定システムに関する。   The present invention relates to a form image determination program, a form image determination method, and a form image determination system.

保険会社や金融機関等では、顧客が記入した帳票や伝票を画像イメージとして帳票読取装置に取り込み、文字認識して帳票の処理を行う。オペレータは、帳票をイメージスキャナやOCR(Optical Character Recognition)等で読み取ることで、手入力を行うよりも早く帳票に記載された内容を帳票読取装置に取り込むことができる。   An insurance company, a financial institution, or the like takes a form or slip filled in by a customer as an image image into a form reading device, recognizes characters, and processes the form. The operator reads the form with an image scanner, OCR (Optical Character Recognition), or the like, so that the contents described in the form can be taken into the form reading device faster than manual input.

なお、帳票読取装置において、読み取った帳票の画像情報から方向識別の対象となる横方向に長い文字を構成する画素群を検出し、検出した画素群を正方向、逆方向、右90度、左90度の4方向に向きを変えて複数の文字を認識し、帳票画像が正しい方向で読み取られたか否かを判定(正立判定)する技術が知られている。また、帳票を撮像して得られた画像情報から文字認識を行う技術が知られている。   In the form reading device, a pixel group constituting a long character in the horizontal direction, which is a target of direction identification, is detected from the read image information of the form, and the detected pixel group is forward direction, reverse direction, right 90 degrees, left A technique for recognizing a plurality of characters by changing directions in four directions of 90 degrees and determining whether or not a form image has been read in the correct direction (upright determination) is known. In addition, a technique for performing character recognition from image information obtained by imaging a form is known.

特開2005−242825号公報JP 2005-242825 A 特開2013−30040号公報JP 2013-30040 A

従来技術では、方向識別の対象となる文字が存在しない帳票画像に対しては、有効な正立判定ができなかった。
また、従来は、帳票画像に滲みやぼけが生じたか否かをオペレータが目視で判定していたため、オペレータによって滲みやぼけの判定基準が異なっていたため、帳票画像の品質が統一されていなかった。また、帳票画像が正しく読み取られたか否かについてオペレータが目視で判定していたため、オペレータの労力が費やされていた。
In the prior art, an effective erecting determination cannot be performed for a form image in which there is no character whose direction is to be identified.
Conventionally, since the operator visually determines whether or not the form image is blurred or blurred, since the judgment criteria for bleeding and blur are different depending on the operator, the quality of the form image has not been unified. Further, since the operator visually determines whether or not the form image has been read correctly, the labor of the operator has been expended.

一側面では、本発明は、帳票画像を判定する処理を改善できる帳票画像判定プログラム、帳票画像判定方法および帳票画像判定システムを提供することを目的とする。   In one aspect, an object of the present invention is to provide a form image determination program, a form image determination method, and a form image determination system that can improve the process of determining a form image.

上記目的を達成するために、以下に示すような帳票画像判定プログラムを提供する。帳票画像判定プログラムは、帳票画像を取得し、帳票画像から直線を抽出し、直線に対する鮮明判定処理の結果に基づき帳票画像が鮮明か否かを判定し、帳票画像から文字認識領域を抽出し、文字認識領域に対する正立判定処理に基づき帳票画像正立か否かを判定し、帳票画像が鮮明であると判定された場合であり、かつ帳票画像が正立であると判定された場合に帳票画像の読み取りが正常であると判定する処理をコンピュータに実行させる。 In order to achieve the above object, the following form image determination program is provided. The form image determination program acquires a form image, extracts a straight line from the form image, determines whether the form image is clear based on the result of the sharpness determination process for the straight line, extracts a character recognition area from the form image, When it is determined whether the form image is erect based on the erecting determination process for the character recognition area, and the form image is determined to be clear, and when the form image is determined to be erect Causes the computer to execute processing for determining that the reading of the form image is normal.

一態様によれば、帳票画像を判定する処理を改善できる帳票画像判定プログラム、帳票画像判定方法および帳票画像判定システムを提供できる。   According to one aspect, it is possible to provide a form image determination program, a form image determination method, and a form image determination system that can improve the process of determining a form image.

第1の実施形態の帳票画像判定装置の一例を示す図である。It is a figure which shows an example of the form image determination apparatus of 1st Embodiment. 第2の実施形態の帳票画像判定システムの一例を示す図である。It is a figure which shows an example of the form image determination system of 2nd Embodiment. 第2の実施形態の帳票読取装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of the form reading apparatus of 2nd Embodiment. 第2の実施形態の帳票セットの一例を示す図である。It is a figure which shows an example of the form set of 2nd Embodiment. 第2の実施形態の帳票管理テーブルの一例を示す図である。It is a figure which shows an example of the form management table of 2nd Embodiment. 第2の実施形態の帳票画像判定処理のフローチャートを示す図である。It is a figure which shows the flowchart of the form image determination process of 2nd Embodiment. 第2の実施形態の画像鮮明判定処理のフローチャートを示す図である。It is a figure which shows the flowchart of the image clear determination process of 2nd Embodiment. 第2の実施形態の太さ鮮明判定処理のイメージの一例を示す図である。It is a figure which shows an example of the image of the thickness clear determination process of 2nd Embodiment. 第2の実施形態の太さ鮮明判定処理のフローチャートを示す図である(その1)。It is a figure which shows the flowchart of the thickness clear determination process of 2nd Embodiment (the 1). 第2の実施形態の太さ鮮明判定処理のフローチャートを示す図である(その2)。It is a figure which shows the flowchart of the thickness clear determination process of 2nd Embodiment (the 2). 第2の実施形態の太さ鮮明判定処理のフローチャートを示す図である(その3)。It is a figure which shows the flowchart of the thickness clear determination process of 2nd Embodiment (the 3). 第2の実施形態の直線近傍鮮明判定処理のイメージの一例を示す図である。It is a figure which shows an example of the image of the straight line vicinity clear determination process of 2nd Embodiment. 第2の実施形態の直線近傍鮮明判定処理のフローチャートを示す図である(その1)。It is a figure which shows the flowchart of the straight line vividness determination process of 2nd Embodiment (the 1). 第2の実施形態の直線近傍鮮明判定処理のフローチャートを示す図である(その2)。It is a figure which shows the flowchart of the straight line vicinity clear determination process of 2nd Embodiment (the 2). 第2の実施形態の直線近傍鮮明判定処理のフローチャートを示す図である(その3)。It is a figure which shows the flowchart of the straight line vicinity clear determination process of 2nd Embodiment (the 3). 第2の実施形態の画像正立判定処理のイメージの一例を示す図である。It is a figure which shows an example of the image of the image erecting determination process of 2nd Embodiment. 第2の実施形態の画像正立判定処理のフローチャートを示す図である(その1)。It is a figure which shows the flowchart of the image erecting determination process of 2nd Embodiment (the 1). 第2の実施形態の画像正立判定処理のフローチャートを示す図である(その2)。It is a figure which shows the flowchart of the image erecting determination process of 2nd Embodiment (the 2). 第2の実施形態の画像正立判定処理のフローチャートを示す図である(その3)。It is a figure which shows the flowchart of the image erecting determination process of 2nd Embodiment (the 3).

以下、図面を参照して実施の形態を詳細に説明する。
[第1の実施形態]
まず、第1の実施形態の帳票画像判定装置について図1を用いて説明する。図1は、第1の実施形態の帳票画像判定装置の一例を示す図である。
Hereinafter, embodiments will be described in detail with reference to the drawings.
[First Embodiment]
First, the form image determination apparatus according to the first embodiment will be described with reference to FIG. FIG. 1 is a diagram illustrating an example of a form image determination apparatus according to the first embodiment.

帳票画像判定装置1は、記憶部2と、制御部3を含む。帳票画像判定装置1は、帳票を撮像して得られた帳票画像4を取得し、帳票画像4が正しく読み取れたか否かの判定を行う装置であり、たとえば、コンピュータ等である。   The form image determination device 1 includes a storage unit 2 and a control unit 3. The form image determination apparatus 1 is an apparatus that acquires a form image 4 obtained by imaging a form and determines whether or not the form image 4 has been read correctly, and is, for example, a computer.

記憶部2は、帳票画像4を記憶するユニットであり、たとえばHDD(Hard Disk Drive)等である。記憶部2は、他のコンピュータから受信した帳票画像4を記憶することや、イメージスキャナ等で帳票を撮像して得られた帳票画像4を記憶することができる。   The storage unit 2 is a unit that stores the form image 4 and is, for example, an HDD (Hard Disk Drive). The storage unit 2 can store a form image 4 received from another computer, or can store a form image 4 obtained by imaging a form with an image scanner or the like.

ここで、帳票画像判定装置1が帳票画像4について正しく読み取れたか否かを判定する帳票画像判定処理について説明する。帳票画像判定処理は、帳票画像判定装置1で実行する帳票画像判定プログラムの処理として提供できる。   Here, a form image determination process for determining whether or not the form image determination apparatus 1 has read the form image 4 correctly will be described. The form image determination process can be provided as a form image determination program process executed by the form image determination apparatus 1.

制御部3は、記憶部2に記憶された帳票画像4を取得し、帳票画像4から直線を抽出し、直線に対する鮮明判定処理5の結果に基づき帳票画像4が鮮明か否かを判定する。
鮮明判定処理5は、太さ鮮明判定処理と直線近傍鮮明判定処理とを含む。太さ鮮明判定処理は、直線に対して所定間隔で点を設定し、それぞれの点における直線の太さを算出し、それぞれの太さが予め定められた範囲内である場合に直線が鮮明であると判定する処理を含む。直線近傍鮮明判定処理は、帳票画像4をグレースケール変換した濃度値を取得し、直線に対して所定の間隔で点を設定し、それぞれの点を囲む所定の領域における白色部分の濃度値の平均値である白色平均濃度値と黒色部分の濃度値の平均値である黒色平均濃度値を算出し、白色平均濃度値と黒色平均濃度値の差が予め定められた濃度値よりも大きい場合に直線が鮮明であると判定する処理を含む。
The control unit 3 acquires the form image 4 stored in the storage unit 2, extracts a straight line from the form image 4, and determines whether the form image 4 is clear based on the result of the sharpness determination process 5 for the straight line.
The sharpness determination process 5 includes a thickness clearness determination process and a straight line vicinity clearness determination process. The sharpness determination process sets points at predetermined intervals with respect to a straight line, calculates the thickness of the straight line at each point, and the straight line is clear when each thickness is within a predetermined range. Includes the process of determining that there is. The straight line neighborhood clearness determination process acquires density values obtained by converting the form image 4 to gray scale, sets points at predetermined intervals with respect to the straight lines, and averages the density values of white portions in predetermined areas surrounding the respective points. If the difference between the white average density value and the black average density value is greater than a predetermined density value, a straight line is calculated. Includes a process of determining that is clear.

制御部3は、太さ鮮明判定処理において直線が鮮明であると判定した場合、かつ、直線近傍鮮明判定処理において直線が鮮明であると判定した場合に、帳票画像4が鮮明であると判定する。言い換えると、制御部3は、鮮明判定処理5の結果が鮮明である場合、帳票画像4に滲みやぼけがなく、帳票画像4が鮮明であると判定できる。   The control unit 3 determines that the form image 4 is clear when it is determined that the straight line is clear in the thickness sharpness determination process and when the straight line vicinity clearness determination process determines that the straight line is clear. . In other words, when the result of the sharpness determination process 5 is clear, the control unit 3 can determine that the form image 4 is clear and the form image 4 is clear.

制御部3は、帳票画像4から文字認識領域7a,7b,7cを抽出し、文字認識領域7a,7b,7cに対する正立判定処理6に基づき帳票画像4が正立か否かを判定する。正立判定処理6は、文字認識領域7a,7b,7cのサイズが上位の順に予め定められた個数の文字を取得し、文字認識領域7a,7b,7cそれぞれについて角度を変更して文字認識し、角度が0度で文字認識できた文字の個数が予め定められた個数に対し所定の割合以上である場合に帳票画像4を正立であると判定する処理を含む。帳票画像4に含まれる複数の文字のうち、文字認識領域7a,7b,7cの大きさが上位3つの領域について正立判定処理の対象とした例を示している。   The control unit 3 extracts the character recognition areas 7a, 7b, and 7c from the form image 4, and determines whether or not the form image 4 is upright based on the upright determination processing 6 for the character recognition areas 7a, 7b, and 7c. The erecting determination process 6 acquires a predetermined number of characters in the order of the size of the character recognition areas 7a, 7b, and 7c, and recognizes the characters by changing the angle for each of the character recognition areas 7a, 7b, and 7c. , Including a process of determining that the form image 4 is upright when the number of characters that can be recognized at an angle of 0 degrees is equal to or greater than a predetermined ratio with respect to a predetermined number. Of the plurality of characters included in the form image 4, an example is shown in which the upper three regions having the character recognition regions 7 a, 7 b, and 7 c are targets of the erecting determination process.

制御部3は、帳票画像4が鮮明であると判定された場合であり、かつ帳票画像4が正立であると判定された場合に、帳票画像4が滲みやぼけがなく正立に撮像された画像であり読み取りが正常であると判定する。制御部3は、帳票画像4の読み取りが正常であるか否かの判定結果を記憶部2に記憶する。   When it is determined that the form image 4 is clear and the form image 4 is determined to be upright, the control unit 3 captures the form image 4 upright without blurring or blurring. It is determined that the read image is normal. The control unit 3 stores a determination result on whether the reading of the form image 4 is normal in the storage unit 2.

このように、帳票画像判定装置1は、帳票画像4の読み取りが正常であるか否かを判定できるため、オペレータが帳票のチェックに要する労力を軽減できる。また、帳票画像判定装置1は、帳票画像4の滲みやぼけの判定基準を一定に保つため、帳票画像4の品質を保持することができる。こうして、帳票画像判定装置1は、帳票画像を判定する処理を改善できる。   Thus, since the form image determination apparatus 1 can determine whether or not the reading of the form image 4 is normal, the operator can reduce labor required for checking the form. In addition, the form image determination apparatus 1 can maintain the quality of the form image 4 because the determination standard for bleeding and blurring of the form image 4 is kept constant. Thus, the form image determination apparatus 1 can improve the process of determining a form image.

[第2の実施形態]
次に、第2の実施形態として、帳票画像判定装置をサーバ装置として適用した帳票画像判定システムについて図2を用いて説明する。図2は、第2の実施形態の帳票画像判定システムの一例を示す図である。
[Second Embodiment]
Next, as a second embodiment, a form image determination system in which the form image determination apparatus is applied as a server apparatus will be described with reference to FIG. FIG. 2 is a diagram illustrating an example of a form image determination system according to the second embodiment.

帳票画像判定システム300は、図2に示すように、複数の帳票読取装置100(図2ではその内の1台を図示)が備えられ、帳票読取装置100はサーバ装置200とネットワーク10を介して接続されている。たとえば、帳票画像判定システム300は、保険会社や金融機関やデータセンタ等に設けられてもよい。なお、保険会社や金融機関やデータセンタ等は一例であり、その他のものであってもよい。   As shown in FIG. 2, the form image determination system 300 includes a plurality of form reading apparatuses 100 (one of which is shown in FIG. 2). The form reading apparatus 100 is connected to the server apparatus 200 and the network 10. It is connected. For example, the form image determination system 300 may be provided in an insurance company, a financial institution, a data center, or the like. In addition, an insurance company, a financial institution, a data center, etc. are examples, and other things may be sufficient.

帳票読取装置100は、帳票の読み取りや帳票画像の表示をする情報処理装置である。帳票読取装置100は、帳票を撮像して取得された帳票の画像情報(以下、帳票画像とも記載する)をサーバ装置200に送信する。また、帳票読取装置100は、サーバ装置200に記憶された帳票画像を受信し、表示する。   The form reading apparatus 100 is an information processing apparatus that reads forms and displays form images. The form reading apparatus 100 transmits image information (hereinafter also referred to as a form image) of the form acquired by imaging the form to the server apparatus 200. In addition, the form reading device 100 receives and displays the form image stored in the server device 200.

サーバ装置200は、帳票画像および帳票に関する情報を管理する情報処理装置である。サーバ装置200は、帳票読取装置100が読み取った帳票画像を取得し、帳票画像が正しく読み取れたか否かを判定し、判定した結果に応じて帳票画像を記憶する。たとえば、サーバ装置200は、滲みやぼけや読み取り方向間違い等の不備が存在する帳票画像と、不備の無い正しく読み取った帳票画像とを区別して記憶する。サーバ装置200は、帳票画像および帳票に関する情報をサーバ装置200が備えるHDD等の記憶部に記憶してもよいし、サーバ装置200がアクセス可能なデータベースに記憶してもよい。サーバ装置200は、帳票画像が正しく読み取れたか否かを判定する処理に用いる閾値や上限値等を環境定義パラメータとしてHDDに保持する。   The server apparatus 200 is an information processing apparatus that manages information related to form images and forms. The server apparatus 200 acquires the form image read by the form reading apparatus 100, determines whether the form image has been read correctly, and stores the form image according to the determined result. For example, the server apparatus 200 distinguishes and stores a form image in which defects such as blurring, blurring, or a reading direction error are present, and a form image that has been correctly read without defects. The server apparatus 200 may store the form image and the information related to the form in a storage unit such as an HDD provided in the server apparatus 200 or may store it in a database accessible by the server apparatus 200. The server device 200 stores a threshold value, an upper limit value, and the like used for processing for determining whether or not the form image is correctly read in the HDD as environment definition parameters.

次に、第2の実施形態の帳票読取装置のハードウェア構成について図3を用いて説明する。図3は、第2の実施形態の帳票読取装置のハードウェア構成の一例を示す図である。
帳票読取装置100は、制御部110を含む。制御部110は、プロセッサ111、RAM(Random Access Memory)112、HDD113、入出力信号インタフェース114、記憶媒体インタフェース115、通信インタフェース116を含む。帳票読取装置100は、プロセッサ111によって装置全体が制御されている。プロセッサ111には、バス117を介してRAM112と複数の周辺機器が接続されている。プロセッサ111は、マルチプロセッサであってもよい。プロセッサ111は、たとえば、CPU(Central Processing Unit)、MPU(Micro Processing Unit)、DSP(Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)、又はPLD(Programmable Logic Device)である。また、プロセッサ111は、CPU、MPU、DSP、ASIC、PLDのうちの2以上の要素の組み合わせであってもよい。
Next, the hardware configuration of the form reading apparatus according to the second embodiment will be described with reference to FIG. FIG. 3 is a diagram illustrating an example of a hardware configuration of the form reading apparatus according to the second embodiment.
The form reading apparatus 100 includes a control unit 110. The control unit 110 includes a processor 111, a RAM (Random Access Memory) 112, an HDD 113, an input / output signal interface 114, a storage medium interface 115, and a communication interface 116. The form reading apparatus 100 is entirely controlled by a processor 111. A RAM 112 and a plurality of peripheral devices are connected to the processor 111 via a bus 117. The processor 111 may be a multiprocessor. The processor 111 is, for example, a central processing unit (CPU), a micro processing unit (MPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), or a programmable logic device (PLD). Further, the processor 111 may be a combination of two or more elements among CPU, MPU, DSP, ASIC, and PLD.

RAM112は、帳票読取装置100の主記憶装置として使用される。RAM112には、プロセッサ111に実行させるOSのプログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。また、RAM112には、プロセッサ111による処理に必要な各種データが格納される。   The RAM 112 is used as a main storage device of the form reading device 100. The RAM 112 temporarily stores at least part of an OS program and application programs to be executed by the processor 111. The RAM 112 stores various data necessary for processing by the processor 111.

バス117に接続されている周辺機器としては、HDD113、入出力信号インタフェース114、記憶媒体インタフェース115および通信インタフェース116がある。
HDD113は、内蔵したディスクに対して、磁気的にデータの書き込みおよび読出しを行う。HDD113は、帳票読取装置100の補助記憶装置として使用される。HDD113には、OSのプログラム、アプリケーションプログラム、および各種データが格納される。なお、補助記憶装置としては、フラッシュメモリ等の半導体記憶装置を使用することもできる。
Peripheral devices connected to the bus 117 include an HDD 113, an input / output signal interface 114, a storage medium interface 115, and a communication interface 116.
The HDD 113 magnetically writes and reads data to and from the built-in disk. The HDD 113 is used as an auxiliary storage device of the form reading device 100. The HDD 113 stores an OS program, application programs, and various data. As the auxiliary storage device, a semiconductor storage device such as a flash memory can be used.

入出力信号インタフェース114には、入力デバイスや出力デバイスが接続されている。入力デバイスの一例として、キーボード119や、マウス120や、イメージスキャナ121や、タッチパネル等がある。また、出力デバイスの一例には、モニタ118や、液晶表示や、各種パネル表示装置等がある。   An input device and an output device are connected to the input / output signal interface 114. Examples of the input device include a keyboard 119, a mouse 120, an image scanner 121, and a touch panel. Examples of the output device include a monitor 118, a liquid crystal display, and various panel display devices.

入出力信号インタフェース114は、キーボード119やマウス120等から送られてくる信号をプロセッサ111に送信する。なお、マウス120は、ポインティングデバイスの一例であり、他のポインティングデバイスを使用することもできる。他のポインティングデバイスとしては、タッチパネル、タブレット、タッチパッド、トラックボール等がある。   The input / output signal interface 114 transmits signals sent from the keyboard 119, the mouse 120, and the like to the processor 111. Note that the mouse 120 is an example of a pointing device, and other pointing devices can also be used. Examples of other pointing devices include a touch panel, a tablet, a touch pad, and a trackball.

出力デバイスは、プロセッサ111からの命令にしたがって、画像をモニタ画面に表示させる。モニタ118としては、CRT(Cathode Ray Tube)を用いた表示装置や液晶表示装置等がある。   The output device displays an image on the monitor screen according to a command from the processor 111. Examples of the monitor 118 include a display device using a CRT (Cathode Ray Tube) and a liquid crystal display device.

記憶媒体インタフェース115は、磁気やレーザ等を利用して記憶媒体122に記録されたデータの読み取りや書き込みを行う。また、記憶媒体インタフェース115は、半導体メモリ等の記憶媒体に記録されたデータの読み取りを行うものであってもよい。記憶媒体122とは、たとえば、光ディスクや、フラッシュメモリ等の半導体メモリ等を含む。光ディスクは、光の反射によって読み取り可能なようにデータが記録された可搬型の記録媒体である。光ディスクには、DVD(Digital Versatile Disk)、DVD−RAM、CD−ROM(Compact Disc - Read Only Memory)、CD−R(Recordable)/RW(ReWritable)等がある。   The storage medium interface 115 reads and writes data recorded on the storage medium 122 using magnetism, laser, or the like. The storage medium interface 115 may read data recorded in a storage medium such as a semiconductor memory. The storage medium 122 includes, for example, an optical disk, a semiconductor memory such as a flash memory, and the like. An optical disc is a portable recording medium on which data is recorded so that it can be read by reflection of light. Optical discs include DVD (Digital Versatile Disk), DVD-RAM, CD-ROM (Compact Disc-Read Only Memory), CD-R (Recordable) / RW (ReWritable), and the like.

記憶媒体インタフェース115は、帳票読取装置100に周辺機器を接続するための通信インタフェースとしても用いることができる。たとえば、記憶媒体インタフェース115には、メモリ装置やメモリリーダライタを接続することができる。メモリ装置は、記憶媒体インタフェース115との通信機能を搭載した記録媒体である。メモリリーダライタは、メモリカードへのデータの書き込み、又はメモリカードからのデータの読出しを行う装置である。メモリカードは、カード型の記録媒体である。   The storage medium interface 115 can also be used as a communication interface for connecting peripheral devices to the form reading apparatus 100. For example, a memory device or a memory reader / writer can be connected to the storage medium interface 115. The memory device is a recording medium equipped with a communication function with the storage medium interface 115. The memory reader / writer is a device that writes data to the memory card or reads data from the memory card. A memory card is a card-type recording medium.

通信インタフェース116は、ネットワーク10に接続されている。通信インタフェース116は、ネットワーク10を介して、他のコンピュータ又は通信機器との間でデータの送受信を行う。なお、ネットワーク10は、有線ネットワークでもよいし、無線ネットワークでもよい。   The communication interface 116 is connected to the network 10. The communication interface 116 transmits / receives data to / from other computers or communication devices via the network 10. The network 10 may be a wired network or a wireless network.

以上のようなハードウェア構成によって、第2の実施形態の帳票読取装置100の機能を実現することができる。なお、第1の実施形態に示した帳票画像判定装置1も、図3に示した帳票読取装置100と同様のハードウェア構成によって実現できる。なお、サーバ装置200も図2に示した帳票読取装置100と同様のハードウェア構成によって実現できる。   With the hardware configuration as described above, the function of the form reading apparatus 100 of the second embodiment can be realized. The form image determination apparatus 1 shown in the first embodiment can also be realized by the same hardware configuration as the form reading apparatus 100 shown in FIG. The server device 200 can also be realized by the same hardware configuration as the form reading device 100 shown in FIG.

サーバ装置200は、たとえばコンピュータ読み取り可能な記録媒体に記録されたプログラムを実行することにより、第2の実施形態の処理機能を実現する。サーバ装置200に実行させる処理内容を記述したプログラムは、様々な記録媒体に記録しておくことができる。たとえば、サーバ装置200に実行させるプログラムをHDD113に格納しておくことができる。プロセッサ111は、HDD113内のプログラムの少なくとも一部をRAM112にロードし、プログラムを実行する。また、サーバ装置200に実行させるプログラムを、光ディスク、メモリ装置、メモリカード等の可搬型記録媒体に記録しておくこともできる。可搬型記録媒体に格納されたプログラムは、たとえばプロセッサ111からの制御により、HDD113にインストールされた後、実行可能となる。またプロセッサ111が、可搬型記録媒体から直接プログラムを読出して実行することもできる。   The server device 200 implements the processing functions of the second embodiment by executing a program recorded on a computer-readable recording medium, for example. A program describing the processing contents to be executed by the server device 200 can be recorded in various recording media. For example, a program to be executed by the server device 200 can be stored in the HDD 113. The processor 111 loads at least a part of the program in the HDD 113 into the RAM 112 and executes the program. In addition, a program to be executed by the server device 200 can be recorded on a portable recording medium such as an optical disk, a memory device, or a memory card. The program stored in the portable recording medium becomes executable after being installed in the HDD 113 under the control of the processor 111, for example. The processor 111 can also read and execute the program directly from the portable recording medium.

次に、帳票セットについて図4を用いて説明する。図4は、第2の実施形態の帳票セットの一例を示す図である。
帳票セット400は、オペレータが帳票読取装置100を用いて読み取る帳票の一例である。帳票読取装置100が読み取る帳票には、複数の種類が存在する。たとえば、予め定められたフォーマットの帳票である定型帳票や、フォーマットが定められていない非定型帳票が存在する。
Next, the form set will be described with reference to FIG. FIG. 4 is a diagram illustrating an example of a form set according to the second embodiment.
The form set 400 is an example of a form that is read by the operator using the form reading apparatus 100. There are a plurality of types of forms read by the form reading apparatus 100. For example, there is a fixed form that is a form having a predetermined format, and a non-standard form that has no predetermined format.

帳票セット400は、定型帳票401と、非定型帳票402,403とを含む。帳票セット400に含まれる帳票は、帳票読取装置100から読み取られ、読み取られた帳票画像は、サーバ装置200に送信される。なお、図4に示した帳票セット400は、3枚の帳票で一組の帳票セットを構成するが、これは一例であり、定型帳票と非定型帳票のいずれか一方のみを含むものであってもよい。   The form set 400 includes a standard form 401 and non-standard forms 402 and 403. Forms included in the form set 400 are read from the form reading apparatus 100, and the read form image is transmitted to the server apparatus 200. Note that the form set 400 shown in FIG. 4 forms a set of form sets with three forms, but this is only an example, and includes only one of the standard form and the non-standard form. Also good.

定型帳票401は、予め定められたフォーマットの帳票である。定型帳票401は、OCR認識箇所404,405を含む。定型帳票401は、所定の座標位置に記載されたOCR認識箇所404,405を読み取ることにより、帳票が正立で読み取られたか否かを判定可能な帳票である。なお、OCR認識箇所は、1枚の帳票につき1箇所含まれてもよいし、2箇所以上含まれてもよい。   The fixed form 401 is a form having a predetermined format. The fixed form 401 includes OCR recognition locations 404 and 405. The fixed form 401 is a form that can determine whether or not the form has been read upright by reading the OCR recognition locations 404 and 405 described at predetermined coordinate positions. Note that one OCR recognition location may be included in one form, or two or more locations may be included.

非定型帳票402,403は、フォーマットが定められていない帳票である。非定型帳票402,403は、帳票画像を文字認識して帳票画像が正立か否かを判定することを要する帳票である。   The non-standard forms 402 and 403 are forms whose formats are not defined. The non-standard forms 402 and 403 are forms that require character recognition of the form image to determine whether the form image is upright.

帳票セット400に含まれる各帳票は、印字部分の文字や項目欄の項目および記入された内容について、帳票読取装置100に接続したイメージスキャナ121を介して帳票画像として読み取られる。   Each form included in the form set 400 is read as a form image via the image scanner 121 connected to the form reading apparatus 100 for the characters in the print portion, the items in the item column, and the entered contents.

次に、帳票管理テーブルについて図5を用いて説明する。図5は、第2の実施形態の帳票管理テーブルの一例を示す図である。
帳票管理テーブル450は、帳票画像を管理するための管理情報を記憶したテーブルである。帳票管理テーブル450は、サーバ装置200のHDD等の記憶部に記憶される。
Next, the form management table will be described with reference to FIG. FIG. 5 is a diagram illustrating an example of a form management table according to the second embodiment.
The form management table 450 is a table that stores management information for managing form images. The form management table 450 is stored in a storage unit such as an HDD of the server device 200.

帳票管理テーブル450は、案件番号と、証券番号と、帳票画像ファイル名と、帳票種別と、判定結果とを含む。サーバ装置200は、帳票読取装置100から帳票画像を受信する毎に、帳票管理テーブル450に受信した帳票画像を管理する案件番号、証券番号、帳票画像ファイル名を記録する。   The form management table 450 includes a case number, a security number, a form image file name, a form type, and a determination result. Each time the server apparatus 200 receives a form image from the form reading apparatus 100, the server apparatus 200 records a case number, a security number, and a form image file name for managing the received form image in the form management table 450.

案件番号は、帳票セットを識別する番号である。証券番号は、帳票セットに含まれる帳票を識別する番号である。帳票画像ファイル名は、帳票を読み取った帳票画像のファイル名である。なお、図示を省略するが、帳票画像ファイル名とともに、帳票画像が記憶された場所を示す情報(フォルダ情報、ディレクトリ情報等)を保持できる。   The case number is a number for identifying the form set. The security number is a number for identifying a form included in the form set. The form image file name is the file name of the form image obtained by reading the form. Although illustration is omitted, information (folder information, directory information, etc.) indicating the location where the form image is stored can be held together with the form image file name.

帳票種別は、定型帳票であるか、非定型帳票であるかを識別する情報である。サーバ装置200は、帳票画像の読み取り判定を行い、帳票種別について「定型」又は「非定型」を記録する。帳票種別の初期値は「−(判定前)」である。サーバ装置200は、帳票画像からOCR認識箇所を取得し定型帳票の画像であると判定した場合「定型」、帳票画像からOCR認識箇所を取得できず帳票画像が非定型帳票であると判定した場合「非定型」を記録する。   The form type is information for identifying whether it is a standard form or an atypical form. The server apparatus 200 determines whether to read the form image, and records “standard” or “non-standard” as the form type. The initial value of the form type is “− (before determination)”. When the server apparatus 200 acquires the OCR recognition part from the form image and determines that the image is a standard form image, the server apparatus 200 cannot acquire the OCR recognition part from the form image and determines that the form image is an atypical form. Record “atypical”.

判定結果は、帳票画像について正しく読み取れたか否かを判定した結果を示す情報である。サーバ装置200は、帳票画像について滲みやぼけや読み取り方向(正立か否か)の判定を行い、判定結果について「正常」又は「異常」を記録する。判定結果の初期値は「−(判定前)」である。サーバ装置200は、帳票画像に滲みや読み取り方向間違い等の不備が存在しない場合「正常」、滲みや読み取り方向間違い等の不備が存在する場合「異常」を記録する。また、サーバ装置200は、判定結果が「−(判定前)」の帳票画像を対象として、滲みやぼけや読み取り方向の判定を行う。   The determination result is information indicating a result of determining whether or not the form image has been read correctly. The server apparatus 200 determines the bleeding and blurring of the form image and the reading direction (whether it is upright) and records “normal” or “abnormal” as the determination result. The initial value of the determination result is “− (before determination)”. The server device 200 records “normal” when the form image has no defect such as bleeding or reading direction mistake, and records “abnormal” when there is a defect such as bleeding or reading direction mistake. In addition, the server device 200 performs blurring, blurring, and reading direction determination on a form image whose determination result is “− (before determination)”.

帳票管理テーブル450に記録された情報によって、どの帳票画像の判定結果が「異常」であるかが把握できるため、オペレータは、判定結果「異常」の帳票画像についてのみチェックを行うことが可能となる。また、判定結果「正常」の帳票画像については、オペレータによってチェックを行うことを要しないため、人手による目視検査の労力を軽減することが可能となる。   Since the information recorded in the form management table 450 can identify which form image is judged to be “abnormal”, the operator can check only the form image having the judgment result “abnormal”. . Further, since it is not necessary for the operator to check the form image of the determination result “normal”, it is possible to reduce the labor of the visual inspection manually.

次に、第2の実施形態の帳票画像判定処理について図6を用いて説明する。図6は、第2の実施形態の帳票画像判定処理のフローチャートを示す図である。
帳票画像判定処理は、サーバ装置200が、帳票読取装置100によって読み取られた帳票画像を取得し、取得した帳票画像に対し画像鮮明判定および画像正立判定を行い、判定結果を記録する処理である。帳票画像判定処理は、サーバ装置200の制御部110(プロセッサ111)が実行する処理である。
Next, the form image determination process according to the second embodiment will be described with reference to FIG. FIG. 6 is a flowchart illustrating the form image determination process according to the second embodiment.
The form image determination process is a process in which the server apparatus 200 acquires a form image read by the form reading apparatus 100, performs image sharpness determination and image erecting determination on the acquired form image, and records the determination result. . The form image determination process is a process executed by the control unit 110 (processor 111) of the server device 200.

[ステップS11]制御部110は、予め設定された環境定義パラメータをHDD113から取得する。環境定義パラメータは、後で説明する画像鮮明判定処理および画像正立判定処理において判定条件として用いる予め設定された閾値や上限数の総称である。環境定義パラメータに含まれる閾値等の詳細については、後で画像鮮明判定処理および画像正立判定処理において説明する。   [Step S11] The control unit 110 acquires preset environment definition parameters from the HDD 113. The environment definition parameter is a generic name of a preset threshold value and upper limit number used as determination conditions in the image sharpness determination process and the image erecting determination process described later. Details of the threshold value and the like included in the environment definition parameters will be described later in the image sharpness determination process and the image erecting determination process.

[ステップS12]制御部110は、帳票画像を取得する。より具体的には、制御部110は、帳票管理テーブル450を参照し、判定結果「−(判定前)」である帳票画像ファイルを取得する。   [Step S12] The control unit 110 acquires a form image. More specifically, the control unit 110 refers to the form management table 450 and acquires a form image file having a determination result “− (before determination)”.

[ステップS13]制御部110は、画像鮮明判定処理を実行する。画像鮮明判定処理は、帳票画像に含まれる直線の幅や直線の濃度値に基づいて帳票画像が鮮明であるか否かを判定する処理である。画像鮮明判定処理は、図7を用いて後で説明する。   [Step S13] The control unit 110 executes image sharpness determination processing. The image sharpness determination process is a process for determining whether or not a form image is clear based on the width of a straight line and the density value of the straight line included in the form image. The image sharpness determination process will be described later with reference to FIG.

[ステップS14]制御部110は、画像鮮明判定処理の結果に基づき、帳票画像は鮮明か否かを判定する。制御部110は、画像鮮明判定処理の結果が鮮明である場合にステップS15にすすみ、鮮明でない場合にステップS20にすすむ。   [Step S14] The control unit 110 determines whether the form image is clear based on the result of the image sharpness determination process. The control unit 110 proceeds to step S15 when the result of the image sharpness determination process is clear, and proceeds to step S20 when the result is not clear.

[ステップS15]制御部110は、帳票画像が定型帳票の画像であるか否かを判定する。制御部110は、帳票画像にOCR認識箇所が含まれる場合に、定型帳票であると判定する。制御部110は、定型帳票である場合にステップS19にすすみ、定型帳票でない場合にステップS16にすすむ。   [Step S15] The control unit 110 determines whether the form image is an image of a standard form. The control unit 110 determines that the form is a standard form when the form image includes an OCR recognition portion. The control unit 110 proceeds to step S19 when it is a fixed form, and proceeds to step S16 when it is not a fixed form.

[ステップS16]制御部110は、画像正立判定処理を実行する。画像正立判定処理は、帳票画像に含まれる文字を抽出し、角度を変えて文字認識をすることで帳票画像が正立か否かを判定する処理である。画像正立判定処理は、図17〜図19を用いて後で説明する。   [Step S16] The controller 110 executes an image erecting determination process. The image erecting determination process is a process of determining whether or not the form image is erect by extracting characters included in the form image and performing character recognition at different angles. The image erecting determination process will be described later with reference to FIGS.

[ステップS17]制御部110は、画像正立判定処理の結果に基づき、帳票画像が正立か否かを判定する。制御部110は、帳票画像が正立である場合にステップS19にすすみ、帳票画像が正立でない場合にステップS18にすすむ。   [Step S17] The control unit 110 determines whether the form image is upright based on the result of the image upright determination processing. The control unit 110 proceeds to step S19 when the form image is upright, and proceeds to step S18 when the form image is not upright.

[ステップS18]制御部110は、ステップS12で取得し判定対象とした帳票画像を「異常」と判定し、帳票管理テーブル450の判定結果に「異常」を記録する。
[ステップS19]制御部110は、ステップS12で取得し判定対象とした帳票画像を「正常」と判定し、帳票管理テーブル450の判定結果に「正常」を記録する。
[Step S18] The control unit 110 determines that the form image acquired in step S12 and is the determination target is “abnormal”, and records “abnormal” in the determination result of the form management table 450.
[Step S19] The control unit 110 determines that the form image acquired in step S12 and is the determination target is “normal”, and records “normal” in the determination result of the form management table 450.

[ステップS20]制御部110は、帳票管理テーブル450を参照し、判定結果が「−(判定前)」の帳票画像が存在するか否かを判定する。制御部110は、判定対象の帳票画像が存在する場合はステップS12にすすみ、存在しない場合は帳票画像判定処理を終了する。   [Step S20] The control unit 110 refers to the form management table 450 and determines whether or not there is a form image whose determination result is “-(before determination)”. The control unit 110 proceeds to step S12 when the determination target form image exists, and ends the form image determination process when it does not exist.

次に、第2の実施形態の画像鮮明判定処理について図7を用いて説明する。図7は、第2の実施形態の画像鮮明判定処理のフローチャートを示す図である。
画像鮮明判定処理は、帳票画像に含まれる直線の幅や直線の濃度値に基づいて帳票画像が鮮明であるか否かを判定する処理である。
Next, image sharpness determination processing according to the second embodiment will be described with reference to FIG. FIG. 7 is a flowchart illustrating image sharpness determination processing according to the second embodiment.
The image sharpness determination process is a process for determining whether or not a form image is clear based on the width of a straight line and the density value of the straight line included in the form image.

画像鮮明判定処理は、帳票画像判定処理のステップ13で、サーバ装置200の制御部110(プロセッサ111)が実行する処理である。
[ステップS31]制御部110は、帳票画像についてグレースケール変換値(濃度値)を取得する。グレースケール変換値は、取得した帳票画像を白黒の濃淡で表現した値であり、1画素毎に8ビットの明るさ情報で表した値である。グレースケール変換値「0」は黒を示し、グレースケース変換値「255」は白を示す。グレースケール変換値は、「0」に近い値ほど黒に近い明るさである。
The image clarity determination process is a process executed by the control unit 110 (processor 111) of the server apparatus 200 in step 13 of the form image determination process.
[Step S31] The control unit 110 acquires a grayscale conversion value (density value) for the form image. The grayscale conversion value is a value representing the acquired form image in black and white, and is a value represented by 8-bit brightness information for each pixel. The grayscale conversion value “0” indicates black, and the grace case conversion value “255” indicates white. The grayscale conversion value is closer to black as the value is closer to “0”.

[ステップS32]制御部110は、帳票画像の解像度を取得する。なお、解像度は、1インチあたりのピクセル数を示す値(ppi)等の単位で表す。
[ステップS33]制御部110は、帳票画像から直線を抽出する。なお、帳票画像から直線を抽出する方法は、ハフ変換法(Hough変換法)等の既存技術を用いることができる。
[Step S32] The control unit 110 acquires the resolution of the form image. The resolution is expressed in units such as a value (ppi) indicating the number of pixels per inch.
[Step S33] The control unit 110 extracts a straight line from the form image. As a method for extracting a straight line from a form image, an existing technique such as a Hough transform method (Hough transform method) can be used.

[ステップS34]制御部110は、帳票画像から直線を抽出できたか否かを判定する。制御部110は、直線を抽出できた場合はステップS35にすすみ、直線を抽出できなかった場合はステップS41にすすむ。   [Step S34] The control unit 110 determines whether a straight line has been extracted from the form image. If the straight line can be extracted, the control unit 110 proceeds to step S35, and if the straight line cannot be extracted, the control unit 110 proceeds to step S41.

[ステップS35]制御部110は、帳票画像から二値化閾値を算出する。なお、二値化閾値を算出する方法は、大津の二値化等の既存技術を用いることができる。二値化閾値は、ある対象点(ピクセル)についてグレースケール変換値(濃度値)が白色であるか又は黒色であるかを判定する基準となる値である。二値化閾値よりも少ない値である場合、制御部110は、対象点を黒色と判定する。   [Step S35] The control unit 110 calculates a binarization threshold value from the form image. As a method for calculating the binarization threshold, existing techniques such as binarization by Otsu can be used. The binarization threshold value is a value serving as a reference for determining whether a grayscale conversion value (density value) is white or black for a certain target point (pixel). When the value is smaller than the binarization threshold, the control unit 110 determines that the target point is black.

[ステップS36]制御部110は、太さ鮮明判定処理を実行する。太さ鮮明判定処理は、帳票画像から抽出した直線の太さに基づいて、帳票画像が鮮明であるか否かを判定する処理である。太さ鮮明判定処理は、図9〜図11を用いて後で説明する。   [Step S36] The control unit 110 executes a clear thickness determination process. The thickness clearness determination process is a process for determining whether or not the form image is clear based on the thickness of the straight line extracted from the form image. The thickness clearness determination process will be described later with reference to FIGS.

[ステップS37]制御部110は、太さ鮮明判定処理の結果が鮮明であるか否かを判定する。制御部110は、太さ鮮明判定処理の結果が鮮明である場合はステップS38にすすみ、鮮明でない場合はステップS41にすすむ。   [Step S37] The control unit 110 determines whether or not the result of the thickness sharpness determination process is clear. The control unit 110 proceeds to step S38 when the result of the thickness sharpness determination process is clear, and proceeds to step S41 when the result is not clear.

[ステップS38]制御部110は、直線近傍鮮明判定処理を実行する。直線近傍鮮明判定処理は、帳票画像から抽出した直線の近傍の濃度値に基づいて、帳票画像が鮮明であるか否かを判定する処理である。直線近傍鮮明判定処理は、図13〜図15を用いて後で説明する。   [Step S38] The control unit 110 executes straight line neighborhood sharpness determination processing. The straight line vicinity clear determination process is a process for determining whether or not the form image is clear based on the density value in the vicinity of the straight line extracted from the form image. The straight line vicinity clear determination process will be described later with reference to FIGS.

[ステップS39]制御部110は、直線近傍鮮明判定処理の結果が鮮明であるか否かを判定する。制御部110は、直線近傍鮮明判定処理の結果が鮮明である場合はステップS40にすすみ、鮮明でない場合はステップS41にすすむ。   [Step S39] The controller 110 determines whether or not the result of the straight line vicinity clear determination process is clear. The control unit 110 proceeds to step S40 if the result of the straight line vicinity clear determination process is clear, and proceeds to step S41 if not clear.

[ステップS40]制御部110は、帳票画像を鮮明と判定し、画像鮮明判定処理を終了する。
[ステップS41]制御部110は、帳票画像を不鮮明と判定し、画像鮮明判定処理を終了する。
[Step S40] The control unit 110 determines that the form image is clear, and ends the image sharpness determination process.
[Step S41] The control unit 110 determines that the form image is unclear and ends the image clear determination process.

次に、第2の実施形態の太さ鮮明判定処理のイメージについて図8を用いて説明する。図8は、第2の実施形態の太さ鮮明判定処理のイメージの一例を示す図である。
太さ鮮明判定処理のイメージ500は、帳票画像から抽出した直線の太さに基づいて、帳票画像が鮮明であるか否かを判定する処理の概念図である。直線の太さが所定の範囲内の場合は帳票画像が鮮明であり、直線の太さが異なる場合は帳票画像について歪みや滲みが生じて不鮮明であると判定する。
Next, an image of the thickness sharpness determination process of the second embodiment will be described with reference to FIG. FIG. 8 is a diagram illustrating an example of an image of a sharpness determination process according to the second embodiment.
An image 500 of the sharpness determination processing is a conceptual diagram of processing for determining whether or not the form image is clear based on the thickness of the straight line extracted from the form image. When the thickness of the straight line is within a predetermined range, the form image is clear. When the thickness of the straight line is different, it is determined that the form image is unclear due to distortion or blurring.

対象線M501は、帳票画像520に含まれる複数の直線(直線La531,直線Lb532,直線Lc533,直線Ld534,直線Le535等)のうち、太さ鮮明判定の対象とする線である。対象点Q504は、対象線M501に所定の間隔で設けた点Pa502〜点Pn503のうち、太さ鮮明判定の対象とする点である。対象線M501上の所定の間隔で設けたそれぞれの点Pa502〜点Pn503における対象線Mの太さ508の値を求める。直線N505は、対象線Mの太さ508を求めるために用いる仮想的な直線である。直線N505は、対象点Q504を通過し、かつ、対象線M501に対して垂直な直線である。   The target line M501 is a line to be subjected to a sharpness determination among a plurality of straight lines (straight line La531, straight line Lb532, straight line Lc533, straight line Ld534, straight line Le535, etc.) included in the form image 520. The target point Q504 is a point to be subjected to a clear thickness determination among the points Pa502 to Pn503 provided on the target line M501 at a predetermined interval. The value of the thickness 508 of the target line M at each of the points Pa502 to Pn503 provided at predetermined intervals on the target line M501 is obtained. The straight line N505 is a virtual straight line used for obtaining the thickness 508 of the target line M. The straight line N505 is a straight line that passes through the target point Q504 and is perpendicular to the target line M501.

まず、対象線Mの太さ508を求めるために、対象線M501のY軸正方向の太さを求める。直線N505上の対象点Q504を起点とし、1ピクセルY軸正方向に位置する点である対象点R507について、対象点R507の濃度値と二値化閾値とを比較して白色又は黒色の判定を行う(ア)。判定結果が黒色の場合、対象線M501のY軸正方向太さ509としてカウントし、さらに1ピクセルY軸正方向に位置する点を新たな対象点Rとし、同様に処理する(イ)。対象点Rについて判定結果が白色の場合、対象線M501のY軸正方向太さ509のカウントをせず、対象線M501についてY軸負方向の太さを求める。   First, in order to obtain the thickness 508 of the target line M, the thickness of the target line M501 in the Y-axis positive direction is obtained. The target point R507, which is a point located in the positive direction of one pixel Y-axis starting from the target point Q504 on the straight line N505, is compared with the density value of the target point R507 and the binarization threshold to determine white or black. Do (a). When the determination result is black, the target line M501 is counted as the Y-axis positive direction thickness 509, and a point positioned in the positive direction of one pixel Y-axis is set as a new target point R, and the same processing is performed (A). When the determination result for the target point R is white, the Y-axis positive direction thickness 509 of the target line M501 is not counted, and the Y-axis negative direction thickness is determined for the target line M501.

次に、対象線M501についてY軸負方向の太さを求める。正方向の場合と同様に直線N上の対象点Q504を起点とし、1ピクセルY軸負方向に位置する点について新たな対象点Rとして、対象点Rの濃度値と二値化閾値とを比較して白色又は黒色の判定を行う(ウ)。判定結果が黒色の場合、対象線M501のY軸負方向太さ510としてカウントし、さらに1ピクセルY軸負方向に位置する点を新たな対象点Rとし、同様に処理する(エ)。判定結果が白色の場合、対象線M501のY軸負方向太さ510のカウントをせず、対象線Mの太さ508を求める。   Next, the thickness of the target line M501 in the negative Y-axis direction is obtained. As in the case of the positive direction, the target point Q504 on the straight line N is set as the starting point, and the density value of the target point R is compared with the binarization threshold as a new target point R for a point located in the negative direction of one pixel Y axis. Then, white or black is determined (c). When the determination result is black, the target line M501 is counted as the Y-axis negative direction thickness 510, and a point located in the negative direction of one pixel Y-axis is set as a new target point R, and the same processing is performed (D). When the determination result is white, the thickness 508 of the target line M is obtained without counting the Y-axis negative direction thickness 510 of the target line M501.

次に、対象線Mの太さ508を求める。対象線Mの太さ508は、Y軸正方向太さ509とY軸負方向太さ510とを加算し、重複した対象点Qのピクセル数を減算した値として求めることができる。図8においては、Y軸正方向太さ「2(ピクセル)」とY軸負方向太さ「2(ピクセル)」を加算し、対象点Q「1(ピクセル)」を減算した値「3(ピクセル)」が対象線Mの太さ508として求められる。   Next, the thickness 508 of the target line M is obtained. The thickness 508 of the target line M can be obtained as a value obtained by adding the Y-axis positive direction thickness 509 and the Y-axis negative direction thickness 510 and subtracting the number of pixels of the overlapping target point Q. In FIG. 8, a value “3 (”) obtained by adding the Y axis positive direction thickness “2 (pixel)” and the Y axis negative direction thickness “2 (pixel)” and subtracting the target point Q “1 (pixel)”. Pixel) ”is obtained as the thickness 508 of the target line M.

このようにして、対象線M501の点Pa502〜点Pn503それぞれにおいて、対象線Mの太さ508を求める。点Pa502〜点Pn503それぞれの点における対象線M501の太さの値が、所定の範囲内である場合に対象線M501は鮮明であると判定する。   In this way, the thickness 508 of the target line M is obtained at each of the points Pa502 to Pn503 of the target line M501. When the value of the thickness of the target line M501 at each of the points Pa502 to Pn503 is within a predetermined range, the target line M501 is determined to be clear.

帳票画像520に含まれる直線が鮮明であると判定した場合、帳票画像520に対する太さ鮮明判定処理の結果が鮮明と判定する。
次に、図9から図11を用いて第2の実施形態の太さ鮮明判定処理について説明する。図9は、第2の実施形態の太さ鮮明判定処理のフローチャートを示す図である(その1)。図10は、第2の実施形態の太さ鮮明判定処理のフローチャートを示す図である(その2)。図11は、第2の実施形態の太さ鮮明判定処理のフローチャートを示す図である(その3)。
When it is determined that the straight line included in the form image 520 is clear, it is determined that the result of the thickness clear determination process for the form image 520 is clear.
Next, a clear thickness determination process according to the second embodiment will be described with reference to FIGS. 9 to 11. FIG. 9 is a diagram illustrating a flowchart of a thickness clearness determination process according to the second embodiment (part 1). FIG. 10 is a diagram illustrating a flowchart of a thickness clearness determination process according to the second embodiment (part 2). FIG. 11 is a view illustrating a flowchart of a thickness clearness determination process according to the second embodiment (part 3).

太さ鮮明判定処理は、帳票画像から抽出した直線の太さに基づいて、帳票画像が鮮明であるか否かを判定する処理である。太さ鮮明判定処理は、画像鮮明判定処理のステップ36で、サーバ装置200の制御部110(プロセッサ111)が実行する処理である。   The thickness clearness determination process is a process for determining whether or not the form image is clear based on the thickness of the straight line extracted from the form image. The thickness sharpness determination process is a process executed by the control unit 110 (processor 111) of the server device 200 in step 36 of the image sharpness determination process.

[ステップS51]制御部110は、ステップS33で帳票画像から抽出した直線のうち、長い順に所定数の直線La〜Lnを選定する。
所定数は、予めHDD113に格納されている値である。たとえば、所定数が「5」である場合、制御部110は、図8に示したとおり、長い順に5本の直線La531〜直線Le535を選定する。また、制御部110は、直線La〜直線Leを選定する条件として長さのみに限らず、(1)抽出した直線のうち最長の直線を直線Laとし、(2)直線Laに平行し、かつ、直線Laから最遠の直線を直線Lbとし、(3)直線Laに直交する角度であり、かつ、直線Laから最遠の直線を直線Lcとし、(4)直線Lcに並行し、かつ、直線Lcから最遠の直線を直線Ldとし、(5)帳票画像の中心点から最短距離に位置する直線を直線Leとすることができる。また、制御部110は、直線La〜Leを選定するに際し同一条件の直線が複数存在する場合、(A)長さが長い直線、(B)帳票画像の原点(左上角)に近い直線、を優先して選定することができる。
[Step S51] The control unit 110 selects a predetermined number of straight lines La to Ln in the longest order from the straight lines extracted from the form image in step S33.
The predetermined number is a value stored in the HDD 113 in advance. For example, when the predetermined number is “5”, the control unit 110 selects five straight lines La531 to Le535 in the longest order as illustrated in FIG. Further, the control unit 110 is not limited to the length as a condition for selecting the straight line La to the straight line Le. (1) The longest straight line among the extracted straight lines is defined as the straight line La, (2) parallel to the straight line La, and The straight line farthest from the straight line La is the straight line Lb, (3) the angle is orthogonal to the straight line La, the straight line farthest from the straight line La is the straight line Lc, (4) parallel to the straight line Lc, and The straight line farthest from the straight line Lc can be defined as the straight line Ld, and (5) the straight line located at the shortest distance from the center point of the form image can be defined as the straight line Le. In addition, when there are a plurality of straight lines having the same condition when selecting the straight lines La to Le, the control unit 110 selects (A) a long straight line and (B) a straight line close to the origin (upper left corner) of the form image. Priority can be selected.

なお、制御部110は、所定数の本数の直線を抽出できない場合であっても、抽出できた直線のみで太さ鮮明判定処理を実行できる。
[ステップS52]制御部110は、直線La〜Lnから対象線Mを決定する。たとえば、制御部110は、直線La〜Lnのうち長い順に対象線Mを決定できる。
Note that, even when the predetermined number of straight lines cannot be extracted, the control unit 110 can execute the sharpness determination process using only the extracted straight lines.
[Step S52] The control unit 110 determines the target line M from the straight lines La to Ln. For example, the control unit 110 can determine the target line M in the longest order among the straight lines La to Ln.

[ステップS53]制御部110は、対象線Mについて点抽出間隔に基づき点Pa〜Pnの座標を決定する。点抽出間隔は、予め環境定義パラメータで設定する値であり、直線上の点を抽出する間隔(長さ)を指定する値である。たとえば、点抽出間隔は、「30000」(μm)と指定できる。   [Step S53] The control unit 110 determines the coordinates of the points Pa to Pn for the target line M based on the point extraction interval. The point extraction interval is a value set in advance by an environment definition parameter, and is a value that specifies an interval (length) for extracting points on a straight line. For example, the point extraction interval can be designated as “30000” (μm).

[ステップS54]制御部110は、点Pa〜Pnから対象点Qを決定する。
[ステップS55]制御部110は、対象点Qの座標を取得する。
[ステップS56]制御部110は、対象点Qが対象線M以外の線と交わっている点であるか否かを判定する。言い換えると、対象点Qが、対象線Mの太さを求める点として適切か否かを判定する。対象点Qが対象線M以外の線と交わっている点(交点や頂点等)である場合、対象線Mの太さが適切に判定できないためである。
[Step S54] The controller 110 determines the target point Q from the points Pa to Pn.
[Step S55] The control unit 110 acquires the coordinates of the target point Q.
[Step S56] The control unit 110 determines whether or not the target point Q is a point intersecting with a line other than the target line M. In other words, it is determined whether or not the target point Q is appropriate as a point for obtaining the thickness of the target line M. This is because when the target point Q is a point (intersection, vertex, etc.) that intersects with a line other than the target line M, the thickness of the target line M cannot be determined appropriately.

制御部110は、対象点Qが対象線M以外の線と交わっている点である場合はステップS57にすすみ、そうでない場合はステップS58にすすむ。
[ステップS57]制御部110は、既に対象点Qとした点を除き、点Pa〜Pnから次の対象点Qを決定し、ステップS55にすすむ。
If the target point Q is a point that intersects with a line other than the target line M, the control unit 110 proceeds to step S57, and otherwise proceeds to step S58.
[Step S57] The control unit 110 determines the next target point Q from the points Pa to Pn, excluding the points already set as the target point Q, and proceeds to step S55.

[ステップS58]制御部110は、対象点Qを通り、かつ、対象線Mと直交する仮想的な直線Nを決定する。
[ステップS59]制御部110は、対象線Mの太さを求めるための変数である正負両方向の太さカウンタ値を初期化する。言い換えると、制御部110は、正方向太さカウンタ値と負方向太さカウンタ値の値を「0」に設定する。
[Step S58] The control unit 110 determines a virtual straight line N that passes through the target point Q and is orthogonal to the target line M.
[Step S59] The control unit 110 initializes a thickness counter value in both positive and negative directions, which is a variable for obtaining the thickness of the target line M. In other words, the control unit 110 sets the values of the positive direction thickness counter value and the negative direction thickness counter value to “0”.

[ステップS60]制御部110は、直線Nに応じて太さを算出する軸を決定する。たとえば、図8に示した例では、直線NがY軸の方向であるため、太さを算出する軸はY軸となる。   [Step S60] The control unit 110 determines an axis for calculating a thickness according to the straight line N. For example, in the example shown in FIG. 8, since the straight line N is in the Y-axis direction, the axis for calculating the thickness is the Y-axis.

[ステップS61]制御部110は、対象軸の正方向を対象方向とする。たとえば、図8に示した例では、まず、Y軸正方向を対象方向とする。
[ステップS62]制御部110は、対象点Qから直線N上の1ピクセル対象方向に位置する点を対象点Rとする。
[Step S61] The control unit 110 sets the positive direction of the target axis as the target direction. For example, in the example shown in FIG. 8, first, the Y axis positive direction is set as the target direction.
[Step S62] The control unit 110 sets a point located in the one-pixel target direction on the straight line N from the target point Q as the target point R.

[ステップS63]制御部110は、対象点Rの濃度値と二値化閾値を比較する。
[ステップS64]制御部110は、ステップS63における比較結果、対象点Rは黒色か否かを判定する。たとえば、二値化閾値よりも対象点Rの濃度値が少ない場合は、対象点Rは黒色であると判定する。
[Step S63] The control unit 110 compares the density value of the target point R with the binarization threshold.
[Step S64] The control unit 110 determines whether the target point R is black as a result of the comparison in step S63. For example, when the density value of the target point R is smaller than the binarization threshold, it is determined that the target point R is black.

制御部110は、比較した結果、対象点Rが黒色である場合はステップS65にすすみ、対象点Rが黒色でない場合はステップS67にすすむ。
[ステップS65]制御部110は、対象方向の太さカウンタ値を加算する。たとえば、図8に示した点では、まず、Y軸正方向太さカウンタ値を加算する。
As a result of the comparison, the control unit 110 proceeds to step S65 when the target point R is black, and proceeds to step S67 when the target point R is not black.
[Step S65] The control unit 110 adds the thickness counter value in the target direction. For example, in the point shown in FIG. 8, first, the Y-axis positive direction thickness counter value is added.

[ステップS66]制御部110は、対象点Rから直線N上の1ピクセル対象方向の点を次の対象点Rとし、ステップS63にすすむ。
[ステップS67]制御部110は、対象軸の正負両方向について対象方向としたか否かを判定する。制御部110は、対象軸の正負両方向について対象方向としていない場合にステップS68にすすみ、両方向について対象とした場合にステップS69にすすむ。
[Step S66] The control unit 110 sets a point in the one-pixel target direction on the straight line N from the target point R as the next target point R, and proceeds to step S63.
[Step S67] The control unit 110 determines whether or not the positive and negative directions of the target axis are set as target directions. The control unit 110 proceeds to step S68 when both the positive and negative directions of the target axis are not set as the target direction, and proceeds to step S69 when the target axis is set as the target direction.

[ステップS68]制御部110は、対象軸の負方向を対象方向とし、ステップS62にすすむ。たとえば、図8に示した例では、対象軸がY軸であり、まずY軸正方向を対象方向とし、次にY軸負方向を対象方向とする。   [Step S68] The control unit 110 sets the negative direction of the target axis as the target direction, and proceeds to step S62. For example, in the example shown in FIG. 8, the target axis is the Y axis, and first the Y axis positive direction is the target direction, and then the Y axis negative direction is the target direction.

[ステップS69]制御部110は、正負両方向の太さカウンタ値を加算した値に基づき、対象点Qにおける対象線Mの太さの値を算出する。たとえば、図8に示したとおり、対象線Mの太さの値は、Y軸正方向太さカウンタ値とY軸負方向太さカウンタ値を加算し、重複した対象点Qのピクセル数を減算した値として求める。   [Step S69] The controller 110 calculates the value of the thickness of the target line M at the target point Q based on the value obtained by adding the thickness counter values in both the positive and negative directions. For example, as shown in FIG. 8, the thickness value of the target line M is obtained by adding the Y-axis positive direction thickness counter value and the Y-axis negative direction thickness counter value and subtracting the number of pixels of the overlapping target point Q. Calculated as the value obtained.

[ステップS70]制御部110は、全ての点Pa〜Pnについて対象点Qとしたか否かを判定する。制御部110は、全ての点Pa〜Pnについて対象点Qとしていない場合にステップS71にすすみ、全ての点Pa〜Pnについて対象点Qとした場合にステップS72にすすむ。   [Step S <b> 70] The control unit 110 determines whether or not all points Pa to Pn are set as target points Q. The control unit 110 proceeds to step S71 when all the points Pa to Pn are not set as the target points Q, and proceeds to step S72 when all the points Pa to Pn are set as the target points Q.

[ステップS71]制御部110は、既に対象点Qとした点を除き、点Pa〜Pnから次の対象点Qを決定し、ステップS55にすすむ。
[ステップS72]制御部110は、ステップS69で算出した太さの値に基づき、点Pa〜Pnの太さ平均値を算出する。
[Step S71] The control unit 110 determines the next target point Q from the points Pa to Pn, excluding the points already set as the target point Q, and proceeds to step S55.
[Step S72] The control unit 110 calculates an average thickness value of the points Pa to Pn based on the thickness value calculated in step S69.

[ステップS73]制御部110は、算出した太さ平均値と各点Pa〜Pnの太さの値との差を算出する。
[ステップS74]制御部110は、ステップS73の算出結果、太さ閾値以上の差のある点を閾値外点とする。太さ閾値は、予め環境定義パラメータで設定する値であり、太さの値(μm)で指定する値である。たとえば、太さ閾値は「200」(μm)のように指定できる。
[Step S73] The controller 110 calculates a difference between the calculated thickness average value and the thickness values of the points Pa to Pn.
[Step S74] As a result of the calculation in step S73, the control unit 110 sets a point having a difference equal to or larger than the thickness threshold as an out-threshold point. The thickness threshold is a value set in advance by an environment definition parameter, and is a value specified by a thickness value (μm). For example, the thickness threshold can be specified as “200” (μm).

[ステップS75]制御部110は、閾値外点が直線判定閾値以上の割合で存在するか否かを判定する。直線判定閾値は、予め環境定義パラメータで設定する値である。直線判定閾値は、対象線Mに対して太さを測定するために設定した点(点Pa〜Pn)の総数に対する閾値外点の数の割合を示す値である。たとえば、直線判定閾値は「10」(%)のように指定できる。制御部110は、閾値外点が対象線M上の全ての点(点Pa〜Pn)の総数に対して、直線判定閾値以上の割合で存在する場合、対象線Mの太さが均一でない(対象線Mの太さにバラツキがある)と判定できる。   [Step S75] The controller 110 determines whether or not there are points outside the threshold at a rate equal to or greater than the straight line determination threshold. The straight line determination threshold is a value set in advance by an environment definition parameter. The straight line determination threshold is a value indicating the ratio of the number of points outside the threshold to the total number of points (points Pa to Pn) set for measuring the thickness of the target line M. For example, the straight line determination threshold value can be specified as “10” (%). When the out-of-threshold points are present at a ratio equal to or greater than the straight line determination threshold with respect to the total number of all points (points Pa to Pn) on the target line M, the control unit 110 does not have a uniform thickness of the target line M ( It can be determined that there is variation in the thickness of the target line M).

制御部110は、閾値外点が直線判定閾値以上の割合で存在する場合はステップS76にすすみ、所定の割合以上で存在しない場合はステップS77にすすむ。
[ステップS76]制御部110は、対象線Mを不鮮明と判定する。
The control unit 110 proceeds to step S76 if the out-of-threshold points are present at a ratio equal to or greater than the straight line determination threshold value, and proceeds to step S77 when the non-threshold points are not present at a predetermined ratio or more.
[Step S76] The control unit 110 determines that the target line M is unclear.

[ステップS77]制御部110は、対象線Mを鮮明と判定する。
[ステップS78]制御部110は、全ての直線La〜Lnについて、対象線Mとしたか否かを判定する。制御部110は、全ての直線について対象線Mとしていない場合はステップS79にすすみ、全ての直線について対象線Mとした場合はステップS80にすすむ。
[Step S77] The control unit 110 determines that the target line M is clear.
[Step S78] The control unit 110 determines whether or not all the straight lines La to Ln are set as the target line M. The control unit 110 proceeds to step S79 when all the straight lines are not set as the target line M, and proceeds to step S80 when all the straight lines are set as the target line M.

[ステップS79]制御部110は、既に対象線Mとした直線を除き、直線La〜Lnから次の対象線Mを決定し、ステップS53にすすむ。
[ステップS80]制御部110は、全ての直線La〜Lnを鮮明と判定したか否かを判定する。制御部110は、全ての直線La〜Lnを鮮明と判定した場合はステップS82にすすみ、全ての直線La〜Lnを鮮明と判定しなかった場合はステップS81にすすむ。
[Step S79] The control unit 110 determines the next target line M from the straight lines La to Ln, excluding the straight line already set as the target line M, and proceeds to step S53.
[Step S80] The controller 110 determines whether or not all the straight lines La to Ln are determined to be clear. The control unit 110 proceeds to step S82 when it is determined that all the straight lines La to Ln are clear, and proceeds to step S81 when it is not determined that all the straight lines La to Ln are clear.

[ステップS81]制御部110は、太さ鮮明判定処理の結果を不鮮明とし、太さ鮮明判定処理を終了する。
[ステップS82]制御部110は、太さ鮮明判定処理の結果を鮮明とし、太さ鮮明判定処理を終了する。
[Step S81] The control unit 110 blurs the result of the sharpness determination process, and ends the clearness determination process.
[Step S82] The control unit 110 sets the result of the sharpness determination process as clear, and ends the clearness determination process.

次に、第2の実施形態の直線近傍鮮明判定処理のイメージについて図12を用いて説明する。図12は、第2の実施形態の直線近傍鮮明判定処理のイメージの一例を示す図である。   Next, an image of the straight line vividness determination process of the second embodiment will be described with reference to FIG. FIG. 12 is a diagram illustrating an example of an image of the straight line neighborhood sharpness determination process according to the second embodiment.

直線近傍鮮明判定処理のイメージ600は、帳票画像から抽出した直線の近傍の濃度値に基づいて、帳票画像が鮮明であるか否かを判定する処理の概念図である。
帳票画像605に含まれる対象線M601について、所定の間隔で設けた点のうち直線近傍鮮明判定処理で判定する対象の点を対象点Q602とする。
The image 600 of the straight line vicinity clear determination process is a conceptual diagram of the process for determining whether or not the form image is clear based on the density value in the vicinity of the straight line extracted from the form image.
With respect to the target line M601 included in the form image 605, a target point to be determined in the straight line vicinity clearness determination process among points provided at predetermined intervals is set as a target point Q602.

対象点Q602を中心として所定の大きさの正方形F603を設定し、正方形F603に含まれるそれぞれの点の濃度値について二値化閾値と比較して白色又は黒色の判定をする。たとえば、正方形F603に含まれる対象点S604の濃度値を二値化閾値と比較し、二値化閾値よりも大きい値であった場合、対象点S604は白色と判定される。   A square F603 having a predetermined size with respect to the target point Q602 is set, and the density value of each point included in the square F603 is determined to be white or black compared with the binarization threshold. For example, the density value of the target point S604 included in the square F603 is compared with the binarization threshold value. If the density value is larger than the binarization threshold value, the target point S604 is determined to be white.

正方形F603に含まれるそれぞれの点について白色か黒色かを判定し、白色と判定された点の白色平均濃度値と黒色と判定された点の黒色平均濃度値を求める。
黒色と判定された点の濃度値と黒色平均濃度値との差が黒色閾値以上の差である場合、黒色部の濃度値が所定の範囲内に無いため、帳票画像が鮮明でないと判定する。黒色閾値は、予め環境定義パラメータで設定された値であり、黒色と判定された対象点の濃度値が所定の範囲内であるか否かを判定する値である。また、白色と判定された点の濃度値と白色平均濃度値との差が白色閾値以上の差である場合、白色部の濃度値が所定の範囲内に無いため、帳票画像が鮮明でないと判定する。白色閾値は、予め環境定義パラメータで設定された値であり、白色と判定された対象点の濃度値が所定の範囲内であるか否かを判定する値である。黒色と判定された点の濃度値と白色と判定された点の濃度値それぞれについて、黒色閾値および白色閾値の範囲内に無い場合(濃度値にバラツキがある場合)は、帳票画像605に滲みやぼけが発生している蓋然性が高い。このため、帳票画像605は、不鮮明であると判定される。
It is determined whether each point included in the square F603 is white or black, and the white average density value of the point determined to be white and the black average density value of the point determined to be black are obtained.
When the difference between the density value of the point determined to be black and the black average density value is a difference equal to or greater than the black threshold value, it is determined that the form image is not clear because the density value of the black portion is not within the predetermined range. The black threshold value is a value set in advance by the environment definition parameter, and is a value for determining whether or not the density value of the target point determined to be black is within a predetermined range. In addition, when the difference between the density value of the point determined to be white and the white average density value is equal to or greater than the white threshold value, the density value of the white portion is not within a predetermined range, and thus the form image is determined not to be clear. To do. The white threshold value is a value set in advance by the environment definition parameter, and is a value for determining whether or not the density value of the target point determined to be white is within a predetermined range. If the density value of the point determined to be black and the density value of the point determined to be white are not within the range of the black threshold value and the white threshold value (if the density value varies), the form image 605 is blurred. There is a high probability that blur is occurring. For this reason, it is determined that the form image 605 is unclear.

また、黒色平均濃度値と白色平均濃度値との差が白黒濃度閾値以下である場合、白色と黒色とのコントラストが少ないため、帳票画像が鮮明でないと判定する。白黒濃度閾値は、予め環境定義パラメータで設定された値であり、白色と判定された部分と黒色と判定された部分とのコントラストの差を判定する基準となる値である。   If the difference between the black average density value and the white average density value is equal to or smaller than the black and white density threshold, it is determined that the form image is not clear because the contrast between white and black is small. The black-and-white density threshold value is a value set in advance by an environment definition parameter, and is a reference value for determining a difference in contrast between a portion determined to be white and a portion determined to be black.

このように、帳票画像から抽出した直線の近傍の濃度値に基づいて、帳票画像が鮮明であるか否かを判定できる。
次に、図13から図15を用いて第2の実施形態の直線近傍鮮明判定処理について説明する。図13は、第2の実施形態の直線近傍鮮明判定処理のフローチャートを示す図である(その1)。図14は、第2の実施形態の直線近傍鮮明判定処理のフローチャートを示す図である(その2)。図15は、第2の実施形態の直線近傍鮮明判定処理のフローチャートを示す図である(その3)。
In this way, it is possible to determine whether or not the form image is clear based on the density value near the straight line extracted from the form image.
Next, the straight line neighborhood sharpness determination process of the second embodiment will be described with reference to FIGS. 13 to 15. FIG. 13 is a diagram illustrating a flowchart of the straight line vicinity clear determination process according to the second embodiment (part 1). FIG. 14 is a diagram illustrating a flowchart of straight line vicinity clearness determination processing according to the second embodiment (part 2). FIG. 15 is a diagram illustrating a flowchart of straight line neighborhood sharpness determination processing according to the second embodiment (part 3).

直線近傍鮮明判定処理は、帳票画像から抽出した直線の近傍の濃度値に基づいて、帳票画像が鮮明であるか否かを判定する処理である。直線近傍鮮明判定処理は、画像鮮明判定処理のステップS38で、サーバ装置200の制御部110(プロセッサ111)が実行する処理である。   The straight line vicinity clear determination process is a process for determining whether or not the form image is clear based on the density value in the vicinity of the straight line extracted from the form image. The straight line neighborhood sharpness determination process is a process executed by the control unit 110 (processor 111) of the server device 200 in step S38 of the image sharpness determination process.

[ステップS91]制御部110は、ステップS51で抽出した直線La〜Lnから対象線Mを決定する。
[ステップS92]制御部110は、対象線M上の点Pa〜Pnから対象点Qを決定する。
[Step S91] The control unit 110 determines the target line M from the straight lines La to Ln extracted in step S51.
[Step S92] The control unit 110 determines the target point Q from the points Pa to Pn on the target line M.

[ステップS93]制御部110は、ステップS70で求めた対象点Qの太さの値を取得する。
[ステップS94]制御部110は、対象点Qを中心として囲む正方形Fの一辺の値を設定する。より具体的には、制御部110は、対象点Qの太さを上回る最小の奇数のピクセル数が正方形Fの一辺の値となるよう設定する。図12の例では、対象線M601の太さは3ピクセルであり、正方形F603の一辺の値は5ピクセルと設定されている。
[Step S93] The control unit 110 acquires the value of the thickness of the target point Q obtained in step S70.
[Step S94] The control unit 110 sets a value of one side of the square F that surrounds the target point Q. More specifically, the control unit 110 sets the minimum odd number of pixels exceeding the thickness of the target point Q to be a value on one side of the square F. In the example of FIG. 12, the thickness of the target line M601 is 3 pixels, and the value of one side of the square F603 is set to 5 pixels.

[ステップS95]制御部110は、正方形Fの内側領域から1ピクセル抽出し対象点Sを決定する。たとえば、制御部110は、正方形Fの内側領域の角に位置する点から順に対象点Sと決定できる。   [Step S95] The control unit 110 extracts one pixel from the inner area of the square F and determines the target point S. For example, the control unit 110 can determine the target point S sequentially from the point located at the corner of the inner area of the square F.

[ステップS96]制御部110は、対象点Sの濃度値と二値化閾値を比較する。
[ステップS97]制御部110は、ステップS96における比較結果、対象点Sは黒色か否かを判定する。たとえば、二値化閾値よりも対象点Sの濃度値が少ない場合は、対象点Sは黒色であると判定する。
[Step S96] The control unit 110 compares the density value of the target point S with the binarization threshold value.
[Step S97] The control unit 110 determines whether the target point S is black as a result of the comparison in step S96. For example, when the density value of the target point S is smaller than the binarization threshold, it is determined that the target point S is black.

制御部110は、比較した結果、対象点Sが黒色である場合はステップS99にすすみ、対象点Sが黒色でない場合はステップS98にすすむ。
[ステップS98]制御部110は、対象点Sを白色対象点とする。
As a result of the comparison, the control unit 110 proceeds to step S99 if the target point S is black, and proceeds to step S98 if the target point S is not black.
[Step S98] The control unit 110 sets the target point S as a white target point.

[ステップS99]制御部110は、対象点Sを黒色対象点とする。
[ステップS100]制御部110は、正方形Fの内側領域の全ての点の濃度値について二値化閾値と比較済みか否かを判定する。
[Step S99] The control unit 110 sets the target point S as a black target point.
[Step S100] The control unit 110 determines whether or not the density values of all points in the inner region of the square F have been compared with the binarization threshold.

制御部110は、全ての点の濃度値について比較済みである場合はステップS102にすすみ、比較済みでない場合はステップS101にすすむ。
[ステップS101]制御部110は、既に対象点Sとした点を除き、正方形Fの内側領域から次の対象点Sを決定し、ステップS96にすすむ。
The control unit 110 proceeds to step S102 if the density values of all points have been compared, and proceeds to step S101 if not compared.
[Step S101] The control unit 110 determines a next target point S from the inner area of the square F except for points that have already been set as the target point S, and proceeds to step S96.

[ステップS102]制御部110は、黒色対象点について、黒色平均濃度値を算出する。言い換えると、制御部110は、ステップS99で黒色対象点とした全ての対象点Sの濃度値を加算し、加算した値を黒色対象点の個数で割ることで黒色平均濃度値を求める。   [Step S102] The control unit 110 calculates a black average density value for the black target point. In other words, the control unit 110 adds the density values of all the target points S that are black target points in step S99, and calculates the black average density value by dividing the added value by the number of black target points.

[ステップS103]制御部110は、各黒色対象点の濃度値と黒色平均濃度値との差を算出する。
[ステップS104]制御部110は、ステップS103で算出した結果、黒色閾値以上の差のある黒色対象点が存在するか否かを判定する。黒色閾値は、予め環境定義パラメータで設定された値であり、黒色と判定された対象点の濃度値が所定の範囲内であるか否かを判定する値である。黒色閾値は、256段階のグレースケールで指定される値であり、たとえば「10」と設定される。
[Step S103] The control unit 110 calculates the difference between the density value of each black target point and the average black density value.
[Step S104] As a result of the calculation in step S103, the control unit 110 determines whether there is a black target point having a difference equal to or greater than the black threshold. The black threshold value is a value set in advance by the environment definition parameter, and is a value for determining whether or not the density value of the target point determined to be black is within a predetermined range. The black threshold is a value designated by 256 gray scales, and is set to “10”, for example.

制御部110は、黒色閾値以上の差のある黒色対象点が存在する場合はステップS110にすすみ、存在しない場合はステップS105にすすむ。
[ステップS105]制御部110は、白色対象点について、白色平均濃度値を算出する。言い換えると、制御部110は、ステップS98で白色対象点とした全ての対象点Sの濃度値を加算し、加算した値を白色対象点の個数で割ることで白色平均濃度値を求める。
The control unit 110 proceeds to step S110 when there is a black target point having a difference equal to or larger than the black threshold value, and proceeds to step S105 when there is no black target point.
[Step S105] The control unit 110 calculates a white average density value for the white target point. In other words, the control unit 110 adds the density values of all the target points S that are white target points in step S98, and obtains the white average density value by dividing the added value by the number of white target points.

[ステップS106]制御部110は、各白色対象点の濃度値と白色平均濃度値との差を算出する。
[ステップS107]制御部110は、ステップS106で算出した結果、白色閾値以上の差のある白色対象点が存在するか否かを判定する。白色閾値は、予め環境定義パラメータで設定された値であり、白色と判定された対象点の濃度値が所定の範囲内であるか否かを判定する値である。白色閾値は、256段階のグレースケールで指定される値であり、たとえば「20」と設定される。
[Step S106] The controller 110 calculates the difference between the density value of each white target point and the white average density value.
[Step S107] As a result of the calculation in step S106, the control unit 110 determines whether there is a white target point having a difference equal to or greater than the white threshold. The white threshold value is a value set in advance by the environment definition parameter, and is a value for determining whether or not the density value of the target point determined to be white is within a predetermined range. The white threshold is a value designated by 256 gray scales, and is set to “20”, for example.

制御部110は、白色閾値以上の差のある白色対象点が存在する場合はステップS110にすすみ、存在しない場合はステップS108にすすむ。
[ステップS108]制御部110は、黒色平均濃度値と白色平均濃度値の差を算出する。
The control unit 110 proceeds to step S110 when there is a white target point having a difference equal to or greater than the white threshold, and proceeds to step S108 when there is no white target point.
[Step S108] The control unit 110 calculates the difference between the black average density value and the white average density value.

[ステップS109]制御部110は、ステップS108で算出した結果、黒色平均濃度値と白色平均濃度値の差は白黒濃度閾値以下であるか否かを判定する。白黒濃度閾値は、予め環境定義パラメータで設定された値であり、白色と判定された部分と黒色と判定された部分とのコントラストの差を判定する基準となる値である。黒色平均濃度値と白色平均濃度値の差が白黒濃度閾値以下である場合は、帳票画像において白黒の差が明確でない場合であり制御部110が不鮮明と判定する。   [Step S109] As a result of the calculation in step S108, the control unit 110 determines whether or not the difference between the black average density value and the white average density value is equal to or smaller than the black and white density threshold. The black-and-white density threshold value is a value set in advance by an environment definition parameter, and is a reference value for determining a difference in contrast between a portion determined to be white and a portion determined to be black. When the difference between the black average density value and the white average density value is equal to or less than the black and white density threshold, the black and white difference is not clear in the form image, and the control unit 110 determines that it is unclear.

制御部110は、平均濃度値の差が白黒濃度閾値以下である場合はステップS110にすすみ、白黒濃度閾値以下でない場合はステップS111にすすむ。
[ステップS110]制御部110は、対象点Qを不鮮明と判定する。
The control unit 110 proceeds to step S110 if the difference between the average density values is less than or equal to the black and white density threshold, and proceeds to step S111 if it is not less than or equal to the black and white density threshold.
[Step S110] The control unit 110 determines that the target point Q is unclear.

[ステップS111]制御部110は、対象点Qを鮮明と判定する。
[ステップS112]制御部110は、全ての点Pa〜Pnについて対象点Qとしたか否かを判定する。制御部110は、全ての点を対象点Qとしていない場合はステップS113にすすみ、全ての点を対象点Qとした場合はステップS114にすすむ。
[Step S111] The control unit 110 determines that the target point Q is clear.
[Step S112] The control unit 110 determines whether or not all the points Pa to Pn are set as the target points Q. The control unit 110 proceeds to step S113 when all the points are not set as the target points Q, and proceeds to step S114 when all the points are set as the target points Q.

[ステップS113]制御部110は、既に対象点Qとした点を除き、点Pa〜Pnから次の対象点Qを決定し、ステップS93にすすむ。
[ステップS114]制御部110は、対象線Mを鮮明と判定する。
[Step S113] The control unit 110 determines the next target point Q from the points Pa to Pn, excluding the points already set as the target point Q, and proceeds to step S93.
[Step S114] The control unit 110 determines that the target line M is clear.

[ステップS115]制御部110は、対象線Mを不鮮明と判定する。
[ステップS116]制御部110は、全ての直線La〜Lnについて、対象線Mとしたか否かを判定する。制御部110は、全ての直線La〜Lnについて対象線Mとしていない場合はステップS117にすすみ、全ての直線La〜Lnについて対象線Mとした場合はステップS119にすすむ。
[Step S115] The control unit 110 determines that the target line M is unclear.
[Step S116] The control unit 110 determines whether or not all the straight lines La to Ln are the target lines M. The control unit 110 proceeds to step S117 when all the straight lines La to Ln are not set as the target line M, and proceeds to step S119 when all the straight lines La to Ln are set as the target line M.

[ステップS117]制御部110は、既に対象線Mとした直線を除き、直線La〜Lnから次の対象線Mを決定し、ステップS92にすすむ。
[ステップS118]制御部110は、直線近傍鮮明判定処理の結果を不鮮明とし、直線近傍鮮明判定処理を終了する。
[Step S117] The control unit 110 determines the next target line M from the straight lines La to Ln, excluding the straight line already set as the target line M, and proceeds to step S92.
[Step S118] The control unit 110 blurs the result of the straight line vicinity sharpness determination process, and ends the straight line vicinity clearness determination process.

[ステップS119]制御部110は、直線近傍鮮明判定処理の結果を鮮明とし、直線近傍鮮明判定処理を終了する。
次に、第2の実施形態の画像正立判定処理のイメージについて図16を用いて説明する。図16は、第2の実施形態の画像正立判定処理のイメージの一例を示す図である。
[Step S119] The control unit 110 sharpens the result of the straight line vicinity clearness determination process, and ends the straight line vicinity clearness determination process.
Next, an image of the image erecting determination process of the second embodiment will be described with reference to FIG. FIG. 16 is a diagram illustrating an example of an image erecting determination process according to the second embodiment.

画像正立判定処理のイメージ700は、帳票画像に含まれる文字を抽出し、角度を変えて文字認識をすることで帳票画像が正立か否かを判定する処理の概念を示した図である。
まず、手順1として、帳票画像701に含まれる文字を、ラベリングの技術を用いて矩形の文字認識領域(矩形領域)として抽出する。抽出した矩形領域をサイズの大きい順に、矩形領域A702、矩形領域B703、矩形領域C704、矩形領域D705、矩形領域E706とする。なお、帳票画像701には複数の文字が含まれているが、サイズの大きい文字から順に所定数の文字を矩形領域として抽出し、文字認識対象とする。サイズの大きい文字は、読み取り易いため誤認識が少ないからである。また、サイズの大きい文字は、帳票のタイトルである場合が多いため、平易な用語が用いられ文字認識できる蓋然性が高いためである。これに対し、サイズの小さな文字は、帳票画像をイメージスキャナ121で取得する際に文字が潰れる可能性がある。また、サイズの小さな文字は、帳票が契約書である場合は契約内容の説明文章の文字であり画数が多く難解な文字が用いられる場合が多く、文字認識に不向きな傾向がある。このため、文字サイズの大きい文字から順に文字認識を行うことで、文字認識する効率を高める。
The image erecting determination processing image 700 is a diagram illustrating the concept of processing for determining whether or not a form image is upright by extracting characters included in the form image and performing character recognition at different angles. .
First, as a procedure 1, characters included in the form image 701 are extracted as a rectangular character recognition area (rectangular area) using a labeling technique. The extracted rectangular areas are defined as a rectangular area A702, a rectangular area B703, a rectangular area C704, a rectangular area D705, and a rectangular area E706 in descending order of size. Note that the form image 701 includes a plurality of characters, but a predetermined number of characters are extracted as a rectangular area in order from the largest size character to be a character recognition target. This is because a large size character is easy to read and thus has few misrecognitions. Moreover, because large characters are often the titles of forms, plain terms are used and the probability of character recognition is high. On the other hand, there is a possibility that characters having a small size are crushed when the form image is acquired by the image scanner 121. In addition, when the form is a contract, a small-sized character is a character of an explanation sentence of the contract content, and a difficult character with a large number of strokes is often used, which tends to be unsuitable for character recognition. For this reason, the efficiency of character recognition is improved by performing character recognition in order from the character with the largest character size.

次に、手順2として、抽出した矩形領域A702〜矩形領域E706それぞれについて、回転角0度、90度、180度、270度と角度を変えて文字認識する。手順2の例では、矩形領域A702の角度を変えた例を示している。各矩形領域について各回転角で文字認識を行い、文字認識が可能であった文字数が多い角度が0度である場合、帳票画像は正立であると判定される。   Next, as procedure 2, for each of the extracted rectangular area A702 to rectangular area E706, character recognition is performed by changing the rotation angles to 0 degrees, 90 degrees, 180 degrees, and 270 degrees. In the example of the procedure 2, an example in which the angle of the rectangular area A702 is changed is shown. Character recognition is performed at each rotation angle for each rectangular area, and if the angle at which the number of characters that can be recognized is large is 0 degrees, it is determined that the form image is upright.

次に、図17から図19を用いて第2の実施形態の画像正立判定処理について説明する。図17は、第2の実施形態の画像正立判定処理のフローチャートを示す図である(その1)。図18は、第2の実施形態の画像正立判定処理のフローチャートを示す図である(その2)。図19は、第2の実施形態の画像正立判定処理のフローチャートを示す図である(その3)。   Next, an image erecting determination process according to the second embodiment will be described with reference to FIGS. FIG. 17 is a diagram illustrating a flowchart of image erecting determination processing according to the second embodiment (part 1). FIG. 18 is a diagram illustrating a flowchart of image erecting determination processing according to the second embodiment (part 2). FIG. 19 is a diagram illustrating a flowchart of image erecting determination processing according to the second embodiment (part 3).

画像正立判定処理は、帳票画像に含まれる文字を抽出し、角度を変えて文字認識をすることで帳票画像が正立か否かを判定する処理である。画像正立判定処理は、帳票画像判定処理のステップS18で、サーバ装置200の制御部110(プロセッサ111)が実行する処理である。   The image erecting determination process is a process of determining whether or not the form image is erect by extracting characters included in the form image and performing character recognition at different angles. The image erecting determination process is a process executed by the control unit 110 (processor 111) of the server device 200 in step S18 of the form image determination process.

[ステップS131]制御部110は、帳票画像に対し二値化処理を行う。
[ステップS132]制御部110は、ステップS131において二値化処理した帳票画像に対してラベリング処理を行い、黒画素の外形を囲む矩形領域を抽出する。
[Step S131] The control unit 110 performs binarization processing on the form image.
[Step S132] The control unit 110 performs a labeling process on the form image binarized in step S131, and extracts a rectangular area surrounding the outline of the black pixel.

[ステップS133]制御部110は、ステップS132で抽出した矩形領域に基づき、文字画像を含む矩形領域をサイズ上位から所定数抽出する。抽出する所定数は、予め環境定義パラメータで設定できる値であり、たとえば「10」である。   [Step S133] Based on the rectangular region extracted in step S132, the control unit 110 extracts a predetermined number of rectangular regions including a character image from the upper size. The predetermined number to be extracted is a value that can be set in advance by an environment definition parameter, for example, “10”.

[ステップS134]制御部110は、ステップS133において、所定数の矩形領域が抽出できたか否かを判定する。制御部110は、矩形領域が抽出できた場合はステップS135にすすみ、矩形領域が抽出できない場合はステップS155にすすむ。   [Step S134] The control unit 110 determines whether or not a predetermined number of rectangular regions have been extracted in step S133. The control unit 110 proceeds to step S135 when the rectangular area can be extracted, and proceeds to step S155 when the rectangular area cannot be extracted.

[ステップS135]制御部110は、矩形領域から認識対象の文字画像を取得する。
[ステップS136]制御部110は、ステップS135で取得した文字画像を回転角度0度で文字認識する。
[Step S135] The control unit 110 acquires a character image to be recognized from the rectangular area.
[Step S136] The controller 110 recognizes the character image acquired in step S135 at a rotation angle of 0 degrees.

[ステップS137]制御部110は、回転角度0度で文字認識できたか否かを判定する。制御部110は、回転角度0度で文字認識できた場合はステップS138にすすみ、文字認識できない場合はステップS139にすすむ。   [Step S137] The control unit 110 determines whether or not characters can be recognized at a rotation angle of 0 degrees. The control unit 110 proceeds to step S138 when the character can be recognized at the rotation angle of 0 degree, and proceeds to step S139 when the character cannot be recognized.

[ステップS138]制御部110は、0度認識カウンタに1ポイント加算する。0度認識カウンタは、回転角度0度で文字認識できた文字の個数を数えるための値である。
[ステップS139]制御部110は、ステップS135で取得した文字画像を回転角度90度で文字認識する。
[Step S138] The control unit 110 adds 1 point to the 0 degree recognition counter. The 0 degree recognition counter is a value for counting the number of characters that can be recognized at a rotation angle of 0 degree.
[Step S139] The control unit 110 recognizes the character image acquired in step S135 at a rotation angle of 90 degrees.

[ステップS140]制御部110は、回転角度90度で文字認識できたか否かを判定する。制御部110は、回転角度90度で文字認識できた場合はステップS141にすすみ、文字認識できない場合はステップS142にすすむ。   [Step S140] The control unit 110 determines whether or not characters can be recognized at a rotation angle of 90 degrees. The control unit 110 proceeds to step S141 when the character can be recognized at the rotation angle of 90 degrees, and proceeds to step S142 when the character cannot be recognized.

[ステップS141]制御部110は、90度認識カウンタに1ポイント加算する。90度認識カウンタは、回転角度90度で文字認識できた文字の個数を数えるための値である。   [Step S141] The control unit 110 adds 1 point to the 90-degree recognition counter. The 90-degree recognition counter is a value for counting the number of characters that can be recognized at a rotation angle of 90 degrees.

[ステップS142]制御部110は、ステップS135で取得した文字画像を回転角度180度で文字認識する。
[ステップS143]制御部110は、回転角度180度で文字認識できたか否かを判定する。制御部110は、回転角度180度で文字認識できた場合はステップS144にすすみ、文字認識できない場合はステップS145にすすむ。
[Step S142] The control unit 110 recognizes the character image acquired in step S135 at a rotation angle of 180 degrees.
[Step S143] The control unit 110 determines whether or not characters can be recognized at a rotation angle of 180 degrees. The control unit 110 proceeds to step S144 when the character can be recognized at the rotation angle of 180 degrees, and proceeds to step S145 when the character cannot be recognized.

[ステップS144]制御部110は、180度認識カウンタに1ポイント加算する。180度認識カウンタは、回転角度180度で文字認識できた文字の個数を数えるための値である。   [Step S144] The control unit 110 adds 1 point to the 180 degree recognition counter. The 180 degree recognition counter is a value for counting the number of characters that can be recognized at a rotation angle of 180 degrees.

[ステップS145]制御部110は、ステップS135で取得した文字画像を回転角度270度で文字認識する。
[ステップS146]制御部110は、回転角度270度で文字認識できたか否かを判定する。制御部110は、回転角度270度で文字認識できた場合はステップS147にすすみ、文字認識できない場合はステップS148にすすむ。
[Step S145] The control unit 110 recognizes the character image acquired in step S135 at a rotation angle of 270 degrees.
[Step S146] The control unit 110 determines whether or not characters can be recognized at a rotation angle of 270 degrees. The control unit 110 proceeds to step S147 when the character can be recognized at the rotation angle of 270 degrees, and proceeds to step S148 when the character cannot be recognized.

[ステップS147]制御部110は、270度認識カウンタに1ポイント加算する。270度認識カウンタは、回転角度270度で文字認識できた文字の個数を数えるための値である。   [Step S147] The control unit 110 adds 1 point to the 270 degree recognition counter. The 270 degree recognition counter is a value for counting the number of characters that can be recognized at a rotation angle of 270 degrees.

[ステップS148]制御部110は、未だ文字認識を行っていない未認識の矩形領域が有るか否かを判定する。制御部110は、未認識の矩形領域が有る場合はステップS149にすすみ、未認識の矩形領域が無い場合はステップS150にすすむ。   [Step S148] The control unit 110 determines whether there is an unrecognized rectangular area that has not yet been recognized. The control unit 110 proceeds to step S149 when there is an unrecognized rectangular area, and proceeds to step S150 when there is no unrecognized rectangular area.

[ステップS149]制御部110は、既に認識対象とした矩形領域を除き、未認識の矩形領域から認識対象の文字画像を取得し、ステップS135にすすむ。
[ステップS150]制御部110は、0度認識カウンタと、90度認識カウンタと、180度認識カウンタと、270度認識カウンタのうちから、最高ポイント数を有する認識カウンタを選定する。
[Step S149] The control unit 110 obtains a character image to be recognized from an unrecognized rectangular area except for a rectangular area that has already been recognized, and proceeds to step S135.
[Step S150] The control unit 110 selects a recognition counter having the highest number of points from the 0-degree recognition counter, the 90-degree recognition counter, the 180-degree recognition counter, and the 270-degree recognition counter.

[ステップS151]制御部110は、0度認識カウンタが最高ポイント数か否かを判定する。制御部110は、0度認識カウンタが最高ポイント数を有する場合はステップS152にすすみ、0度認識カウンタが最高ポイント数を有さない場合はステップS155にすすむ。   [Step S151] The control unit 110 determines whether or not the 0 degree recognition counter is the maximum number of points. The control unit 110 proceeds to step S152 when the 0-degree recognition counter has the maximum number of points, and proceeds to step S155 when the 0-degree recognition counter does not have the maximum number of points.

[ステップS152]制御部110は、文字認識した累計文字数は、文字認識上限数以下か否かを判定する。文字認識上限数は、予め環境定義パラメータで設定できる値であり、たとえば、文字認識上限数を「100」と設定できる。   [Step S152] The control unit 110 determines whether or not the cumulative number of recognized characters is equal to or less than the upper limit number of character recognition. The upper limit number of character recognition is a value that can be set in advance using environment definition parameters. For example, the upper limit number of character recognition can be set to “100”.

制御部110は、累計文字数が文字認識上限数以下である場合はステップS153にすすみ、累計文字数が文字認識上限数以下でない場合はステップS155にすすむ。
[ステップS153]制御部110は、最高ポイント数に基づき、文字認識率を算出する。より具体的には、制御部110は、0度認識カウンタのポイント数を文字認識対象とした全文字数で割ることで、文字認識率を算出する。たとえば、文字認識した文字数が「10」であり、10文字全てについて回転角度0度で文字認識できた場合(0度認識カウンタのポイント数10の場合)、文字認識率は100%となる。
The control unit 110 proceeds to step S153 when the cumulative number of characters is less than or equal to the upper limit number of character recognition, and proceeds to step S155 when the accumulated number of characters is not less than or equal to the upper limit number of character recognition.
[Step S153] The control unit 110 calculates a character recognition rate based on the maximum number of points. More specifically, the control unit 110 calculates the character recognition rate by dividing the number of points of the 0 degree recognition counter by the total number of characters targeted for character recognition. For example, when the number of recognized characters is “10” and the characters can be recognized for all 10 characters at a rotation angle of 0 degrees (when the number of points of the 0 degree recognition counter is 10), the character recognition rate is 100%.

[ステップS154]制御部110は、ステップS153で算出した文字認識率は、文字認識率閾値以上であるか否かを判定する。文字認識率閾値は、予め環境定義パラメータで設定できる値であり、たとえば、文字認識率閾値を「80」(%)と設定できる。   [Step S154] The controller 110 determines whether or not the character recognition rate calculated in step S153 is equal to or greater than a character recognition rate threshold. The character recognition rate threshold value is a value that can be set in advance using environment definition parameters. For example, the character recognition rate threshold value can be set to “80” (%).

制御部110は、文字認識率が文字認識率閾値以上でない場合はステップS155にすすみ、文字認識率が文字認識率閾値以上である場合はステップS156にすすむ。
[ステップS155]制御部110は、画像正立判定処理の結果を異常とし、画像正立判定処理を終了する。
If the character recognition rate is not equal to or higher than the character recognition rate threshold, the control unit 110 proceeds to step S155. If the character recognition rate is equal to or higher than the character recognition rate threshold, the control unit 110 proceeds to step S156.
[Step S155] The controller 110 determines that the result of the image erecting determination process is abnormal, and ends the image erecting determination process.

[ステップS156]制御部110は、画像正立判定処理の結果を正立とし、画像正立判定処理を終了する。
こうして、サーバ装置200は、帳票画像が鮮明であるか否かの判定と、帳票画像が正立であるか否かの判定に基づき、帳票画像が正しく読み取れたか否かを判定できる。
[Step S156] The control unit 110 sets the result of the image erecting determination process as erect, and ends the image erecting determination process.
In this way, the server device 200 can determine whether the form image is correctly read based on the determination whether the form image is clear and the determination whether the form image is upright.

サーバ装置200により帳票画像判定処理を実行することにより、帳票画像について一定の画質を保つことができる。また、サーバ装置200が帳票画像判定処理を実行することにより、オペレータが目視で判定していた作業を軽減できる。こうして、帳票画像判定装置1は、帳票画像を判定する処理を改善できる。   By executing the form image determination process by the server device 200, a certain image quality can be maintained for the form image. In addition, the server device 200 executes the form image determination process, thereby reducing the work that the operator has visually determined. Thus, the form image determination apparatus 1 can improve the process of determining a form image.

なお、上記の処理機能は、コンピュータによって実現することができる。その場合、帳票読取装置100、サーバ装置200が有すべき機能の処理内容を記述したプログラムが提供される。そのプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、磁気記憶装置、光ディスク、光磁気記録媒体、半導体メモリ等がある。磁気記憶装置には、ハードディスク装置(HDD)、フレキシブルディスク(FD:Flexible Disk)、磁気テープ等がある。光ディスクには、DVD、DVD−RAM、CD−ROM/RW等がある。光磁気記録媒体には、MO(Magneto-Optical disk)等がある。   The above processing functions can be realized by a computer. In that case, a program describing processing contents of functions that the form reading apparatus 100 and the server apparatus 200 should have is provided. By executing the program on a computer, the above processing functions are realized on the computer. The program describing the processing contents can be recorded on a computer-readable recording medium. Examples of the computer-readable recording medium include a magnetic storage device, an optical disk, a magneto-optical recording medium, and a semiconductor memory. The magnetic storage device includes a hard disk device (HDD), a flexible disk (FD), a magnetic tape, and the like. Optical discs include DVD, DVD-RAM, CD-ROM / RW, and the like. Magneto-optical recording media include MO (Magneto-Optical disk).

プログラムを流通させる場合には、たとえば、そのプログラムが記録されたDVD、CD−ROM等の可搬型記録媒体が販売される。また、プログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することもできる。   When distributing the program, for example, a portable recording medium such as a DVD or a CD-ROM in which the program is recorded is sold. It is also possible to store the program in a storage device of a server computer and transfer the program from the server computer to another computer via a network.

プログラムを実行するコンピュータは、たとえば、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、自己の記憶装置に格納する。コンピュータは、自己の記憶装置からプログラムを読み取り、プログラムにしたがった処理を実行する。なお、コンピュータは、可搬型記録媒体から直接プログラムを読み取り、そのプログラムにしたがった処理を実行することもできる。また、コンピュータは、ネットワークを介して接続されたサーバコンピュータからプログラムが転送される毎に、逐次、受け取ったプログラムにしたがった処理を実行することもできる。   The computer that executes the program stores, for example, the program recorded on the portable recording medium or the program transferred from the server computer in its own storage device. The computer reads the program from its own storage device and executes processing according to the program. The computer can also read the program directly from the portable recording medium and execute processing according to the program. In addition, each time a program is transferred from a server computer connected via a network, the computer can sequentially execute processing according to the received program.

また、上記の処理機能の少なくとも一部を、DSP、ASIC、PLD等の電子回路で実現することもできる。   In addition, at least a part of the processing functions described above can be realized by an electronic circuit such as a DSP, ASIC, or PLD.

1 帳票画像判定装置
2 記憶部
3 制御部
4 帳票画像
5 鮮明判定処理
6 正立判定処理
7a,7b,7c 文字認識領域
10 ネットワーク
100 帳票読取装置
110 制御部
111 プロセッサ
112 RAM
113 HDD
114 入出力信号インタフェース
115 記憶媒体インタフェース
116 通信インタフェース
117 バス
118 モニタ
119 キーボード
120 マウス
121 イメージスキャナ
122 記憶媒体
200 サーバ装置
300 帳票画像判定システム
DESCRIPTION OF SYMBOLS 1 Form image determination apparatus 2 Storage part 3 Control part 4 Form image 5 Sharpness determination process 6 Erecting determination process 7a, 7b, 7c Character recognition area 10 Network 100 Form reading apparatus 110 Control part 111 Processor 112 RAM
113 HDD
114 I / O Signal Interface 115 Storage Medium Interface 116 Communication Interface 117 Bus 118 Monitor 119 Keyboard 120 Mouse 121 Image Scanner 122 Storage Medium 200 Server Device 300 Form Image Determination System

Claims (8)

帳票画像を取得し、
前記帳票画像から直線を抽出し、
前記直線に対する鮮明判定処理の結果に基づき前記帳票画像が鮮明か否かを判定し、
前記帳票画像から文字認識領域を抽出し、
前記文字認識領域に対する正立判定処理に基づき前記帳票画像正立か否かを判定し、
前記帳票画像が鮮明であると判定された場合であり、かつ前記帳票画像が正立であると判定された場合に前記帳票画像の読み取りが正常であると判定する、
処理をコンピュータに実行させる帳票画像判定プログラム。
Get a form image
Extracting a straight line from the form image,
Determine whether the form image is clear based on the result of the sharpness determination process for the straight line,
Extract a character recognition area from the form image,
Determine whether the form image is upright based on the upright determination processing for the character recognition area,
When it is determined that the form image is clear and when it is determined that the form image is upright, it is determined that the reading of the form image is normal.
A form image determination program for causing a computer to execute processing.
前記鮮明判定処理は、
太さ鮮明判定処理と直線近傍鮮明判定処理とを含む、
請求項1記載の帳票画像判定プログラム。
The sharpness determination process includes
Including thickness sharpness determination processing and straight line neighborhood sharpness determination processing,
The form image determination program according to claim 1.
前記太さ鮮明判定処理は、
前記直線に対して所定の間隔で点を設定し、
それぞれの前記点における前記直線の太さを算出し、
それぞれの前記太さが予め定められた範囲内である場合に前記直線が鮮明であると判定する処理を含む、
請求項2記載の帳票画像判定プログラム。
The thickness clearness determination process includes
Set points at predetermined intervals with respect to the straight line,
Calculate the thickness of the straight line at each of the points;
Including a process of determining that the straight line is clear when each of the thicknesses is within a predetermined range;
The form image determination program according to claim 2.
前記直線近傍鮮明判定処理は、
前記帳票画像をグレースケール変換した濃度値を取得し、
前記直線に対して所定の間隔で点を設定し、
それぞれの前記点を囲む所定の領域における白色部分の濃度値の平均値である白色平均濃度値と黒色部分の濃度値の平均値である黒色平均濃度値を算出し、
前記白色平均濃度値と前記黒色平均濃度値の差が予め定められた濃度値よりも大きい場合に前記直線が鮮明であると判定する処理を含む、
請求項2記載の帳票画像判定プログラム。
The straight line vividness determination process is:
Obtain the grayscale converted density value of the form image,
Set points at predetermined intervals with respect to the straight line,
A white average density value that is an average value of density values of white portions in a predetermined area surrounding each of the points and a black average density value that is an average value of density values of black portions are calculated,
Including a process of determining that the straight line is clear when a difference between the white average density value and the black average density value is larger than a predetermined density value.
The form image determination program according to claim 2.
前記帳票画像が鮮明か否かを判定するとは、
前記太さ鮮明判定処理において前記直線が鮮明であると判定した場合、かつ、前記直線近傍鮮明判定処理において前記直線が鮮明であると判定した場合に、前記帳票画像が鮮明であると判定する処理を含む、
請求項3および請求項4記載の帳票画像判定プログラム。
To determine whether the form image is clear,
A process for determining that the form image is clear when it is determined that the straight line is clear in the thickness sharpness determination process and when the straight line vicinity clear determination process determines that the straight line is clear including,
The form image determination program according to claim 3 or 4.
前記正立判定処理は、
文字認識領域のサイズが上位の順に予め定められた個数の前記文字認識領域を取得し、
前記文字認識領域それぞれについて角度を変更して文字認識し、
前記角度が0度で文字認識できた前記文字認識領域の個数が前記予め定められた個数に対して所定の割合以上である場合に前記帳票画像を正立であると判定する処理を含む、
請求項1記載の帳票画像判定プログラム。
The erecting determination process includes
Obtain a predetermined number of the character recognition areas in order of the size of the character recognition area,
Character recognition by changing the angle for each of the character recognition areas,
Including a process of determining that the form image is upright when the number of the character recognition areas that can be recognized at the angle of 0 degrees is equal to or greater than a predetermined ratio with respect to the predetermined number.
The form image determination program according to claim 1.
記憶部と制御部とを含む帳票画像判定装置における帳票画像判定方法であって、
前記記憶部は、
帳票画像を記憶し、
前記制御部は、
前記記憶部から前記帳票画像を取得し、
前記帳票画像から直線を抽出し、
前記直線に対する鮮明判定処理の結果に基づき前記帳票画像が鮮明か否かを判定し、
前記帳票画像から文字認識領域を抽出し、
前記文字認識領域に対する正立判定処理に基づき前記帳票画像正立か否かを判定し、
前記帳票画像が鮮明であると判定された場合であり、かつ前記帳票画像が正立であると判定された場合に前記帳票画像の読み取りが正常であると判定する、
帳票画像判定方法。
A form image determination method in a form image determination apparatus including a storage unit and a control unit,
The storage unit
Memorize the form image,
The controller is
Obtaining the form image from the storage unit;
Extracting a straight line from the form image,
Determine whether the form image is clear based on the result of the sharpness determination process for the straight line,
Extract a character recognition area from the form image,
Determine whether the form image is upright based on the upright determination processing for the character recognition area,
When it is determined that the form image is clear and when it is determined that the form image is upright, it is determined that the reading of the form image is normal.
Form image determination method.
帳票画像読取装置と帳票画像判定装置とを含む帳票画像判定システムにおいて、
前記帳票画像読取装置は、
帳票画像を読み取る読取部と、
前記帳票画像を前記帳票画像判定装置に送信する送信部とを含み、
前記帳票画像判定装置は、
前記帳票画像読取装置から送信された前記帳票画像を記憶する記憶部と、
前記記憶部から前記帳票画像を取得し、
前記帳票画像から直線を抽出し、
前記直線に対する鮮明判定処理の結果に基づき前記帳票画像が鮮明か否かを判定し、
前記帳票画像から文字認識領域を抽出し、
前記文字認識領域に対する正立判定処理に基づき前記帳票画像正立か否かを判定し、
前記帳票画像が鮮明であると判定された場合であり、かつ前記帳票画像が正立であると判定された場合に前記帳票画像の読み取りが正常であると判定する制御部とを含む、
帳票画像判定システム。
In a form image determination system including a form image reading device and a form image determination device,
The form image reading device comprises:
A reading unit for reading a form image;
A transmission unit that transmits the form image to the form image determination device,
The form image determination device includes:
A storage unit for storing the form image transmitted from the form image reading device;
Obtaining the form image from the storage unit;
Extracting a straight line from the form image,
Determine whether the form image is clear based on the result of the sharpness determination process for the straight line,
Extract a character recognition area from the form image,
Determine whether the form image is upright based on the upright determination processing for the character recognition area ,
A control unit that determines that the form image is clear, and determines that the reading of the form image is normal when it is determined that the form image is upright.
Form image determination system.
JP2015186721A 2015-09-24 2015-09-24 Form image determination program, form image determination method, and form image determination system Active JP6438369B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015186721A JP6438369B2 (en) 2015-09-24 2015-09-24 Form image determination program, form image determination method, and form image determination system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015186721A JP6438369B2 (en) 2015-09-24 2015-09-24 Form image determination program, form image determination method, and form image determination system

Publications (2)

Publication Number Publication Date
JP2017062574A JP2017062574A (en) 2017-03-30
JP6438369B2 true JP6438369B2 (en) 2018-12-12

Family

ID=58428868

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015186721A Active JP6438369B2 (en) 2015-09-24 2015-09-24 Form image determination program, form image determination method, and form image determination system

Country Status (1)

Country Link
JP (1) JP6438369B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005242825A (en) * 2004-02-27 2005-09-08 Toshiba Solutions Corp Business form reading device and business form direction determination method by business form reading device
JP4853073B2 (en) * 2006-03-27 2012-01-11 沖電気工業株式会社 Form classification processing system, electronic medium receipt creation method and delivery method
JP2009272962A (en) * 2008-05-08 2009-11-19 Murata Mach Ltd Image processor
JP5566971B2 (en) * 2011-07-29 2014-08-06 富士通フロンテック株式会社 Information processing program, information processing apparatus, and character recognition method
US9288362B2 (en) * 2014-02-03 2016-03-15 King Fahd University Of Petroleum And Minerals Technique for skew detection of printed arabic documents

Also Published As

Publication number Publication date
JP2017062574A (en) 2017-03-30

Similar Documents

Publication Publication Date Title
US10885644B2 (en) Detecting specified image identifiers on objects
US11468225B2 (en) Determining functional and descriptive elements of application images for intelligent screen automation
TWI654567B (en) Method and apparatus for extracting specific information from standard cards
WO2020140698A1 (en) Table data acquisition method and apparatus, and server
US8712188B2 (en) System and method for document orientation detection
CN109784323B (en) Image recognition method and device, electronic equipment and computer storage medium
US9679354B2 (en) Duplicate check image resolution
US8811751B1 (en) Method and system for correcting projective distortions with elimination steps on multiple levels
US8897600B1 (en) Method and system for determining vanishing point candidates for projective correction
CN109948521B (en) Image deviation rectifying method and device, equipment and storage medium
JP6465215B2 (en) Image processing program and image processing apparatus
JP2018530094A (en) Segment block-based handwritten signature authentication system and method
WO2020060632A1 (en) Converting an image into a structured table
JP2016162420A (en) Attention area detection device, attention area detection method and program
US10643097B2 (en) Image processing apparatuses and non-transitory computer readable medium
JP6628336B2 (en) Information processing system
JP3471578B2 (en) Line direction determining device, image tilt detecting device, and image tilt correcting device
CN112419207A (en) Image correction method, device and system
JP2017521011A (en) Symbol optical detection method
JP6438369B2 (en) Form image determination program, form image determination method, and form image determination system
CN111768345A (en) Method, device and equipment for correcting back image of identity card and storage medium
JP7386446B2 (en) information processing system
JP6890849B2 (en) Information processing system
CN110929708A (en) Method, equipment and storage medium for identifying national flag in Thai identity card
CN110569847B (en) Character inclination angle determining method, character inclination correcting method and computer

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170911

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180905

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180918

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181101

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181116

R150 Certificate of patent or registration of utility model

Ref document number: 6438369

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150