JP2014048851A - Layout holding device of spread sheet software - Google Patents
Layout holding device of spread sheet software Download PDFInfo
- Publication number
- JP2014048851A JP2014048851A JP2012190683A JP2012190683A JP2014048851A JP 2014048851 A JP2014048851 A JP 2014048851A JP 2012190683 A JP2012190683 A JP 2012190683A JP 2012190683 A JP2012190683 A JP 2012190683A JP 2014048851 A JP2014048851 A JP 2014048851A
- Authority
- JP
- Japan
- Prior art keywords
- character recognition
- result
- recognition result
- spreadsheet software
- ocr
- 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 Discrimination (AREA)
- Document Processing Apparatus (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
この発明は、表計算ソフトによるファイル作成機能をもったMFP(Multi Function Peripherals) 等に適用される表計算ソフトのレイアウト保持装置に関する。 The present invention relates to a layout holding device for spreadsheet software applied to an MFP (Multi Function Peripherals) having a file creation function using spreadsheet software.
従来より、MFP等には、スキャナ部で読み取った文書画像の画像データを入力画像とし、該入力画像における所望のテキスト領域内に対して光学式文字認識装置(OCRともいう)を使用して文字認識を行い、表計算ソフト、例えばマイクロソフト社が提供しているexcel(エクセルともいう)によるファイル形式を作成する機能を備えたものが存在する。 2. Description of the Related Art Conventionally, an MFP or the like uses an image data of a document image read by a scanner unit as an input image, and uses an optical character recognition device (also referred to as OCR) for a desired text area in the input image. Some of them have a function of recognizing and creating a file format using spreadsheet software such as excel provided by Microsoft.
そして、このようなエクセル等を利用して作成されたファイル形式のシートを別のシートにコピーする場合には、レイアウト等が適正に保持されることが大事である。 When a file format sheet created using such Excel is copied to another sheet, it is important that the layout is properly maintained.
また、従来、文書内のテキスト領域内に対する文字認識の変換結果(OCR結果)をそれぞれ各テキスト領域(セル領域)に流し込む場合に、文字の縮小を極力回避しつつも、それらテキスト領域同士の配置関係を崩さないようにした技術が提案されている。 Conventionally, when the conversion result (OCR result) of character recognition for a text area in a document is poured into each text area (cell area), the arrangement of the text areas is avoided while avoiding character reduction as much as possible. A technique that does not break the relationship has been proposed.
具体的には、レイアウト解析部で入力画像中の各領域を求めてOCRを行い、翻訳する場合に、配列構造解析部では、ページの外周および各領域間の余白に境界線を設定し、レイアウト処理部では、各領域に対して領域内のOCR結果と翻訳結果を記載し、配列構造調整部では、ページの外周の境界線をページ外側へ、また、空白領域に隣接する境界線を空白領域の方向へそれぞれ移動させ、その移動に応じて領域を移動または拡大し、すべての領域がページ内に収まるまで、境界線の移動と領域の移動、または拡大を行なうようにした技術である(例えば、特許文献1参照)。 Specifically, when the layout analysis unit obtains each region in the input image, performs OCR, and translates, the sequence structure analysis unit sets a boundary line on the outer periphery of the page and the margin between each region, and performs layout. In the processing unit, the OCR result and translation result in each region are described for each region, and in the arrangement structure adjusting unit, the boundary line on the outer periphery of the page is outside the page, and the boundary line adjacent to the blank region is a blank region. In this technique, the area is moved or enlarged according to the movement, and the boundary line is moved and the area is moved or enlarged until all the areas are within the page (for example, , See Patent Document 1).
しかし、一般に、エクセル等の表計算ソフトのシ−トを他のシートにコピーした際、別のシートの列幅等の違い等からレイアウトが崩れてしまうことも少なくなく、その場合、使い回しがしにくくなる。 However, in general, when a sheet of spreadsheet software such as Excel is copied to another sheet, the layout is often corrupted due to the difference in the column width of another sheet. It becomes difficult to do.
また、先行技術においては、テキスト領域同士の配置関係を崩さないようにするためにテキスト領域の高さおよび幅を可変にしており、このファイル形式では、配置関係が保たれるが、別のシートへのコピーを行なう際に、レイアウトの配置関係が崩れてしまう。これは、表計算ソフトのシートをコピーする際に、コピー先のシートでは、列幅がデフォルト値で固定されるためである。よって、先行技術では、テキスト領域の列幅が変更された場合、列方向(幅方向)に配置がずれてしまい、配置関係が維持できなくなる。 Also, in the prior art, the height and width of the text area are made variable so as not to break the arrangement relation between the text areas. In this file format, the arrangement relation is maintained, but another sheet is used. When copying to, the layout arrangement relationship is broken. This is because the column width is fixed to the default value in the copy destination sheet when copying the spreadsheet sheet. Therefore, in the prior art, when the column width of the text area is changed, the arrangement is shifted in the column direction (width direction), and the arrangement relationship cannot be maintained.
この発明は、上記実情に鑑みてなされたものであり、シートの列幅を固定した他のシートにコピーした際でも、レイアウトの配置関係を崩すことなく、良好なハンドリングが行なえる表計算ソフトのレイアウト保持装置を提供することを課題としている。 The present invention has been made in view of the above circumstances, and even when copying to another sheet with a fixed column width of the sheet, spreadsheet software that can perform good handling without destroying the layout arrangement relationship. It is an object to provide a layout holding device.
上記課題は、以下の手段によって解決される。
(1)文書画像を読み込んで画像データに変換して出力する読み取り手段と、前記読み取り手段による画像データを入力画像とし、その入力画像の文字領域に対して文字認識を行なう文字認識手段と、文字認識手段により得られた複数の文字認識結果を表計算ソフトにおける対応セルに挿入して表計算ファイルを作成するファイル作成手段と、前記文字認識結果が複数のセルに跨がっている場合、または、第1文字認識結果と第2文字認識結果が表計算ソフトの一つのセルの中に内包されている場合には、文字認識結果のテキストボックス幅と前記表計算ソフトのセル幅の関係に応じて、前記両文字認識結果を結合、または分離するように制御する制御手段と、を備えていることを特徴する表計算ソフトのレイアウト保持装置。
(2)前記制御手段は、第1文字認識結果と第2文字認識結果とで一つの単語になる場合には、第1文字認識結果と第2文字認識結果との間に空白を加入してレイアウトを保持した状態で両文字認識結果を結合する前項1に記載の表計算ソフトのレイアウト保持装置。
(3)前記制御手段は、第1文字認識結果と第2文字認識結果とで一つの単語・文節にならない場合には、第1文字認識結果と第2文字認識結果をそれぞれ前記表計算ソフトの別々のセルに挿入する前項1に記載の表計算ソフトのレイアウト保持装置。
(4)前記制御手段は、文字認識結果のテキストボックス幅が前記表計算ソフトのセル幅より大きい場合には、該文字認識結果に対して構文解析を行う機能を有しており、前記制御手段は、前記構文解析の結果、文字認識結果を単語・文節として分離できない場合には、該文字認識結果をそのまま表計算ソフトのセルに挿入する前項1に記載の表計算ソフトのレイアウト保持装置。
(5)前記制御手段は、文字認識結果のテキストボックス幅が表計算ソフトのセル幅より大きく、該文字認識結果に対して構文解析を行った結果、該表計算ソフトのセル境界線で、単語・文節として分離できる場合には、それら分離可能な複数の文字認識結果を別々のセルに挿入する前項4に記載の表計算ソフトのレイアウト保持装置。
(6)前記制御手段は、第1文字認識結果が第2文字認識結果に対して行方向で一定距離だけずれている場合には、第1文字認識結果と第2文字認識結果を表計算ソフトの同一行の別々のセルに挿入できるように、第1文字認識結果もしくは第2文字認識結果の位置を調整する前項1〜5のいずれかに記載の表計算ソフトのレイアウト保持装置。
The above problem is solved by the following means.
(1) Reading means for reading a document image, converting it into image data, and outputting it; character recognition means for using the image data from the reading means as an input image and performing character recognition on a character area of the input image; A file creation means for creating a spreadsheet file by inserting a plurality of character recognition results obtained by the recognition means into corresponding cells in the spreadsheet software, and when the character recognition results straddle a plurality of cells, or When the first character recognition result and the second character recognition result are included in one cell of the spreadsheet software, the character recognition result depends on the relationship between the text box width and the spreadsheet software cell width. And a control means for controlling to combine or separate the character recognition results.
(2) When the first character recognition result and the second character recognition result result in one word, the control means adds a space between the first character recognition result and the second character recognition result. 2. The layout holding device for spreadsheet software according to
(3) When the first character recognition result and the second character recognition result do not result in one word / phrase, the control means displays the first character recognition result and the second character recognition result respectively in the spreadsheet software. 2. The layout holding device for spreadsheet software according to
(4) The control means has a function of performing syntax analysis on the character recognition result when the text box width of the character recognition result is larger than the cell width of the spreadsheet software. 2. The layout holding device for spreadsheet software according to
(5) The control means is configured such that the text box width of the character recognition result is larger than the cell width of the spreadsheet software, and the character recognition result is subjected to syntax analysis. The layout holding device for spreadsheet software according to
(6) When the first character recognition result is deviated from the second character recognition result by a certain distance in the row direction, the control means calculates the first character recognition result and the second character recognition result using spreadsheet software. The layout holding device for spreadsheet software according to any one of the preceding
前項(1)に記載の発明によれば、読み取り手段により文書画像を読み込んで得られた入力画像に対して文字認識が行なわれ、得られた複数の文字認識結果が、ファイル作成手段により表計算ソフトにおける対応セルに挿入されて、表計算ファイルが作成される。 According to the invention described in item (1) above, character recognition is performed on the input image obtained by reading the document image by the reading means, and a plurality of obtained character recognition results are spreadsheeted by the file creating means. A spreadsheet file is created by inserting into the corresponding cell in the software.
その場合、前記文字認識結果が前記表計算ソフトの複数のセルに跨がっている場合、または、第1文字認識結果と第2文字認識結果が表計算ソフトの一つのセルの中に内包されている場合には、制御手段により、文字認識結果のテキストボックス幅と表計算ソフトのセル幅の関係に応じて、前記両文字認識結果を結合、または分離するように制御されるので、表計算ソフト内のシート列幅がデフォルトで固定されている場合であっても、他のシートにコピーした際にレイアウトを崩さずに、ハンドリングの良い表計算ソフトのシートの作成が可能となる。 In that case, when the character recognition result extends over a plurality of cells of the spreadsheet software, or the first character recognition result and the second character recognition result are included in one cell of the spreadsheet software. If so, the control means controls to combine or separate the character recognition results according to the relationship between the text recognition result text box width and the spreadsheet software cell width. Even if the sheet row width in the software is fixed by default, it is possible to create a spreadsheet of spreadsheet software with good handling without destroying the layout when copied to another sheet.
前項(2)に記載の発明によれば、第1文字認識結果と第2文字認識結果とで一つの単語になる場合には、第1文字認識結果と第2文字認識結果との間に空白を加入してレイアウトを保持した状態で両文字認識結果が結合されるので、テキストファイルにコピーした際のハンドリングが容易となる。 According to the invention described in the preceding item (2), when the first character recognition result and the second character recognition result become one word, a space is provided between the first character recognition result and the second character recognition result. Since both character recognition results are combined in a state in which the layout is maintained by joining, the handling when copying to a text file becomes easy.
前項(3)に記載の発明によれば、第1文字認識結果と第2文字認識結果とで一つの単語・文節にならない場合には、第1文字認識結果と第2文字認識結果が表計算ソフトの別々のセルに挿入されるので、表計算ソフトの他のシートにコピーした際、ハンドリングやすく、検索が行ないやすいファイルの作成が可能となる。 According to the invention described in the preceding item (3), when the first character recognition result and the second character recognition result do not become one word / phrase, the first character recognition result and the second character recognition result are spreadsheeted. Since it is inserted into a separate cell of the software, it is possible to create a file that is easy to handle and search when copied to another sheet of spreadsheet software.
前項(4)に記載の発明によれば、文字認識結果のテキストボックス幅が前記表計算ソフトのセル幅より大きい場合には、該第文字認識結果に対して構文解析が行なわれ、第3文字認識結果を単語・文節として分離できない場合には、文字認識結果が表計算ソフトのセルにそのまま挿入されるので、表計算ソフトの他のシートにファイルをコピーした際のハンドリングがしやすく、検索が行ないやすいファイルの作成が可能となる。 According to the invention described in item (4) above, when the text box width of the character recognition result is larger than the cell width of the spreadsheet software, the third character recognition result is parsed. If the recognition result cannot be separated into words / phrases, the character recognition result is inserted into the spreadsheet software cell as it is, making it easier to handle when copying files to other spreadsheet software sheets. It is possible to create a file that is easy to perform.
前項(5)に記載の発明によれば、文字認識結果のテキストボックス幅が表計算ソフトのセル幅より大き、該文字認識結果に対して構文解析を行った結果、該表計算ソフトのセル境界線で、単語・文節として分離できる場合には、それら分離可能な複数の文字認識結果を該表計算ソフトの別々のセルに挿入することで、他のシートにファイルをコピーした際のハンドリングがしやすく、検索が行いやすいファイルの作成が可能となる。 According to the invention described in item (5), the text box width of the character recognition result is larger than the cell width of the spreadsheet software, and the result of parsing the character recognition result is that the cell boundary of the spreadsheet software is If the line can be separated as a word / sentence, it can be handled when the file is copied to another sheet by inserting the separated character recognition results into separate cells of the spreadsheet software. It is easy to create a file that is easy to search.
前項(6)に記載の発明によれば、第1文字認識結果が第2文字認識結果に対して行方向で一定距離だけずれている場合には、第1文字認識結果と第2文字認識結果を表計算ソフトの同一行の別々のセルに挿入できるように、第1文字認識結果もしくは第2文字認識結果の位置が調整されるので、他のシートにファイルをコピーした際のハンドリングがしやすく、検索が行ないやすいファイルの作成が可能となる。 According to the invention described in (6) above, when the first character recognition result is deviated from the second character recognition result by a certain distance in the row direction, the first character recognition result and the second character recognition result. The position of the first character recognition result or the second character recognition result is adjusted so that the file can be inserted into different cells in the same row of the spreadsheet software, making it easier to handle when copying files to other sheets This makes it possible to create a file that is easy to search.
以下、この発明の実施形態を図面に基づいて説明する。 Embodiments of the present invention will be described below with reference to the drawings.
図1は、この発明の一実施形態に係る表計算ソフトのレイアウト保持装置が適用された多機能デジタル複合機(以下、MFPともいう)の電気的構成を示すブロック図である。 FIG. 1 is a block diagram showing an electrical configuration of a multi-function digital multi-function peripheral (hereinafter also referred to as MFP) to which a layout holding device for spreadsheet software according to an embodiment of the present invention is applied.
図1において、このMFPは、例えば、CPU1と、ROM2と、RAM3と、スキャナ部4と、操作パネル部5と、記憶部6と、プリンタ部7と、外部インターフェース部8とを備えている。
In FIG. 1, the MFP includes, for example, a
前記CPU1は、MFPの全体の動作を統括制御する他に、表計算ファイル形式の作成部11、さらには、OCR結果に対して構文を解析する構文解析部12等の機能を備えている。
In addition to the overall control of the overall operation of the MFP, the
前記ROM2は、CPU1の動作プログラム等が格納されたメモリであり、前記RAM3は、CPU1が動作プログラムに基づいて動作する際に作業領域を提供するメモリである。
The
前記スキャナ部4は、文書画像を読み取って電子データである画像データに変換して出力する読み取り部を構成するものである。また、スキャナ部4は、前記得られた画像データを入力画像として複数の必要部分領域に対して文字認識を行なうOCR(光学式文字認識装置)41の機能も有している。
The
前記操作パネル部5は、スタートキー、ストップキー、テンキー等のハードキーを備えているキー部51と、液晶表示装置(LCD)等からなる表示部52とを備えている。
The
前記記憶部6は、各種データやアプリケーションソフトを記憶する記憶手段であり、例えばハードディスク装置(HDD)等からなり、ここでは、表計算ソフトとしてのエクセルやOCR用のソフト等が格納されている。
The
前記プリンタ部7は、画像データを用紙に印刷するエンジン部を構成するものである。
The
前記外部インターフェース部8は、ネートワークを介して接続されているユーザ端末等との間での通信を司るものである。
The
図2(A)〜(C)は、前記スキャナ部4により原稿を読み取って得られた画像データを入力画像とし、その入力画像の複数の必要部分領域についてOCR認識を行い、複数のOCR結果をエクセルの各セルに挿入して、表計算ファイルを作成する場合の説明図である。
2A to 2C, image data obtained by reading a document by the
この例では、入力画像における必要部分領域に対してOCR認識を行い、得られた複数のOCR結果R1,R2が複数(互いに隣り合う二つ)のセルC1,C2に跨がっている場合、または、OCR結果R1とOCR結果R2がエクセルの一つのセルC1の中に内包されているとき、文字認識結果のテキストボックス幅Dとエクセルのセル幅dの関係により、OCR結果R1とOCR結果R2とを結合、または分離する場合を示している。 In this example, when OCR recognition is performed on a necessary partial region in the input image, and a plurality of obtained OCR results R1 and R2 extend over a plurality of (two adjacent to each other) cells C1 and C2, Alternatively, when the OCR result R1 and the OCR result R2 are included in one cell C1 of Excel, the OCR result R1 and the OCR result R2 depend on the relationship between the text box width D of the character recognition result and the cell width d of Excel. And the case where these are combined or separated.
図2(A)では、同図左部に示すように、OCR結果R2が二つのセルC1,C2にま跨がっており、構文解析の結果、OCR結果R1とOCR結果R2とで一つの単語・文節にならない場合を示している。この場合、OCR結果R1とOCR結果R2とを別々のセルC1,C2に挿入してある(同図右端の丸数字1)。
In FIG. 2A, as shown in the left part of FIG. 2, the OCR result R2 extends over the two cells C1 and C2. As a result of the syntax analysis, one OCR result R1 and one OCR result R2 exist. It shows the case where it does not become a word or phrase. In this case, the OCR result R1 and the OCR result R2 are inserted into separate cells C1 and C2 (the circled
この場合、エクセルの他のシートにコピーした際、ハンドリングがしやすく、検索が行ないやすいファイルの作成が可能となる。 In this case, when copying to another sheet of Excel, it becomes possible to create a file that is easy to handle and easy to search.
また、OCR結果R1とOCR結果R2とで一つの単語・文節になる場合には、OCR結果R1とOCR結果R2との間に空白(斜線表示)Gを加入して両者R1,R2を結合した状態で各セルC1,C2に挿入してある(同図右端の丸数字2)。
In addition, when the OCR result R1 and the OCR result R2 become one word / phrase, a blank (indicated by hatching) G is added between the OCR result R1 and the OCR result R2, and both R1 and R2 are combined. In the state, it is inserted in each of the cells C1 and C2 (
このように、OCR1とOCR2との間に空白Gを加入してレイアウトを保持した状態で両OCRR1,R2が結合されるので、テキストファイルにコピーした際のハンドリングが容易となる。 Thus, since both OCRR1 and R2 are joined in a state in which a blank G is added between OCR1 and OCR2 and the layout is maintained, handling when copying to a text file is facilitated.
図2(B)は、入力画像における必要部分領域に対してOCR認識を行い、その結果、テキストボックスの幅Dがセル幅dよりも大きい場合を示している。 FIG. 2B shows a case where OCR recognition is performed on a necessary partial region in the input image, and as a result, the width D of the text box is larger than the cell width d.
図2(B)では、同図左部に示すように、OCR認識した結果R3のテキストボックスの幅Dがセル幅dよりも大きいので、このOCR結果R3の構文解析を行う。そして、エクセルのセル境界線Lで単語・文節が分離可能で、かつ、OCR結果R3をOCR結果R3AとOCR結果R3Bに分離できる場合は、これらOCR結果R3A,R3Bを別々のセルC1,C2に挿入する(同図右端の丸数字3)。
In FIG. 2B, as shown in the left part of FIG. 2, since the width D of the text box of the result R3 recognized by OCR is larger than the cell width d, the OCR result R3 is parsed. If the word / phrase can be separated at the cell boundary L of Excel and the OCR result R3 can be separated into the OCR result R3A and the OCR result R3B, the OCR results R3A and R3B are separated into separate cells C1 and C2. Insert (
このように、OCR結果R3を分離したOCR結果R3A,R3Bが別々のセルC1,C2に挿入されるので、エクセルの他のシートにファイルをコピーした際のハンドリングがしやすく、検索が行ないやすいファイルの作成が可能となる。 As described above, since the OCR results R3A and R3B obtained by separating the OCR result R3 are inserted into the separate cells C1 and C2, the file is easy to handle and search when the file is copied to another sheet of Excel. Can be created.
一方、前記OCR結果R3の構文解析を行い、単語・文節として分離できないものであれば、OCR結果R3を、そのままエクセルのセルC1に挿入する(同図右端の丸数字4)。
On the other hand, if the OCR result R3 is parsed and cannot be separated as a word / phrase, the OCR result R3 is inserted into the Excel cell C1 as it is (
このように、OCR結果R3がエクセルのセルC1にそのまま挿入されるので、エクセルの他のシートにファイルをコピーした際のハンドリングがしやすく、検索が行ないやすいファイルの作成が可能となる。 As described above, since the OCR result R3 is inserted into the Excel cell C1 as it is, it is possible to create a file that can be easily handled and searched when the file is copied to another sheet of Excel.
図2(C)は、エクセルにおけるあるセルC1(C2)に着目し、OCR結果R1(R2)がOCR結果R2(R1)に対して行方向で一定距離だけずれている場合には、OCR結果R1(R2)とOCR結果R2(R1)を同一行の別々のセルC1,C2に当てはめるように、OCR結果R1(R2)もしくはOCR結果R2(R1)の位置を調整するようになっている。 FIG. 2C focuses on a certain cell C1 (C2) in Excel. When the OCR result R1 (R2) is deviated from the OCR result R2 (R1) by a certain distance in the row direction, the OCR result The position of the OCR result R1 (R2) or the OCR result R2 (R1) is adjusted so that the R1 (R2) and the OCR result R2 (R1) are applied to different cells C1 and C2 in the same row.
図2(C)では、同図左部に示すように、OCR結果R1がOCR結果R2に対して行方向で一定距離だけずれているので、OCR結果R1の位置を調整し、これらOCR結果R1,R2を別々のセルC1,C2に挿入する(同図右端の丸数字5)。
In FIG. 2C, as shown in the left part of FIG. 2, since the OCR result R1 is shifted by a certain distance in the row direction with respect to the OCR result R2, the position of the OCR result R1 is adjusted, and these OCR results R1 , R2 are inserted into separate cells C1, C2 (
このように、OCR結果R1(R2)もしくはOCR結果R2(R1)の行方向の位置を調整することにより、エクセルの他のシートにファイルをコピーした際のハンドリングがしやすく、検索が行ないやすいファイルの作成が可能となる。 As described above, by adjusting the position in the row direction of the OCR result R1 (R2) or the OCR result R2 (R1), the file is easy to handle and search when the file is copied to another sheet of Excel. Can be created.
図3は、複数のOCR結果R1,R2から図2(A)に示すように、エクセルの一つのセルC1(C2)の中に複数のOCR結果R1,R2が入る場合の処理の流れを示すフローチャートである。 FIG. 3 shows the flow of processing when a plurality of OCR results R1 and R2 enter one cell C1 (C2) of Excel as shown in FIG. 2A from a plurality of OCR results R1 and R2. It is a flowchart.
図3において、ステップS1で、スキャナ部4により文書画像を読み取り、その画像データを入力画像(画像入力)とする。
In FIG. 3, in step S1, a document image is read by the
ステップS2では、入力画像の全面に対してOCR認識を行なう。なお、必要な部位のみにOCR認識を行っても良い。 In step S2, OCR recognition is performed on the entire input image. Note that OCR recognition may be performed only on necessary portions.
ステップS3では、ある部分領域についてのOCR処理により、入力画像内の文字または文字列をOCR結果R1として出力する。また、ステップS4では、別の部分領域についてのOCR処理により、入力画像内の文字、または文字列をOCR結果R2として出力する。 In step S3, the character or character string in the input image is output as the OCR result R1 by OCR processing for a certain partial region. In step S4, a character or character string in the input image is output as an OCR result R2 by OCR processing for another partial region.
ステップS5では、エクセルの一つのセルC1の中に、複数(例えば2つ)のOCR結果R1,R2が入る場合、OCR結果R1とOCR結果R2とが、即ち(R1+R2)が一つの単語または文節を構成するか否かを判断する。 In step S5, when a plurality of (for example, two) OCR results R1 and R2 are included in one cell C1 of Excel, the OCR result R1 and the OCR result R2, that is, (R1 + R2) is one word or phrase. Is determined.
OCR結果R1とOCR結果R2とが一つの単語、または文節を構成すれば(ステップS5の判定がYES)、ステップS6では、OCR結果R1とOCR結果R2とを結合して、図2(A)の丸数字2に示すように、一つのセルC1に挿入する。この場合、OCR結果R1とOCR結果R2との間には、レイアウトを保持するために、空白G(斜線表示)Gを加入する。
If the OCR result R1 and the OCR result R2 constitute one word or phrase (the determination in step S5 is YES), in step S6, the OCR result R1 and the OCR result R2 are combined, and FIG. As shown by the circled
OCR結果R1とOCR結果R2とが一つの単語、または文節を構成しなければ(ステップS5の判定がNO)、ステップS7で、OCR結果R1とOCR結果R2とを結合することなく、図2(A)の丸数字1に示すように、OCR結果R1をセルC1に挿入し、OCR結果R2をその右隣のセルC2に挿入する。
If the OCR result R1 and the OCR result R2 do not constitute one word or phrase (the determination in step S5 is NO), the OCR result R1 and the OCR result R2 are not combined in step S7 (FIG. 2). As indicated by the circled
このように、エクセル内のシートの列幅を固定したものに対して、OCR結果R1,R2がエクセルの一つのセルC1(C2)に内包されている場合には、分離してセルC1(C2)にそれぞれ代入し、OCR結果R1,R2が二つのセルC1,C2に跨がっている場合には、OCR結果R1とOCR結果R2とを結合してセルC1に挿入するので、エクセルシートに対してレイアウトが保持されて、使い回し(ハンドリング)が良くなる。 As described above, when the OCR results R1 and R2 are included in one cell C1 (C2) of Excel with respect to the sheet having a fixed column width in Excel, the cells C1 (C2) are separated. ), And the OCR results R1 and R2 straddle the two cells C1 and C2, the OCR result R1 and the OCR result R2 are combined and inserted into the cell C1. On the other hand, the layout is maintained and the handling (handling) is improved.
とくに、OCR結果R1,R2で一つの単語・文節になる場合には、OCR結果R1との間に空白Gを加入するので、レイアウトが良好に保持された状態となる。 In particular, when the OCR results R1 and R2 result in one word / phrase, a blank G is added between the OCR result R1 and the layout is maintained well.
図4は、複数のOCR結果から図2(B)に示すように、入力画像における必要部分領域に対してOCR認識を行い、その結果、テキストボックスの幅Dがセル幅dよりも大きい場合の処理の流れを示すフローチャートである。 FIG. 4 shows a case where OCR recognition is performed on a necessary partial region in the input image from a plurality of OCR results, and as a result, the width D of the text box is larger than the cell width d. It is a flowchart which shows the flow of a process.
図4において、ステップS11で、スキャナ部4により文書画像を読み取り、その画像データを入力画像(画像入力)とする。
4, in step S11, a document image is read by the
ステップS12では、入力画像の全面に対してOCR認識を行なう。 In step S12, OCR recognition is performed on the entire input image.
ステップS13では、ある部分領域についてのOCR処理により、入力画像内の文字または文字列をOCR結果(R1)として出力する。また、ステップS14では、別の部分領域についてのOCR処理により、入力画像内の文字または文字列をOCR結果(R2)として出力する。 In step S13, the character or character string in the input image is output as an OCR result (R1) by OCR processing for a certain partial region. In step S14, the character or character string in the input image is output as an OCR result (R2) by OCR processing for another partial region.
ステップS15では、エクセルの複数のセルC1(C2)の中に、OCR結果R3が入り、構文解析した結果、別の単語・文節であるOCR結果R3AとOCR結果R3Bに分離できるか否かを判断する。 In step S15, the OCR result R3 is entered into a plurality of Excel cells C1 (C2), and as a result of the syntax analysis, it is determined whether the OCR result R3A and the OCR result R3B, which are different words / phrases, can be separated. To do.
構文解析した結果、OCR結果R3A、OCR結果R3Bに分離できる場合には(ステップS15の判定がYES)、ステップS16では、OCR結果R3をOCR結果R3AとOCR結果R3Bに分割して、図2(B)の丸数字に示すように、OCR結果R3Bの左上座標に対応するセルC1,C2にOCR結果R3A、OCR結果R3Bを挿入してから、終了する。 As a result of the syntax analysis, when the OCR result R3A and the OCR result R3B can be separated (the determination in step S15 is YES), in step S16, the OCR result R3 is divided into the OCR result R3A and the OCR result R3B, and FIG. As indicated by the circled numbers in B), the OCR result R3A and the OCR result R3B are inserted into the cells C1 and C2 corresponding to the upper left coordinates of the OCR result R3B, and then the process ends.
構文解析した結果、OCR結果R3A、OCR結果R3Bに分離できない場合には(ステップS15の判定がNO)、ステップS17で、図2(B)の丸数字4に示すように、OCR結果R3の左上座標に対応するセルにOCR結果R3を分離することなく挿入する。
As a result of the syntax analysis, when separation into the OCR result R3A and the OCR result R3B cannot be made (determination in step S15 is NO), the upper left of the OCR result R3 is shown in step S17 as indicated by the circled
図5は、複数のOCR結果から図2(C)の丸数字5に示すように、あるOCR結果が挿入されるセルC1(C2)に注目し、そのセルC1(C2)に隣接するセルC2(C1)にOCR結果がR2(R1)が挿入されていた場合の処理の流れを示すフローチャートである。
FIG. 5 focuses on a cell C1 (C2) into which an OCR result is inserted as shown by a circled
図5において、ステップS21で、スキャナ部4により文書画像を読み取り、その画像データを入力画像(画像入力)とする。
In FIG. 5, in step S21, a document image is read by the
ステップS22では、入力画像の全面に対してOCR認識を行なう。 In step S22, OCR recognition is performed on the entire input image.
ステップS23では、ある部分領域についてのOCR処理により、入力画像内の文字、または文字列をOCR結果R1として出力する。また、ステップS24では、別の部分領域についてのOCR処理により、入力画像内の文字、または文字列をOCR結果R2として出力する。 In step S23, the character or character string in the input image is output as the OCR result R1 by OCR processing for a certain partial region. In step S24, the character or character string in the input image is output as the OCR result R2 by OCR processing for another partial region.
ステップS25では、あるOCR結果が挿入されるセルC1に注目し、そのセルC1に隣接するセルC2にOCR結果R2が挿入されている場合、「セルC1のOCR結果R1とセルC2のOCR結果R2」を構文解析し、一つの単語、または文節と判断できるか否かを判断する。 In step S25, paying attention to the cell C1 in which a certain OCR result is inserted, and when the OCR result R2 is inserted in the cell C2 adjacent to the cell C1, "OCR result R1 of the cell C1 and OCR result R2 of the cell C2" "Is parsed to determine whether it can be determined as a single word or phrase.
一つの単語または文節と判断できる場合には(ステップS25の判定がYES)、ステップS26で、OCR結果R1とOCR結果R2を一つのセルに入れる。 If it can be determined as one word or phrase (YES in step S25), the OCR result R1 and the OCR result R2 are put in one cell in step S26.
「セルC1のOCR結果R1とセルC2のOCR結果R2」を構文解析し、一つの単語または文節と判断できない場合には(ステップS25の判定がNO)、ステップS27で、OCR結果R1とOCR結果R2を元々の対応するセルC1とC2に挿入する。 When “the OCR result R1 of the cell C1 and the OCR result R2 of the cell C2” are parsed and cannot be determined as one word or phrase (the determination in step S25 is NO), the OCR result R1 and the OCR result are determined in step S27. Insert R2 into the original corresponding cells C1 and C2.
図6は、エクセルで作成されるファイル例の説明図である。 FIG. 6 is an explanatory diagram of an example of a file created by Excel.
図6において、左側が文書画像をスキャンして得られた入力画像Vでの形態であり、また、右側が文書画像をOCR認識し、そのOCR結果R1をエクセルシートのセルに挿入した形態を示している。 In FIG. 6, the left side is a form of an input image V obtained by scanning a document image, and the right side is a form in which the document image is OCR-recognized and the OCR result R1 is inserted into a cell of an Excel sheet. ing.
なお、左側の入力画像Vの形態では、所定のジョブに従って印刷に利用され、また、右側のエクセルシートでの形態は、テキストに再利用される。 Note that, in the form of the left input image V, it is used for printing according to a predetermined job, and the form in the right Excel sheet is reused for text.
図7は、同じくエクセルで作成される別のファイル例の説明図である。 FIG. 7 is an explanatory diagram of another example of a file that is also created in Excel.
図7において、前記文書画像をスキャンする際、文書が複数ページにわたる場合には、1シートだけでは、標準表示で何ページまでスキャンしたのかが一目で分かりにくいので、1ページ毎に別シートで用意する。例えば、デフォルトでは、255ページ(シート)毎に別ファイルにするのがよい。 In FIG. 7, when the document image is scanned, if the document covers a plurality of pages, it is difficult to understand at a glance how many pages have been scanned in the standard display with only one sheet. To do. For example, by default, a separate file is recommended for every 255 pages (sheets).
図8は、同じくエクセルで作成されるさらに別のファイル例の説明図であり、エクセルシートのみにより構成されており、OCR認識機能がONの時のみ有効にする。 FIG. 8 is an explanatory diagram of still another example of a file created in the same Excel, which is configured only by an Excel sheet and is enabled only when the OCR recognition function is ON.
図9は、同じくエクセルで作成される別のファイル例の説明図である。 FIG. 9 is an explanatory diagram of another file example that is also created in Excel.
図9において、エクセルで作成されるCSV(Comma separated Value)フォーマットのファイルを開いた形態を示しており、OCR認識機能がONの時のみ有効にする。この場合、フォントサイズは保存されない。 FIG. 9 shows a form in which a CSV (Comma separated Value) format file created by Excel is opened, and is enabled only when the OCR recognition function is ON. In this case, the font size is not saved.
1 CPU
4 スキャナ部
41 文字認識部(OCR)
11 ファイル作成部
12 構文解析部
C1,C2 表計算ソフトのセル
d セル幅
D テキストボックス幅
G 空白
R1,R2,R3 OCR結果
R3A,R3B 分離されたOCR結果
V 読み取り画像(入力画像)
1 CPU
4
11
Claims (6)
前記読み取り手段による画像データを入力画像とし、その入力画像の文字領域に対して文字認識を行なう文字認識手段と、
文字認識手段により得られた複数の文字認識結果を表計算ソフトにおける対応セルに挿入して表計算ファイルを作成するファイル作成手段と、
前記文字認識結果が複数のセルに跨がっている場合、または、第1文字認識結果と第2文字認識結果が表計算ソフトの一つのセルの中に内包されている場合には、文字認識結果のテキストボックス幅と前記表計算ソフトのセル幅の関係に応じて、前記両文字認識結果を結合、または分離するように制御する制御手段と、
を備えていることを特徴する表計算ソフトのレイアウト保持装置。 Reading means for reading a document image, converting it into image data, and outputting it;
Character recognition means for performing image recognition on a character area of the input image, using the image data obtained by the reading means as an input image;
A file creation means for creating a spreadsheet file by inserting a plurality of character recognition results obtained by the character recognition means into corresponding cells in the spreadsheet software;
Character recognition is performed when the character recognition result extends over a plurality of cells, or when the first character recognition result and the second character recognition result are included in one cell of the spreadsheet software. Control means for controlling to combine or separate the character recognition results according to the relationship between the result text box width and the cell width of the spreadsheet software;
A layout holding device for spreadsheet software, comprising:
前記制御手段は、前記構文解析の結果、文字認識結果を単語・文節として分離できない場合には、該文字認識結果をそのまま表計算ソフトのセルに挿入する請求項1に記載の表計算ソフトのレイアウト保持装置。 The control means has a function of parsing the character recognition result when the text box width of the character recognition result is larger than the cell width of the spreadsheet software,
The layout of the spreadsheet software according to claim 1, wherein if the character recognition result cannot be separated into words and phrases as a result of the parsing, the control means inserts the character recognition result into a cell of the spreadsheet software as it is. Holding device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012190683A JP6065467B2 (en) | 2012-08-30 | 2012-08-30 | Spreadsheet holding device for spreadsheet software |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012190683A JP6065467B2 (en) | 2012-08-30 | 2012-08-30 | Spreadsheet holding device for spreadsheet software |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014048851A true JP2014048851A (en) | 2014-03-17 |
JP6065467B2 JP6065467B2 (en) | 2017-01-25 |
Family
ID=50608475
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012190683A Active JP6065467B2 (en) | 2012-08-30 | 2012-08-30 | Spreadsheet holding device for spreadsheet software |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6065467B2 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0887495A (en) * | 1994-09-16 | 1996-04-02 | Ibm Japan Ltd | Cut amd paste method for table data and data processing system |
JPH09231208A (en) * | 1996-02-28 | 1997-09-05 | Oki Electric Ind Co Ltd | Table type document data processor |
JPH11161736A (en) * | 1997-12-01 | 1999-06-18 | Fujitsu Ltd | Method for recognizing character |
JP2008282095A (en) * | 2007-05-08 | 2008-11-20 | Canon Inc | Ocr (optical character recognize) software |
-
2012
- 2012-08-30 JP JP2012190683A patent/JP6065467B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0887495A (en) * | 1994-09-16 | 1996-04-02 | Ibm Japan Ltd | Cut amd paste method for table data and data processing system |
JPH09231208A (en) * | 1996-02-28 | 1997-09-05 | Oki Electric Ind Co Ltd | Table type document data processor |
JPH11161736A (en) * | 1997-12-01 | 1999-06-18 | Fujitsu Ltd | Method for recognizing character |
JP2008282095A (en) * | 2007-05-08 | 2008-11-20 | Canon Inc | Ocr (optical character recognize) software |
Also Published As
Publication number | Publication date |
---|---|
JP6065467B2 (en) | 2017-01-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8610929B2 (en) | Image processing apparatus, control method therefor, and program | |
JP5915628B2 (en) | Image forming apparatus, text data embedding method, and embedding program | |
JP2008052423A (en) | Print management device, print management method, and print management program | |
JP2007257401A (en) | Image processor | |
JP2018130889A (en) | Image forming apparatus and image forming method | |
JP6065467B2 (en) | Spreadsheet holding device for spreadsheet software | |
US10630854B2 (en) | Image processing apparatus | |
JP5446852B2 (en) | Print processing apparatus, print processing program, and print processing method | |
JP4591372B2 (en) | Image forming apparatus and image forming method | |
JP2010039542A (en) | Operation information management system | |
JP6201686B2 (en) | Text data embedding apparatus, image processing apparatus including the apparatus, text data embedding method, and embedding program | |
JP2018056797A (en) | Image processing device | |
JP2019004365A (en) | Information processing apparatus | |
JP2020024516A (en) | Information processing apparatus and information processing program | |
JP2006093862A (en) | Image-forming device, image-forming system, image formation method, and program for enabling computer to execute image formation method | |
JP2010171492A (en) | Image processing apparatus, image processing method, and image processing program | |
JP4893820B2 (en) | Control device and computer program | |
JP2008245184A (en) | Image forming apparatus | |
JP2006091956A (en) | Processor and processing method | |
JP6919412B2 (en) | Image processing equipment and programs | |
JP2022169232A (en) | Image processing device | |
JP2022131466A (en) | Information processing apparatus and information processing program | |
JP4857198B2 (en) | Image processing device | |
CN113762064A (en) | Image processing apparatus, method, and storage medium | |
JP2018086813A (en) | Image formation apparatus and job control method in image formation apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150323 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160209 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160212 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160404 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160913 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20161109 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20161129 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20161212 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6065467 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |