JP4153850B2 - Image processing apparatus and image processing program - Google Patents

Image processing apparatus and image processing program Download PDF

Info

Publication number
JP4153850B2
JP4153850B2 JP2003306990A JP2003306990A JP4153850B2 JP 4153850 B2 JP4153850 B2 JP 4153850B2 JP 2003306990 A JP2003306990 A JP 2003306990A JP 2003306990 A JP2003306990 A JP 2003306990A JP 4153850 B2 JP4153850 B2 JP 4153850B2
Authority
JP
Japan
Prior art keywords
region
boundary
candidate
area
candidates
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.)
Expired - Fee Related
Application number
JP2003306990A
Other languages
Japanese (ja)
Other versions
JP2005078306A (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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2003306990A priority Critical patent/JP4153850B2/en
Publication of JP2005078306A publication Critical patent/JP2005078306A/en
Application granted granted Critical
Publication of JP4153850B2 publication Critical patent/JP4153850B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Character Input (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

本発明は、帳票等の画像から記入枠を抽出する画像処理装置、画像処理プログラムに関する。   The present invention relates to an image processing apparatus and an image processing program for extracting an entry frame from an image such as a form.

従来、帳票等の画像から記入枠を抽出する方法として、様々な方法が提案されているが、これらの方法では、想定している帳票と入力された帳票との間の寸法の食い違いにより記入枠の抽出が失敗するという問題があり、寸法が一定でない帳票群からの記入枠の抽出が困難となっていた。   Conventionally, various methods have been proposed as methods for extracting an entry frame from an image such as a form. In these methods, however, an entry frame is created due to a dimensional discrepancy between the assumed form and the entered form. Extraction has failed, and it has been difficult to extract an entry frame from a group of forms whose dimensions are not constant.

例えば、特許文献1に記載された方法では、帳票のフォーマットごとに罫線枠の格子点の座標列が登録されており、それらの座標により記入枠の位置を特定している。この方法では、枠の寸法の変動や紙の伸縮等による画像の歪みや伸縮等の変動が有る場合には、正確な位置合せが困難となり、記入枠の抽出が困難となる。   For example, in the method described in Patent Document 1, a coordinate sequence of grid points of a ruled line frame is registered for each format of a form, and the position of the entry frame is specified by these coordinates. In this method, if there is a variation in the size of the frame or a variation in the image due to the expansion or contraction of the paper, it is difficult to accurately align, and it is difficult to extract the entry frame.

また、特許文献2に記載された方法では、入力画像と基準画像の部分画像同士の位置合せを行い、部分画像同士の位置合せの結果を用いて画像全体の位置合せを行い、基準画像について定められた枠位置に、記入枠が位置するように入力画像を補正しているが、この方法では、罫線位置の変動やフォーム上のプレプリント文字のフォントや配置等の変動が有る場合、それらの変動に起因する画像の変動により位置合せが困難となる。   In the method described in Patent Document 2, the partial images of the input image and the reference image are aligned with each other, the entire image is aligned using the result of the alignment between the partial images, and the reference image is determined. The input image is corrected so that the entry frame is positioned at the specified frame position. However, in this method, if there is a change in the ruled line position or a change in the font or arrangement of the preprint characters on the form, these are corrected. Positioning becomes difficult due to image fluctuations caused by the fluctuations.

また、特許文献3に記載された方法では、入力帳票と基準帳票について、水平線長及び垂直線長を線方向へ投影し、横座標及び縦座標を一定間隔に分割した間隔ごとの累積線長を求めて分布を作成し、入力帳票と基準帳票とで水平線の分布同士と垂直線の分布同士のマッチングを行うことにより位置合せを行っている。この方法では、枠の寸法の変動や紙の伸縮等による画像の歪みや伸縮を、線の分布のマッチングによりある程度吸収することができるが、枠の寸法の変動に起因する累積線長の変動が大きい場合には位置合せが困難となる。
特開平10−143605号公報 特開昭60−120485号公報 特開平7−249099号公報
Moreover, in the method described in Patent Document 3, the horizontal line length and the vertical line length are projected in the line direction for the input form and the reference form, and the accumulated line length for each interval obtained by dividing the abscissa and ordinate into a predetermined interval is obtained. Then, the distribution is created and the registration is performed by matching the horizontal line distribution and the vertical line distribution between the input form and the reference form. In this method, image distortion and expansion / contraction due to variation in frame dimensions and paper expansion / contraction can be absorbed to some extent by matching the distribution of lines, but there is variation in accumulated line length due to variation in frame dimensions. If it is large, alignment becomes difficult.
JP-A-10-143605 JP-A-60-120485 Japanese Patent Laid-Open No. 7-249099

このように従来の方法では、帳票に設けられる領域を区分する枠の寸法の変動が大きいと位置合せが困難となり、想定している帳票と処理対象とする帳票との間の領域の寸法の食い違いにより、領域を区分する位置(記入枠)の抽出が失敗してしまうという問題があった。   As described above, in the conventional method, if the size of the frame that divides the area provided in the form varies greatly, alignment becomes difficult, and the size difference of the area between the assumed form and the form to be processed becomes difficult. Therefore, there has been a problem that the extraction of the position (entry frame) for dividing the region fails.

本発明は、前記のような問題に鑑みなされたもので、帳票に設けられる領域の寸法が一定でない帳票群から領域を区分する位置を確実に抽出することが可能な画像処理装置、画像処理プログラムを提供することを目的とする。   The present invention has been made in view of the above problems, and an image processing apparatus and an image processing program capable of reliably extracting a position for dividing an area from a form group in which the dimensions of the area provided in the form are not constant. The purpose is to provide.

本発明は、処理対象とする帳票の画像中から、帳票の様式について定められた領域の境界位置の候補とする境界候補を抽出する境界候補抽出手段と、前記境界候補抽出手段によって抽出された前記境界候補の対を両端とする領域候補の各々について、前記領域候補の境界の両端にそれぞれ接している異なる方向の境界の本数の組からなる特徴量を算出する領域特徴抽出手段と、前記領域特徴抽出手段によって算出された前記特徴量のパターンと、帳票の様式上の特徴量の参照パターンとの距離が小さくなるように、前記境界候補と様式上での境界とのマッチングをとることにより領域候補を選択するマッチング手段と、前記マッチング手段により選択された領域候補から領域を区分する位置を抽出する領域区分位置抽出手段とを具備したことを特徴とする。 The present invention provides a boundary candidate extraction unit for extracting a boundary candidate as a candidate for a boundary position of an area defined for a form format from a form image to be processed, and the boundary candidate extraction unit A region feature extraction unit that calculates a feature amount composed of a set of boundaries in different directions that are in contact with both ends of the boundary of the region candidate for each of the region candidates having both ends of a pair of boundary candidates, and the region feature the pattern of the feature quantity calculated by the extraction means, such that the distance between the feature quantity of the reference pattern on the style of the form is reduced, region candidates by taking matching between the boundary on the boundary candidates and style Matching means for selecting a region, and a region segment position extracting unit for extracting a position for segmenting the region from the region candidates selected by the matching unit. And features.

本発明によれば、処理対象の様式の座標情報を用いないでマッチングを実行することにより、帳票に設けられる領域の寸法が一定でない帳票群から領域を区分する位置(例えば記入枠)を確実に抽出することが可能となる。   According to the present invention, by performing matching without using coordinate information of a processing target format, a position (for example, an entry frame) for dividing an area from a form group in which the dimensions of the area provided in the form are not constant is ensured. It becomes possible to extract.

以下、図面を参照して本発明の実施の形態について説明する。図1は、本実施形態における画像処理装置を実現するシステムの構成を示すブロック図である。   Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration of a system that realizes an image processing apparatus according to the present embodiment.

本実施形態における画像処理装置は、コンピュータに本実施形態を実現するプログラムを組み込むことによって構成でき、以下ではそのような構成を仮定して説明する。ただし、本実施形態は各手段を専用ハードウェアや、その集合体、または分散処理用のコンピュータネットワークとしても構成することもでき、以下に説明する手段を具備する構成ならば、ここで挙げた構成に関わらずどのようなもので実装しても良い。また、本実施形態における画像処理装置は、帳票等に記録された罫線(記入枠)の位置を検出する罫線(記入枠)認識装置、罫線(記入枠)により区切られた領域内に記入された文字を認識する文字認識装置として用いることができる。   The image processing apparatus according to the present embodiment can be configured by incorporating a program that implements the present embodiment into a computer, and will be described below assuming such a configuration. However, in the present embodiment, each unit can be configured as dedicated hardware, an aggregate thereof, or a computer network for distributed processing. If the configuration includes the units described below, the configuration described here Regardless of what you implement it. The image processing apparatus according to the present embodiment is a ruled line (entry frame) recognizing device that detects the position of a ruled line (entry frame) recorded on a form or the like, and is entered in an area delimited by the ruled line (entry frame). It can be used as a character recognition device that recognizes characters.

図1に示すように、本実施形態における画像処理装置は、CPU10、メモリ12、ディスプレイ14、キーボード15、ポインティングデバイス16、スキャナ17、記憶装置18、及びプリンタ19を備えている。   As shown in FIG. 1, the image processing apparatus according to the present embodiment includes a CPU 10, a memory 12, a display 14, a keyboard 15, a pointing device 16, a scanner 17, a storage device 18, and a printer 19.

CPU10は、画像処理装置全体の制御を司るもので、メモリ12に記録される各種プログラムに従い、データの入出力制御、スキャナ17から入力された帳票等の画像に対する画像処理(文字認識処理)制御などの各種の処理を制御する。   The CPU 10 controls the entire image processing apparatus. According to various programs recorded in the memory 12, the CPU 10 performs data input / output control, image processing (character recognition processing) control for an image such as a form input from the scanner 17, and the like. Control various processes.

メモリ12は、プログラムやデータなどを記録するもので、各種プログラムに従って処理が実行される場合に、このプログラムの実行に伴って処理対象とするデータが一時的に記憶される。メモリ12に記憶されるプログラムとしては、例えば帳票等の画像に対する画像処理を実行するための画像処理プログラム12aが記憶される。また、画像処理プログラム12aの実行に伴って記憶されるデータとしては、スキャナ17によって入力された帳票等の画像のデータ(入力画像データ12b)、入力画像データ12bに対して帳票に設けられる領域の区分、例えば記入枠を認識する際に用いられる、処理対象とする帳票の様式上の領域から抽出された特徴量を表す参照パターンデータ12c、参照パターンデータ12cを用いて入力画像データ12bから抽出された記入枠の位置を示す記入枠抽出結果データ12d、記入枠抽出結果データ12dが示す領域内に記入された文字に対する文字認識処理の結果(文字コード)である文字認識結果データ12eなどが記憶される。   The memory 12 records programs, data, and the like. When processing is executed according to various programs, data to be processed is temporarily stored as the programs are executed. As a program stored in the memory 12, for example, an image processing program 12a for executing image processing on an image such as a form is stored. Further, as data stored with the execution of the image processing program 12a, image data such as a form (input image data 12b) input by the scanner 17 and an area provided in the form with respect to the input image data 12b. Extracted from the input image data 12b using the reference pattern data 12c and the reference pattern data 12c representing the feature amount extracted from the area on the form of the form to be processed, which is used when recognizing the classification, for example, the entry frame. The entry frame extraction result data 12d indicating the position of the entry frame, the character recognition result data 12e which is the result (character code) of the character recognition process for the characters entered in the area indicated by the entry frame extraction result data 12d, etc. are stored. The

ディスプレイ14は、LCD(Liquid Crystal Display)などにより構成され、画像処理結果(文字認識結果)や装置の状態を示す情報を表示する。   The display 14 is configured by an LCD (Liquid Crystal Display) or the like, and displays image processing results (character recognition results) and information indicating the state of the apparatus.

キーボード15は、装置に対して各種の指示を入力するために用いられる。   The keyboard 15 is used for inputting various instructions to the apparatus.

ポインティングデバイス16は、マウスやタブレットなどにより構成され、装置に対して各種の指示を入力するために用いられる。   The pointing device 16 is configured by a mouse, a tablet, or the like, and is used for inputting various instructions to the apparatus.

スキャナ17は、画像処理の対象とする帳票等の画像を読み取り、入力画像データを生成する。   The scanner 17 reads an image such as a form to be subjected to image processing, and generates input image data.

記憶装置18は、各種の記録媒体に対してプログラムやデータなどの読み書きを実行する。記憶装置18は、記録媒体として、ハードディスク等の磁気ディスクや、光ディスク、半導体メモリなどを用いることができる。記録媒体は、固定型、可搬型の何れであっても良い。   The storage device 18 reads / writes programs and data from / to various recording media. The storage device 18 can use a magnetic disk such as a hard disk, an optical disk, a semiconductor memory, or the like as a recording medium. The recording medium may be either a fixed type or a portable type.

プリンタ19は、帳票等の画像に対する画像処理(文字認識結果)を紙媒体に印刷するもので、例えば帳票に設けられた記入枠内に記入されていた文字に対する文字認識処理の結果(文字コード)を画像(文字)として印刷する。   The printer 19 prints image processing (character recognition result) on an image such as a form on a paper medium. For example, the result of character recognition processing (character code) for characters entered in an entry frame provided on the form. Is printed as an image (character).

(第1実施形態)
以下、図面を参照して本発明の第1実施形態について説明する。
図2は、図1に示すシステムによって実現される第1実施形態における画像処理装置の機能構成を示すブロック図である。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings.
FIG. 2 is a block diagram showing a functional configuration of the image processing apparatus in the first embodiment realized by the system shown in FIG.

第1実施形態における画像処理装置は、入力画像20(入力画像データ12b)に対するノイズ除去や二値化、拡大縮小、回転等の前処理により前処理済み画像を生成する前処理手段21と、処理対象の帳票の様式について定められた分割位置の前処理済み画像上での位置の候補を境界候補として抽出する境界候補抽出手段22と、境界候補の対を両端とする領域候補の各々についての特徴量を算出する領域特徴抽出手段23と、様式上の領域の系列から抽出した特徴量のパターンと様式上の領域に対応する前処理済み画像上での領域候補の系列から抽出した特徴量の参照パターン25との距離が小さくなるように、様式上での境界と前処理済み画像上での境界候補のマッチングをとることにより領域候補を選択するマッチング手段24と、マッチング手段24により選択された領域候補から領域を区分する位置、すなわち記入枠を抽出する記入枠抽出手段26(領域区分位置抽出手段)とから構成されている。   The image processing apparatus according to the first embodiment includes a preprocessing unit 21 that generates a preprocessed image by performing preprocessing such as noise removal, binarization, enlargement / reduction, and rotation on the input image 20 (input image data 12b). Features of boundary candidate extraction means 22 for extracting candidate positions on the preprocessed image at the division positions determined for the form of the target form as boundary candidates, and each of the area candidates having a pair of boundary candidates as both ends Region feature extraction means 23 for calculating the amount, reference of the feature amount extracted from the sequence of region candidates on the preprocessed image corresponding to the pattern of the feature amount pattern and the region on the format, and the feature amount pattern A matching means 24 for selecting a region candidate by matching a boundary on the form with a boundary candidate on the preprocessed image so that the distance to the pattern 25 is reduced; Position for dividing the region from the selected region candidate by etching means 24, that is, constituted from the entry frame extracting unit 26 for extracting the entry frame (area division position extracting means).

第1実施形態では、例えば図3、図4に示すような様式の帳票を処理対象とするものとして説明する。図3は、マッチング手段24におけるマッチングの際に使用される参照パターン25のもとになった帳票の様式を示すもので、複数の垂直方向の罫線と、垂直罫線の間に設けられた複数の水平方向の罫線によって、複数の領域が区分されている。各領域は、文字が記入される位置を表している。図4は、処理対象とする帳票の様式を示すもので、図3と同様にして複数の垂直方向の罫線と水平方向の罫線によって領域を区分している。図4では、各領域に対して文字が記入されている状態を示している。   In the first embodiment, a description will be given on the assumption that forms such as those shown in FIGS. 3 and 4 are processed. FIG. 3 shows a form of a form based on a reference pattern 25 used for matching in the matching unit 24. A plurality of vertical ruled lines and a plurality of vertical ruled lines provided between the vertical ruled lines are shown. A plurality of regions are divided by horizontal ruled lines. Each area represents a position where a character is written. FIG. 4 shows the form of a form to be processed, and the area is divided by a plurality of vertical ruled lines and horizontal ruled lines as in FIG. FIG. 4 shows a state where characters are entered for each area.

図3と図4を比較すると、文字が記入される領域の数と、その各領域についての相対的な位置関係は同じであるが、領域を区分する罫線の位置(座標)が異なり、また図4に示す処理対象とする帳票には、図3にはない領域(「製品情報」の文字列が記入された領域)を区分する罫線が存在している。   Comparing FIG. 3 and FIG. 4, the number of areas in which characters are entered and the relative positional relationship for each area are the same, but the positions (coordinates) of the ruled lines that divide the areas are different. The form to be processed shown in FIG. 4 has ruled lines that divide areas not shown in FIG. 3 (areas where a character string “product information” is entered).

第1実施形態の画像処理装置では、罫線(枠)の位置に依存しない方法で位置合わせをするマッチングにより、処理対象とする帳票群における罫線の位置の変動が位置合わせに影響を与えないようにして、領域を区分する枠(領域)の位置を確実に抽出できるようにする。   In the image processing apparatus according to the first embodiment, by performing matching that aligns in a manner that does not depend on the position of the ruled line (frame), a change in the position of the ruled line in the form group to be processed does not affect the alignment. Thus, the position of the frame (area) that divides the area can be reliably extracted.

次に、第1実施形態における動作について、図5に示すフローチャートを参照しながら説明する。
まず、スキャナ17により処理対象とする帳票(図4)について読み取りが実行され、入力画像データ12b(入力画像20)がメモリ12に記憶される(ステップA1)。
Next, the operation in the first embodiment will be described with reference to the flowchart shown in FIG.
First, the scanner 17 reads a form to be processed (FIG. 4), and the input image data 12b (input image 20) is stored in the memory 12 (step A1).

前処理手段21は、入力された画像(入力画像20)に対して二値化やノイズ除去、拡大縮小、回転等の前処理を実行して前処理済み画像を生成する(ステップA2)。   The preprocessing unit 21 performs preprocessing such as binarization, noise removal, enlargement / reduction, and rotation on the input image (input image 20) to generate a preprocessed image (step A2).

次に、境界候補抽出手段22は、前処理済み画像上において、処理対象の帳票の様式について定められた領域の分割位置の候補として境界候補を抽出する(ステップA3)。例えば、領域同士の境界に罫線(枠線)が引かれている場合、境界候補は、罫線抽出により抽出された罫線の位置を示す座標として抽出可能である。例えば、図3に示す帳票の様式では、垂直罫線B1−B6により領域a−eが区切られているが、図4に示す帳票の様式では、垂直罫線抽出によって得られる垂直罫線C1−C8の横座標が境界位置候補となる。なお、領域を区分する位置(境界)を表すB1−B6,C1−C8を境界番号と称する。   Next, the boundary candidate extraction means 22 extracts boundary candidates as candidates for the division position of the area defined for the form of the processing target form on the preprocessed image (step A3). For example, when a ruled line (frame line) is drawn at the boundary between regions, the boundary candidate can be extracted as coordinates indicating the position of the ruled line extracted by ruled line extraction. For example, in the form of the form shown in FIG. 3, the areas ae are divided by the vertical ruled lines B1-B6. However, in the form of the form shown in FIG. 4, the horizontal lines of the vertical ruled lines C1-C8 obtained by the vertical ruled line extraction. Coordinates become boundary position candidates. Note that B1-B6 and C1-C8 representing positions (boundaries) for dividing the region are referred to as boundary numbers.

領域特徴抽出手段23は、境界候補の対に挟まれた領域の特徴量を、可能な対の全てまたは一部について算出する(ステップA4)。例えば、可能な対の全てについて特徴量を抽出する場合、図4に示す帳票を処理対象とする場合、以下の境界番号の対を両端とする境界候補の各々について特徴量を算出する。   The region feature extraction means 23 calculates the feature amount of the region sandwiched between the boundary candidate pairs for all or part of the possible pairs (step A4). For example, when extracting feature amounts for all possible pairs, when processing the form shown in FIG. 4, the feature amounts are calculated for each of the boundary candidates having the following boundary number pairs as both ends.

(C1,C2)(C1,C3)(C1,C4)(C1,C5)(C1,C6)(C1,C7)(C1,C8)
(C2,C3)(C2,C4)(C2,C5)(C2,C6)(C2,C7)(C2,C8)
(C3,C4)(C3,C5)(C3,C6)(C3,C7)(C3,C8)
(C4,C5)(C4,C6)(C4,C7)(C4,C8)
(C5,C6)(C5,C7)(C5,C8)
(C6,C7)(C6,C8)
(C7,C8)
領域特徴抽出手段23が求める特徴量としては、例えば図4に示す帳票の様式の場合では、垂直罫線(C2)の右側に接している水平罫線の本数r(この場合では6本)と、垂直罫線(C3)の左側から接している水平罫線の本数l(この場合では6本)の組からなる2次元ベクトル(r,l)を用いることができる。
(C1, C2) (C1, C3) (C1, C4) (C1, C5) (C1, C6) (C1, C7) (C1, C8)
(C2, C3) (C2, C4) (C2, C5) (C2, C6) (C2, C7) (C2, C8)
(C3, C4) (C3, C5) (C3, C6) (C3, C7) (C3, C8)
(C4, C5) (C4, C6) (C4, C7) (C4, C8)
(C5, C6) (C5, C7) (C5, C8)
(C6, C7) (C6, C8)
(C7, C8)
For example, in the case of the form of the form shown in FIG. 4, the feature quantity obtained by the area feature extraction unit 23 is the number r (6 in this case) of horizontal ruled lines that are in contact with the right side of the vertical ruled line (C2), and the vertical amount. A two-dimensional vector (r, l) composed of a set of l (6 in this case) horizontal ruled lines in contact from the left side of the ruled line (C3) can be used.

この特徴量を図4に示す帳票について列挙した対のいくつかに対応する領域候補について求めた結果は以下のようになる。   The results obtained for the area candidates corresponding to some of the pairs listed in the form shown in FIG. 4 for the feature amounts are as follows.

(C2,C3):(6,6)、(C3,C4):(6,6)、(C4,C5):(2,2)、(C5,C7):(7,8)、(C7,C8):(8,8)、(C1,C2):(2,2)、(C1,C3):(2,6)、(C5,C6):(7,2)、(C6,C7):(3,8)、(C6,C8):(3,8)。   (C2, C3): (6, 6), (C3, C4): (6, 6), (C4, C5): (2, 2), (C5, C7): (7, 8), (C7 , C8): (8, 8), (C1, C2): (2, 2), (C1, C3): (2, 6), (C5, C6): (7, 2), (C6, C7 ): (3, 8), (C6, C8): (3, 8).

ただし、「:」の前側は領域候補の両端に位置する境界候補の対を、後ろ側は領域候補について求めた特徴量を表している。   However, the front side of “:” represents a pair of boundary candidates located at both ends of the region candidate, and the rear side represents a feature amount obtained for the region candidate.

次に、マッチング手段24は、様式上の領域の系列から抽出した特徴量のパターンと様式上の領域に対応する前処理済み画像上での領域候補の系列から抽出した特徴量のパターンの距離が小さくなるように、様式上での境界の系列と前処理済み画像上での境界候補の系列のマッチングをとることにより領域候補を選択する(ステップA5)。   Next, the matching unit 24 calculates the distance between the feature amount pattern extracted from the sequence of region on the style and the pattern of feature amount extracted from the sequence of region candidates on the preprocessed image corresponding to the region on the format. A region candidate is selected by matching the boundary series on the style with the boundary candidate series on the preprocessed image so as to be smaller (step A5).

マッチング手段24によるマッチングは、帳票の様式上の領域から求めた特徴量のパターン、すなわち参照パターンと、領域候補から求めた特徴量のパターンの距離が小さくなるように行う。ただし、図3に示す帳票の様式に対する図4の様式に示す左端の領域(垂直罫線C1−C2の間の領域)のように、様式で定められていない領域が前後に付随している可能性が有る場合を想定して、マッチングにおいて、最初及び最後のいくつかの境界候補を無視してマッチングを行う端点フリーマッチングを行う。また、様式で定められていない領域が付随しない場合は、端点固定でのマッチングを行っても良い。   The matching by the matching unit 24 is performed so that the distance between the feature amount pattern obtained from the region on the form form, that is, the reference pattern, and the feature amount pattern obtained from the region candidate is small. However, there is a possibility that areas not defined in the style are attached to the front and rear, such as the leftmost area (area between the vertical ruled lines C1-C2) shown in the style of FIG. 4 with respect to the form of the form shown in FIG. In the matching, end-point free matching is performed in which matching is performed by ignoring the first and last boundary candidates. In addition, when an area not defined in the form is not attached, matching with fixed end points may be performed.

特徴量のパターン同士の距離は、例えば、様式上の領域から求めた特徴量のベクトルと、対応付けられた領域候補から求めた特徴ベクトルのユークリッド距離の自乗和として求めることができる。   The distance between the feature amount patterns can be obtained, for example, as the square sum of the Euclidean distance between the feature amount vector obtained from the style region and the feature vector obtained from the associated region candidate.

図3の様式と図4の帳票の例において、例えば、(r,l)を特徴量とした場合、図3の様式について参照パターンを定めると以下のようになる。
(B1,B2):(6,6)、(B2,B3):(6,6)、(B3,B4):(2,2)、(B4,B5):(7,8)、(B5,B6):(8,8)。
In the example of the form of FIG. 3 and the form of FIG. 4, for example, when (r, l) is a feature amount, the reference pattern is determined for the form of FIG. 3 as follows.
(B1, B2): (6, 6), (B2, B3): (6, 6), (B3, B4): (2, 2), (B4, B5): (7, 8), (B5 , B6): (8, 8).

様式上の境界B1,B2,B3,B4,B5,B6がそれぞれ境界候補C2,C3,C4,C5,C7,C8に対応付けられた場合の距離は、
((6−6)+(6−6))+((6−6)+(6−6)
+((2−2)+(2−2))+((7−7)+(8−8)+(8−8)+(8−8)
=0
となる。
The distances when the style boundaries B1, B2, B3, B4, B5, and B6 are associated with the boundary candidates C2, C3, C4, C5, C7, and C8, respectively,
((6-6) 2 + (6-6) 2 ) + ((6-6) 2 + (6-6) 2 )
+ ((2-2) 2 + (2-2) 2 ) + ((7-7) 2 + (8-8) 2 + (8-8) 2 + (8-8) 2 )
= 0
It becomes.

また、様式上の境界B1,B2,B3,B4,B5,B6がそれぞれ境界候補C1,C3,C4,C5,C6,C8に対応付けられた場合の距離は、
((2−6)+(6−6))+((6−6)+(6−6)
+((2−2)+(2−2))+((7−7)+(2−8)+(3−8)+(8−8)
=77
となる。
Further, the distances when the style boundaries B1, B2, B3, B4, B5, and B6 are associated with the boundary candidates C1, C3, C4, C5, C6, and C8, respectively,
((2-6) 2 + (6-6) 2 ) + ((6-6) 2 + (6-6) 2 )
+ ((2-2) 2 + (2-2) 2 ) + ((7-7) 2 + (2-8) 2 + (3-8) 2 + (8-8) 2 )
= 77
It becomes.

以上では、様式上の領域が入力画像上で省略されていないことを仮定してパターン同士の距離の計算方法について述べたが、様式上の領域が入力画像上で省略されている場合は、領域毎に定めたペナルティー値で、自乗和で表された距離の式の当該領域に対応する項を置き換えることにより、領域の省略に対応することができる。   In the above, the method for calculating the distance between patterns has been described on the assumption that the area on the style is not omitted on the input image, but if the area on the style is omitted on the input image, the area By replacing the term corresponding to the area of the distance formula expressed by the sum of squares with the penalty value determined for each, it is possible to cope with the omission of the area.

例えば、B3,B4を両端とする領域が省略されており、この領域に対応するペナルティー値が1000であり、B1,B2,B3がC2,C3,C4と、B4,B5,B6がC4,C7,C8と対応付けられている場合の距離は、
((6−6)+(6−6))+((6−6)+(6−6))+1000
+((2−7)+(8−8)+(8−8)+(8−8)
=1025
となる。
For example, a region having both ends of B3 and B4 is omitted, the penalty value corresponding to this region is 1000, B1, B2, and B3 are C2, C3, and C4, and B4, B5, and B6 are C4, C7 , C8 is associated with the distance,
((6-6) 2 + (6-6) 2 ) + ((6-6) 2 + (6-6) 2 ) +1000
+ ((2-7) 2 + (8-8) 2 + (8-8) 2 + (8-8) 2 )
= 1025
It becomes.

参照パターン25と入力画像20から求めた特徴量のパターンの距離が小さくなるように、様式上の境界と境界候補を対応付ける方法としては、例えば動的計画法を用いることができる。   For example, dynamic programming can be used as a method of associating the boundary on the style with the boundary candidate so that the distance between the reference pattern 25 and the pattern of the feature amount obtained from the input image 20 becomes small.

図6は、図3の様式と図4の帳票のマッチングにおいて、動的計画法を用いた場合の様子を示した図である。図6において、横軸が境界候補の系列C1−C8の番号、縦軸が様式上の境界B1−B6の番号に対応している。   FIG. 6 is a diagram showing a state in which dynamic programming is used in matching between the style of FIG. 3 and the form of FIG. In FIG. 6, the horizontal axis corresponds to the number of the boundary candidate series C1-C8, and the vertical axis corresponds to the number of the boundary B1-B6 on the style.

図6において、マッチングの経路は点線及び座標軸の交点として表現されるノード同士を結ぶ辺の系列として表現される。ノード同士を結ぶ辺の、両端の真横に位置する境界の対は様式上の領域と対応しており、両端の真下に位置する境界候補の対は領域候補に対応しているので、ノード同士を結ぶ辺を介して様式上の領域と領域候補が対応づけられている。例えば、境界B4−B5の対に対しては、境界候補C5−C7の対が対応づけられている。   In FIG. 6, the matching path is expressed as a series of sides connecting nodes expressed as intersections of dotted lines and coordinate axes. The pair of boundaries that lie directly beside both ends of the edge connecting the nodes corresponds to the area on the style, and the pair of boundary candidates that lies directly below both ends corresponds to the area candidates. The region on the style and the region candidate are associated with each other through the connecting edge. For example, a pair of boundary candidates C5-C7 is associated with a pair of boundaries B4-B5.

図6の例では、隣り合う境界の対に対応する境界候補の対が、異なる二つの境界候補からなっているが、処理対象とする帳票にある領域が省略されているなどして、入力画像上から抜けている場合には、例えば図7に示すように、様式上の境界の対(B3−B4)に同一の二つの境界候補(C4−C4)が対応付けられる。従って、様式上の領域に対して、空の領域候補が対応付けられることになる。   In the example of FIG. 6, a pair of boundary candidates corresponding to a pair of adjacent boundaries is composed of two different boundary candidates, but an input image is displayed because an area in a form to be processed is omitted. In the case where it is missing from the top, for example, as shown in FIG. 7, the same two boundary candidates (C4-C4) are associated with the boundary pair (B3-B4) on the style. Accordingly, an empty area candidate is associated with the area on the style.

境界候補を垂直罫線として抽出した場合、境界候補C6のように、様式で定められた境界と対応しない境界候補が検出される場合がある。このため、経路上の隣り合うノードを結ぶ辺の各々の境界番号差と境界候補番号差は1対多となる。   When a boundary candidate is extracted as a vertical ruled line, there may be a case where a boundary candidate that does not correspond to the boundary defined in the style is detected, such as a boundary candidate C6. For this reason, the boundary number difference and the boundary candidate number difference of each side connecting adjacent nodes on the route are one-to-many.

また、図4のように、様式で定められていない領域が、様式で定められている領域の系列の外側に付随している可能性がある場合は、境界番号差と境界候補番号差が0対1となる辺も含んだ経路も求められる。   In addition, as shown in FIG. 4, when there is a possibility that an area not defined in the format is attached outside the series of areas defined in the format, the boundary number difference and the boundary candidate number difference are 0. A route including the edge to be paired 1 is also obtained.

次に、記入枠抽出手段26は、マッチング手段24により選択された領域候補から記入枠を抽出し、その記入枠の位置を示す情報(領域を区分する位置を示す情報)を記入枠抽出結果27として出力する(ステップA6)。分割した領域からの記入枠の抽出方法としては、対象とする様式や、マッチング手段24で求めた領域の種類により、様々な方法が考えられるが、例えば、図3の様式の領域b及び領域eにおいては、当該領域を横罫線で分割する事によって各記入枠を抽出することができる。   Next, the entry frame extraction unit 26 extracts an entry frame from the region candidate selected by the matching unit 24, and uses the entry frame extraction result 27 as information indicating the position of the entry frame (information indicating the position where the region is divided). (Step A6). As a method for extracting the entry frame from the divided areas, various methods are conceivable depending on the target style and the type of area obtained by the matching means 24. For example, the area b and area e in the style of FIG. In, each entry frame can be extracted by dividing the area by a horizontal ruled line.

また、記入枠抽出手段26(領域区分位置抽出手段)を、図8のブロック図に示す機能によって構成することにより、マッチング手段24により求められた領域候補内に含まれる部分領域の位置を示す記入枠をさらに抽出することができる。   Further, the entry frame extraction means 26 (area segment position extraction means) is configured by the function shown in the block diagram of FIG. 8 so that the entry indicating the position of the partial area included in the area candidate obtained by the matching means 24 is entered. A frame can be further extracted.

すなわち、記入枠抽出手段26は、マッチング手段24で求められた領域候補を示す領域情報30をもとに、領域候補内をさらに分割して得られる部分領域の境界の候補(領域内境界候補)を、境界候補抽出手段22と同様の方法で抽出する領域内境界候補抽出手段31と、領域内境界候補抽出手段31によって抽出された領域内境界候補の対で定まる部分領域候補の特徴量を領域特徴抽出手段23と同様の方法で抽出する部分領域特徴抽出手段32と、マッチング手段24と同様の方法により部分領域特徴抽出手段32で抽出した特徴量のパターンと様式上の部分領域から求めた特徴量のパターンすなわち領域内参照パターン34をマッチングして部分領域候補を選択する領域内マッチング手段33と、領域内マッチング手段33で選択した部分領域候補から記入枠(部分領域を区分する位置)を抽出する領域内記入枠抽出手段35(部分領域区分位置抽出手段)から構成される。   In other words, the entry frame extraction unit 26 uses the region information 30 indicating the region candidate obtained by the matching unit 24 to further subdivide the region candidate to obtain a partial region boundary candidate (intra-region boundary candidate). Are extracted in the same way as the boundary candidate extraction unit 22 and the feature amount of the partial region candidate determined by a pair of the intra-region boundary candidate extraction unit 31 and the intra-region boundary candidate extraction unit 31 is determined as a region. Features obtained from the partial area feature extraction means 32 extracted by the same method as the feature extraction means 23 and the feature amount pattern extracted by the partial area feature extraction means 32 and the style partial area by the same method as the matching means 24 The region matching means 33 for selecting a partial region candidate by matching the quantity pattern, ie, the area reference pattern 34, and the region matching means 33 Composed of entry boxes from the partial area candidate area entry frame extracting means 35 for extracting (position partitioning the partial region) (partial area partition position extracting means).

この場合、記入枠抽出手段26は、領域内マッチング手段33で求めた部分領域を罫線で分割することによって記入枠を求めてもよい。また、領域内記入枠抽出手段35は、記入枠抽出手段26を領域内境界候補抽出手段31、部分領域特徴抽出手段32、領域内マッチング手段33、領域内記入枠抽出手段35に分割したのと同様に、さらに分割した機能により構成することもできる。こうして、記入枠を抽出する手段を再帰的に任意の回数で再分割する構成とすることで、より複雑な様式に対応することができる。   In this case, the entry frame extraction unit 26 may obtain the entry frame by dividing the partial region obtained by the in-region matching unit 33 with a ruled line. In addition, the intra-area entry frame extraction means 35 divides the entry frame extraction means 26 into an intra-area boundary candidate extraction means 31, a partial area feature extraction means 32, an intra-area matching means 33, and an intra-area entry frame extraction means 35. Similarly, it can be configured by further divided functions. In this way, it is possible to cope with a more complicated format by recursively subdividing the means for extracting the entry frame at an arbitrary number of times.

なお、マッチング手段24によるマッチングで、様式上の領域に対して空の領域候補が対応付けられた場合、その領域は入力画像20上に存在していないことになるが、この場合には当該領域からの記入枠の抽出は行わず、当該領域上の記入枠については、当該記入枠の位置を表す情報の替わりに、当該記入枠が空であることを示す情報を記入枠抽出結果27として出力するものとする。   In addition, when an empty region candidate is associated with a region on the style by matching by the matching unit 24, the region does not exist on the input image 20, but in this case, the region The information indicating that the entry frame is empty is output as the entry frame extraction result 27 instead of the information indicating the position of the entry frame. It shall be.

なお、図5に示すステップA7については、後述する第3実施形態及び第4実施形態において説明する。   Step A7 shown in FIG. 5 will be described in a third embodiment and a fourth embodiment which will be described later.

このようにして、第1実施形態の画像処理装置では、マッチング手段24において領域を区分する記入枠の位置に依存しない方法で参照パターン25とのマッチングを実行するので、処理対象とする帳票群における罫線の位置の変動があっても、記入枠(領域)の位置を確実に抽出できるようになる。   In this manner, in the image processing apparatus according to the first embodiment, the matching unit 24 executes matching with the reference pattern 25 by a method that does not depend on the position of the entry frame that divides the region. Even if there is a change in the position of the ruled line, the position of the entry frame (area) can be reliably extracted.

(第2実施形態)
以下、図面を参照して本発明の第2実施形態について説明する。
図9は第2実施形態における画像処理装置の機能構成を示すブロック図である。
(Second Embodiment)
The second embodiment of the present invention will be described below with reference to the drawings.
FIG. 9 is a block diagram illustrating a functional configuration of the image processing apparatus according to the second embodiment.

第2実施形態における画像処理装置は、入力画像に対するノイズ除去や二値化、拡大縮小、回転等の前処理により前処理済み画像を生成する前処理手段21と、処理対象の帳票の様式について定められた水平方向の分割位置の前処理済み画像上での位置として水平方向の境界候補を抽出する水平方向境界候補抽出手段22aと、処理対象の帳票の様式について定められた垂直方向の分割位置の前処理済み画像上での位置として垂直方向の境界候補を抽出する垂直方向境界候補抽出手段22bと、水平方向の境界候補の対を両端とする水平方向の領域候補の各々についての特徴量を算出する水平方向領域特徴抽出手段23aと、垂直方向の境界候補の対を両端とする垂直方向の領域候補の各々についての特徴量を算出する垂直方向領域特徴抽出手段23bと、処理対象の帳票の様式について予め定められた水平方向の参照パターン(水平方向参照パターン25a)と水平方向の領域候補から抽出した特徴量のパターンの距離が小さくなるように水平方向の参照パターンと水平方向の領域候補をマッチングして水平方向の領域候補を選択する水平方向マッチング手段24aと、処理対象の帳票の様式について予め定められた垂直方向の参照パターン(垂直方向参照パターン25b)と垂直方向の領域候補から抽出した特徴量のパターンの距離が小さくなるように垂直方向の参照パターンと垂直方向の領域候補をマッチングして垂直方向の領域候補を選択する垂直方向マッチング手段24bと、水平方向マッチング手段24aで選択した水平方向の領域候補に対応する境界候補及び垂直方向マッチング手段24bで選択した垂直方向の領域候補に対応する境界候補の座標を用いて、様式上で定められた矩形領域の座標を求める領域抽出手段28と、領域抽出手段28で求めた矩形領域から領域を区分する位置、すなわち記入枠を抽出する記入枠抽出手段26(領域区分位置抽出手段)とから構成されている。   The image processing apparatus according to the second embodiment determines the preprocessing means 21 that generates a preprocessed image by preprocessing such as noise removal, binarization, enlargement / reduction, and rotation of an input image, and the form of a form to be processed. A horizontal boundary candidate extracting means 22a for extracting a horizontal boundary candidate as a position on the preprocessed image of the horizontal division position, and a vertical division position determined for the form of the form to be processed. The vertical boundary candidate extraction means 22b for extracting vertical boundary candidates as positions on the preprocessed image, and the feature amount for each of the horizontal area candidates having the horizontal boundary candidate pairs as both ends are calculated. Vertical region feature extraction means 23a for calculating the feature amount for each of the vertical region candidates having a pair of vertical boundary candidates as both ends A horizontal reference pattern (horizontal reference pattern 25a) that is predetermined for the form of the processing target form and the feature pattern extracted from the horizontal region candidate is reduced in a horizontal direction. A horizontal direction matching means 24a for selecting a horizontal area candidate by matching a reference pattern with a horizontal area candidate, and a vertical reference pattern (vertical reference pattern 25b) predetermined for the format of the form to be processed And vertical direction matching means 24b for selecting a vertical area candidate by matching the vertical reference pattern and the vertical area candidate so that the distance between the feature amount patterns extracted from the vertical area candidates is reduced, Boundary candidates and vertical directions corresponding to the horizontal region candidates selected by the horizontal direction matching means 24a Using the coordinates of the boundary candidate corresponding to the vertical area candidate selected by the matching means 24b, the area extracting means 28 for obtaining the coordinates of the rectangular area determined on the style, and the rectangular area obtained by the area extracting means 28 It is composed of a position for dividing an area, that is, an entry frame extraction means 26 (area division position extraction means) for extracting an entry frame.

なお、第1実施形態と同様の機能を有する部分については同じ符号を付している。   In addition, the same code | symbol is attached | subjected about the part which has the same function as 1st Embodiment.

第2実施形態では、例えば図10、図11に示すような様式の帳票を処理対象とするものとして説明する。図10は、水平方向マッチング手段24a及び垂直方向マッチング手段24bにおけるマッチングの際に使用される水平方向参照パターン25a、垂直方向参照パターン25bのもとになった帳票の様式を示すもので、a,b,c,d,eは記入枠の各々を表している。図10に示す帳票の様式は、横方向に領域を分割しても、縦方向に領域を分割しても、記入枠が領域の境界によって分割されている。   In the second embodiment, a description will be given on the assumption that forms such as those shown in FIGS. 10 and 11 are processed. FIG. 10 shows a form of a form based on the horizontal direction reference pattern 25a and the vertical direction reference pattern 25b used for matching in the horizontal direction matching unit 24a and the vertical direction matching unit 24b. b, c, d, and e represent each of the entry boxes. In the form of the form shown in FIG. 10, the entry frame is divided by the boundary of the region regardless of whether the region is divided in the horizontal direction or the region is divided in the vertical direction.

また、図11は、図10の様式を水平方向及び垂直方向の罫線として、水平方向の境界HB1,HB2,HB3,HB4、垂直方向の境界VB1,VB2,VB3,VB4を定め、それらの境界により水平方向の領域h1,h2,h3と、垂直方向の領域v1,v2,v3とを定めた例を示す図である。なお、領域を区分する位置(境界)を表すHB1,HB2,HB3,HB4,VB1,VB2,VB3,VB4を境界番号と称する。   Further, FIG. 11 defines horizontal boundaries HB1, HB2, HB3, and HB4 and vertical boundaries VB1, VB2, VB3, and VB4 with the style of FIG. 10 as horizontal and vertical ruled lines. It is a figure which shows the example which defined the area | region h1, h2, h3 of the horizontal direction, and area | region v1, v2, v3 of the vertical direction. Note that HB1, HB2, HB3, HB4, VB1, VB2, VB3, and VB4 representing positions (boundaries) for dividing the region are referred to as boundary numbers.

次に、第2実施形態における動作について説明する。
第2実施形態の画像処理装置は、基本的には第1実施形態(図5に示すフローチャート)と同様の流れで処理を実行するものとし、同一の処理部分については説明を省略する。第2実施形態では、ステップA3〜A5に相当する処理において、水平方向、垂直方向のそれぞれの方向で処理を実行し、各方向で特徴量のパターンについてマッチングを行うことで領域候補を選択し、水平方向と垂直方向のそれぞれで選択された領域候補の境界の位置をもとに領域を表す矩形領域を求める。
Next, the operation in the second embodiment will be described.
The image processing apparatus of the second embodiment basically executes processing in the same flow as that of the first embodiment (the flowchart shown in FIG. 5), and description of the same processing portion is omitted. In the second embodiment, in the processing corresponding to steps A3 to A5, processing is performed in each of the horizontal direction and the vertical direction, and a region candidate is selected by performing matching on the feature amount pattern in each direction, A rectangular area representing the area is obtained based on the boundary positions of the area candidates selected in the horizontal direction and the vertical direction.

まず、前処理手段21により入力画像20に対して前処理済み画像が生成されると、水平方向境界候補抽出手段22a及び垂直方向境界候補抽出手段22bは、それぞれ前処理済み画像上において、処理対象の帳票の様式について定められた領域の分割位置の候補として境界候補を抽出する。水平方向の境界候補と垂直方向の境界候補の抽出は、第1実施形態における境界候補抽出手段22と同様の処理を水平方向境界候補抽出手段22aと垂直方向境界候補抽出手段22bが、帳票の画像に対してそれぞれ水平方向、垂直方向に行うことで実現される。   First, when a preprocessed image is generated for the input image 20 by the preprocessing means 21, the horizontal boundary candidate extraction means 22a and the vertical boundary candidate extraction means 22b are processed on the preprocessed image, respectively. Boundary candidates are extracted as candidates for the division position of the area determined for the form of the form. For the extraction of the horizontal boundary candidates and the vertical boundary candidates, the horizontal boundary candidate extraction means 22a and the vertical boundary candidate extraction means 22b perform the same processing as the boundary candidate extraction means 22 in the first embodiment. Are realized in the horizontal and vertical directions.

次に、水平方向領域特徴抽出手段23a及び垂直方向領域特徴抽出手段23bは、第1実施形態における領域特徴抽出手段23と領域候補の特徴の抽出と同様の方法により、それぞれ水平方向の領域候補及び垂直方向の領域候補の特徴抽出を行う。   Next, the horizontal direction area feature extracting unit 23a and the vertical direction area feature extracting unit 23b are respectively used in the horizontal direction area candidate and the horizontal direction area candidate by the same method as the area feature extracting unit 23 and the area candidate feature extraction in the first embodiment. Extract features of vertical region candidates.

次に、水平方向マッチング手段24aと垂直方向マッチング手段24bは、第1実施形態におけるマッチング手段24におけるマッチングと同様の方法により、水平方向領域特徴抽出手段23a及び垂直方向領域特徴抽出手段23bにより抽出された領域候補の特徴量のパターンについて、それぞれ水平方向参照パターン25a、垂直方向参照パターン25bとのマッチングをして領域候補を選択する。なお、水平方向参照パターン25a及び垂直方向参照パターン25bは、第1実施形態における参照パターンと同様に定義される。   Next, the horizontal direction matching means 24a and the vertical direction matching means 24b are extracted by the horizontal direction area feature extraction means 23a and the vertical direction area feature extraction means 23b by the same method as the matching in the matching means 24 in the first embodiment. The region candidate feature amount patterns are matched with the horizontal direction reference pattern 25a and the vertical direction reference pattern 25b, respectively, to select a region candidate. The horizontal direction reference pattern 25a and the vertical direction reference pattern 25b are defined in the same manner as the reference pattern in the first embodiment.

次に、領域抽出手段28は、水平方向マッチング手段24aと垂直方向マッチング手段24bのそれぞれにより選択された領域候補の境界の位置をもとに矩形領域を求める。例えば、帳票の様式上で、上下左右の端に接している境界の番号の組み合わせからなる矩形情報を、上下左右の境界番号に対応する水平方向の境界候補及び垂直方向の境界候補の座標に置き換えることによって、前処理済み画像上での矩形の座標を求め、それを抽出した領域の矩形の座標とする。   Next, the region extracting unit 28 obtains a rectangular region based on the boundary positions of the region candidates selected by the horizontal direction matching unit 24a and the vertical direction matching unit 24b. For example, in the form format, rectangular information consisting of a combination of border numbers touching the top, bottom, left, and right edges is replaced with the horizontal border candidate and vertical border candidate coordinates corresponding to the top, bottom, left, and right border numbers. Thus, the coordinates of the rectangle on the preprocessed image are obtained and set as the rectangle coordinates of the extracted area.

例えば、図11に示す記入枠aに対する矩形情報についての矩形情報は(HB1,HB2,VB1,VB2)により表され、(HB1,HB3,VB1,VB2)の各境界番号を座標に置き換えることで、領域の矩形(各頂点の座標)を求めることができる。 For example, a rectangular information about the rectangular information for input frame a shown in FIG. 11 are represented by (HB1, HB2, VB1, VB2 ), by replacing the coordinates (HB1, HB3, VB1, VB2 ) each boundary number, The rectangle of the area (the coordinates of each vertex) can be obtained.

記入枠抽出手段26は、領域抽出手段28で抽出された領域の矩形(領域矩形)から領域を区分する位置を示す記入枠の抽出を行う。なお、この抽出処理は、第1実施形態における記入枠の抽出と同様の方法で行われる。   The entry frame extraction unit 26 extracts an entry frame indicating the position where the region is divided from the region rectangle (region rectangle) extracted by the region extraction unit 28. This extraction process is performed in the same manner as the entry frame extraction in the first embodiment.

このようにして、第1実施形態の方法では記入枠の抽出を行うことができない図10のような様式、すなわち横方向に領域を分割しても、縦方向に領域を分割しても、記入枠が領域の境界によって分割されてしまう様式であっても、第2実施形態における画像処理装置では、水平方向、垂直方向のそれぞれについての特徴を抽出し、それぞれの方向でマッチング処理を実行することにより記入枠(領域)の抽出が可能となる。   In this manner, the entry frame cannot be extracted by the method of the first embodiment, as shown in FIG. 10, that is, whether the area is divided horizontally or divided vertically. Even if the frame is divided by the boundary of the region, the image processing apparatus according to the second embodiment extracts features in each of the horizontal direction and the vertical direction, and executes matching processing in each direction. This makes it possible to extract an entry frame (area).

(第3実施形態)
以下、図面を参照して本発明の第3実施形態について説明する。
第3実施形態では、画像処理装置を文字認識装置として使用する場合について説明する。
図12は第3実施形態における文字認識装置の機能構成を表すブロック図である。
(Third embodiment)
The third embodiment of the present invention will be described below with reference to the drawings.
In the third embodiment, a case where an image processing apparatus is used as a character recognition apparatus will be described.
FIG. 12 is a block diagram illustrating a functional configuration of the character recognition device according to the third embodiment.

第3実施形態における文字認識装置は、入力画像に対するノイズ除去や二値化、拡大縮小、回転等の前処理により前処理済み画像を生成する前処理手段21と、処理対象の帳票の様式について定められた分割位置の前処理済み画像上での位置の候補を境界候補として抽出する境界候補抽出手段22と、境界候補の対を両端とする領域候補の各々についての特徴量を算出する領域特徴抽出手段23と、様式上の領域の系列から抽出した特徴量のパターンと様式上の領域に対応する前処理済み画像上での領域候補の系列から抽出した特徴量のパターンの距離が小さくなるように、様式上での境界と前処理済み画像上での境界候補のマッチングをとることにより領域候補を選択するマッチング手段24と、マッチング手段24により選択された領域候補から記入枠を抽出する記入枠抽出手段26と、記入枠内に記入された文字を認識し、文字コードの列に変換する記入枠認識手段29とから構成されている。   The character recognition apparatus according to the third embodiment determines the preprocessing means 21 that generates a preprocessed image by preprocessing such as noise removal, binarization, enlargement / reduction, and rotation of the input image, and the form of the form to be processed. Boundary candidate extraction means 22 for extracting a position candidate on the preprocessed image of the divided position as a boundary candidate, and region feature extraction for calculating a feature quantity for each of the region candidates having a pair of boundary candidates as both ends The distance between the feature 23 and the feature amount pattern extracted from the region series on the style and the feature amount pattern extracted from the region candidate series on the preprocessed image corresponding to the region on the style is reduced. A matching unit 24 for selecting a region candidate by matching a boundary on the form with a boundary candidate on the preprocessed image, and the region selected by the matching unit 24 The entry frame extracting unit 26 for extracting the entry boxes from the coenzyme, recognizes the filled-in characters in the entry box, and a fill frame recognition means 29 for converting the column character code.

すなわち、第3実施形態の文字認識装置は、第1実施形態における画像処理装置に記入枠認識手段29が追加された構成を有する。前処理手段21、境界候補抽出手段22、領域特徴抽出手段23、マッチング手段24、記入枠抽出手段26は、第1実施形態と同じ処理を実行するものとして詳細な説明を省略する。   That is, the character recognition device of the third embodiment has a configuration in which the entry frame recognition means 29 is added to the image processing device of the first embodiment. The preprocessing unit 21, the boundary candidate extraction unit 22, the region feature extraction unit 23, the matching unit 24, and the entry frame extraction unit 26 perform the same processing as in the first embodiment, and detailed description thereof is omitted.

第3実施形態の文字認識装置は、基本的には第1実施形態(図5に示すフローチャート)と同様の流れで処理を実行するものとし、同一の処理部分(ステップA1〜A6)については説明を省略する。第3実施形態は、ステップA7に相当する処理が追加されている。   The character recognition device of the third embodiment basically executes processing in the same flow as in the first embodiment (the flowchart shown in FIG. 5), and the same processing portions (steps A1 to A6) will be described. Is omitted. In the third embodiment, a process corresponding to step A7 is added.

記入枠認識手段29は、記入枠抽出手段26によって抽出された記入枠内に記入された文字を認識して文字コードの列に変換する(図5、ステップA7)。   The entry frame recognition unit 29 recognizes the characters entered in the entry box extracted by the entry frame extraction unit 26 and converts them into a character code string (FIG. 5, step A7).

記入枠内に記入された文字の認識は、例えば、記入枠内の画像に対してラベリングを行い黒画素の連結領域として個別の文字毎の文字画像を抽出し、文字画像に対して複合類似度法に基づくクラス分類を行う事によって文字種を特定し、文字種に対応する文字コードを、文字画像に外接する矩形の中心の横座標に関して昇順で並べた系列を認識結果として出力することによって可能である。ただし、記入枠内の文字の認識方法にとしては、前記の方法に限らずどのような方法を用いても良い。   The recognition of characters entered in the entry frame is performed by, for example, labeling the image in the entry frame, extracting the character image for each individual character as a black pixel connection region, and combining the character image It is possible by specifying the character type by performing classification based on the law, and outputting as a recognition result a series in which the character code corresponding to the character type is arranged in ascending order with respect to the abscissa of the center of the rectangle circumscribing the character image . However, the method for recognizing characters in the entry box is not limited to the above method, and any method may be used.

このようにして、第3実施形態の文字認識装置では、第1実施形態と同様の処理によって抽出された記入枠の位置をもとに、記入枠内の文字について文字認識することができるので、記入枠毎に確実に分類された認識結果を出力することができる。   In this way, the character recognition device of the third embodiment can perform character recognition on characters in the entry frame based on the position of the entry frame extracted by the same processing as in the first embodiment. The recognition result classified reliably for every entry frame can be output.

(第4実施形態)
以下、図面を参照して本発明の第4実施形態について説明する。
第4実施形態では、第3実施形態と同様に、画像処理装置を文字認識装置として使用する場合について説明する。
図13は、第4実施形態における文字認識装置の機能構成を表すブロック図である。
(Fourth embodiment)
The fourth embodiment of the present invention will be described below with reference to the drawings.
In the fourth embodiment, as in the third embodiment, a case where the image processing apparatus is used as a character recognition apparatus will be described.
FIG. 13 is a block diagram illustrating a functional configuration of the character recognition device according to the fourth embodiment.

第4実施形態における文字認識装置は、入力画像に対するノイズ除去や二値化、拡大縮小、回転等の前処理により前処理済み画像を生成する前処理手段21と、処理対象の帳票の様式について定められた水平方向の分割位置の前処理済み画像上での位置として水平方向の境界候補を抽出する水平方向境界候補抽出手段22aと、処理対象の帳票の様式について定められた垂直方向の分割位置の前処理済み画像上での位置として垂直方向の境界候補を抽出する垂直方向境界候補抽出手段22bと、水平方向の境界候補の対を両端とする水平方向の領域候補の各々についての特徴量を算出する水平方向領域特徴抽出手段23aと、垂直方向の境界候補の対を両端とする垂直方向の領域候補の各々についての特徴量を算出する垂直方向領域特徴抽出手段23bと、処理対象の帳票の様式について予め定められた水平方向の参照パターンと水平方向の領域候補から抽出した特徴量のパターンの距離が小さくなるように水平方向の参照パターンと水平方向の領域候補をマッチングして水平方向の領域候補を選択する水平方向マッチング手段24aと、処理対象の帳票の様式について予め定められた垂直方向の参照パターンと垂直方向の領域候補から抽出した特徴量のパターンの距離が小さくなるように垂直方向の参照パターンと垂直方向の領域候補をマッチングして垂直方向の領域候補を選択する垂直方向マッチング手段24bと、水平方向マッチング手段24aで選択した水平方向の境界候補及び垂直方向マッチング手段24bで選択した垂直方向の境界候補の座標を用いて、様式上で定められた矩形領域の座標を求める領域抽出手段28と、領域抽出手段28で求めた矩形領域から記入枠を抽出する記入枠抽出手段26と、記入枠内に記入された文字を認識し、文字コードの列に変換する記入枠認識手段29とから構成されている。   The character recognition apparatus according to the fourth embodiment determines the preprocessing means 21 that generates a preprocessed image by preprocessing such as noise removal, binarization, enlargement / reduction, and rotation of an input image, and the form of a form to be processed. A horizontal boundary candidate extracting means 22a for extracting a horizontal boundary candidate as a position on the preprocessed image of the horizontal division position, and a vertical division position determined for the form of the form to be processed. The vertical boundary candidate extraction means 22b for extracting vertical boundary candidates as positions on the preprocessed image, and the feature amount for each of the horizontal area candidates having the horizontal boundary candidate pairs as both ends are calculated. Vertical region feature extraction means 23a for calculating the feature amount for each of the vertical region candidates having a pair of vertical boundary candidates as both ends The horizontal reference pattern and the horizontal area so that the distance between the step 23b and the predetermined horizontal reference pattern for the form of the processing target form and the feature amount pattern extracted from the horizontal area candidate is reduced. A horizontal matching means 24a for matching candidates and selecting a horizontal region candidate, and a vertical reference pattern and a feature pattern extracted from the vertical region candidate predetermined for the format of the form to be processed. A vertical direction matching unit 24b that selects a vertical region candidate by matching a vertical reference pattern and a vertical region candidate so that the distance is reduced, and a horizontal boundary candidate selected by the horizontal direction matching unit 24a, and Using the coordinates of the vertical boundary candidate selected by the vertical direction matching means 24b, it is determined on the style. Region extraction means 28 for obtaining the coordinates of the rectangular area, entry frame extraction means 26 for extracting an entry frame from the rectangular area obtained by the area extraction means 28, a character entered in the entry frame is recognized, and a character code The input frame recognition means 29 for converting into

すなわち、第4実施形態の文字認識装置は、第2実施形態における画像処理装置に記入枠認識手段29が追加された構成を有する。その他の機能については、第2実施形態と同じ処理を実行するものとして詳細な説明を省略する。   That is, the character recognition device of the fourth embodiment has a configuration in which the entry frame recognition means 29 is added to the image processing device of the second embodiment. Other functions will not be described in detail because they perform the same processing as in the second embodiment.

第4実施形態の文字認識装置は、基本的には第1実施形態(図5に示すフローチャート)と同様の流れで処理を実行するものとし、同一の処理部分(ステップA1〜A6)については説明を省略する。第4実施形態は、第3実施形態と同様に、ステップA7に相当する処理が追加されている。   The character recognition device of the fourth embodiment basically executes processing in the same flow as in the first embodiment (the flowchart shown in FIG. 5), and the same processing portions (steps A1 to A6) will be described. Is omitted. In the fourth embodiment, a process corresponding to step A7 is added as in the third embodiment.

記入枠認識手段29は、記入枠抽出手段26によって抽出された記入枠内に記入された文字を認識して文字コードの列に変換する(図5、ステップA7)。文字認識処理の方法についても、第3実施形態と同様にして実行することができる。   The entry frame recognition unit 29 recognizes the characters entered in the entry box extracted by the entry frame extraction unit 26 and converts them into a character code string (FIG. 5, step A7). The character recognition processing method can also be executed in the same manner as in the third embodiment.

このようにして、第4実施形態の文字認識装置では、図11に示すような様式の帳票の記入枠内に記入された文字についても、第3実施形態と同様の処理によって抽出された記入枠の位置をもとに、記入枠内の文字について文字認識することができるので、記入枠毎に確実に分類された認識結果を出力することができる。   In this way, in the character recognition device of the fourth embodiment, the entry frame extracted by the same processing as that of the third embodiment for characters entered in the entry frame of the form as shown in FIG. Since the characters in the entry frame can be recognized on the basis of the positions, it is possible to output a recognition result that is reliably classified for each entry frame.

なお、前述した説明では、帳票の様式において設けられる領域は、垂直及び水平方向の罫線(記入枠)によって区切られているものとしたが、その他の形態によって区分されていても良い。例えば、領域が所定の間隔をもった空白領域により区分されていたり、帳票の外周辺近傍に設けられた所定の形状を持ったマーカにより区分位置が示されていても良い。すなわち、領域の区分を表すものであれば何れの形態が用いられていても良い。   In the above description, the area provided in the form format is divided by vertical and horizontal ruled lines (entry frames), but may be divided by other forms. For example, the area may be divided by blank areas having a predetermined interval, or the division position may be indicated by a marker having a predetermined shape provided near the outer periphery of the form. That is, any form may be used as long as it represents the division of the region.

また、本発明は、前述した実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。また、前述した実施形態で実行される機能は可能な限り適宜組み合わせて実施しても良い。前述した実施形態には種々の段階の発明が含まれており、開示される複数の構成要件における適宜の組み合わせにより種々の発明が抽出され得る。例えば、実施形態に示される全構成要件から幾つかの構成要件が削除されても、効果が得られるので有れば、この構成要件が削除された構成が発明として抽出され得る。   Further, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the invention in the implementation stage. Further, the functions executed in the above-described embodiments may be combined as appropriate as possible. The above-described embodiments include various stages of the invention, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. For example, even if several constituent requirements are deleted from all the constituent requirements shown in the embodiment, an effect can be obtained, so that a configuration from which the constituent requirements are deleted can be extracted as an invention.

また、前述した各実施形態において記載した処理は、コンピュータに実行させることのできる画像処理(文字認識)プログラムとして、例えば磁気ディスク(フレキシブルディスク、ハードディスク等)、光ディスク(CD−ROM、DVD等)、半導体メモリなどの記録媒体に書き込んで各種装置に提供することができる。また、通信媒体により伝送して各種装置に提供することも可能である。画像処理装置(文字認識装置)を実現するコンピュータは、記録媒体に記録された画像処理プログラムを読み込み、または通信媒体を介して画像処理(文字認識)プログラムを受信し、このプログラムによって動作が制御されることにより、上述した処理を実行する。   The processing described in each of the above-described embodiments is, for example, a magnetic disk (flexible disk, hard disk, etc.), optical disk (CD-ROM, DVD, etc.), as an image processing (character recognition) program that can be executed by a computer. It can be written on a recording medium such as a semiconductor memory and provided to various apparatuses. It is also possible to transmit to a variety of devices by transmitting via a communication medium. A computer that realizes an image processing apparatus (character recognition apparatus) reads an image processing program recorded on a recording medium or receives an image processing (character recognition) program via a communication medium, and the operation is controlled by this program. Thus, the above-described processing is executed.

本発明の実施形態における画像処理装置を実現するシステムの構成を示すブロック図。1 is a block diagram showing the configuration of a system that implements an image processing apparatus according to an embodiment of the present invention. 図1に示すシステムによって実現される第1実施形態における画像処理装置の機能構成を示すブロック図。The block diagram which shows the function structure of the image processing apparatus in 1st Embodiment implement | achieved by the system shown in FIG. 第1実施形態において処理の対象とする帳票の様式の一例を示す図。The figure which shows an example of the format of the form made into the process target in 1st Embodiment. 第1実施形態において処理の対象とする帳票の様式の一例を示す図。The figure which shows an example of the format of the form made into the process target in 1st Embodiment. 第1実施形態における動作について説明するためのフローチャート。The flowchart for demonstrating the operation | movement in 1st Embodiment. 図3の様式と図4の帳票のマッチングにおいて動的計画法を用いた場合の様子を示した図。The figure which showed the mode at the time of using a dynamic programming in the matching of the form of FIG. 3 and the form of FIG. 動的計画法を用いた場合の他の様子を示した図。The figure which showed the other mode at the time of using a dynamic programming. 第1実施形態における記入枠抽出手段26の詳細な機能構成を示すブロック図。The block diagram which shows the detailed function structure of the entry frame extraction means 26 in 1st Embodiment. 第2実施形態における画像処理装置の機能構成を示すブロック図。The block diagram which shows the function structure of the image processing apparatus in 2nd Embodiment. 第2実施形態において本発明で処理の対象とする帳票の様式の一例を示す図。The figure which shows an example of the format of the form made into the process object by this invention in 2nd Embodiment. 図10の様式の水平罫線及び垂直罫線による領域への分解の一例を示す図。The figure which shows an example of the decomposition | disassembly to the area | region by the horizontal ruled line of the style of FIG. 10, and a vertical ruled line. 第3実施形態における文字認識装置の機能構成を表すブロック図。The block diagram showing the functional composition of the character recognition device in a 3rd embodiment. 第4実施形態における文字認識装置の機能構成を表すブロック図。The block diagram showing the functional composition of the character recognition device in a 4th embodiment.

符号の説明Explanation of symbols

10…CPU、12…メモリ、12a…画像処理プログラム、12b…入力画像データ、12c…参照パターンデータ、12d…記入枠抽出結果データ、12e…文字認識結果データ、14…ディスプレイ、15…キーボード、16…ポインティングデバイス、17…スキャナ、18…記憶装置、19…プリンタ、20…入力画像、21…前処理手段、22…境界候補抽出手段、22a…水平方向境界候補抽出手段、22b…垂直方向境界候補抽出手段、23…領域特徴抽出手段、23a…水平方向領域特徴抽出手段、23b…垂直方向領域特徴抽出手段、24…マッチング手段、24a…水平方向マッチング手段、24b…垂直方向マッチング手段、25…参照パターン、25a…水平方向参照パターン、25b…垂直方向参照パターン、26…記入枠抽出手段、27…記入枠抽出結果、28…領域抽出手段、29…記入枠認識手段、30…領域情報、31…領域内境界候補抽出手段、32…部分領域特徴抽出手段、33…領域内マッチング手段、34…領域内参照パターン、35…領域内記入枠抽出手段。   DESCRIPTION OF SYMBOLS 10 ... CPU, 12 ... Memory, 12a ... Image processing program, 12b ... Input image data, 12c ... Reference pattern data, 12d ... Entry frame extraction result data, 12e ... Character recognition result data, 14 ... Display, 15 ... Keyboard, 16 ... Pointing device, 17 ... Scanner, 18 ... Storage device, 19 ... Printer, 20 ... Input image, 21 ... Preprocessing means, 22 ... Boundary candidate extraction means, 22a ... Horizontal boundary candidate extraction means, 22b ... Vertical boundary candidate Extraction means, 23 ... area feature extraction means, 23a ... horizontal direction area feature extraction means, 23b ... vertical direction area feature extraction means, 24 ... matching means, 24a ... horizontal direction matching means, 24b ... vertical direction matching means, 25 ... see Pattern, 25a ... horizontal direction reference pattern, 25b ... vertical direction reference pattern, 6 ... entry frame extraction means, 27 ... entry frame extraction result, 28 ... area extraction means, 29 ... entry frame recognition means, 30 ... area information, 31 ... area boundary candidate extraction means, 32 ... partial area feature extraction means, 33 ... intra-area matching means, 34 ... in-area reference pattern, 35 ... in-area entry frame extraction means.

Claims (7)

処理対象とする帳票の画像中から、帳票の様式について定められた領域の境界位置の候補とする境界候補を抽出する境界候補抽出手段と、
前記境界候補抽出手段によって抽出された前記境界候補の対を両端とする領域候補の各々について、前記領域候補の境界の両端にそれぞれ接している異なる方向の境界の本数の組からなる特徴量を算出する領域特徴抽出手段と、
前記領域特徴抽出手段によって算出された前記特徴量のパターンと、帳票の様式上の特徴量の参照パターンとの距離が小さくなるように、前記境界候補と様式上での境界とのマッチングをとることにより領域候補を選択するマッチング手段と、
前記マッチング手段により選択された領域候補から領域を区分する位置を抽出する領域区分位置抽出手段と
を具備したことを特徴とする画像処理装置。
Boundary candidate extraction means for extracting boundary candidates as candidates for the boundary position of the area defined for the form of the form from the image of the form to be processed;
For each of the area candidates having both ends of the pair of boundary candidates extracted by the boundary candidate extracting means, a feature amount consisting of a set of the number of boundaries in different directions in contact with both ends of the boundary of the area candidate is calculated. Region feature extraction means to perform,
The pattern of the feature amount calculated by said region feature extracting means, so that the distance between the feature quantity of the reference pattern on the style of the form is reduced, take the matching with the boundary on the boundary candidates and style Matching means for selecting region candidates by:
An image processing apparatus comprising: an area segment position extracting unit that extracts a position for segmenting an area from the area candidate selected by the matching unit.
処理対象とする帳票の画像中から、帳票の様式について定められた水平方向の境界候補を抽出する水平方向境界候補抽出手段と、
処理対象とする帳票の画像中から、帳票の様式について定められた垂直方向の境界候補を抽出する垂直方向境界候補抽出手段と、
前記水平方向境界候補抽出手段により抽出された水平方向の境界候補の対を両端とする水平方向の第1の領域候補の各々について、前記第1の領域候補の境界の両端にそれぞれ接している異なる方向の境界の本数の組からなる第1の特徴量を算出する水平方向領域特徴抽出手段と、
前記垂直方向境界候補抽出手段により抽出された垂直方向の境界候補の対を両端とする垂直方向の第2の領域候補の各々について、前記第2の領域候補の境界の両端にそれぞれ接している異なる方向の境界の本数の組からなる第2の特徴量を算出する垂直方向領域特徴抽出手段と、
前記水平方向領域特徴抽出手段により算出された前記第1の特徴量のパターンと、帳票の様式について予め定められた水平方向の参照パターンとの距離が小さくなるように、水平方向の領域候補と水平方向の参照パターンとをマッチングして水平方向の領域候補を選択する水平方向マッチング手段と、
前記垂直方向領域特徴抽出手段により算出された前記第2の特徴量のパターンと、帳票の様式について予め定められた垂直方向の参照パターンとの距離が小さくなるように、垂直方向の領域候補と垂直方向の参照パターンとをマッチングして垂直方向の領域候補を選択する垂直方向マッチング手段と、
前記水平方向マッチング手段により選択された水平方向の領域候補に対応する境界候補、及び前記垂直方向マッチング手段により選択された垂直方向の領域候補に対応する境界候補を用いて矩形領域を求める領域抽出手段と、
前記領域抽出手段で求めた矩形領域から領域を区分する位置を抽出する領域区分位置抽出手段と
を具備したことを特徴とする画像処理装置。
A horizontal boundary candidate extraction means for extracting a horizontal boundary candidate determined for the form of the form from the image of the form to be processed;
A vertical boundary candidate extraction means for extracting a vertical boundary candidate defined for the form of the form from the image of the form to be processed;
Each of the first region candidates in the horizontal direction having both ends of the pair of horizontal boundary candidates extracted by the horizontal direction boundary candidate extracting unit is in contact with both ends of the boundary of the first region candidate . Horizontal direction area feature extraction means for calculating a first feature amount consisting of a set of the number of direction boundaries ;
Each of the second region candidates in the vertical direction having both ends of the pair of vertical direction boundary candidates extracted by the vertical direction boundary candidate extracting unit is in contact with both ends of the boundary of the second region candidate . Vertical direction area feature extraction means for calculating a second feature amount comprising a set of the number of direction boundaries ;
The horizontal region candidates and the horizontal region candidates are reduced so that the distance between the pattern of the first feature amount calculated by the horizontal region feature extraction unit and the horizontal reference pattern predetermined for the form format is small. A horizontal matching means for selecting a region candidate in the horizontal direction by matching a reference pattern in the direction;
The vertical region candidate and the vertical region candidate are perpendicular to each other so that the distance between the pattern of the second feature amount calculated by the vertical region feature extraction unit and the vertical reference pattern determined in advance for the form format is small. Vertical direction matching means for selecting a vertical region candidate by matching a direction reference pattern;
A region extraction unit that obtains a rectangular region using a boundary candidate corresponding to a horizontal region candidate selected by the horizontal direction matching unit and a boundary candidate corresponding to a vertical region candidate selected by the vertical direction matching unit. When,
An image processing apparatus comprising: an area segment position extracting unit that extracts a position for segmenting an area from the rectangular area obtained by the area extracting unit.
前記領域区分位置抽出手段は、領域を区分する位置として領域の境界を表す記入枠を抽出する記入枠抽出手段を有することを特徴とする請求項1または請求項2記載の画像処理装置。   3. The image processing apparatus according to claim 1, wherein the area segment position extraction unit includes an entry frame extraction unit that extracts an entry frame representing a boundary of the region as a position for segmenting the region. 前記記入枠抽出手段により抽出された前記記入枠内に記入された文字を認識し、文字コードの列に変換する記入枠認識手段を具備したことを特徴とする請求項3記載の画像処理装置。 4. The image processing apparatus according to claim 3 , further comprising entry frame recognition means for recognizing a character entered in the entry frame extracted by the entry frame extraction means and converting the character into a character code string. 前記領域区分位置抽出手段は、
前記マッチング手段により選択された領域候補内から部分領域の境界位置の候補とする領域内境界候補を抽出する領域内境界候補抽出手段と、
前記領域内境界候補抽出手段によって抽出された前記領域内境界候補の対を両端とする領域候補の各々について特徴量を算出する部分領域特徴抽出手段と、
前記部分領域特徴抽出手段によって算出された特徴量のパターンと、帳票の様式上の部分領域の特徴量の参照パターンとの距離が小さくなるように、前記領域内境界候補と様式上での境界とのマッチングをとることにより部分領域候補を選択する領域内マッチング手段と、
前記領域内マッチング手段により選択された部分領域候補から部分領域を区分する位置を抽出する部分領域区分位置抽出手段とを具備したことを特徴とする請求項1記載の画像処理装置。
The region segment position extraction means includes
An intra-region boundary candidate extraction unit that extracts an intra-region boundary candidate as a candidate for a boundary position of a partial region from within the region candidate selected by the matching unit;
A partial region feature extraction unit that calculates a feature amount for each of the region candidates having both ends of the pair of intra-region boundary candidates extracted by the intra-region boundary candidate extraction unit;
The in-region boundary candidates and the style boundaries are reduced so that the distance between the feature quantity pattern calculated by the partial area feature extracting means and the feature quantity reference pattern of the partial area on the form of the form is reduced. Intra-region matching means for selecting partial region candidates by matching
The image processing apparatus according to claim 1, further comprising: a partial region segment position extracting unit that extracts a position for segmenting the partial region from the partial region candidates selected by the intra-region matching unit.
コンピュータを、
処理対象とする帳票の画像中から、帳票の様式について定められた領域の境界位置の候補とする境界候補を抽出する境界候補抽出手段と、
前記境界候補抽出手段によって抽出された前記境界候補の対を両端とする領域候補の各々について、前記領域候補の境界の両端にそれぞれ接している異なる方向の境界の本数の組からなる特徴量を算出する領域特徴抽出手段と、
前記領域特徴抽出手段によって算出された前記特徴量のパターンと、帳票の様式上の特徴量の参照パターンとの距離が小さくなるように、前記境界候補と様式上での境界とのマッチングをとることにより領域候補を選択するマッチング手段と、
前記マッチング手段により選択された領域候補から領域を区分する位置を抽出する領域区分位置抽出手段として機能させるための画像処理プログラム。
Computer
Boundary candidate extraction means for extracting boundary candidates as candidates for the boundary position of the area defined for the form of the form from the image of the form to be processed;
For each of the area candidates having both ends of the pair of boundary candidates extracted by the boundary candidate extracting means, a feature amount consisting of a set of the number of boundaries in different directions in contact with both ends of the boundary of the area candidate is calculated. Region feature extraction means to perform,
The pattern of the feature amount calculated by said region feature extracting means, so that the distance between the feature quantity of the reference pattern on the style of the form is reduced, take the matching with the boundary on the boundary candidates and style Matching means for selecting region candidates by:
An image processing program for functioning as a region segment position extracting unit that extracts a region segmenting position from a region candidate selected by the matching unit.
コンピュータを、
処理対象とする帳票の画像中から、帳票の様式について定められた水平方向の境界候補を抽出する水平方向境界候補抽出手段と、
処理対象とする帳票の画像中から、帳票の様式について定められた垂直方向の境界候補を抽出する垂直方向境界候補抽出手段と、
前記水平方向境界候補抽出手段により抽出された水平方向の境界候補の対を両端とする水平方向の第1の領域候補の各々について、前記第1の領域候補の境界の両端にそれぞれ接している異なる方向の境界の本数の組からなる特徴量を算出する水平方向領域特徴抽出手段と、
前記垂直方向境界候補抽出手段により抽出された垂直方向の境界候補の対を両端とする垂直方向の第2の領域候補の各々について、前記第2の領域候補の境界の両端にそれぞれ接している異なる方向の境界の本数の組からなる第2の特徴量を算出する垂直方向領域特徴抽出手段と、
前記水平方向領域特徴抽出手段により算出された前記第1の特徴量のパターンと、帳票の様式について予め定められた水平方向の参照パターンとの距離が小さくなるように、水平方向の領域候補と水平方向の参照パターンとをマッチングして水平方向の領域候補を選択する水平方向マッチング手段と、
前記垂直方向領域特徴抽出手段により算出された前記第2の特徴量のパターンと、帳票の様式について予め定められた垂直方向の参照パターンとの距離が小さくなるように、垂直方向の領域候補と垂直方向の参照パターンとをマッチングして垂直方向の領域候補を選択する垂直方向マッチング手段と、
前記水平方向マッチング手段により選択された水平方向の領域候補に対応する境界候補、及び前記垂直方向マッチング手段により選択された垂直方向の領域候補に対応する境界候補を用いて矩形領域を求める領域抽出手段と、
前記領域抽出手段で求めた矩形領域から領域を区分する位置を抽出する領域区分位置抽出手段として機能させるための画像処理プログラム。
Computer
A horizontal boundary candidate extraction means for extracting a horizontal boundary candidate determined for the form of the form from the image of the form to be processed;
A vertical boundary candidate extraction means for extracting a vertical boundary candidate defined for the form of the form from the image of the form to be processed;
Each of the first region candidates in the horizontal direction having both ends of the pair of horizontal boundary candidates extracted by the horizontal direction boundary candidate extracting unit is in contact with both ends of the boundary of the first region candidate . A horizontal region feature extraction means for calculating a feature quantity consisting of a set of number of direction boundaries ;
Each of the second region candidates in the vertical direction having both ends of the pair of vertical direction boundary candidates extracted by the vertical direction boundary candidate extracting unit is in contact with both ends of the boundary of the second region candidate . Vertical direction area feature extraction means for calculating a second feature amount comprising a set of the number of direction boundaries ;
The horizontal region candidates and the horizontal region candidates are reduced so that the distance between the pattern of the first feature amount calculated by the horizontal region feature extraction unit and the horizontal reference pattern predetermined for the form format is small. A horizontal matching means for selecting a region candidate in the horizontal direction by matching a reference pattern in the direction;
The vertical region candidate and the vertical region candidate are perpendicular to each other so that the distance between the pattern of the second feature amount calculated by the vertical region feature extraction unit and the vertical reference pattern determined in advance for the form format is small. Vertical direction matching means for selecting a vertical region candidate by matching a direction reference pattern;
A region extraction unit that obtains a rectangular region using a boundary candidate corresponding to a horizontal region candidate selected by the horizontal direction matching unit and a boundary candidate corresponding to a vertical region candidate selected by the vertical direction matching unit. When,
An image processing program for functioning as an area segment position extracting unit for extracting a position for segmenting an area from a rectangular area obtained by the area extracting unit.
JP2003306990A 2003-08-29 2003-08-29 Image processing apparatus and image processing program Expired - Fee Related JP4153850B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003306990A JP4153850B2 (en) 2003-08-29 2003-08-29 Image processing apparatus and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003306990A JP4153850B2 (en) 2003-08-29 2003-08-29 Image processing apparatus and image processing program

Publications (2)

Publication Number Publication Date
JP2005078306A JP2005078306A (en) 2005-03-24
JP4153850B2 true JP4153850B2 (en) 2008-09-24

Family

ID=34409918

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003306990A Expired - Fee Related JP4153850B2 (en) 2003-08-29 2003-08-29 Image processing apparatus and image processing program

Country Status (1)

Country Link
JP (1) JP4153850B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5062884B2 (en) * 2007-08-24 2012-10-31 株式会社リコー Image search apparatus, image search method and program
JP7283756B2 (en) * 2020-05-12 2023-05-30 株式会社ミラボ Information processing device and program

Also Published As

Publication number Publication date
JP2005078306A (en) 2005-03-24

Similar Documents

Publication Publication Date Title
CN102354363B (en) Identification method of two-dimensional barcode image on high-reflect light cylindrical metal
JP5854802B2 (en) Image processing apparatus, image processing method, and computer program
JP5387193B2 (en) Image processing system, image processing apparatus, and program
KR101235226B1 (en) Image processor and image processing method and recording medium
JP5321109B2 (en) Information processing apparatus and information processing program
JP2007241356A (en) Image processor and image processing program
US20070041643A1 (en) Character recognition apparatus and character recognition method
JP2016181057A (en) Image processor, image processing method and image processing program
JP2017161969A (en) Character recognition device, method, and program
JP2009065640A (en) Image forming device, image formation method, image formation program, and computer-readable recording medium with recording image forming program stored
JP4153850B2 (en) Image processing apparatus and image processing program
JP2009031937A (en) Form image processing apparatus and form image processing program
JP5619111B2 (en) Image determination apparatus and program
JP2000353233A (en) System and method for printing map data and recording medium where processing program thereof is recorded
JP5313946B2 (en) Midpoint calculation device, method, and program for imprint image
JP2008269131A (en) Image processor and image processing program
JP7034823B2 (en) Image processing program, image processing method, and image processing device
JPH0916713A (en) Image area dividing method
JP2008135857A (en) Image processor and image processing program
JP4792117B2 (en) Document image processing apparatus, document image processing method, and document image processing program
JP6950436B2 (en) Computer program for image capture, image capture device and image capture method
JPH09288728A (en) Picture processor and method therefor
WO2023042270A1 (en) Character recognition program, character recognition system, and character recognition method
JP4356995B2 (en) Mark determination apparatus, mark determination control method, program, and storage medium
JP5062076B2 (en) Information processing apparatus and information processing program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060713

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060718

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060901

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20061212

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080609

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080704

R151 Written notification of patent or utility model registration

Ref document number: 4153850

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110711

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120711

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130711

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees