JP2005267394A - Information processing device, method for changing area, and program and recording medium thereof - Google Patents
Information processing device, method for changing area, and program and recording medium thereof Download PDFInfo
- Publication number
- JP2005267394A JP2005267394A JP2004080805A JP2004080805A JP2005267394A JP 2005267394 A JP2005267394 A JP 2005267394A JP 2004080805 A JP2004080805 A JP 2004080805A JP 2004080805 A JP2004080805 A JP 2004080805A JP 2005267394 A JP2005267394 A JP 2005267394A
- Authority
- JP
- Japan
- Prior art keywords
- area
- data
- change
- area data
- information processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Character Input (AREA)
Abstract
Description
本発明は、イメージデータ上に選択領域を作成する情報処理装置および領域変更方法およびプログラムおよび記録媒体に関する。 The present invention relates to an information processing apparatus, an area changing method, a program, and a recording medium that create a selection area on image data.
特開2000−172780(特許文献1)では、読み込まれた帳票画像から罫線を抽出し、該抽出された罫線情報から罫線枠を抽出することが記載されている。 Japanese Patent Laid-Open No. 2000-172780 (Patent Document 1) describes that a ruled line is extracted from a read form image and a ruled line frame is extracted from the extracted ruled line information.
また、特開平4−123262(特許文献2)においても、読み込まれたイメージデータから線分を判別し桁割することが記載されている。 Japanese Patent Laid-Open No. 4-123262 (Patent Document 2) also describes that a line segment is discriminated from the read image data and divided.
さらに、現在では、抽出された線分に基づいて自動的に帳票内の領域を探索し帳票の領域を抽出する技術が提案されており、記入済みの帳票をOCR(Optical Character Recognition)処理する際のテンプレートを作る際の領域作成を簡単に行うことが可能となっている。 Furthermore, currently, a technique for automatically searching for an area in a form based on the extracted line segment and extracting the form area has been proposed, and when an filled form form is subjected to OCR (Optical Character Recognition) processing. It is possible to easily create an area when creating a template.
また、特開平6−143730(特許文献3)では、2値画像データの選択した領域の画像を指定された倍率で縦横等倍比で拡大することが記載されている。
しかしながら、帳票内の領域を抽出した領域を選択させる際に、ユーザが見やすい或いは選択しやすいようにするため、抽出領域表示はそれぞれの領域が隣接するように抽出・表示されている。 However, in order to make it easy for the user to see or select when extracting the extracted area in the form, the extracted area display is extracted and displayed so that the areas are adjacent to each other.
そのため、この表示された領域を単に選択しOCR処理に必要なテンプレートを作成した場合、記入済みの帳票を読み込み、前記テンプレートを用いてOCRを行うと、読み込んだ記入済みの帳票とテンプレートとの間にズレが生じる場合が頻繁に発生し、このためテンプレート作成時に選択した範囲のOCR処理を正確に行うことができない場合が多い。 Therefore, when the displayed area is simply selected and a template necessary for OCR processing is created, when the completed form is read and OCR is performed using the template, the interval between the read completed form and the template is determined. In many cases, the OCR processing of the range selected at the time of creating the template cannot be accurately performed.
また、この問題を解決するために、従来では、ユーザが選択した領域に対し抽出された矩形領域の頂点にポインタを合わせ、領域を拡大することをそれぞれ行っている。なお、この矩形領域をOCR処理する際には、読み込んだ記入済みの帳票が上下左右どの方向のずれが生じるか分からないため、上下左右の全ての方向に矩形枠を拡大する必要があった。 In order to solve this problem, conventionally, a pointer is placed on the vertex of the rectangular area extracted for the area selected by the user, and the area is enlarged. When OCR processing is performed on this rectangular area, it is not known in which direction the read / finished form slips up / down / left / right, so it is necessary to enlarge the rectangular frame in all directions.
しかしながら、このようにポインタを矩形領域の頂点に合わせて行う拡大方法では、1回の操作で矩形領域を最大2方向(例えば、左上方向又は右下方向)にしか拡大することができない。そのため、矩形領域を上下左右4方向に拡大するためには、上記操作を最低2回行わなければならなかった。なお、領域を縮小する場合も同様な方法で縮小することしかできなかった。 However, in the enlargement method in which the pointer is set to the vertex of the rectangular area in this way, the rectangular area can be enlarged only in a maximum of two directions (for example, upper left direction or lower right direction) by one operation. Therefore, in order to expand the rectangular area in four directions, up, down, left, and right, the above operation has to be performed at least twice. In the case of reducing the area, it was only possible to reduce the area by the same method.
また、上述したように、ポインタを矩形領域の頂点に合わせて領域毎に手作業で行う拡大方法では、各操作者が各自の経験から矩形領域毎に枠線の考慮等を行ってOCR処理に適した大きさに直感的に矩形領域を拡大していたため、経験の少ない操作者では適切なサイズに矩形領域を拡大することは困難であった。よって、上記操作により拡大された矩形領域を用いてOCR処理を行った場合、作成者によりOCR認識率が大きく異なるものとなってしまっていた。 In addition, as described above, in the enlargement method in which the pointer is manually set for each area by aligning the pointer with the vertex of the rectangular area, each operator considers a frame line for each rectangular area based on his / her experience and performs OCR processing. Since the rectangular area has been intuitively enlarged to a suitable size, it is difficult for an operator with little experience to enlarge the rectangular area to an appropriate size. Therefore, when the OCR process is performed using the rectangular area enlarged by the above operation, the OCR recognition rate differs greatly depending on the creator.
なお、上記特許文献3では、単に、画像データの選択された領域の画像を縦横等倍に拡大することは可能であるが、この方法では、領域毎にその拡大倍率を操作者が指定する必要があり、結局、経験の少ない操作者では矩形領域毎に枠線を判定してOCR処理に適した拡大率を指定することは困難であるという問題点があった。 In the above-mentioned Patent Document 3, it is possible to simply enlarge an image of a selected area of image data in the horizontal and vertical magnifications. However, in this method, the operator needs to specify the enlargement magnification for each area. As a result, there is a problem that it is difficult for an operator with little experience to determine a frame line for each rectangular area and specify an enlargement rate suitable for OCR processing.
本発明は、上記の問題点を解決するためになされたもので、本発明の目的は、表示手段に表示されるイメージデータ上に作成された1つ又は複数の領域データからいずれかの領域データを選択し、該選択された領域データに対して変更を指示し、前記イメージデータの解像度に基づいて前記選択された領域データの変更量を算出し、該算出された変更量に基づいて前記選択された領域データに対して上下左右方向に領域変更処理を行うことにより、従来に比べて少ない作業工数により、イメージデータ上に領域データを容易に設定できるようにし、OCR用のテンプレートの作成の手間を省き(作業効率を向上し)、作業ミスも防止するとともに、作業者の作業経験等に影響されることなく一定の精度のOCRテンプレート用の領域データを作成することができる情報処理装置および領域変更方法およびプログラムおよび記録媒体を提供することである。 The present invention has been made to solve the above problems, and an object of the present invention is to provide any region data from one or a plurality of region data created on image data displayed on the display means. And instructing the selected area data to be changed, calculating a change amount of the selected area data based on the resolution of the image data, and selecting the selection based on the calculated change amount By performing the area change process for the area data in the vertical and horizontal directions, it is possible to easily set the area data on the image data with fewer man-hours than before, and to create the OCR template. (Improving work efficiency), preventing work mistakes, and obtaining area data for OCR templates with a certain degree of accuracy without being affected by the work experience of the operator. It is to provide an information processing apparatus and a region changing method, and program and recording medium that can be formed.
本発明は、イメージデータ上に作成される1つ又は複数の領域データを変更する情報処理装置において、前記いずれかの領域データを選択し該選択された領域データに対して変更を指示する変更指示手段と、前記イメージデータの解像度に基づいて前記選択された領域データの変更量を算出する算出手段と、前記算出手段により算出された変更量に基づいて前記選択された領域データに対して上下左右方向に領域変更処理を行う領域変更手段とを有することを特徴とする。 The present invention provides an information processing apparatus that changes one or a plurality of area data created on image data, and that selects any one of the area data and changes the selected area data. Means for calculating a change amount of the selected region data based on the resolution of the image data, and up / down / left / right with respect to the selected region data based on the change amount calculated by the calculation unit. And a region changing means for performing a region changing process in the direction.
本発明によれば、イメージデータ上に作成された1つ又は複数の領域データからいずれかの領域データを選択し、該選択された領域データに対して変更を指示し、前記イメージデータの解像度に基づいて前記選択された領域データの変更量を算出し、該算出された変更量に基づいて前記選択された領域データに対して上下左右方向に領域変更処理を行うので、従来に比べて少ない作業工数により、イメージデータ上に領域データを容易に設定することができ、OCR用のテンプレートの作成の手間を省くことができ(作業効率を向上することができ)、作業ミスの防止効果も奏する。 According to the present invention, any region data is selected from one or a plurality of region data created on the image data, the change is instructed to the selected region data, and the resolution of the image data is set. Since the change amount of the selected area data is calculated based on the area, and the area change process is performed in the vertical and horizontal directions on the selected area data based on the calculated change amount, less work is required than in the past. Depending on the man-hours, it is possible to easily set the area data on the image data, to save the trouble of creating an OCR template (work efficiency can be improved), and to prevent work mistakes.
また、OCR処理用に予め決定された解像度に応じた算出方法(ドット数)により変更幅を算出するので、作業者の作業経験等に影響されることなく、一定の精度のOCRテンプレート用の領域データを作成することができる。 In addition, since the change width is calculated by a calculation method (number of dots) corresponding to a resolution determined in advance for the OCR processing, an area for an OCR template having a certain accuracy without being affected by the work experience of the operator. Data can be created.
従って、必要な箇所の領域データのみを拡大して枠線を正確にOCR認識することができ、また必要な箇所の領域データのみを縮小して領域データを確実に枠線の内部領域に変更して、OCR認識処理を正確に行うことができるテンプレートを容易に作成することができる等の効果を奏する。 Therefore, it is possible to recognize the OCR accurately by enlarging only the area data at the necessary location, and to reduce the area data only at the necessary location and reliably change the area data to the inner area of the frame. As a result, it is possible to easily create a template capable of accurately performing the OCR recognition processing.
〔第1実施形態〕
図1は、本発明の第1実施形態を示す情報処理装置を適用可能なシステムの全体構成図である。
[First Embodiment]
FIG. 1 is an overall configuration diagram of a system to which an information processing apparatus according to the first embodiment of the present invention can be applied.
図1に示すように、利用者端末101、サーバ102、複合機103が、LAN(Local Area Network)104を介して相互に通信可能に接続されている。この利用者端末101は、パーソナルコンピュータ,ワークステーション等の情報処理装置であり、本発明の実施形態に係る処理を実現する。
As shown in FIG. 1, a
なお、本発明の実施形態に係る処理は、利用者端末101で実行され、BMP,TIFF,JPEG,PDF等のイメージデータを利用するが、利用者端末101内に記憶されているイメージデータを利用しても良いし、利用者端末101に接続されるスキャナ105等の画像読取装置で読み取られたイメージデータを取得して利用しても良いし、LAN104を介して、サーバ102に記憶されているイメージデータを取得して利用しても良く、さらには画像読取機能を有する複合機103で読み取られたイメージデータを取得して利用しても良い。
The processing according to the embodiment of the present invention is executed by the
図2は、図1に示した利用者端末101の内部構成を概略的に示すブロック図である。
FIG. 2 is a block diagram schematically showing the internal configuration of the
図2に示すように、利用者端末101は、利用者端末全体の制御を行うCPU201と、CPU201が実行するプログラムを格納するROM203と、プログラム実行時の作業用記憶領域等として利用するRAM202と、帳票等の原稿からイメージを読み取るスキャナ等の画像読取装置と接続するためのI/F209と、読み取られた画像等を記憶する磁気ディスク等の外部記憶装置204と、画像表示機能を有するビデオアダプタ205と、入力機能を有するキーボード(K/B)206及びマウス等のポインティングデバイス207と、LAN104等のネットワークと接続するためのネットワークインターフェース(NIC)208を備え、これらはシステムバス210を介して互いに接続されている。
As shown in FIG. 2, a
また、利用者端末101のビデオアダプタ205には、LCT,CRT等のディスプレイ211が接続されている。
In addition, a
本発明の実施形態に係るプログラムは、ROM203又は外部記憶装置204に記憶され、CPU201によってRAM202にロードされて実行される。
The program according to the embodiment of the present invention is stored in the
なお、図1に示したサーバ102の内部構成は、利用者端末101と同様なので省略する。
It should be noted that the internal configuration of the
ここで、本発明の実施形態に係るプログラムが、サーバ102内におけるROM又は外部記憶装置に記憶され、サーバ102内のCPUによって実行されてもよい。この場合、利用者は、クライアントとして利用者端末101を操作して、LAN104を介してサーバ102内に記憶されるプログラムを実行することになる。なお、この場合、サーバ102での実行結果は、クライアントとしての利用者端末101に送信されてディスプレイ211上に表示される。
Here, the program according to the embodiment of the present invention may be stored in a ROM or an external storage device in the
以下、図3〜図10を参照して、本発明の情報処理装置における領域変更処理の一例について説明する。 Hereinafter, an example of the area changing process in the information processing apparatus of the present invention will be described with reference to FIGS.
図3は、本発明の情報処理装置における第1の制御処理手順の一例を示すフローチャートであり、図2に示した利用者端末101のCPU201が外部記憶装置204に格納されるプログラムをRAM202にロードして実行することによって実行される第1実施形態の領域変更処理に対応する。なお、S101〜S111は各ステップを示す。
FIG. 3 is a flowchart showing an example of a first control processing procedure in the information processing apparatus of the present invention. The
図3に示すように、ステップS101において、利用者端末101のCPU201は、スキャナ105等によって読み取られたBMP,TIFF,JPEG,PDF等の画像データ(イメージデータ)、又は、既に読み取られて外部記憶装置104又はサーバ102の記憶装置等に記憶されている画像データ(イメージデータ)をRAM202に読込む。本実施形態では、図4に示すような枠を有する画像データ(例えば帳票等の画像データ)を読み込むものとする。
As shown in FIG. 3, in step S101, the
図4は、本発明の情報処理装置において読み込まれる画像データの一例を示す模式図である。 FIG. 4 is a schematic diagram showing an example of image data read by the information processing apparatus of the present invention.
図4に示すように、本実施形態では、読み込まれる画像データの一例として、複数の枠が存在し、各枠内に文字等を記入可能となっている帳票の画像データを用いている。 As shown in FIG. 4, in the present embodiment, as an example of image data to be read, there are a plurality of frames, and image data of a form in which characters or the like can be entered in each frame is used.
以下、図3のフローチャートの説明に戻る。 The description returns to the flowchart of FIG.
そして、ステップS102おいて、CPU201は、読込んだ画像データ内の枠線画像に対応するデータ(枠線データ(直線のみでなく曲線の画像も含んでもよく、また完全に閉じていなくてもよい。以下、単に枠線と称する))を判別し領域データを抽出し、該抽出した領域データ(以下、単に領域と称する)を後述する図10に示すデータ構造でRAM202に格納する。なお、この枠線の抽出方法は、例えば、特開2000−172780号公報に記載されているように、まず画像データ内の線分を抽出するには、例えば画像の連結成分の輪郭線や中心線を線分近似することにより行う。次いで、抽出された線分の情報を使って枠線を抽出する。ここで、線分から枠線を抽出するには、その一手法として特開平08−221506号公報で示されるように、長方形を形成するような線分同士の交差点を4つずつ拾い出し、この4点を頂点とするような枠が存在するかを検査することにより行う方法がある。次いで、抽出された枠線から領域を抽出する。
In step S102, the
次に、ステップS103において、CPU201は、ステップS102で抽出した領域およびステップS101で読み取られたデータをディスプレイ211に表示させる。画像データ上の領域の表示例を図5に示す。
Next, in step S103, the
なお、図3のフローチャートでは、CPU201が、ステップS102で、ステップS101で読み込んだ画像データ内の枠線を判別して領域を抽出し、ステップS103で、該抽出した領域を図2のディスプレイ211に表示させる構成を記載しているが、図3のステップS102,S103の代わりに、ステップS101で読み込んだ画像データを表示し、ユーザに領域を指定させ、該ユーザに指定された領域を図5に示すようにディスプレイ211に表示させるように構成してもよい。
In the flowchart of FIG. 3, in step S102, the
図5は、本発明の情報処理装置においてCPU201の処理により抽出、又はユーザにより指定された領域の表示例を示す模式図であり、図中の網かけされている個所(複数)が抽出又はユーザ指定された領域に対応する。
FIG. 5 is a schematic diagram showing a display example of an area extracted by the processing of the
なお、この画像データ内の各領域は、それぞれ後述する図10に示すデータ構造でRAM202に格納されている。
Each area in the image data is stored in the
以下、図3のフローチャートの説明に戻る。 The description returns to the flowchart of FIG.
次に、ステップS104において、CPU201は、図2に示したキーボード206やポインティングデバイス207によって、ステップS103で表示された領域が指定(選択)されたかどうかを判断する。
Next, in step S104, the
CPU201は、ステップS104で、領域指定があると判断した場合には、ステップS105へ処理を移行し、一方、領域指定がないと判断した場合には、ステップS111へ処理を移行する。
If the
ステップS105では、CPU201は、ステップS104で指定された領域について拡大指示(又は縮小指示)があったかどうかを判断する。この拡大指示の様子を図6に示す。
In step S105, the
図6は、図4に示したディスプレイ211に表示される領域に対する拡大指示を説明する模式図である。
FIG. 6 is a schematic diagram for explaining an enlargement instruction for the area displayed on the
ステップS105において、CPU201は、ステップS104で指定された領域について拡大指示(又は縮小指示)があったと判断した場合には、ステップS106に移行し、一方、拡大指示(又は縮小指示)がなかったと判断した場合には、ステップS111へ処理を移行する。なお、図3には、説明処理を簡単にするために記載していないが、CPU201は、ステップS105で、拡大指示(又は縮小指示)がなかったと判断した場合でも、ステップS104で指定された領域に対して拡大指示(又は縮小指示)以外の指示がなされたと判断した場合には、その指示に対応する処理を行った後、ステップS111へ処理を移行する。
In step S105, when the
例えば、指示(選択)された領域に対して「領域の設定」の指示がなされた場合には、図7に示す領域設定画面800をディスプレイ211に表示させ、選択された領域に対する属性情報の設定を促した後、ステップS111へ処理を移行させるものとする。なお、図7に示す領域設定画面800で領域に対する属性情報が設定されて「OK」キー又は「適用」キーが指示された場合には、該領域設定画面800上で設定された領域の属性情報を後述する図10に示すデータ構造でRAM202に格納するものとする。
For example, when an “area setting” instruction is issued for the specified (selected) area, the
図7は、図4に示したディスプレイ211に表示される領域に対して属性情報の設定を行う領域設定画面800の一例を示す模式図である。
FIG. 7 is a schematic diagram showing an example of an
図7において、801はプレビュー画面で、指定されている領域の領域イメージを表示するためのものである。
In FIG. 7,
以下、図3のフローチャートの説明に戻る。 The description returns to the flowchart of FIG.
ステップS105で、指定領域に対して拡大指示があったと判断した場合、ステップS106において、CPU201は、拡大幅(又は縮小幅)を画像データ(イメージデータ)の解像度から計算する。例えば帳票イメージの解像度が「300dpi」の場合「30ドット=300÷10」とする。例えば、帳票イメージの解像度が「400dpi」の場合「40ドット=400÷10」,「600dpi」の場合「60ドット=600÷10」等のように、イメージデータの解像度に応じて算出するように構成してもよい。
If it is determined in step S105 that an enlargement instruction has been given to the designated area, in step S106, the
また、予め決められたポイント単位の拡大幅(又は縮小幅)を解像度に応じて計算するように構成してもよい。例えば、拡大幅(又は縮小幅)を「7ポイント」とすると、「1ポイント=1/72インチ」であるので、「7ポイント」は、例えば解像度が「300dpi」の場合「29ドット300×7÷72」、解像度が「400dpi」の場合「39ドット400×7÷72」、解像度が「600dpi」の場合「58ドット600×7÷72」で計算することで求めるようにしてもよい。これにより、解像度依存することなく見た目上同一の幅で拡大することができる。さらに、予め決められたポイント単位の拡大幅(又は縮小幅)は「7ポイント」に限られるものではなく、所定のポイント数であれば何ポイントであってもよい。例えば「3ポイント」等であってもよい。 Further, the enlargement width (or reduction width) in predetermined points may be calculated according to the resolution. For example, if the enlargement width (or reduction width) is “7 points”, “1 point = 1/72 inch”, so “7 points” is “29 dots 300 × 7” when the resolution is “300 dpi”, for example. ÷ 72 ”,“ 39 dots 400 × 7 ÷ 72 ”when the resolution is“ 400 dpi ”, and“ 58 dots 600 × 7 ÷ 72 ”when the resolution is“ 600 dpi ”. As a result, it is possible to enlarge the image with the same apparent width without depending on the resolution. Furthermore, the predetermined enlargement width (or reduction width) in point units is not limited to “7 points”, and may be any number as long as the number of points is a predetermined number. For example, “3 points” may be used.
また、この予め決められたポイント単位の拡大幅(又は縮小幅)をユーザが設定可能にし、ユーザにより設定されたポイント数を外部記憶装置204に記憶しておき、拡大(又は縮小)幅(ドット数)の算出時に読み出して上記算出処理に利用するように構成してもよい。さらに、ステップS102で用いられる領域抽出方法により領域と枠線との位置関係が異なるため、領域作成方法に応じて、このポイント数をCPU201が変更するように構成してもよい。また、使用するOCRエンジンに応じて、このポイント数をCPU201が変更制御するように構成してもよい。
Further, the user can set the predetermined enlargement width (or reduction width) in point units, the number of points set by the user is stored in the
さらに、予め解像度に応じた拡大幅(ドット数)を設定して外部記憶装置204に記憶させておき、画像データ(イメージデータ)の解像度に応じて選択して利用するように構成してもよい。例えば、帳票イメージの解像度が「300dpi」の場合「30ドット」とする。また、帳票イメージの解像度が「400dpi」の場合「40ドット」,「600dpi」の場合「60ドット」等のようにする。なお、この予め設定されるイメージデータの解像度と拡大幅の組み合わせは上記例に限られるものではない。
Furthermore, an enlarged width (number of dots) corresponding to the resolution may be set in advance and stored in the
また、上下方向と左右方向とで解像度が異なる場合には、上下方向の解像度で上下方向の変倍幅を算出し、左右方向の解像度で左右方向の変倍幅を算出するように構成してもよい。 Also, when the vertical and horizontal directions have different resolutions, the vertical scaling is calculated with the vertical resolution, and the horizontal scaling is calculated with the horizontal resolution. Also good.
次に、ステップS107において、CPU201は、ステップS106で計算したドット数をもとに拡大した領域の座標を算出する。物理的には領域を上下左右に同じドット数分広げる。例えばWindows(登録商標)では左上を座標の頂点とするため後述する図8に示すような処理を行う。
Next, in step S107, the
図8は、本発明の情報処理装置における第2の制御処理手順の一例を示すフローチャートであり、図2に示した利用者端末101のCPU201が外部記憶装置204に格納されるプログラムをRAM202にロードして実行することによって実行される図3のステップS107の処理に対応する。なお、S107−1〜S107−5は各ステップを示す。なお、本実施形態では、図2に示したディスプレイ211に表示される画面の左上を座標の頂点(0,0)とする。
FIG. 8 is a flowchart showing an example of a second control processing procedure in the information processing apparatus of the present invention. The
図8に示すように、ステップS107−1において、CPU201は、後述する図10に示す領域座標1303の左座標(例えば左上点のX座標)からステップS106で算出した拡大幅をマイナスする(縮小の場合は縮小幅をプラスする)。
As shown in FIG. 8, in step S107-1, the
次に、ステップS107−2において、CPU201は、後述する図10に示す領域座標1303の上座標(例えば左上点のY座標)からステップS106で算出した拡大幅をマイナスする(縮小の場合は縮小幅をプラスする)。
Next, in step S107-2, the
次に、ステップS107−3において、CPU201は、後述する図10に示す領域座標1303の右座標(例えば右下点のX座標)にステップS106で算出した拡大幅をプラスする(縮小の場合は縮小幅をマイナスする)。
Next, in step S107-3, the
次に、ステップS107−4において、CPU201は、後述する図10に示す領域座標1303の下座標(例えば右下点のX座標)にステップS106で算出した拡大幅をプラスする(縮小の場合は縮小幅をマイナスする)。
Next, in step S107-4, the
最後に、ステップS107−5において、CPU201は、求めた座標値で領域を作成する(即ち、求めた座標値でRAM202に格納される図10に示す領域座標1303を更新する)。
Finally, in step S107-5, the
そして、ステップS107−5の処理が終了すると、CPU201は、処理を図3のステップS108に戻す。
Then, when the process of step S107-5 ends, the
次に、ステップS108において、CPU201は、ステップS107−5で作成されRAM202に格納された図10に示す領域座標1303に基づいて、指定された領域をディスプレイ211に再表示させる(図5)。即ち、拡大又は縮小の指示に基づき選択領域を上下左右に所定量プラス又はマイナスすることで領域の中点を変更することなく領域を拡大または縮小するという領域変更を行うことができる。
Next, in step S108, the
そして、ステップS109では、CPU201は、ディスプレイ211にステップS104で指定した領域を表示した全ての画面(プレビュー画面、例えば図7に示したプレビュー画面801)が表示されているか否かを判断する。
In step S109, the
ステップS109で、CPU201は、ステップS104で指定した領域のプレビュー画面が表示されていると判断した場合には、ステップS110に処理を移行させ、プレビュー画面が表示されていないと判断した場合には、ステップS111に処理を移行させる。
In step S109, if the
ステップS110において、CPU201は、RAM202に格納される図10に示す領域座標1303に基づいて、指定領域のプレビュー画面を更新する。即ち、拡大した指定領域をプレビュー画面に表示(更新)する。これにより、図7のプレビュー画面801に示した領域イメージは、図9のプレビュー画面901に示した領域イメージのように拡大される。
In step S <b> 110, the
図9は、図3に示した指定領域の変更処理(拡大処理)後にディスプレイ211に表示される領域設定画面の一例を示す模式図である。
FIG. 9 is a schematic diagram illustrating an example of an area setting screen displayed on the
最後にステップS111において、CPU201は、図2に示したキーボード206やポインティングデバイス207によって、ディスプレイ211上の図示しない終了メニュー等により終了指示がなされたか否かを判断し、終了指示がなされていないと判断した場合には、ステップS104の処理に戻る。
Finally, in step S111, the
一方、ステップS111で、CPU201は、終了指示がなされたと判断した場合には、RAM202に記憶されている全領域の領域データ(図3のフローチャートにおける処理結果)を外部記憶装置204に格納して、処理を終了する。なお、図3のフローチャートにおける処理結果を外部記憶装置204に格納することなく、処理を終了することも可能である。
On the other hand, if the
なお、ステップS104で複数の領域(全ての領域であってもよい)が指定され、ステップS105で拡大(又は縮小)指示があったと判断した場合には、ステップS106〜ステップS110の処理を指定された領域全てに対して行うものとする。これにより、複数の領域の領域変更処理を一度の変更指示(拡大指示、縮小指示)により行うことができる。 If a plurality of areas (or all areas) may be specified in step S104, and if it is determined in step S105 that an enlargement (or reduction) instruction has been given, the processing in steps S106 to S110 is specified. This is done for all the areas. Thereby, the area change process of a plurality of areas can be performed by a single change instruction (enlargement instruction, reduction instruction).
以上説明したように、本実施形態の情報処理装置において、ポインティングデバイス207等により、ディスプレイ211に表示されるイメージデータ上に作成された1つ又は複数の領域データからいずれかの領域データを選択し該選択された領域データに対して変更が指示されると、CPU201は、前記イメージデータの解像度に基づいて前記選択された領域データの変更量を算出し、該算出された変更量に基づいて前記選択された領域データに対して上下左右方向に領域変更処理(拡大変更処理又は縮小変更処理)を行うので、画像データ上の枠データに対して作成された領域データを容易に変更処理(拡大処理、縮小処理等)でき、帳票等の画像データに対するOCR用のテンプレートを作成する際、従来のような枠を手作業で変更する等の煩雑な作業を行うことなく容易にOCR用のテンプレートを作成することができ、作業効率を向上することができる。
As described above, in the information processing apparatus according to the present embodiment, the region data is selected from one or a plurality of region data created on the image data displayed on the
また、上記領域の変更処理時の変更幅(拡大幅、縮小幅等)は、予めOCR認識を考慮して決定された解像度に応じた算出方法により算出されるドット数、又は予めOCR認識を考慮して決定されたポイント数に応じて算出されるドット数で行うことができるため(作業者による作業の質や、作業者の作業ミス等に影響されないため)、作業ミスを抑え、一定の品質のOCR用のテンプレートを作成することができる。 In addition, the change width (enlargement width, reduction width, etc.) at the time of the above-described area change processing is the number of dots calculated by a calculation method according to the resolution determined in consideration of OCR recognition in advance, or OCR recognition in advance. The number of dots can be calculated according to the number of points determined in this way (because it is not affected by the quality of work performed by the worker or the operator's work mistakes), so that work mistakes are suppressed and a certain level of quality is achieved. A template for OCR can be created.
また、1つ又は複数の領域を指定して領域変更を指示する構成であるので、必要な箇所のみを拡大し枠を正確に認識することができ、OCR処理を正確に行うことができるテンプレートを作成することができる。 In addition, since it is a configuration in which one or a plurality of areas are specified and an area change is instructed, a template capable of enlarging only a necessary portion and accurately recognizing a frame and accurately performing OCR processing is provided. Can be created.
さらに、枠に掛かる領域を縮小して枠を含まない領域とすることができ、OCR処理を正確に行うことができるテンプレートを作成することができる。 Furthermore, a region that covers the frame can be reduced to a region that does not include the frame, and a template that can accurately perform the OCR process can be created.
また、CPU201は、複数の領域データに対して変更が指示された場合、該選択された複数の領域データに対してそれぞれ変更処理を行うように構成してもよい。
Further, the
また、CPU201は、ステップS109,S110に示したように、領域データの変更処理後に、該変更処理された領域データのディスプレイ211における全ての表示(例えば、図7に示した領域イメージ801等のプレビュー表示)を再表示させる。
Further, as shown in steps S109 and S110, after the area data change processing, the
さらに、CPU201は、ステップS102に示したように、イメージデータから枠線データを抽出して領域データ(例えば、OCR認識処理(文字,記号の認識処理)を行うための領域データ)を作成する。
Further, as shown in step S102, the
また、CPU201は、変更された領域データをRAM202,外部記憶装置204に記憶させておき、また、外部記憶装置204に記憶される図示しないOCRプログラムをRAM202上にロードして、前記外部記憶装置204に記憶される領域データを読み出し、該読み出した領域データに基づいて、スキャナ105,複合機103でスキャンされて入力された、外部記憶装置204,サーバ102から読み出されて入力されるイメージデータ上のOCR処理(文字,記号の認識処理)を行うことが可能である。
Further, the
以下、図10を参照して、図4に示した画像データ内の各領域のデータ構造について説明する。 Hereinafter, the data structure of each region in the image data shown in FIG. 4 will be described with reference to FIG.
図10は、図4に示した画像データ内の領域のデータ構造を示す模式図であり、このデータ構造でRAM202,外部記憶装置204に格納される。
FIG. 10 is a schematic diagram showing the data structure of the area in the image data shown in FIG. 4, and this data structure is stored in the
図10において、1301には、領域名が記憶される。この領域名は、任意につけることができるが、領域名が付されていない場合には後述する1309で説明する領域ナンバが付与される。1302には、領域の種別が記憶される。例えば「OCR」「OMR」「バーコード」等の認識種別が設定される。 In FIG. 10, an area name is stored in 1301. This area name can be given arbitrarily, but if no area name is given, the area number described in 1309 described later is given. In 1302, the type of area is stored. For example, recognition types such as “OCR”, “OMR”, and “barcode” are set.
1303には、領域の座標が記憶される。例えば、領域が矩形であれば、矩形の左上点のX座標,Y座標、及び右下点のX座標,Y座標等が記憶される。なお、領域が、後述するように拡大縮小など変更されると、この1303に記憶される領域の座標も変更される。 In 1303, the coordinates of the region are stored. For example, if the region is a rectangle, the X coordinate and Y coordinate of the upper left point of the rectangle and the X coordinate and Y coordinate of the lower right point are stored. Note that when the area is changed, such as enlargement or reduction, as will be described later, the coordinates of the area stored in 1303 are also changed.
1304には、この領域にOCR処理を行う場合に、該OCRに使用される認識辞書名が記憶される。例えば、辞書名は任意にユーザが選ぶことができ、「活字」「手書き」「チェックライタフォント」「MICR」「OCR−B」「チェックマーク」など様々な辞書を選択することができる。 In 1304, when the OCR process is performed on this area, a recognition dictionary name used for the OCR is stored. For example, the dictionary name can be arbitrarily selected by the user, and various dictionaries such as “type”, “handwriting”, “check writer font”, “MICR”, “OCR-B”, and “check mark” can be selected.
1305には、辞書ごとの文字種別が記憶される。例えば、辞書で活字を選択すると文字種別として「英大」,「英小」,「数」,「かな大」,「かな小」,「カナ大」,「カナ小」,「記号」が選択でき、図示しないが文字種別も記憶されている。 In 1305, a character type for each dictionary is stored. For example, if you select a type in the dictionary, “English large”, “English small”, “Number”, “Kana large”, “Kana small”, “Kana small”, “Kana small”, “Symbol” are selected as the character type. Although not shown, the character type is also stored.
1306には、この領域の文字の方向が記憶される。例えば、文字方向として「横書き」,「縦書き」等がある。1307には、この領域における文字枠の種類が記憶される。例えば、文字枠の種類としては「枠なし」,「はしご枠系(枠が梯子のように複数の枠に区切られている枠)」,「単独枠(一文字ごとに独立した文字枠)」等がある。 In 1306, the direction of characters in this area is stored. For example, there are “horizontal writing”, “vertical writing”, and the like as character directions. In 1307, the type of character frame in this area is stored. For example, the types of character frames are “no frame”, “ladder frame system (frame divided into multiple frames like a ladder)”, “single frame (independent character frame for each character)”, etc. There is.
1308には、1306で記憶される文字枠が「はしご枠系」状の場合、文字枠の桁数及び行数が記憶される。1309には、各領域に振られる領域ナンバが記憶される。例えば、CPU201による抽出(探索)順、ユーザによる指定順等で、1から順次付される。
When the character frame stored in 1306 is “ladder frame system”, 1308 stores the number of digits and the number of lines of the character frame. In 1309, an area number assigned to each area is stored. For example, the numbers are sequentially assigned from 1 in the order of extraction (search) by the
なお、上記1301〜1308は、枠の抽出時又はユーザの指定による作成時には、予め外部記憶装置204内に格納された初期値(デフォルト)が格納されているが、図7に示した領域設定画面800等からユーザが任意の値を入力することができる。
The above 1301 to 1308 store the initial values (default) stored in advance in the
〔第2実施形態〕
上記第1実施形態では、画像データの解像度に応じて決定される変更幅に基づいて選択領域を変更処理(拡大処理,縮小処理)する構成について説明したが、選択領域に近接する枠線を抽出し、該抽出した枠線に外接する矩形を抽出して、この抽出した矩形を所定幅だけ拡大したサイズに上記選択領域を拡大処理するように構成してもよい。以下、その実施形態について図11,図12を用いて説明する。
[Second Embodiment]
In the first embodiment, the configuration in which the selection region is changed (enlargement processing, reduction processing) based on the change width determined according to the resolution of the image data has been described. However, a frame line close to the selection region is extracted. Alternatively, a rectangle circumscribing the extracted frame line may be extracted, and the selected region may be enlarged to a size obtained by enlarging the extracted rectangle by a predetermined width. The embodiment will be described below with reference to FIGS.
図11は、本発明の情報処理装置における第3の制御処理手順の一例を示すフローチャートであり、図2に示した利用者端末101のCPU201が外部記憶装置204に格納されるプログラムをRAM202にロードして実行することによって実行される第2実施形態の領域変更処理に対応する。なお、S101〜S104,S107〜S111,S201〜S204は各ステップを示し、図3と同一のステップには同一のステップ番号を付し説明は省略する。
FIG. 11 is a flowchart showing an example of a third control processing procedure in the information processing apparatus of the present invention. The
ステップS201において、CPU201は、ステップS104で指定された領域について拡大指示があったかどうかを判断し、拡大指示があったと判断した場合には、ステップS202に移行し、一方、拡大指示がなかったと判断した場合には、ステップS111へ処理を移行する。なお、図11には、説明処理を簡単にするために記載していないが、CPU201は、ステップS202で、拡大指示(又は縮小指示)がなかったと判断した場合でも、ステップS104で指定された領域に対して拡大指示(又は縮小指示)以外の指示がなされたと判断した場合には、その指示に対応する処理を行った後、ステップS111へ処理を移行する。
In step S201, the
例えば、指示(選択)された領域に対して「領域の設定」の指示がなされた場合には、図7に示した領域設定画面800をディスプレイ211に表示させ、選択された領域に対する属性情報の設定を促した後、ステップS111へ処理を移行させるものとする。なお、図7に示した領域設定画面800で領域に対する属性情報が設定されて「OK」キー又は「適用」キーが指示された場合には、該領域設定画面800上で設定された領域の属性情報を図10に示すデータ構造でRAM202に格納するものとする。
For example, when an “area setting” instruction is given to the specified (selected) area, the
ステップS201で、指定領域に対して拡大指示があったと判断した場合には、ステップS202において、CPU201は、図12の(a),(b)に示すように、指定領域1000に関してステップS102で領域を抽出する際に判別した枠線1001(図12では太線)で構成される領域に外接する矩形1002(図1では破線)の座標(矩形データ、例えば左上XY座標,右下XY座標)を取得(決定)する。
If it is determined in step S201 that there has been an enlargement instruction for the designated area, in step S202, the
図12は、指定領域と画像データ内の枠線との位置関係を示す模式図である。 FIG. 12 is a schematic diagram showing the positional relationship between the designated area and the frame line in the image data.
図12において、(a)は、指定領域1000が該指定領域1000を抽出する際に判別した画像データ内の枠線1001に内接している場合を示す。
12A shows a case in which the designated
また、(b)は、指定領域1000の周(輪郭)が該指定領域1000を抽出する際に判別した画像データ内の枠線1001と交差する場合を示す。
(B) shows a case where the circumference (contour) of the designated
このように、領域の作成方法や作成状態により、指定領域1000と指定領域1000を抽出する際に判別した枠線1001との位置関係は多種存在する。例えば、(a)に示したように指定領域1000が枠線1001に内接する場合、(b)に示したように指定領域1000の周(輪郭)が枠線1001と交差する場合(b)、さらに上記(a),(b)以外にも、指定領域1000が枠線1001で構成される領域に包含される場合、指定領域1000が枠線1001で構成される領域を包含する場合、指定領域1000の周(輪郭)が枠線1001上に丁度重なる場合等を含む種々の場合が考えられるが、本実施形態では、これらのいずれの位置関係においても、枠線1001を指定領域1000に近接する枠線と称するものとする。
As described above, there are various positional relationships between the designated
即ち、図11のステップS202では、CPU201は、指定領域1000に関して該指定領域に近接する枠線1001を検出し、該検出した近接する枠線1001に外接する矩形1002(図12では破線)の座標を取得する。なお、指定領域1000がユーザの指定操作により作成された場合も同様に、CPU201は、指定領域1000に関して該指定領域に近接する枠線1001を検出(抽出)し、該検出した近接する枠線1001に外接する矩形1002(破線)の座標を取得する。
That is, in step S202 of FIG. 11, the
なお、上記指定領域に近接する枠線の検出(抽出)方法としては、指定領域と枠線で構成される領域とが重なる部分の面積が最も多く、指定領域の面積と枠線で構成される領域の面積との差分が最も小さく、指定領域と枠線で構成される領域の形状の一致度が最も高くなるような枠線を検出(抽出)する等の方法を用いるものとする。 As a method for detecting (extracting) a frame line adjacent to the specified area, the area where the specified area and the area formed by the frame line overlap is the largest, and the area of the specified area and the frame line are used. A method of detecting (extracting) a frame line that has the smallest difference from the area of the region and has the highest degree of matching between the shape of the designated region and the region formed by the frame line is used.
なお、ステップS102で示したようにCPU201により画像データ内の枠線を判別して領域を抽出することにより作成された領域の場合には、上記判別された枠線を上記領域に対応付けてRAM202又は外部記憶装置204に記憶しておくようにし、該記憶された対応情報に基づいて該対応付けられた枠線を検出(抽出)するように構成してもよい。
As shown in step S102, in the case of an area created by the
次に、ステップS203において、CPU201は、指定領域1000の矩形座標とステップS202で取得した外接する矩形1002の矩形座標との差を算出する。この指定領域の矩形座標と外接する矩形の矩形座標との差の算出方法としては、指定領域1000の座標と外接する矩形1002の座標とのX座標の差,Y座標の差でそれぞれ算出し、該X座標の差の最大値、Y座標の差の最大値をそれぞれ算出するものとする。
Next, in step S203, the
そして、ステップS204において、CPU201は、ステップS203で算出した値に基づいて拡大幅を決定する。この拡大幅を算出する方法としては、ステップS203で算出された指定領域の矩形座標と外接する矩形の矩形座標との差のX座標の最大値,Y座標の最大値に所定の値をそれぞれプラスして、X方向の拡大幅,Y方向の拡大幅をそれぞれ算出(決定)するものとする。このように、計算され指定領域の矩形座標と外接する矩形の矩形座標との差の最大値に一定の値をプラスすることで拡大したときに確実に線分を含むことができるため、この領域を、枠線を含むものとしてOCR認識させる場合の領域内のOCR認識率を向上させることができる。
In step S204, the
尚、外接する矩形の矩形座標の全部又は一部が指定領域の矩形座標よりも小さい場合は、拡大幅がマイナスの値になることもある。 When all or part of the rectangle coordinates of the circumscribed rectangle are smaller than the rectangle coordinates of the designated area, the enlargement width may be a negative value.
なお、上記指定領域の矩形座標と外接する矩形の矩形座標との差の最大値に所定の値をプラスする際には、該所定の値を、第1実施形態のステップS106で示した処理と同様に解像度に応じて決定した値とするようにしてもよい。 When a predetermined value is added to the maximum value of the difference between the rectangular coordinates of the specified area and the rectangular coordinates of the circumscribed rectangle, the predetermined value is converted into the process shown in step S106 of the first embodiment. Similarly, a value determined according to the resolution may be used.
なお、図11,図12では、選択領域(指定領域とも称する)に近接する枠線を抽出し、該抽出した枠線に外接する矩形を抽出して、この抽出した矩形を拡大したサイズに上記選択領域を拡大する構成について説明したが、選択領域に近接する枠線を抽出し、該抽出した枠線に内接する矩形を抽出して、この抽出した矩形を縮小したサイズに上記選択領域を縮小するように構成してもよい。 11 and 12, a frame line close to the selected area (also referred to as a designated area) is extracted, a rectangle circumscribing the extracted frame line is extracted, and the extracted rectangle is enlarged to the above size. Although the configuration for enlarging the selected area has been described, a frame line close to the selected area is extracted, a rectangle inscribed in the extracted frame line is extracted, and the selected area is reduced to a size obtained by reducing the extracted rectangle. You may comprise.
これにより、領域を枠線の内側に確実に縮小することができ、この領域を、枠線がない領域としてOCR認識させる場合の領域内のOCR認識率を向上させることができる。 As a result, the area can be reliably reduced to the inside of the frame line, and the OCR recognition rate in the area when this area is OCR-recognized as an area having no frame line can be improved.
以上説明したように、本実施形態の情報処理装置は、CPU201は、枠線を含む画像のイメージデータから、選択された領域データに近接する枠線データを抽出し、該抽出した枠線データに外接する矩形データを決定し、該決定した矩形データと前記選択された領域データとの差分から変更量を算出するので、領域に近接する枠を含むように拡大幅(又は枠を含まないように縮小幅)を決定して、上記第1実施形態の効果に加えて、イメージデータ上の個々の枠線を判定して、領域データごとに領域データを領域変更処理して、精度の高いOCR認識を可能とし、ユーザの所望するOCR結果を得ることができるOCRテンプレートの領域データを作成することができる等の効果を奏する。
As described above, in the information processing apparatus according to the present embodiment, the
〔第3実施形態〕
上記第1実施形態では、選択された領域に対する拡大指示がなされると、画像データの解像度に応じて決定される変更幅に基づいて前記選択領域を変更処理(拡大処理,縮小処理)し、特に、選択された複数の領域に対する拡大指示がなされた場合には、選択された各領域をそれぞれ変更処理する構成について説明したが、選択された複数の領域に対する結合指示がなされた場合に、選択された各領域を結合した領域を作成するとともに、該結合した領域を変更処理(拡大処理,縮小処理)するように構成してもよい。以下、その実施形態について図13〜図14を用いて説明する。
[Third Embodiment]
In the first embodiment, when an enlargement instruction is given to the selected area, the selection area is changed (enlargement process, reduction process) based on the change width determined according to the resolution of the image data. In the above description, the configuration is described in which each of the selected areas is changed when an instruction for enlargement is made for the selected areas. However, the instruction is selected when an instruction for combining the selected areas is given. Alternatively, an area may be created by combining the areas, and the combined area may be changed (enlarged or reduced). Hereinafter, the embodiment will be described with reference to FIGS.
図13は、本発明の情報処理装置における第4の制御処理手順の一例を示すフローチャートであり、図2に示した利用者端末100のCPU201が外部記憶装置204に格納されるプログラムをRAM202にロードして実行することによって実行される第3実施形態の領域結合処理に対応する。なお、S101〜S103,S300〜S316は各ステップを示し、図3と同一のステップには同一のステップ番号を付し説明は省略する。
FIG. 13 is a flowchart showing an example of a fourth control processing procedure in the information processing apparatus of the present invention. The
ステップS300において、CPU201は、図2に示したキーボード206やポインティングデバイス207によって、ステップS103で表示された複数の領域が指定(選択)されたかどうかを判断する。
In step S300, the
CPU201は、ステップS300で、複数の領域指定があると判断した場合には、ステップS301へ処理を移行し、一方、複数の領域指定がないと判断した場合には、ステップS316へ処理を移行する。
If the
ステップS301では、CPU201は、ステップS300で指定された複数の領域について結合指示があったかどうかを判断する。この複数の領域に対する結合指示の様子を図14に示す。
In step S301, the
図14は、図4に示したディスプレイ211に表示される領域に対する結合指示を説明する模式図である。図14において、1101〜1104はそれぞれ指定(選択)された領域を示す。
FIG. 14 is a schematic diagram for explaining a combination instruction for an area displayed on the
ステップS301において、CPU201は、ステップS300で指定された複数の領域について結合指示があったと判断した場合には、ステップS302−1に処理を移行させ、一方、結合指示がなかったと判断した場合には、ステップS316へ処理を移行させる。なお、図13には、説明処理を簡単にするために記載していないが、CPU201は、ステップS301で、結合指示がなかったと判断した場合でも、ステップS300で指定された複数の領域に対して結合指示以外の指示がなされたと判断した場合には、その指示に対応する処理を行った後、ステップS316へ処理を移行する。
In step S301, if the
CPU201は、ステップS301で、複数の指定領域に対して結合指示があったと判断した場合、ステップS302−1〜S302−2の間の処理(S303)を、複数選択した選択領域の最初の選択領域から最後の選択領域まで繰り返し行う。
If the
ステップS303では、CPU201は、選択した各領域の座標を抽出する(例えば、領域(矩形)の左上頂点のXY座標と右下頂点のXY座標を抽出する)。そして、CPU201は、ステップS303の座標の抽出処理を、複数の選択領域の全てで終了すると、ステップS304に処理を移行させる。なお、本実施形態では、図2に示したディスプレイ211に表示される画面の左上を座標の頂点(0,0)とする。
In step S303, the
次に、ステップS304において、CPU201は、ステップS303で抽出した各領域の座標のうち左座標(例えば、左上頂点のX座標)の最小値を取得する。次に、ステップS305において、CPU201は、ステップS303で抽出した各領域の座標のうち上座標(例えば、左上頂点のY座標)の最小値を取得する。
Next, in step S304, the
次に、ステップS306において、CPU201は、ステップS303で抽出した各領域の座標のうち右座標(例えば、右下頂点のX座標)の最大値を取得する。次に、ステップS307において、CPU201は、ステップS303で抽出した各領域の座標のうち下座標(例えば、右下頂点のY座標)の最大値を取得する。
Next, in step S306, the
次に、ステップS308において、CPU201は、ステップS300で指定された複数の領域すべてを削除する(複数の領域に対応する領域データをRAM202から削除する)。
Next, in step S308, the
次に、ステップS309において、CPU201は、拡大幅を解像度から計算する。なお、この拡大幅の算出方法は、図3のステップS106で示した方法と同様の方法を用いるものとする。また、ステップS304〜S307で取得した座標で作成される領域に基づいて、図11のステップS202〜S204の処理で示した方法により拡大幅を計算して決定するように構成してもよい。
Next, in step S309, the
次に、ステップS310において、CPU201は、ステップS304で取得した左座標の最小値からステップS309で算出した拡大幅をマイナスする。次に、ステップS311において、CPU201は、ステップS305で取得した上座標の最小値からステップS309で算出した拡大幅をマイナスする。
Next, in step S310, the
次に、ステップS312において、CPU201は、ステップS306で取得した右座標の最大値にステップS309で算出した拡大幅をプラスする。次に、ステップS313において、CPU201は、ステップS307で取得した下座標の最大値にステップS309で算出した拡大幅をプラスする。
Next, in step S312, the
次に、ステップS314において、CPU201は、ステップS310〜S313で取得した座標値で領域を作成する(即ち、ステップS105で結合指定された複数の領域データを結合した領域データを、ステップS310〜S313で求めた座標値を領域座標1303(図10)とする領域データとして作成し、図10に示したデータ構造でRAM202に格納する)。
Next, in step S314, the
次に、ステップS315において、CPU201は、ステップS314で作成されRAM202に格納された図10に示す領域座標1303に基づいて、該領域をディスプレイ211に表示させる(図15)。これにより、図14に示した複数の選択領域1101〜1104は、図15の結合領域1201に示すように結合されて拡大される。即ち、複数の選択領域に対する結合指示に基づき、該複数の選択領域を結合した領域を作成するとともに、該結合された領域を上下左右に所定量プラスすることで結合領域の中点を変更することなく結合領域を拡大するという結合処理を行うことができる。
Next, in step S315, the
尚、外接する矩形の矩形座標の全部又は一部が結合された領域の矩形座標よりも小さい場合は、拡大幅がマイナスの値になることもある。 Note that the enlargement width may be a negative value when it is smaller than the rectangular coordinates of the region where all or some of the rectangular coordinates of the circumscribed rectangles are combined.
図15は、図13に示した複数の指定領域の結合処理後にディスプレイ211に表示される結合領域の一例を示す模式図である。
FIG. 15 is a schematic diagram illustrating an example of a combined area displayed on the
なお、図13には示していないが、CPU201は、ディスプレイ211にステップS314で作成された領域(選択された複数の領域の結合領域)を表示した全ての画面(プレビュー画面、例えば図7に示したプレビュー画面801等)が表示されている場合には、全てのプレビュー画面も同様に更新するものとする。
Although not shown in FIG. 13, the
最後にステップS316において、CPU201は、図2に示したキーボード206やポインティングデバイス207によって、ディスプレイ211上の図示しない終了メニュー等により終了指示がなされたか否かを判断し、終了指示がなされていないと判断した場合には、ステップS300の処理に戻す。
Finally, in step S316, the
一方、ステップS316で、CPU201は、終了指示がなされたと判断した場合には、RAM202に記憶されている全領域の領域データ(図13のフローチャートにおける処理結果)を外部記憶装置204に格納して、処理を終了する。なお、図13のフローチャートにおける処理結果を外部記憶装置204に格納することなく、処理を終了することも可能である。
On the other hand, if the
なお、ステップS308の全選択領域の削除処理は、ステップS313,S314の後に行ってもよく、削除するタイミングは何れでもよい。 It should be noted that the deletion process of all selected areas in step S308 may be performed after steps S313 and S314, and the timing of deletion may be any.
また、ステップS308で、全ての選択領域を削除する代わりに、選択領域の一つ、例えば最後に選択された領域を残し、他の領域を削除し、前記残した領域の座標をステップS310〜S313で求めた座標値の領域に変更するように構成してもよい。 In step S308, instead of deleting all selected areas, one of the selected areas, for example, the last selected area is left, the other area is deleted, and the coordinates of the remaining area are stored in steps S310 to S313. You may comprise so that it may change to the area | region of the coordinate value calculated | required by.
なお、上記図13では、選択される複数の領域の結合指示がなされた場合には、該複数の領域を結合した領域を作成し、且つ該結合された領域を解像度に応じて算出された拡大幅だけ拡大した領域を作成する構成について説明したが、前記結合された領域を解像度に応じて算出された縮小幅だけ縮小した領域を作成するように構成してもよい。 In FIG. 13, when an instruction to combine a plurality of selected areas is given, an area in which the plurality of areas are combined is created, and the combined area is enlarged according to the resolution. Although the configuration in which the region enlarged by the width is created has been described, the region may be created by reducing the combined region by the reduction width calculated according to the resolution.
以上説明したように、本実施形態の情報処理装置のCPU201は、ポインティングデバイス207等により複数の領域データに対して変更が指示された場合、前記複数の領域データを結合した領域データを作成し、該結合した領域データに対して解像度に応じて算出された変更幅(拡大幅,縮小幅)だけ変更(拡大,縮小)した領域データを作成して、上記第1実施形態の効果に加えて、複数の領域を選択して結合指示するという簡単な操作で、精度の高いOCR認識が可能になり、ユーザの所望するOCR結果を得ることができるOCRテンプレートの領域データを作成することができ、作業効率を向上することができる等の効果を奏する。
As described above, when the
なお、図8,図13のフローチャートでは、領域データを上下左右方向に領域変更する構成について示したが、領域変更方向は、上下左右方向に限られるものではなく、360度、いずれの方向に領域変更するような構成も全て本発明に含まれるものである。 8 and 13 show the configuration in which the area data is changed in the vertical and horizontal directions. However, the area change direction is not limited to the vertical and horizontal directions. All configurations that are changed are also included in the present invention.
また、図10に示した領域のデータ構造はこれに限定されるものではなく、用途や目的に応じて、様々な構成や内容で構成されることは言うまでもない。 Further, the data structure of the area shown in FIG. 10 is not limited to this, and it is needless to say that the data structure is configured in various configurations and contents depending on applications and purposes.
以上、各実施形態について示したが、本発明は、例えば、システム、装置、方法、プログラムもしくは記録媒体等としての実施態様をとることが可能であり、具体的には、複数の機器から構成されるシステムに適用しても良いし、また、一つの機器からなる装置に適用しても良い。 As described above, each embodiment has been described. However, the present invention can take an embodiment as a system, apparatus, method, program, recording medium, or the like, and specifically includes a plurality of devices. The present invention may be applied to a system including a single device.
なお、上記第1実施形態〜第3実施形態を組み合わせた構成も本発明に含まれるものである。 In addition, the present invention includes a configuration in which the first to third embodiments are combined.
以下、図16に示すメモリマップを参照して本発明に係る情報処理装置で読み取り可能なデータ処理プログラムの構成について説明する。 The configuration of a data processing program that can be read by the information processing apparatus according to the present invention will be described below with reference to the memory map shown in FIG.
図16は、本発明に係る情報処理装置で読み取り可能な各種データ処理プログラムを格納する記録媒体(記憶媒体)のメモリマップを説明する図である。 FIG. 16 is a diagram illustrating a memory map of a recording medium (storage medium) that stores various data processing programs readable by the information processing apparatus according to the present invention.
なお、特に図示しないが、記録媒体に記憶されるプログラム群を管理する情報、例えばバージョン情報,作成者等も記憶され、かつ、プログラム読み出し側のOS等に依存する情報、例えばプログラムを識別表示するアイコン等も記憶される場合もある。 Although not specifically shown, information for managing a program group stored in the recording medium, for example, version information, creator, etc. is also stored, and information depending on the OS on the program reading side, for example, a program is identified and displayed. Icons may also be stored.
さらに、各種プログラムに従属するデータも上記ディレクトリに管理されている。また、インストールするプログラムやデータが圧縮されている場合に、解凍するプログラム等も記憶される場合もある。 Further, data depending on various programs is also managed in the directory. In addition, when a program or data to be installed is compressed, a program to be decompressed may be stored.
本実施形態における図3,図8,図11,図13に示す機能が外部からインストールされるプログラムによって、ホストコンピュータにより遂行されていてもよい。そして、その場合、CD−ROMやフラッシュメモリやFD等の記録媒体により、あるいはネットワークを介して外部の記録媒体から、プログラムを含む情報群を出力装置に供給される場合でも本発明は適用されるものである。 The functions shown in FIG. 3, FIG. 8, FIG. 11, and FIG. 13 in this embodiment may be performed by a host computer by a program installed from the outside. In this case, the present invention is applied even when an information group including a program is supplied to the output device from a recording medium such as a CD-ROM, a flash memory, or an FD, or from an external recording medium via a network. Is.
以上のように、前述した実施形態の機能を実現するソフトウエアのプログラムコードを記録した記録媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記録媒体に格納されたプログラムコードを読出し実行することによっても、本発明の目的が達成されることは言うまでもない。 As described above, a recording medium recording software program codes for realizing the functions of the above-described embodiments is supplied to a system or apparatus, and a computer (or CPU or MPU) of the system or apparatus stores the recording medium in the recording medium. It goes without saying that the object of the present invention can also be achieved by reading and executing the programmed program code.
この場合、記録媒体から読み出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記録媒体は本発明を構成することになる。 In this case, the program code itself read from the recording medium realizes the novel function of the present invention, and the recording medium storing the program code constitutes the present invention.
また、上記プログラムは、上述した実施の形態の機能をコンピュータで実現することができればよく、その形態は、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給されるスクリプトデータ等の形態を有するものでもよい。 The above-described program only needs to be able to realize the functions of the above-described embodiments by a computer, and the form includes forms such as object code, a program executed by an interpreter, and script data supplied to the OS. But you can.
プログラムコードを供給するための記録媒体としては、例えば、RAM,NV−RAM,フレキシブルディスク,磁気ディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,CD−RW,DVD(DVD−ROM、DVD−RAM、DVD−RW、DVD+RW),磁気テープ,不揮発性のメモリカード,ROM,EEPROM,シリコンディスク等の上記プログラムを記憶できるものであればよい。 As a recording medium for supplying the program code, for example, RAM, NV-RAM, flexible disk, magnetic disk, optical disk, magneto-optical disk, CD-ROM, CD-R, CD-RW, DVD (DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), magnetic tape, nonvolatile memory card, ROM, EEPROM, silicon disk, or the like may be used as long as the program can be stored.
さらに、上記プログラムは、インターネット、商用ネットワーク、若しくはローカルエリアネットワーク等に接続される不図示の他のコンピュータやデータベース等からダウンロードすることにより供給されるものであってもよい。 Furthermore, the program may be supplied by downloading from another computer or database (not shown) connected to the Internet, a commercial network, a local area network, or the like.
また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) or the like running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
さらに、記録媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Furthermore, after the program code read from the recording medium is written in a memory provided in a function expansion board inserted in the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that the case where the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
また、本発明は、複数の機器から構成されるシステムに適用しても、1つの機器からなる装置に適用してもよい。また、本発明は、システムあるいは装置にプログラムを供給することによって達成される場合にも適応できることは言うまでもない。この場合、本発明を達成するためのソフトウエアによって表されるプログラムを格納した記録媒体を該システムあるいは装置に読み出すことによって、そのシステムあるいは装置が、本発明の効果を享受することが可能となる。 Further, the present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device. Needless to say, the present invention can be applied to a case where the present invention is achieved by supplying a program to a system or apparatus. In this case, by reading the recording medium storing the program represented by the software for achieving the present invention into the system or apparatus, the system or apparatus can enjoy the effects of the present invention. .
さらに、本発明を達成するためのソフトウェアによって表されるプログラムをネットワーク上のサーバ,データベース等から通信プログラムによりダウンロードして読み出すことによって、そのシステムあるいは装置が、本発明の効果を享受することが可能となる。 Furthermore, by downloading and reading out a program represented by software for achieving the present invention from a server, database, etc. on a network using a communication program, the system or apparatus can enjoy the effects of the present invention. It becomes.
イメージデータ上に作成されたOCR処理に用いられる領域データを、通常の画像データとすることにより、画像データの重心を変更しない拡大または縮小処理にも本発明は適用可能である。 The present invention is also applicable to enlargement or reduction processing that does not change the center of gravity of image data by using region data used for OCR processing created on the image data as normal image data.
101 利用者端末
102 サーバ
103 複合機
104 LAN
105 スキャナ
201 CPU
202 RAM
203 ROM
204 外部記憶装置
206 キーボード
207 ポインティングデバイス
211 ディスプレイ
101
105
202 RAM
203 ROM
204
Claims (13)
前記いずれかの領域データを選択し該選択された領域データに対して変更を指示する変更指示手段と、
前記イメージデータの解像度に基づいて前記選択された領域データの変更量を算出する算出手段と、
前記算出手段により算出された変更量に基づいて前記選択された領域データに対して上下左右方向に領域変更処理を行う領域変更手段と、
を有することを特徴とする情報処理装置。 In an information processing apparatus that changes one or a plurality of area data created on image data,
Change instruction means for selecting any of the area data and instructing the change to the selected area data;
Calculating means for calculating a change amount of the selected area data based on the resolution of the image data;
Area change means for performing area change processing in the vertical and horizontal directions on the selected area data based on the change amount calculated by the calculation means;
An information processing apparatus comprising:
前記算出手段は、前記イメージデータから前記選択された領域データに近接する枠線データを抽出し、該抽出した枠線データに外接する矩形データを決定し、該決定した矩形データと前記選択された領域データとの差分から前記変更量を算出することを特徴とする請求項1記載の情報処理装置。 The image data is image data of an image including a frame line,
The calculation means extracts frame line data close to the selected area data from the image data, determines rectangular data circumscribing the extracted frame line data, and determines the determined rectangular data and the selected rectangular data The information processing apparatus according to claim 1, wherein the change amount is calculated from a difference from the area data.
前記記憶手段により記憶される領域データに基づいて、入力されるイメージデータ上の文字,記号の認識処理を行う認識処理手段と、
を備えることを特徴とする請求項1〜9のいずれかに記載の情報処理装置。 Storage means for storing area data changed by the area changing means;
Recognition processing means for performing recognition processing of characters and symbols on the input image data based on the area data stored by the storage means;
The information processing apparatus according to claim 1, further comprising:
前記いずれかの領域データを選択し該選択された領域データに対して変更を指示する変更指示ステップと、
前記イメージデータの解像度に基づいて前記選択された領域データの変更量を算出する算出ステップと、
該算出された変更量に基づいて前記選択された領域データに対して上下左右方向に領域変更処理を行う領域変更ステップと、
を有することを特徴とする領域変更方法。 In an area changing method in an information processing apparatus for changing one or more area data created on image data,
A change instruction step for selecting any one of the area data and instructing the change to the selected area data;
A calculation step of calculating a change amount of the selected area data based on the resolution of the image data;
An area change step for performing an area change process in the vertical and horizontal directions on the selected area data based on the calculated change amount;
A region changing method characterized by comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004080805A JP4297815B2 (en) | 2004-03-19 | 2004-03-19 | Information processing apparatus, processing method, program, and recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004080805A JP4297815B2 (en) | 2004-03-19 | 2004-03-19 | Information processing apparatus, processing method, program, and recording medium |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2005267394A true JP2005267394A (en) | 2005-09-29 |
JP2005267394A5 JP2005267394A5 (en) | 2007-04-05 |
JP4297815B2 JP4297815B2 (en) | 2009-07-15 |
Family
ID=35091863
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004080805A Expired - Fee Related JP4297815B2 (en) | 2004-03-19 | 2004-03-19 | Information processing apparatus, processing method, program, and recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4297815B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013052025A1 (en) * | 2011-10-03 | 2013-04-11 | Hewlett-Packard Development Company, L.P. | Region selection for counterfeit determinations |
JP2015210543A (en) * | 2014-04-23 | 2015-11-24 | 株式会社キーエンス | Portable optical reader, optical reading method using portable optical reader, and computer program |
-
2004
- 2004-03-19 JP JP2004080805A patent/JP4297815B2/en not_active Expired - Fee Related
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013052025A1 (en) * | 2011-10-03 | 2013-04-11 | Hewlett-Packard Development Company, L.P. | Region selection for counterfeit determinations |
US9977987B2 (en) | 2011-10-03 | 2018-05-22 | Hewlett-Packard Development Company, L.P. | Region selection for counterfeit determinations |
JP2015210543A (en) * | 2014-04-23 | 2015-11-24 | 株式会社キーエンス | Portable optical reader, optical reading method using portable optical reader, and computer program |
Also Published As
Publication number | Publication date |
---|---|
JP4297815B2 (en) | 2009-07-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6466694B2 (en) | Document image processing device and method thereof | |
US8780117B2 (en) | Display control apparatus and display control method capable of rearranging changed objects | |
CN102117269B (en) | Apparatus and method for digitizing documents | |
EP0444922B1 (en) | Modifying a graphics display image | |
JP5121599B2 (en) | Image processing apparatus, image processing method, program thereof, and storage medium | |
CN107133615B (en) | Information processing apparatus, information processing method, and computer program | |
US8269791B2 (en) | Information processing apparatus and method for processing a vector image composed of a plurality of objects described by structured document data | |
US5703962A (en) | Image processing method and apparatus | |
JP3396404B2 (en) | Automatic string editing system | |
US6504540B1 (en) | Method and apparatus for altering one or more attributes of one or more blocks of image data in a document | |
JPH032979A (en) | Method and device for correction of image | |
JP2006277001A (en) | Input image displaying method, and input image displaying program | |
JP4297815B2 (en) | Information processing apparatus, processing method, program, and recording medium | |
JP2006184415A (en) | Image processor, image processing program, and image processing method | |
JPH10312407A (en) | Drawing display device | |
JP2003046746A (en) | Method and apparatus for processing image | |
JP4218517B2 (en) | Color correction device | |
JPH1186017A (en) | Apparatus and method for information processing | |
JP2006072877A (en) | Document editing apparatus, document editing method, document editing program, and its recording medium | |
JP4633773B2 (en) | Document image processing apparatus and method | |
JP5361315B2 (en) | Information processing apparatus and information processing method | |
JP7127365B2 (en) | Character segmentation device, character segmentation method, and program | |
JP4922151B2 (en) | Form reading system, form reading method, and program | |
JPH103516A (en) | Method and device for processing information | |
JP3761923B2 (en) | Image processing apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070216 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20070216 |
|
A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20070322 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070612 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070802 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20070828 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20070927 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071026 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20071106 |
|
A912 | Re-examination (zenchi) completed and case transferred to appeal board |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20071130 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20080403 |
|
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: 20090414 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4297815 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120424 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120424 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130424 Year of fee payment: 4 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130424 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140424 Year of fee payment: 5 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |