JP6607490B2 - CONVERSION PROCESSING DEVICE, INFORMATION PROCESSING DEVICE EQUIPPED WITH THE SAME, PROGRAM, AND RECORDING MEDIUM - Google Patents
CONVERSION PROCESSING DEVICE, INFORMATION PROCESSING DEVICE EQUIPPED WITH THE SAME, PROGRAM, AND RECORDING MEDIUM Download PDFInfo
- Publication number
- JP6607490B2 JP6607490B2 JP2015210168A JP2015210168A JP6607490B2 JP 6607490 B2 JP6607490 B2 JP 6607490B2 JP 2015210168 A JP2015210168 A JP 2015210168A JP 2015210168 A JP2015210168 A JP 2015210168A JP 6607490 B2 JP6607490 B2 JP 6607490B2
- Authority
- JP
- Japan
- Prior art keywords
- area
- processing unit
- information
- image
- region
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は、変換処理装置、それを備えた情報処理装置、プログラム、及び記録媒体に関する。 The present invention relates to a conversion processing apparatus, an information processing apparatus including the conversion processing apparatus, a program, and a recording medium.
従来、電子写真方式又はインクジェット方式等により画像形成を行う複写機又は複合機等の画像形成装置が広く普及している。また、近年の複合機は高機能化が進められており、スキャナにより読み取った文書を文書画像データ(以下、文書画像情報、または文書画像ともいう)として保存し、保存した文書画像を管理する機能等が求められている。一般に、スキャナにより読み取った文書は画像データとして保存されるため読み取った文書をそのまま再編集することはできない。これに対し、読み取った文書画像に含まれる文字や図表の情報を取得して再編集したいといった要望があり、更には文書画像に含まれる文字や図、表などの構造を認識し、文書作成ソフトウェアや、表計算ソフトウェア、またはプレゼンテーションソフトウェアなどで作成、使用されるオフィス文書ファイルとして再構成する機能への需要が高まっている。 2. Description of the Related Art Conventionally, image forming apparatuses such as copiers or multi-function machines that perform image formation by an electrophotographic method or an ink jet method have been widely used. In recent years, advanced functions have been advanced in multifunction peripherals, and a function of storing a document read by a scanner as document image data (hereinafter also referred to as document image information or document image) and managing the stored document image. Etc. are required. In general, since a document read by a scanner is stored as image data, the read document cannot be re-edited as it is. On the other hand, there is a demand to acquire and re-edit information of characters and diagrams included in the read document image, and further, the document creation software recognizes the structure of characters, diagrams and tables included in the document image. In addition, there is an increasing demand for a function for reconstructing an office document file created and used by spreadsheet software or presentation software.
こうしたオフィス文書ファイルへの変換処理機能を支える技術として、文書画像に含まれる文字や図、写真、表などといった要素を抽出、解析する技術が必要となる。既に、光学文字認識(Optical Character Recognition; OCR)技術により、文書画像に含まれる文字画像を解析して文字コードなどの情報に変換する機能が多くのスキャナなどにも搭載されている。これにより、文書画像中の文字画像の集合を編集可能なテキストデータとして取得することは一般に行われている。また、文書画像中に含まれる図や写真、また表の領域を分離、抽出するといった機能も種々提案されている。また、紙媒体でしか保存されていない帳票を作り直したり、膨大な実験データを表計算ソフトに入力したりといった利用例を考えると、特に表の再構成の頻度は高いと考えられる。しかし、文書画像から手動で同様のレイアウトの文書を作成する場合、表を再構成する作業が、特に手間のかかる作業であり、表の再構成の自動化がますます重要となっている。 As a technology that supports such an office document file conversion processing function, a technology for extracting and analyzing elements such as characters, diagrams, photographs, and tables included in a document image is required. Many scanners and the like are already equipped with a function of analyzing a character image included in a document image and converting it into information such as a character code by using an optical character recognition (OCR) technique. As a result, a collection of character images in a document image is generally acquired as editable text data. Various functions have also been proposed for separating and extracting diagrams, photographs, and table areas included in document images. Also, considering the use cases such as recreating forms that are stored only on paper media and inputting a large amount of experimental data into spreadsheet software, it is considered that the frequency of table reconstruction is particularly high. However, when a document having the same layout is manually created from a document image, the work of reconfiguring the table is particularly troublesome work, and automation of the reorganization of the table is becoming increasingly important.
こうした表画像から精度よく表を再構成するための技術が開発されている。たとえば、特許文献1に記載の技術では、枠に接触する文字等を含む画像から枠を正確に抽出し、文字等を高品位に復元可能とする画像抽出装置を提案している。この画像抽出装置では、画像を構成するパターンから画素と画素が繋がっている部分パターンを抽出し、抽出した各部分パターンに基づいて枠を抽出し、抽出した部分パターン及び枠に基づいて文字と枠との交点を算出する。枠の線幅に応じて枠を挟む文字線分間の距離及び傾きの連続性の判定基準を適応的に変化させ、距離及び傾きの連続性に基づいて算出した交点の対応付けを行い、対応付けた交点に基づいて枠内の文字線分を抽出する。これにより、1文字枠のサイズや位置がわからない矩形で分離した文字枠が複数個あり、その文字枠に接触、またはその文字枠からはみ出して手書き文字が書かれた場合であっても、良好に文字及び文字枠のパターンから文字部分だけを一文字、一文字切り出すことを可能としている。
A technique for accurately reconstructing a table from such a table image has been developed. For example, the technique described in
しかしながら、特許文献1の手法の場合、電子化された文書の画像データから表領域を抽出し、再利用可能な表データに変換する際、表の中に写真やイラストなどの画像オブジェクトが存在する場合に、それを文字ではなく画像オブジェクトだと認識する手段がない。そのため、画像オブジェクトを文字として誤認識し、画像オブジェクトを間違った文字として再構成してしまう可能性があるという問題がある。
However, in the case of the technique disclosed in
そこで、本発明では、表のセルの中に画像など文字以外のオブジェクトが存在する場合でも、そのオブジェクトを文字として誤って抽出することなく、正しくオブジェクトを抽出して変換し、表の中にそのオブジェクトを正しく配置することを可能とする変換処理装置、それを備えた情報処理装置、プログラム、並びに記憶媒体を提供することを目的とする。 Therefore, in the present invention, even when an object other than a character such as an image exists in a table cell, the object is correctly extracted and converted without erroneously extracting the object as a character, and the object is converted into the table. It is an object of the present invention to provide a conversion processing device capable of correctly arranging objects, an information processing device including the same, a program, and a storage medium.
上記問題を解決するために、本発明の一態様は、文書画像情報に存在する文字領域を抽出する文字抽出処理部と、前記文書画像情報に存在する線分を抽出するライン抽出処理部と、前記ライン抽出処理部より抽出される前記線分の情報を用い、表領域を抽出する表領域抽出処理部と、前記文書画像情報に対して、予め定められる局所領域を設定し、前記局所領域の輝度ヒストグラムを作成して前記局所領域の輝度変化情報を求め、前記輝度変化情報と、前記文字抽出処理部より抽出される前記文字領域の情報と、前記ライン抽出処理部より抽出される線分の情報と、前記表領域抽出処理部より抽出される表領域の情報と、を用いて前記表領域の外、または前記表領域の中に存在する図、または写真を含む画像オブジェクト領域の抽出を行う図領域抽出処理部と、前記表領域における前記文字領域の情報、前記線分の情報、および前記画像オブジェクト領域の情報をもとに表構造を解析し、表を再構成する表構造情報を取得する表構造化処理部と、を備えることを特徴とする変換処理装置である。 In order to solve the above problem, one aspect of the present invention provides a character extraction processing unit that extracts a character region existing in document image information, a line extraction processing unit that extracts a line segment existing in the document image information, Using the line segment information extracted from the line extraction processing unit, a table region extraction processing unit for extracting a table region and a predetermined local region for the document image information are set, and the local region A luminance histogram is created to determine luminance change information of the local region, the luminance change information, information on the character region extracted by the character extraction processing unit, and a line segment extracted by the line extraction processing unit Using the information and the table area information extracted by the table area extraction processing unit, an image object area including a figure or a photograph outside the table area or in the table area is extracted. Figure The table structure is analyzed based on the area extraction processing unit, the information on the character area in the table area, the information on the line segment, and the information on the image object area, and the table structure information for reconfiguring the table is acquired. A conversion processing apparatus comprising: a table structuring processing unit.
また、本発明の一態様は、上記に記載の発明において、前記文字抽出処理部が、前記文書画像情報から抽出する前記文字領域には、文字列を含む文字列領域も含まれており、前記図領域抽出処理部は、前記文書画像情報に対して、予め定められる局所領域を設定し、前記局所領域の輝度ヒストグラムを作成して前記局所領域の輝度変化情報を求め、前記輝度変化情報と、前記文字抽出処理部より抽出される前記文字列領域の情報と、前記ライン抽出処理部より抽出される線分の情報と、前記表領域抽出処理部より抽出される表領域の情報と、を用いて前記表領域の外、または前記表領域の中に存在する図、または写真を含む画像オブジェクト領域の抽出を行い、前記表構造化処理部は、前記表領域における前記文字列領域の情報、前記線分の情報、および前記画像オブジェクト領域の情報をもとに表構造を解析し、表を再構成する表構造情報を取得することを特徴としてもよい。 Further, according to an aspect of the present invention, in the invention described above, the character region extracted by the character extraction processing unit from the document image information includes a character string region including a character string, The figure region extraction processing unit sets a predetermined local region for the document image information, creates a luminance histogram of the local region to obtain luminance change information of the local region, and the luminance change information; Using the character string region information extracted from the character extraction processing unit, the line segment information extracted from the line extraction processing unit, and the table region information extracted from the table region extraction processing unit The image object area including a figure or a photograph existing outside the table area or in the table area is extracted, and the table structuring processing unit includes information on the character string area in the table area, Line segment Distribution, and the analyzes based on the table structure information of the image object area may also be characterized by acquiring the table structure information to reconstruct the table.
また、本発明の一態様は、上記に記載の発明において、前記文字列領域のオブジェクト、前記表領域のオブジェクト、前記線分領域のオブジェクト、前記画像オブジェクトの順番、または、前記文字列領域のオブジェクト、前記表領域のオブジェクト、前記画像オブジェクト、前記線分領域のオブジェクトの順番でオブジェクトを配置するように指定されたファイル形式で記述するファイル記述部をさらに備えることを特徴としてもよい。 In addition, according to one aspect of the present invention, in the above-described invention, the character string area object, the table area object, the line segment object, the image object order, or the character string area object And a file description section described in a file format designated to arrange the objects in the order of the table area object, the image object, and the line segment object.
また、本発明の一態様は、上記に記載の発明において、前記図領域抽出処理部は、前記文書画像情報に対してエッジ検出を行い、前記エッジ検出の結果から、前記文字抽出処理部より抽出される文書構成要素の1つである文字列領域を除外することにより、前記画像オブジェクト領域の候補となる非文字列マップを生成する非文字列マップ生成処理部と、前記輝度変化情報として、前記文書画像情報の局所領域におけるヒストグラムのエントロピーを算出し、算出したエントロピーの値が高い値である領域を前記画像オブジェクト領域の候補として前記非文字列マップに追加する非文字列エリア追加処理部と、前記画像オブジェクト領域の候補が追加された前記非文字列マップに対し、前記表領域抽出処理部より抽出される前記表領域の線分を削除し、前記表領域の線分を削除した非文字列マップに対してラベリング処理を行うことにより前記画像オブジェクト領域のラベル付けを行い、ラベル付けされた画像オブジェクト領域の矩形領域を求めることによりオブジェクトマップを生成するオブジェクトマップ生成処理部と、を備えることを特徴としてもよい。 According to another aspect of the present invention, in the above-described invention, the figure region extraction processing unit performs edge detection on the document image information, and extracts from the character extraction processing unit based on the result of the edge detection. A non-character string map generation processing unit that generates a non-character string map that is a candidate for the image object region by excluding a character string region that is one of the document components to be processed, A non-character string area addition processing unit that calculates the entropy of a histogram in a local region of the document image information, and adds a region having a high value of the calculated entropy as a candidate for the image object region to the non-character string map; A line segment of the table area extracted by the table area extraction processing unit for the non-character string map to which the candidate for the image object area is added. The object is obtained by labeling the image object area by performing a labeling process on the non-character string map from which the line segment of the table area is deleted, and obtaining a rectangular area of the labeled image object area. And an object map generation processing unit that generates a map.
また、本発明の一態様は、上記に記載の発明において、前記図領域抽出処理部は、前記画像オブジェクト領域の矩形領域それぞれについて、前記矩形領域の統合処理、または、前記矩形領域の分割処理を行う有効オブジェクトエリア判定処理部を備えることを特徴としてもよい。 According to another aspect of the present invention, in the above-described invention, the figure region extraction processing unit performs the integration processing of the rectangular regions or the division processing of the rectangular regions for each of the rectangular regions of the image object region. An effective object area determination processing unit may be provided.
また、本発明の一態様は、上記に記載の発明において、前記有効オブジェクトエリア判定処理部は、複数の前記画像オブジェクト領域の矩形領域が重複している場合には、複数の画像オブジェクトの矩形領域座標の最大値と最小値を算出し、重複している画像オブジェクト領域を1つの矩形領域に統合することを特徴としてもよい。 Further, according to one aspect of the present invention, in the above-described invention, the effective object area determination processing unit may be configured such that when the rectangular areas of the plurality of image object areas overlap, the rectangular areas of the plurality of image objects. A maximum value and a minimum value of coordinates may be calculated, and overlapping image object regions may be integrated into one rectangular region.
また、本発明の一態様は、上記に記載の発明において、前記有効オブジェクトエリア判定処理部は、前記画像オブジェクト領域の矩形領域に対し、前記文字列領域が重複している場合には、前記画像オブジェクトの矩形領域と前記文字列領域よりなる領域の、座標の最大値と最小値を算出し、前記画像オブジェクト領域と重複している文字列領域を1つの矩形領域に統合することを特徴としてもよい。 According to another aspect of the present invention, in the above-described invention, the valid object area determination processing unit is configured to display the image when the character string area overlaps the rectangular area of the image object area. It is also possible to calculate the maximum value and the minimum value of the coordinates of the object rectangular area and the character string area, and to combine the character string area overlapping the image object area into one rectangular area. Good.
また、本発明の一態様は、上記に記載の発明において、前記有効オブジェクトエリア判定処理部は、前記画像オブジェクト領域の矩形領域に対し、前記表領域が重複している場合には、前記画像オブジェクト領域の矩形領域から前記表領域が重複している領域を排除すると共に、前記重複している表領域の水平方向の枠線、または、垂直方向の枠線の延長線上に沿って前記画像オブジェクト領域の矩形領域を分割することを特徴としてもよい。 Further, according to one aspect of the present invention, in the invention described in the above, the valid object area determination processing unit is configured to display the image object when the table area overlaps a rectangular area of the image object area. The area where the table area overlaps from the rectangular area of the area is excluded, and the image object area along a horizontal frame line or an extension of the vertical frame line of the overlap table area The rectangular area may be divided.
また、本発明の一態様は、上記に記載の変換処理装置を備えることを特徴とする情報処理装置である。 Another embodiment of the present invention is an information processing device including the conversion processing device described above.
また、本発明の一態様は、コンピュータを、文書画像情報に存在する文字領域を抽出する文字抽出処理手段、前記文書画像情報に存在する線分を抽出するライン抽出処理手段、前記ライン抽出処理手段より抽出される前記線分の情報を用い、表領域を抽出する表領域抽出処理手段、前記文書画像情報に対して、予め定められる局所領域を設定し、前記局所領域の輝度ヒストグラムを作成して前記局所領域の輝度変化情報を求め、前記輝度変化情報と、前記文字抽出処理手段より抽出される前記文字領域の情報と、前記ライン抽出処理手段より抽出される線分の情報と、前記表領域抽出処理手段より抽出される表領域の情報と、を用いて前記表領域の外、または前記表領域の中に存在する図、または写真を含む画像オブジェクト領域の抽出を行う図領域抽出処理手段、前記表領域における前記文字領域の情報、前記線分の情報、および前記画像オブジェクト領域の情報をもとに表構造を解析し、表を再構成する表構造情報を取得する表構造化処理手段、として機能させるためのプログラムである。 According to another aspect of the present invention, there is provided a computer, a character extraction processing unit that extracts a character region existing in document image information, a line extraction processing unit that extracts a line segment existing in the document image information, and the line extraction processing unit. Table area extraction processing means for extracting a table area using the extracted line segment information, setting a predetermined local area for the document image information, and creating a luminance histogram of the local area The luminance change information of the local region is obtained, the luminance change information, the information of the character region extracted by the character extraction processing unit, the line segment information extracted by the line extraction processing unit, and the table region The table object information extracted by the extraction processing means is used to extract an image object area including a figure or a photograph outside or within the table area. The table structure is analyzed based on the figure region extraction processing means, the information on the character region in the table region, the information on the line segment, and the information on the image object region, and the table structure information for reconstructing the table is obtained It is a program for functioning as a table structuring processing means.
また、本発明の一態様は、上記に記載のプログラムを記録したコンピュータ読み取り可能な記録媒体である。 One embodiment of the present invention is a computer-readable recording medium on which the program described above is recorded.
この発明によれば、表のセルの中に画像など文字以外のオブジェクトが存在する場合でも、そのオブジェクトを文字として誤って抽出することなく、正しくオブジェクトを抽出して変換し、表の中にそのオブジェクトを正しく配置することが可能となる。 According to the present invention, even when an object other than a character such as an image exists in a table cell, the object is correctly extracted and converted without erroneously extracting the object as a character, and the object is converted into the table. It becomes possible to arrange objects correctly.
以下、本発明の実施の形態について、図面を参照して詳細に説明する。本発明による実施形態では、電子化された文書の画像データから表領域を抽出し、再利用可能な表データに変換する際、表のセルの中に写真・図・グラフ・イラストといった文字以外の画像オブジェクトが存在する場合でも、その画像オブジェクトを文字として誤って抽出することなく、正しく画像オブジェクトを抽出して変換し、表の中にその画像オブジェクトを正しく配置する。また、画像オブジェクト領域同士や画像オブジェクト領域と文字列領域、画像オブジェクト領域と表領域が重なった場合でも、所定のファイルフォーマットに変換する際に見栄え良く変換する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In an embodiment according to the present invention, when a table area is extracted from image data of an electronic document and converted into reusable table data, a table cell contains characters other than characters such as photographs, diagrams, graphs, and illustrations. Even when an image object exists, the image object is correctly extracted and converted without erroneously extracting the image object as characters, and the image object is correctly arranged in the table. Further, even when the image object areas, the image object area and the character string area, or the image object area and the table area overlap each other, the image object area and the table area are converted with a good appearance when converted into a predetermined file format.
〔実施の形態1〕
以下の説明では、本発明に係る変換処理装置が変換処理部30として画像処理装置1の一部を成し、また、その画像処理装置1が画像形成装置100の一部を成す形態を例示する。図1は、実施の形態1に係る画像形成装置100(情報処理装置)の機能的構成を示すブロック図である。画像形成装置100は、例えば、コピー機能及びスキャナ機能等を有するデジタル複合機である。画像形成装置100は、画像処理装置1、画像入力装置2、画像出力装置3、送信装置4、操作パネル5、及び記憶部6を備えている。
[Embodiment 1]
In the following description, the conversion processing apparatus according to the present invention forms a part of the
操作パネル5は、画像入力装置2、画像処理装置1、画像出力装置3及び送信装置4に接続されている。操作パネル5は、ユーザが画像形成装置100の動作モードを設定するための設定ボタン及びテンキー等の操作部(不図示)と、液晶ディスプレイ等で構成される表示部(不図示)とを備える。
The
画像形成装置100で実行される各種処理は、不図示の制御部(CPU(Central Processing Unit)あるいはDSP(Digital Signal Processor)等のプロセッサを含むコンピュータ)が制御する。画像形成装置100の制御部は、不図示のネットワークカード及びLANケーブルを介して、ネットワークに接続されたコンピュータ及び他のデジタル複合機等とデータ通信を行う。
Various processes executed by the
以下、画像形成装置100の各部について詳述する。画像入力装置2は、原稿から画像を光学的に読み取る。画像入力装置2は、たとえば、CCD(Charge Coupled Device)を有するカラースキャナよりなり、原稿からの反射光像を、CCDを用いてRGB(R:赤,G:緑,B:青)のアナログ信号として読み取り、画像処理装置1へ出力する。画像入力装置2は、スキャナでなくてもよく、たとえば、デジタルカメラ等であってもよい。
Hereinafter, each part of the
画像処理装置1は、画像入力装置2が読み取った画像データに処理を施し、処理を施した画像データを保存、あるいは、送信するために圧縮ファイルを生成する。画像処理装置1は、画像入力装置2から入力されたRGBのアナログ信号に対して、A/D変換部10、シェーディング補正部11、原稿種別判別部12、入力階調補正部13、及び領域分離処理部14により、各後述する画像処理を実行することによって、RGBのデジタル信号(以下、RGB信号という)からなる画像データを生成する。
The
また、画像処理装置1は、領域分離処理部14が出力したRGB信号に対して色補正部15、黒生成下地除去部16、空間フィルタ処理部17、出力階調補正部18、及び階調再現処理部19により、各後述する画像処理を実行することによって、CMYK(C:シアン,M:マゼンタ,Y:イエロー,K:ブラック)のデジタル信号からなる画像データを生成して、ストリームとして画像出力装置3へ出力する。なお、画像出力装置3へ出力される前に、画像データが記憶部6に一旦記憶されてもよい。記憶部6は、たとえば、不揮発性の記憶装置(たとえばハードディスク)である。
The
画像出力装置3は、画像処理装置1が生成した画像データに基づいて画像を出力する。画像出力装置3は、画像処理装置1から入力された画像データに基づいて、熱転写、電子写真、又はインクジェット等の方式により、記録シート(たとえば記録用紙等)上にカラー画像を形成(印刷)して出力する。なお、画像出力装置3はカラー画像を出力する構成に限られるものではなく、たとえば、記録シート上にモノクローム画像(白黒画像)を形成して出力する構成であってもよい。この場合、画像処理装置1により、カラー画像の画像データがモノクローム画像の画像データに変換されてから画像出力装置3へ出力される。
The
更にまた、画像処理装置1において、領域分離処理部14が出力したRGB信号に対して圧縮処理部20が、画像圧縮処理を実行することによって、圧縮されたカラー画像の画像データを有する圧縮ファイルを生成し、送信装置4へ出力する。なお、送信装置4へ出力される前に、圧縮ファイルが記憶部6に一旦記憶されてもよい。
Furthermore, in the
画像処理装置1の変換処理部30は、操作パネル5においてフォーマット変換モードが選択されている場合、領域分離処理部14が出力したRGB信号に対してフォーマット変換処理を実行する。このフォーマット変換処理により、変換処理部30は、後述のように、カラー画像が有する文書レイアウトを解析して文書構造ツリーを生成し、この文書構造ツリーを操作パネル5においてユーザが選択したフォーマットに変換して、送信装置4へ出力する。なお、変換処理部30は、本発明に係る変換処理装置として機能する機能部でもある。また、送信装置4へ出力される前に、変換されたファイルが記憶部6に一旦記憶されてもよい。
When the format conversion mode is selected on the
送信装置4は、画像処理装置1が生成した圧縮ファイルを外部へ送信する。送信装置4は、図示しない公衆回線網、LAN(Local Area Network)又はインターネット等の通信ネットワークに接続可能であり、ファクシミリ又は電子メール等の通信方法により、通信ネットワークを介して外部へ圧縮ファイルを送信する。たとえば、操作パネル5において「scan to e-mail」モードが選択されている場合、ネットワークカード、モデム等を用いてなる送信装置4は、圧縮ファイルを電子メールに添付し、設定された送信先へ送信する。
The
なお、ファクシミリ送信を行う場合は、画像形成装置100の制御部が、モデム等を用いてなる送信装置4により、相手先との通信手続きを行い、送信可能な状態が確保されたときに、圧縮ファイルに対して圧縮形式の変更等の必要な処理を施してから、相手先に通信回線を介して順次送信する。
また、ファクシミリを受信する場合、画像形成装置100の制御部は、送信装置4により、通信手続きを行いながら、相手先から送信されてくる圧縮ファイルを受信して、画像処理装置に入力する。
When facsimile transmission is performed, the control unit of the
When receiving a facsimile, the control unit of the
画像処理装置1では、受信した圧縮ファイルに対し、不図示の圧縮/伸張処理部で伸張処理が施される。圧縮ファイルを伸張することによって得られた画像データには、必要に応じて、不図示の処理部で回転処理及び/又は解像度変換処理等が施され、また、出力階調補正部18で出力階調補正が施され、階調再現処理部19で階調再現処理が施される。各種画像処理が施された画像データは、画像出力装置3へ出力され、画像出力装置3により、記録シート上に画像が形成される。
In the
以下では、画像処理装置1の構成について、画像処理装置における画像処理及びフォーマット変換処理を詳述しながら説明する。A/D変換部10は、画像入力装置2から画像処理装置1へ入力されたRGBのアナログ信号を受け付け、RGBのアナログ信号をRGBのデジタル信号(即ちRGB信号)へ変換し、変換したRGB信号をシェーディング補正部11へ出力する。
Hereinafter, the configuration of the
シェーディング補正部11は、A/D変換部10から入力されたRGB信号に対して、画像入力装置2の照明系、結像系及び撮像系で生じる各種の歪みを取り除く処理を行う。次いで、シェーディング補正部11は、歪みを取り除いたRGB信号を原稿種別判別部12へ出力する。原稿種別判別部12では、シェーディング補正部11から入力されたRGBの反射率信号をRGB各色の濃度を示す濃度信号に変換し、文字、印刷写真、又は写真(連続階調写真)等の原稿のモードを判別する原稿種別判別処理が実行される。原稿種別判別処理を、ユーザが操作パネル5を用いてマニュアル設定する場合、原稿種別判別部12は、シェーディング補正部11から入力されたRGB信号をそのまま後段の入力階調補正部13に出力する。原稿種別判別処理の処理結果は、後段の画像処理に反映される。
The
入力階調補正部13は、RGB信号に対して、カラーバランスの調整、下地濃度の除去、及びコントラストの調整等の画質調整処理を行う。入力階調補正部13は、次に、処理を行ったRGB信号を領域分離処理部14へ出力する。領域分離処理部14は、入力階調補正部13から入力されたRGB信号が表す画像中の各画素を、文字領域、網点領域、又は写真領域のいずれかに分離する。また、領域分離処理部14は、分離結果に基づき、各画素がいずれの領域に属しているかを示す領域識別信号を、黒生成下地除去部16、空間フィルタ処理部17、階調再現処理部19、及び圧縮処理部20へ出力する。更に、領域分離処理部14は、入力階調補正部13から入力されたRGB信号を、そのまま後段の色補正部15及び圧縮処理部20へ出力する。
The input
色補正部15は、領域分離処理部14から入力されたRGB信号をCMYのデジタル信号(以下、CMY信号という)へ変換し、色再現の忠実化実現のために、不要吸収成分を含むCMY色材の分光特性に基づいた色濁りをCMY信号から取り除く処理を行う。次いで、色補正部15は、色補正後のCMY信号を黒生成下地除去部16へ出力する。黒生成下地除去部16は、色補正部15から入力されたCMY信号に基づき、CMY信号から黒色(K)信号を生成する黒生成処理と、CMY信号から黒生成処理で得たK信号を差し引いて新たなCMY信号を生成する処理とを行う。この結果、CMY3色のデジタル信号は、CMYK4色のデジタル信号(以下、CMYK信号という)に変換される。次いで、黒生成下地除去部16は、CMY信号を変換したCMYK信号を空間フィルタ処理部17へ出力する。
The
黒生成処理の一例としては、一般に、スケルトン・ブラックによる黒生成を行う方法が用いられる。この方法では、スケルトン・カーブの入出力特性をy=f(x)、入力されるデータをC,M,Y、出力されるデータをC',M',Y',K'、UCR(Under Color Removal)率をα(0<α<1)とすると、黒生成下地除去処理は、下記の式(1)〜式(4)で表わされる。 As an example of the black generation process, a method of generating black by skeleton black is generally used. In this method, the input / output characteristic of the skeleton curve is y = f (x), the input data is C, M, Y, the output data is C ′, M ′, Y ′, K ′, UCR (Under When the color removal rate is α (0 <α <1), the black generation background removal processing is expressed by the following equations (1) to (4).
ここで、UCR率α(0<α<1)とは、CMYが重なっている部分をKに置き換えてCMYをどの程度削減するかを示すものである。式(1)は、CMYの各信号強度の内の最も小さい信号強度に応じてK信号が生成されることを示している。 Here, the UCR rate α (0 <α <1) indicates how much CMY is reduced by replacing the portion where CMY overlaps with K. Equation (1) indicates that the K signal is generated in accordance with the smallest signal strength among the signal strengths of CMY.
空間フィルタ処理部17は、黒生成下地除去部16から入力されたCMYK信号の画像データに対して、領域分離処理部14から入力された領域識別信号に基づいてデジタルフィルタによる空間フィルタ処理を行い、空間周波数特性を補正することによって、画像のぼやけ又は粒状性劣化を改善する。たとえば、領域分離処理部14により文字に分離された領域に対しては、空間フィルタ処理部17は、文字の再現性を高めるために、高周波成分の強調量が大きいフィルタを用いて空間フィルタ処理を行う。また、領域分離処理部14により網点に分離された領域に対しては、空間フィルタ処理部は、入力網点成分を除去するためのローパス・フィルタ処理を行う。
The spatial filter processing unit 17 performs spatial filter processing using a digital filter on the image data of the CMYK signal input from the black generation background removal unit 16 based on the region identification signal input from the region
次いで、空間フィルタ処理部17は、処理後のCMYK信号を出力階調補正部18へ出力する。出力階調補正部18は、空間フィルタ処理部17から入力されたCMYK信号に対して、画像出力装置3の特性に基づく出力階調補正処理を行い、出力階調補正処理後のCMYK信号を階調再現処理部19へ出力する。階調再現処理部19は、出力階調補正部18から入力されたCMYK信号に対して、領域分離処理部14から入力された領域識別信号に基づいて、中間調処理を行う。たとえば、領域分離処理部14により文字に分離された領域に対しては、階調再現処理部19は、高域周波成分の再現に適した高解像度のスクリーンによる二値化又は多値化の処理を行う。また、領域分離処理部14にて網点に分離された領域に対しては、階調再現処理部19は、階調再現性を重視したスクリーンでの二値化又は多値化の処理を行う。次いで、階調再現処理部19は、処理後の画像データを画像出力装置3へ出力する。
Next, the spatial filter processing unit 17 outputs the processed CMYK signal to the output
圧縮処理部20は、領域分離処理部14から入力された領域識別信号と、RGB信号からなる画像データとに基づき、圧縮ファイルを生成する。圧縮処理部20に入力される画像データは、マトリクス状に配置されている複数の画素で構成されている。この画像データは、前景レイヤと背景レイヤとに分離され、前景レイヤが更に二値画像に変換され、各二値画像がたとえばMMR(Modified Modified READ)で可逆圧縮され、背景レイヤがたとえばJPEG(Joint Photographic Experts Group)で非可逆圧縮される。最後に、可逆圧縮された二値画像及び非可逆圧縮された背景レイヤと、これらを伸張してカラー画像の画像データとなすための伸張情報とが一つのファイルにまとめられる。このファイルが圧縮ファイルとなる。また、この伸張情報としては、圧縮形式を示す情報、及びインデックス・カラー・テーブル等が用いられる。画素毎に生成された領域識別信号の圧縮は、たとえば、可逆圧縮方法であるMMR方式、MR(Modified READ)方式に基づいて行われる。圧縮された画像データ(圧縮画像)は、一旦記憶部6に格納され、たとえば、操作パネル5において、「scan to e-mail」モードが選択されている場合、送信装置4から、電子メールに添付されて、設定された送信先に送信される。
The
(変換処理部の構成)
変換処理部30は、入力された文書画像の情報(以下、入力画像の情報ともいう)に対してフォーマット変換処理を実行する。変換処理部30の詳細について、以下に説明する。図2は変換処理部30の構成を示すブロック図である。変換処理部30は、文字抽出処理部31、ライン抽出処理部32、表領域抽出処理部33、図領域抽出処理部34、表構造化処理部35及びファイル記述部36を備える。
(Configuration of conversion processing unit)
The
文字抽出処理部31は、入力画像に含まれる文字画像を抽出し、その文字画像が示す文字の情報をOCR等により解析する。また、文字抽出処理部31は、各文字の並び方から、1つ以上の文字で構成される文字列を定義する(ここでは、1文字のものも文字列に含むこととする)。更に、文字抽出処理部31は、抽出された文字のサイズや文字の色などの属性を取得する。
The character
ライン抽出処理部32は、入力画像に含まれるライン(線分)を抽出し、各ラインの情報を取得する。ラインの情報は、少なくともラインの抽出された位置(座標)や方向、長さ、幅及び色を含む。表領域抽出処理部33は、ライン抽出処理部32で抽出されたラインの情報から、互いに交差する水平方向のラインと垂直方向のラインからなる集合を表領域として抽出する。図領域抽出処理部34は、入力画像に含まれる図や写真などの領域を抽出して、各領域の情報を取得する。図領域の情報として、少なくとも各図領域を囲む矩形の左上位置及びサイズ(幅、高さ)を含む。表構造化処理部35は、抽出された表領域において、表領域に含まれるラインや、表領域と重複する位置で抽出された文字や図などの要素を用いて表構造を解析し、表を構造化するための情報(表構造情報)を取得する。ファイル記述部36は、表構造の情報や文字、図などの要素、また表に含まれないライン等の情報から、入力画像と同様のレイアウトの文書構造となるように、指定されたファイル形式の記述方法に従ってファイルを記述する。
The line
文字抽出処理部31、ライン抽出処理部32、表領域抽出処理部33、及び表構造化処理部35は、公知の技術を利用してもよい。文字抽出処理部31は、公知のOCR技術により文字及び文字列の抽出を行うことができる。文字列の抽出手法としては、たとえば、表から文字列を抽出する手法(特願2014−174348に記載の技術)を利用することができる。当該手法では、まず、文字抽出処理部31が、OCRにより抽出した文字の文字矩形(外接矩形)を求める。文字抽出処理部31が、求めた各矩形に対し、近傍の矩形同士の距離を算出し、近い矩形同士を同じ文字列のグループとして統合する。このとき、近傍の矩形サイズと比較して、あまりにもサイズが違い過ぎており、かつ、近傍に似たような矩形が存在しない矩形については、非文字矩形として除去する。文字抽出処理部31は、各文字列グループの水平方向のサイズ、垂直方向のサイズを検出し、長い方を文字列の方向として設定する。水平方向のサイズと垂直方向のサイズが同じくらいの場合は、方向が判定できないので、文字列方向不定として設定する。文字抽出処理部31は、同じ方向の近傍文字列でサイズが近いもの、または文字列の開始位置や終了位置が近いもの同士でグループ分けを行って文字列領域とする。
The character
なお、文字抽出処理部31による、文字の抽出及び文字列の抽出は、ライン抽出処理部32の処理の前に行っても、後に行ってもよい。ただし、後述する図領域抽出処理部34による処理は、文字、ライン、表の情報を用いることから、文字抽出処理部31、ライン抽出処理部32、表領域抽出処理部33による処理は、図領域抽出処理部34による処理よりも前に行われている必要がある。
また、文字抽出処理部31が外接矩形を求める際、文字または文字列を含む表の各セルの大きさは既知であり、外接矩形は、セルの大きさを超えないことから、セルの大きさを超えるような外接矩形が得られた場合、セルの範囲以内となるように外接矩形の大きさを補正するようにしてもよい。
The character extraction and character string extraction by the character
Further, when the character
ライン抽出処理部32及び表領域抽出処理部33は、たとえば、参考文献1(特許第5153857号公報)で挙げられる方法によりライン及び表領域を抽出することができる。参考文献1に記載の方法では、文書画像データからラインとなる可能性のある候補画素を抽出し、前記候補画素が水平方向もしくは垂直方向に所定画素数以上連続する場合に、前記連続する候補画素の集合をラインとして抽出する。前記抽出された水平方向及び垂直方向のラインの位置関係から、各ラインが表を構成する罫線であるか単一のラインであるかを判定し、同一の表を構成するラインの集合について、それら全てを囲む最小外接矩形を表領域として抽出する。参考文献2に記載の方法では、ラインを構成する画素(ライン画素)を文書画像中から抽出しているため、ライン画素の画素値の平均値をラインの色として算出することも可能である。また、上記ライン画素の方向と直交する方向(水平方向のラインであれば垂直方向)に並ぶ画素数からラインの太さを算出することができ、たとえば垂直方向に連続するライン画素の平均値をラインの太さとして算出することも可能である。
The line
また、よく知られた方法により、点線や破線を抽出することが可能であり、当該方法と、参考文献1の方法と組み合わせることで、実線以外の線種のラインを抽出することも可能である。たとえば、参考文献2(特開平7−230525号公報)の方法では、二値化された文書画像から、注目する罫線方向(水平または垂直方向)に連結する黒画素を抽出し、それぞれの連結画素を全て内包する矩形を抽出したとき、その大きさが所定の閾値以下である場合に点線要素とし、更に点線要素同士の間隔が所定閾値内である場合にそれらの点線要素同士を統合した矩形を、点線の罫線として抽出することができる。
Moreover, it is possible to extract a dotted line or a broken line by a well-known method, and it is also possible to extract a line type line other than a solid line by combining the method with the method of
また、参考文献3(特開平4−68477号公報)では、二値化された文書画像から黒画素の連結を追跡することで輪郭ベクトルを抽出する。そのうち実線の直線もしくは曲線を構成するものを除いた輪郭ベクトルで囲まれた領域の長軸および短軸の長さの関係から破線候補としての領域を抽出し、得られた破線候補の相互関係を調べることで、同一の破線を構成する破線領域を抽出している。 In Reference 3 (Japanese Patent Laid-Open No. 4-68477), a contour vector is extracted by tracking the connection of black pixels from a binarized document image. The area as the candidate for the broken line is extracted from the relationship between the length of the major axis and the minor axis of the area surrounded by the contour vector excluding the solid line or curved line, and the correlation between the obtained broken line candidates is calculated. By examining, a broken line area constituting the same broken line is extracted.
図領域抽出処理部34については後述する。表構造化処理部35は、たとえば、入力された文書画像と、入力画像から抽出されたラインから水平方向の基準線及び垂直方向の基準線を決定し、2本の隣り合う水平方向の基準線と、2本の隣り合う垂直方向の基準線からなる四角形をそれぞれ仮セルとして定義する。定義された仮セルを、入力画像から抽出された要素の情報をもとに、少なくとも1つ以上の仮セルからなる四角形の集合である結合セル候補として第1の分類を行う。第1の分類が行われた結合セル候補ごとに、入力画像から抽出された要素の情報をもとに、判定基準に従って、結合セル候補に含まれる仮セルを、最も適切とされるセルブロック(少なくとも1つ以上の仮セルからなる四角形の集合)として第2の分類を行う。第2の分類が行われたセルブロックの属性、及び予め抽出されている要素の情報から、表構造を解析し、表を再構成するために参照すべき情報を表構造情報として記述する。
The figure region
これらの表構造情報の具体的な記述方法について、特に決まりは無く、たとえば、図3のようにツリー形状に参照できるように記述しておくと、後述するXML(Extensible Markup Language)形式のファイルフォーマットなどへの変換が容易になる。また、属性の種別ごとに別途リストなどを記述しておき、そのリストで指定されたID(Identification)を参照して情報を取得するようにすることで、同一の属性を何度も繰り返し記述することを避けることができる。たとえば抽出されたラインの情報を図4のようにリストとして記述し、各ラインにID(ラインID)を割り振っておき、図3のように記述されたツリー形状の表構造情報において、各セルブロックの罫線の情報としてラインIDを記述することで、同一のラインを共有する複数のセルブロック間で同一の情報を何度も繰り返して記述する必要が無くなる。記述の順序は特に決まりは無いが、記述の対象となるセルブロックの順序は、親IDの小さい順とし、表の左上から順に情報が記述されるようにすることが望ましい。もちろん、図3及び図4に示された項目以外にも記述する情報を増やしてもよい。 The specific description method of the table structure information is not particularly determined. For example, if it is described so that it can be referred to in a tree shape as shown in FIG. 3, an XML (Extensible Markup Language) format file format described later is used. Conversion to etc becomes easy. In addition, a list or the like is separately described for each attribute type, and information is acquired by referring to an ID (Identification) specified in the list, so that the same attribute is repeatedly described. You can avoid that. For example, the extracted line information is described as a list as shown in FIG. 4, IDs (line IDs) are assigned to the respective lines, and each cell block in the tree-shaped table structure information described as shown in FIG. By describing the line ID as the ruled line information, it is not necessary to repeatedly describe the same information among a plurality of cell blocks sharing the same line. Although the order of description is not particularly determined, it is desirable that the order of cell blocks to be described is in descending order of parent ID, and information is described in order from the upper left of the table. Of course, information to be described may be increased in addition to the items shown in FIGS.
なお、変換したいオフィス文書ファイルの種類によって、後述するファイル記述部36が実行するファイルの記述方法(変換方法)が異なる。たとえば、OfficeOpenXML(OOXML)の規格に準拠するオフィススイート(オフィス業務用ソフトウェアのセット)では、XMLで記述された文書群と、写真やイラストレーション、図形などのバイナリデータを圧縮により1つのファイルとして統合したものをオフィス文書ファイルとして使用する。これに対して、異なる種類のソフトウェア(たとえば文書作成ソフトウェアとプレゼンテーションソフトウェア)の間ではファイルの記述方法は異なり、また、OOXMLと、異なる規格の文書形式(たとえば、OpenDocument Format)では、同じ種類のソフトウェアであってもファイルの記述方法は異なる。
Note that the file description method (conversion method) executed by the
従って、あらゆるファイル形式に容易に対応できるようにするため、表構造化処理部35では、特定のファイル形式に限定されない表構造情報を取得するようにし、後述するファイル記述部36において、前記表構造情報を用いて、指定されたファイル形式に合わせて表を構造化するようにする。このようにすることで、ユーザが、変換処理部30の機能を有する変換処理装置を利用する際に、あるファイル形式で変換した結果を見た後に、異なるファイル形式に変換する場合も、表構造化処理部35を最初から実行しなくても、既に得られている表構造情報を再使用して容易に変換することが可能となる。
Therefore, in order to be able to easily cope with any file format, the table
ファイル記述部36は、前段までに抽出された文字や図などの要素の情報、ラインの情報及び表構造情報を用いて、指定されたファイル形式への変換を行う。ファイル記述部36は、指定されたファイル形式によって記述方法が異なるが、ファイル構造が公開されているファイル形式については、既に得られている表構造情報や要素の情報等を用いて公知の方法により記述することができる。たとえば、Microsoft(登録商標)社が提供する文書作成ソフトウェアである「Microsoft Word 2010」(左記において、Microsoftは登録商標)、またはその後継バージョン(以降、単純にWordと表記する)のファイル形式(docx)が採用するファイルフォーマットであるOOXMLは、ECMA−376、及びISO/IEC 29500として標準化されており、それらの仕様書に記載されたフォーマットに従って記述することでWordのファイルとして構造化することができる。ECMA−376として標準化されたフォーマットは、下記の参考文献4として公開されており、参考文献4に記載のフォーマットに従って記述する。以下では、文書画像中の特に表の構造化に係る部分の処理例を挙げ、詳細の記述方法については省略する。
「参考文献4:ECMA-376, 4th Edition Office Open XML File Formats、[平成27年9月10日検索]、インターネット(URL http://www.ecma-international.org/publications/standards/Ecma-376.htm)」
The
“Reference 4: ECMA-376, 4th Edition Office Open XML File Formats, [searched on September 10, 2015], Internet (URL http://www.ecma-international.org/publications/standards/Ecma-376 .htm) "
図5は、Wordファイルのファイル構造(一部)の一例を示すツリー図である。Wordファイルでは、図5に示すような一連のフォルダ及びファイルをZIP圧縮し、ファイル拡張子をdocxに置き換えることで1つのファイルとしている。図5の1行目の/word/フォルダ以下に、文書を構造化するためのデータを記述したファイルや、文書画像中から抽出されたグラフィックを画像として保存した画像ファイルなどを格納する。たとえば、document.xmlファイルは、ドキュメント本文を構成する文字(列)やグラフィック、表などのオブジェクトを、その情報に従って、WordProcessingMLと呼ばれるマークアップ言語を用いて記述される。たとえば表は、図6に示すように、<w:tbl>を開始宣言、</w:tbl>を終了宣言とするタグの間に記述された情報(以下、この情報を記述1という)に従って、表を構造化する。記述1は、表全体にわたるプロパティなどの情報(以下、この情報を記述2という)と、各行を構造化するための情報(以下、この情報を記述3という)に分かれる。
FIG. 5 is a tree diagram illustrating an example of a file structure (part) of a Word file. In the Word file, a series of folders and files as shown in FIG. 5 are ZIP-compressed and the file extension is replaced with docx to form one file. A file describing data for structuring a document, an image file storing graphics extracted from a document image, and the like are stored in the / word / folder on the first line of FIG. For example, the document.xml file describes objects such as characters (columns), graphics, and tables that make up the document body according to the information using a markup language called WordProcessingML. For example, as shown in FIG. 6, the table is based on information described between tags having <w: tbl> as a start declaration and </ w: tbl> as an end declaration (hereinafter, this information is referred to as description 1). Structuring the table. The
記述3は<w:tr>から</w:tr>の間に記述され、先頭の行から順に行数分反復する。記述3は更に、行全体にわたるプロパティなどの情報(以下、この情報を記述4という)と、各セルを構造化するための情報(以下、この情報を記述5という)に分かれる。記述5は<w:tc>から</w:tc>の間に記述され、先頭(左端)から順に列数分反復する。記述5は更に、セルに関するプロパティなどの情報(以下、この情報を記述6という)と、各セルに格納される要素の集合である段落を構造化するための情報(以下、この情報を記述7という)に分かれる。記述7の<w:p>から</w:p>の間に記述される内容は1つの段落を示す。記述7は、更に、各段落に関するプロパティなどの情報(以下、この情報を記述8という)と、格納される要素を構造化するための情報(以下、この情報を記述9という)に分かれる。
記述9の<w:r>から</w:r>の間に記述される内容は1つのランを示す。ラン毎に、プロパティなどの情報(以下、この情報を記述10という)と要素を示すデータの情報(以下、この情報を記述11という)を記述するため、プロパティなどの情報を共有する要素毎にランに分類する。すなわち、文字列の場合でも、文字色やサイズなどのプロパティが異なる場合はランを分ける。なお、図6において、記述11にあたる<w:t>から</w:t>の間の情報は文字(列)データを記述するものであり、画像を格納する場合は<w:drawing>から</w:drawing>の間に、格納する画像に関する情報を記述する。なお、画像ファイルは図5の/word/mediaフォルダに格納され、/word/rels/document.xml.relsにおいてファイル名と関連づけられたIDをdocument.xmlファイル内で参照することにより、対応するグラフィックを文書ファイル中に貼り付けることができる。図5の各ファイルの詳細、及び具体的な各ファイルの記述方法については参考文献4などのフォーマット仕様書を参照されたい。
The content described between <w: r> and </ w: r> of description 9 indicates one run. For each run, information such as properties (hereinafter referred to as “
なお、各種属性において算出過程を省略するなどにより適切な値が設定されていない場合は、その属性に関するプロパティの記述などを省略し、各種アプリケーションで設定される初期値を使用するようにしてもよい。たとえば、文字色の算出を省略した場合、黒色など予め決められた色を初期値として使うことができる。なお、セルブロックの四辺の罫線について、前述の通り「不定」として与えられている場合、そのセルの辺の罫線情報は設定しない。また、各行において、行を構成する全ての仮セルの上辺もしくは下辺の罫線が、同一のラインにより構成されている場合、セル単位でなく、行単位(図6では記述4にあたる)で上辺もしくは下辺の罫線の情報を一括して設定するようにしてもよい。
If appropriate values are not set for various attributes, such as omitting the calculation process, description of properties related to the attributes may be omitted, and initial values set by various applications may be used. . For example, when the calculation of the character color is omitted, a predetermined color such as black can be used as the initial value. When the ruled lines on the four sides of the cell block are given as “undefined” as described above, the ruled line information on the sides of the cell is not set. Also, in each row, when the ruled lines on the upper side or the lower side of all the temporary cells constituting the row are constituted by the same line, the upper side or the lower side is not a cell unit but a row unit (corresponding to
また、上述した図3において、セルブロックに対応付けられる格納要素(第1要素、第2要素、…)としては、文字や、文字を複数並べて成る文字列に加えて、画像オブジェクトである図、及び写真などがある。これらの情報をどのよう利用するかはファイル記述部36における記述の仕方と変換するファイルフォーマット次第である。例えば、Microsoft(登録商標)社のExcelなどは、セルの中に画像を文字のように記述することができないため、単純に画像オブジェクトを重ねているだけになる。これに対して、Wordであれば、表のセル中に画像オブジェクトを挿入することもできる。したがって、本実施の形態では、変換先のファイルフォーマットにしたがって変換を行うことになる。
In addition, in FIG. 3 described above, as storage elements (first element, second element,...) Associated with cell blocks, in addition to characters and character strings formed by arranging a plurality of characters, FIG. And photos. How to use these pieces of information depends on the description method in the
図7は、図領域抽出処理部34(図領域抽出装置)の構成を示すブロック図である。図領域抽出処理部34は、非文字列マップ生成処理部341、非文字列エリア追加処理部342、オブジェクトマップ生成処理部343、及び有効オブジェクトエリア判定処理部344を備える。
FIG. 7 is a block diagram showing the configuration of the figure area extraction processing unit 34 (figure area extraction apparatus). The figure region
非文字列マップ生成処理部341は、入力画像に対してエッジ検出処理を行い、得られたエッジ検出結果に対し、文字抽出処理部31で抽出された文字から構成される文字列領域を排除することにより、残されたエッジ領域を非文字列マップとして生成する。非文字列エリア追加処理部342は、文字抽出処理部31で抽出された文字から構成された文字列領域を除いた領域に対して画像のヒストグラムエントロピー値を算出し、エントロピー値の高い領域を非文字列エリアとして非文字列マップに追加する。オブジェクトマップ生成処理部343は、非文字列エリアが追加された非文字列マップに対して表のライン領域の除去処理、ラベリング処理、矩形化処理を行い、オブジェクトマップを生成する。有効オブジェクトエリア判定処理部344は、オブジェクトマップ生成処理部343で生成されたオブジェクトマップ上の各オブジェクトに対し、必要に応じて矩形領域の統合・分割処理を行い、最終的にフォーマット変換処理時に変換すべき画像オブジェクトであるかを判定し、変換すべき画像オブジェクトと判定した場合はそのオブジェクトエリアをマップ上に残し、変換すべきでないと判定した場合にはそのオブジェクトエリアをマップ上から削除する。
The non-character string map
以下では、図領域抽出処理部34の各処理部について図8の表画像400と図9,12,15,19のフローチャートを用いながら詳述する。図8の表画像400における表において、四角とハートは便宜上網掛けにしているが、実際には写真のように適度な濃度変化があり、また、図形の外周のエッジ強度が弱いものであるとする。非文字列マップ生成処理部341は、図9のフローチャートに示すように、まず、入力画像に対してエッジ検出処理を行う(ステップSa1)。エッジ検出の方法としては、たとえば、SobelフィルタやPrewittフィルタなどの1次微分フィルタや、ラプラシアンフィルタなどの2次微分系のフィルタを用いて検出を行う。ここでは一例として、ラプラシアンフィルタを用いてRGB値のG値に対してエッジ検出を行う方法について説明する。図10(a)は3×3サイズのラプラシアンフィルタである。フィルタ処理を行う注目画素の水平座標位置をx、垂直座標位置をyとし、注目画素のG値をp_g(x,y)と表すとき、ラプラシアンフィルタ処理結果p’_g(x,y)は以下の式(5)によって表される。
Hereinafter, each processing unit of the figure region
式(5)に従って、図10(b)の太線で囲まれた領域内にある各画素のG値に対して図10(a)のラプラシアンフィルタによるエッジ強度検出処理を行った結果が図10(c)である。なお、ラプラシアンフィルタの計算では±の値が出てくるが、ここでは絶対値を取ることで処理結果がプラスの値のみになるようにしている。 The result of performing the edge intensity detection processing by the Laplacian filter of FIG. 10A on the G value of each pixel in the region surrounded by the thick line of FIG. c). In the calculation of the Laplacian filter, a value of ± appears, but here the absolute value is taken so that the processing result becomes only a positive value.
更に、このエッジ強度検出結果に対し、非文字列マップ生成処理部341は、予め定められた閾値を用いて閾値よりも大きいエッジ強度を持つ画素のみエッジ画素として検出する(ステップSa2)。たとえば、閾値を50と設定し、エッジ強度が50よりも大きい画素をエッジ画素として1を設定し、それ以外の画素を0とした結果が、図10(d)である。このエッジ検出結果に対し、非文字列マップ生成処理部341は、文字抽出処理部31で定義された文字列領域に存在するエッジ検出結果を排除する(ステップSa3)。たとえば、図8の表画像400に対するエッジ検出結果が、図11(a)の表画像401であり、文字抽出処理部31で定義された文字列領域が図11(b)の表画像402における黒く塗られた部分だとすると、エッジ検出結果に対し、文字抽出処理部31で定義された文字列領域に存在するエッジ検出結果を排除した結果は、図11(c)のようになる。表画像全体に対し、このような処理を行った結果が非文字列マップ403である。
Further, for this edge strength detection result, the non-character string map
次に、非文字列エリア追加処理部342は、図12に示すフローチャートにしたがって、非文字列マップ生成処理部341によるエッジ検出処理に基づいては抽出できない写真などのオブジェクトを非文字列エリアとして抽出し、非文字列マップに追加する。文書画像の所定局所領域毎に画素値の出現頻度(即ち、ヒストグラム)を求めた場合に、図領域の一つである写真領域上の各画素では輝度変化が広範囲に及ぶヒストグラムが得られることを利用して、ヒストグラムのエントロピー(平均情報量)を輝度変化情報として算出する。例えば、非文字列エリア追加処理部342は、11×11画素のエリアを1つの局所領域とみなし、この領域内でのヒストグラムを算出する(ステップSb1)。次いで、非文字列エリア追加処理部342は、このヒストグラムのエントロピー値を算出する(ステップSb2)。なお、ヒストグラムを求める際には、文字抽出処理部31で抽出された文字から構成された文字列領域を排除した画素のみでヒストグラムを求めることで、文字のエントロピー値が算出されることを極力抑えることができる。ヒストグラムのエントロピーは次式(6)で求められる。
Next, the non-character string area
式(6)において、Lはヒストグラムの階調数(8ビットならばL=256)を表し、h(i)は階調iの度数、Nはヒストグラムカウント対象の画素数、p(i)はh(i)をNで正規化した値である。以上で求められたエントロピー値が高い領域を抽出することで精度よく写真領域を抽出することが可能となる。その為に、非文字列エリア追加処理部342は、予め定められた閾値(たとえば、35程度の値)を超えるエントロピー値の画素領域のみを1とし、それ以外を0とする(ステップSb3)。図13は、非文字列エリア追加処理部342が、ヒストグラムエントロピーによる非文字列エリア検出処理を図8の表画像400に対して行った結果である非文字列エリア404を示す例である。非文字列エリア404を検出した場合、非文字列エリア追加処理部342は、非文字列マップ403に非文字列エリア404を追加する(ステップSb4)。図11(c)の非文字列マップ403に図13の非文字列エリア404を追加した結果が、図14に示す非文字列マップ405である。
In Equation (6), L represents the number of gradations in the histogram (L = 256 if 8-bit), h (i) is the frequency of gradation i, N is the number of pixels to be counted, and p (i) is This is a value obtained by normalizing h (i) by N. By extracting a region having a high entropy value obtained as described above, it is possible to accurately extract a photographic region. For this purpose, the non-character string area
次に、オブジェクトマップ生成処理部343は、図15に示すフローチャートにしたがって、まず、ライン抽出処理部32で判定された表領域のラインの除去処理を行う(ステップSc1)。図8の表画像400を表領域と判定し、ライン抽出により各罫線をラインとして抽出できているとする。オブジェクトマップ生成処理部343は、図16のように、図14の更新された非文字列マップ405から表領域のラインを削除する。なお、図16に示すライン削除後の非文字列マップ406では、削除された跡がわかりやすいように削除されたラインを点線で示しているが、実際には、当該点線は存在しない。このように非文字列マップ405に対して表の罫線を除去する処理を行うことによって、表の罫線に画像オブジェクトが接触したり重畳したりしている場合でも、表の罫線から切り離し、画像オブジェクト領域だけを抽出することが可能となる。
Next, according to the flowchart shown in FIG. 15, the object map
次に、オブジェクトマップ生成処理部343は、ラベリング処理を行う(ステップSc2)。上下左右斜めに接続している画素は同一のラベルとすることを条件として、ラベリング処理を行う。ラベリングの手法としては一般的な手法で構わない。図17に、図16の非文字列マップ406に対してラベリング処理を行った結果の例を示す。オブジェクトマップ生成処理部343により、四角がラベル201に、丸の外側のラインがラベル202に、丸の内側のラインがラベル203に、三角がラベル204に、ハートがラベル205に、スターの外側のラインがラベル206に、スターの内側のラインがラベル207にラベル付けされる。
Next, the object map
オブジェクトマップ生成処理部343は、ラベル付けした各オブジェクトに対し、各画素の座標情報を比較し、ラベル毎の座標の水平・垂直方向それぞれの最小値と最大値を求める。オブジェクトマップ生成処理部343は、求めた最大値と最小値を頂点に持つ矩形領域(最小値が矩形領域の左上、最大値が矩形領域の右下の頂点を表す)の値を1とすることで図18に示すようにラベル付けした各オブジェクト領域を矩形化処理する(ステップSc3)。その際、オブジェクトマップ生成処理部343は、各ラベルの最大値座標と最小値座標を比較する。これにより、ラベル203の矩形領域はラベル202の矩形領域に包含されることがわかるので、オブジェクトマップ生成処理部343は、ラベル203を、ラベル202に統合する。同様に、ラベル207の矩形領域はラベル206の矩形領域に包含されることがわかるので、オブジェクトマップ生成処理部343は、ラベル207をラベル206に統合する。このようにして、オブジェクトマップ生成処理部343は、ラベル201、ラベル202、ラベル204、ラベル205、ラベル206の5つの矩形領域を作成する。
The object map
なお、ライン抽出処理で抽出された表以外の罫線を画像オブジェクトとして扱う場合には、矩形化処理された画像オブジェクトからなるオブジェクトマップに対し、罫線も画像オブジェクトとして追加しても構わない。また、ライン抽出処理で抽出された表以外の罫線を画像オブジェクトとしてではなく、ベクター情報として扱うのであれば、オブジェクトマップは矩形化処理された画像オブジェクトのみとなる。 When a ruled line other than the table extracted by the line extraction process is handled as an image object, the ruled line may be added as an image object to the object map including the image object subjected to the rectangularization process. Further, if ruled lines other than the table extracted by the line extraction processing are handled as vector information instead of image objects, the object map is only the rectangular image processing object.
上記のように、非文字列マップ生成処理部341が、輝度変化の高いイラストなどの線画やグラフなどの図はエッジベースで抽出する。エッジ強度がそれほど強くないが輝度変化のある写真などの画像領域については、非文字列エリア追加処理部342が、ヒストグラムエントロピーに基づいて抽出する。これにより、オブジェクトマップ生成処理部343は、様々なタイプの画像オブジェクトを幅広く抽出することが可能となる。また、一部が抽出できていなくても、図形や写真は矩形であることが多いので、ラベリングと矩形化処理を行うことで、図形や写真の一部の抽出抜けを防ぐことが可能となる。
As described above, the non-character string map
次に、有効オブジェクトエリア判定処理部344は、図19のフローチャートに示すように、まず、オブジェクトマップ生成処理部343で生成されたオブジェクトマップ上の各オブジェクトに対し、必要に応じて矩形領域の統合・分割処理を行う(ステップSd1)。図18の例の場合、表中の画像オブジェクトのみで矩形が区切られていたので統合・分割処理は、必要ない。実際には、表中の画像オブジェクトだけに関わらず、表の外にも画像オブジェクトが存在することもあり、入力画像の画像オブジェクトの形状や配置によっては、画像オブジェクトの矩形領域の一部同士が重なっていたり、画像オブジェクトの矩形領域が文字列と重なっていたり、画像オブジェクトの矩形領域の一部が表と重なっていたり、といったことが起こり得る。このような場合に、矩形領域の統合処理や分割処理を行う。
Next, as shown in the flowchart of FIG. 19, the effective object area
例えば、図20に示す、画像オブジェクト501,502のように、矩形領域同士が一部重なっている場合、有効オブジェクトエリア判定処理部344は、再度ラベリング処理を行い、座標の最大値と最小値を算出し、矩形化処理を行う。これにより、重なり合っていた2つの画像オブジェクト501,502の矩形領域が1つの矩形領域504に統合される。これにより、ファイルフォーマット変換処理時に、画像オブジェクトの上から別の画像オブジェクトを重ねて見栄えが悪くなったり、重複している分、ファイルサイズが大きくなったりすることを防ぐことが可能となる。
For example, when the rectangular areas partially overlap each other like the image objects 501 and 502 shown in FIG. 20, the valid object area
また、図21のように、画像オブジェクト501の矩形領域に文字列301が重なっている場合に、文字列301の一部だけが画像オブジェクトになるとフォーマット変換後のレイアウトで一部フォント、一部画像といった具合になる。すなわち、図21の例では、最下層のレイヤから順に、文字のオブジェクト、表のオブジェクト、ラインのオブジェクト、画像オブジェクトの順に重なっており、画像オブジェクト501と重なっている部分の文字列301の部分と、画像オブジェクト501と重なっていない部分の文字列301の部分を分けて情報を格納したとする。このとき、画像オブジェクト501と重なっている部分の文字列301は、画像オブジェクト501に含まれる単なるイメージとしての文字画像として格納されることになる。このように格納された情報を、再構成する場合、画像オブジェクト501と重なっていない文字列301の部分は、他のフォントで置き換えられることもある。その場合、画像オブジェクト501で表示された文字画像と重ね合わせた結果、フォントや大きさが異なってしまう場合があり、見栄えが悪くなる。 In addition, as shown in FIG. 21, when the character string 301 overlaps the rectangular area of the image object 501, if only a part of the character string 301 becomes an image object, a partial font and a partial image are used in the layout after format conversion. And so on. In other words, in the example of FIG. 21, the character object, the table object, the line object, and the image object overlap in order from the lowest layer, and the character string 301 that overlaps the image object 501 Assume that information is stored by dividing a portion of the character string 301 that does not overlap the image object 501. At this time, the character string 301 of the portion overlapping the image object 501 is stored as a character image as a simple image included in the image object 501. When the information stored in this way is reconstructed, the portion of the character string 301 that does not overlap the image object 501 may be replaced with another font. In that case, as a result of overlapping with the character image displayed on the image object 501, the font and size may be different, and the appearance will be deteriorated.
有効オブジェクトエリア判定処理部344は、図21のような場合、文字列301の矩形座標と画像オブジェクト501の矩形座標を比較し、画像オブジェクト501,502同士の重なりのときと同様に座標の最大値と最小値を算出し、矩形化処理を行う(ステップSd2)。この処理により、画像オブジェクト501と重なっていない部分の文字列301は、文字列301を含んだ画像オブジェクト503の矩形領域に統合される。なお、この統合により、文字列301自体がなくなるわけではなく、文字列301自体はフォーマット変換時に画像オブジェクト501の下に配置されることになるため、画像オブジェクト504に統合された文字列も、テキスト検索など、テキストデータして使用可能である。これにより、ファイルフォーマット変換処理時に、フォントに変換された文字列301の上から別の画像オブジェクト501内にある文字画像を重ねて文字の書体や大きさが変化し見栄えが悪くなってしまうことを防ぐことが可能となる。
In the case shown in FIG. 21, the valid object area
また、図22のように、画像オブジェクト505の矩形領域が表領域410と重なっている場合がある。この場合、有効オブジェクトエリア判定処理部344は、画像オブジェクト505の矩形領域の座標と表領域410の座標とを比較して重なっている範囲を抽出し、画像オブジェクト505の矩形領域から重なっている表領域410を削除する。更に、有効オブジェクトエリア判定処理部344は、表領域410の外枠のラインの延長上に沿って、画像オブジェクト505の残った領域に対し、分割処理を行う(ステップSd3)。これにより、有効オブジェクトエリア判定処理部344は、矩形化された画像オブジェクト505の領域と表領域410が重なった際にも画像オブジェクト505の重なっている領域を画像オブジェクト505の分割により排除し、表領域410に重なって表領域410の一部が見えなくなることを回避可能となる。すなわち、ファイルフォーマット変換処理時に、表領域410の上に画像オブジェクト505が重ねられて、表領域410の一部が見えなくなってしまうことを防ぐことが可能となる。
Further, as shown in FIG. 22, the rectangular area of the image object 505 may overlap the table area 410. In this case, the effective object area
図22の例では表領域410の水平方向の外枠のラインの延長線上に沿って画像オブジェクト505の残った領域を画像オブジェクト506,507に分割している例を示している。なお、画像オブジェクトの残った領域の分割は、表領域410の外枠ラインの水平方向ではなく、垂直方向の外枠のラインの延長線上に沿って分割しても構わないし、水平垂直両方とも分割しても構わない。また、分割する際はたとえば2画素分の領域で分割を行い、あとでこのオブジェクトエリア判定結果を用いて画像オブジェクト505を切り出す際には、矩形領域から全体に1画素分膨張させた領域を切り出すことによって、分割された画像オブジェクト506,507が見た目には2つに分割されたようには見えずにフォーマット変換可能となる。 In the example of FIG. 22, the remaining area of the image object 505 is divided into image objects 506 and 507 along the extended line of the outer frame line in the horizontal direction of the table area 410. Note that the remaining area of the image object may be divided not along the horizontal direction of the outer frame line of the table area 410 but along the extension line of the vertical outer frame line, or both horizontal and vertical may be divided. It doesn't matter. Further, when dividing, for example, the image is divided into areas of two pixels, and when the image object 505 is cut out later using the object area determination result, the area expanded by one pixel from the rectangular area is cut out. As a result, the divided image objects 506 and 507 can be format-converted without seemingly being divided into two.
このようにして得られた各画像オブジェクト504,503,506,507の矩形領域に対し、有効オブジェクトエリア判定処理部344は、再ラベリングを行って矩形化処理を行う(ステップSd4)。このとき、有効オブジェクトエリア判定処理部344は、予め定められた面積未満の矩形領域については画像オブジェクトとしてはふさわしくない大きさとして、キャンセル処理を行ってもよい。例えば、300dpiの入力画像を75dpiに解像度変換処理し、75dpiの画像サイズで矩形化処理をした場合、矩形領域の横のサイズが30画素未満、または、矩形領域の縦のサイズが30画素未満、または、矩形領域の面積が900画素未満の矩形領域については画像オブジェクトとしなくてもよい。また、矩形領域の面積に対し、実際にラベリングされたオブジェクト領域の画素数が25%未満の矩形領域については画像オブジェクトとしなくてもよい。ただし、分割処理された画像オブジェクトに対しては、分割前の大きさも考慮して画像オブジェクトにするかどうかを判定する。
For the rectangular regions of the image objects 504, 503, 506, and 507 obtained in this way, the valid object area
以上の処理を行い、有効オブジェクトエリア判定処理部344は、最終的に残った画像オブジェクトの領域を有効オブジェクトエリアとして判定する(ステップSd5)。有効オブジェクトエリア判定処理部344は、有効オブジェクトエリアと判定した情報に従って、入力画像から画像オブジェクトを切り出すことで、表内にある画像オブジェクトはもとより、他の画像オブジェクトも精度よく切り出すことが可能となり、フォーマット変換した際にも、見栄えの良い結果を得ることが可能となる。
By performing the above processing, the effective object area
上記の実施の形態1の構成により、文字列領域情報と、線分情報と、表領域情報と、ヒストグラムエントロピーによる輝度変化情報とを用いることで、表外にある画像オブジェクト領域はもとより、表内に存在する画像オブジェクト領域の抽出をも行うことが可能となる。また、矩形化された画像オブジェクト領域と表領域が重なった際にも画像オブジェクトの重なっている領域を排除し、表が重なって見えなくなることを回避可能となる。したがって、表のセルの中に画像など文字以外のオブジェクトが存在する場合でも、そのオブジェクトを文字として誤って抽出することなく、正しくオブジェクトを抽出して変換し、表の中にそのオブジェクトを正しく配置することが可能となる。 By using the character string region information, the line segment information, the table region information, and the luminance change information based on the histogram entropy, the configuration of the first embodiment described above allows not only the image object region outside the table but also the inside of the table. It is also possible to extract the image object area existing in the. Further, even when the rectangular image object area and the table area overlap, it is possible to eliminate the area where the image object overlaps and prevent the table from overlapping and becoming invisible. Therefore, even if an object other than a character such as an image exists in a table cell, the object is correctly extracted and converted without accidentally extracting the object as a character, and the object is correctly placed in the table. It becomes possible to do.
また、上述したように、ファイル記述部36による、各オブジェクトを重ね合わせる順は、最下層から文字領域のオブジェクト、表領域のオブジェクト、線分領域のオブジェクト、画像オブジェクトの順である。線分のオブジェクトは、画像オブジェクトの一部として扱われることもあるため、線分領域のオブジェクトと画像オブジェクトの順が入れ替わってもよい。このように、文字領域のオブジェクトを一番下にすることで、画像オブジェクトと重なった場合に、重なった文字領域は画像オブジェクトに統合された文字画像で表示されることで見栄えが良くなり、検索ではOCRされた文字情報で検索可能な状態にすることができる。また、表領域と重なった画像オブジェクトは分割されているので、表領域が画像オブジェクトの下にあっても、表領域が隠れるようなことはない。
Further, as described above, the order in which the objects are overlapped by the
なお、上記の実施の形態1における図領域抽出処理部34の非文字列マップ生成処理部341、非文字列エリア追加処理部342、オブジェクトマップ生成処理部343、及び有効オブジェクトエリア判定処理部344において、文字抽出処理部31により抽出された文字列を扱うようにしているが、本発明の構成は、当該実施の形態に限られない。文字列だけでなく、文字抽出処理部31により抽出される文字を対象に処理を行ってもよい。文字列として抽出する場合に比べて、文字として抽出する場合、抽出の精度によって、文字の一部が抽出できなかったり、句読点等を抽出できなかったりする恐れがあるものの、図領域抽出処理部34における処理を、文字列として処理しても、文字として処理をしても同様の作用効果を奏する。
また、上記の実施の形態1では、文字抽出処理部31は、文字列領域、または上記の文字領域を抽出する際に、その領域として、外接矩形を求めるようにしているが、本発明の構成は、当該実施の形態に限られない。文字列領域、または文字領域として、外接矩形に限らず、曲線が一部に含まれる形状、たとえば、外接する円や外接する楕円などであってもよい。
Note that in the non-character string map
In the first embodiment, the character
また、上記の実施の形態1における非文字列エリア追加処理部342において、全ての領域においてヒストグラムを求めて、エントロピーを算出するのではなく、不明な領域に対してのみ行うようにしてもよい。例えば、エッジ検出により検出した表領域を除いた残りの表領域についてのみヒストグラムを求めて、エントロピーを算出するようにしてもよい。
また、上記の実施の形態1において、非文字列エリア追加処理部342が、ヒストグラムエントロピーを求める場合、隣接する画像オブジェクトの距離が近い場合、1つの画像オブジェクトとみなしてしまう場合がある。この場合、各々の画像オブジェクトは、多くの場合、1つのセルに含まれていることから、非文字列エリア追加処理部342が、セルの境界を示す情報を参照して、各々のオブジェクトを明確に分離して、ヒストグラムエントロピーを求めるようにしてもよい。
Further, in the non-character string area
In the first embodiment, when the non-character string area
また、上記の実施の形態1において、非文字列エリア追加処理部342が、求める輝度変化情報は、エントロピーに限られるものではなく、他の指標であってもよい。
ここで、輝度変化情報の変形例について説明する。
図24は、輝度変化情報の変形例を説明するための図である。
図24に示す例において、画像Pは、文字列と、画像オブジェクトとを含む。非文字列エリア追加処理部342は、例えば、注目画素に対応する局所領域(例えば、11[pixel]×11[pixel]の領域)のヒストグラムを求め、その度数が所定の閾値T(例えば、度数5)以上である階調値(ビン)の中からピークの度数を示す階調値を抽出する。次に、非文字列エリア追加処理部342は、ピークの周囲において、その度数が閾値T以上で連続している階調値を抽出し、抽出した一連の階調値の幅(階調幅)を輝度変化情報として使用する。そして、非文字列エリア追加処理部342は、この階調幅が所定の階調数(例えば、48階調)の幅(基準幅SW)以上である場合、写真領域であるとして非文字列エリアに追加してもよい。
In the first embodiment, the luminance change information that the non-character string area
Here, a modified example of the luminance change information will be described.
FIG. 24 is a diagram for explaining a modification of the luminance change information.
In the example shown in FIG. 24, the image P includes a character string and an image object. For example, the non-character string area
具体的には、例えば、図24において、画像Pのうち、写真を含む局所領域A1の場合、ピークBに係る階調幅WBは基準幅SWよりも大きいため、局所領域A1は写真オブジェクトの領域であると判定される。これに対して、画像Pのうち、写真も文字列も含まない局所領域A2や、文字列を含む局所領域A3の場合、各局所領域に現れるピークC、D、Eに係る階調幅WC、WD、WEは、いずれも基準幅SWに満たないため、局所領域A2、A3は、写真オブジェクトの領域でないと判定される。このように、エントロピーだけでなく、各ピークに係る階調幅を、輝度変化情報として用いてもよい。 Specifically, for example, in FIG. 24, in the case of a local region A1 including a photograph in the image P, the gradation width WB related to the peak B is larger than the reference width SW, and thus the local region A1 is a region of a photographic object. It is determined that there is. On the other hand, in the case of the local region A2 that does not include a photograph or a character string or the local region A3 that includes a character string in the image P, the gradation widths WC and WD related to the peaks C, D, and E appearing in each local region. , WE are less than the reference width SW, and it is determined that the local areas A2 and A3 are not photographic object areas. In this way, not only entropy but also the gradation width related to each peak may be used as the luminance change information.
また、上記の実施の形態1において、オブジェクトマップ生成処理部343は、1つのセルの中に、重複しない矩形領域が存在する場合、2つの矩形領域として処理しているが、本発明の構成は、当該実施の形態に限られず、1つのセル内の矩形領域を1つに統合するようにしてもよい。
また、上記の実施の形態1において、有効オブジェクトエリア判定処理部344は、表領域に文字列領域が重なっている場合、表領域に画像オブジェクトが重なっている場合と同様の処理を文字列領域に適用するようにしてもよい。
In
In the first embodiment, the valid object area
なお、実施の形態1、及び以下に記載する実施の形態2,3において、閾値等の予め定める数値以上か否かの判定は、一例であり、予め定める数値の大きさによっては、予め定める数値を超えるか否かの判定であってもよく、また、予め定める数値以下か否かの判定についても、予め定める数値の大きさによっては、予め定める数値未満か否かの判定であってもよい。 In the first embodiment and the second and third embodiments described below, the determination as to whether or not the threshold value or the like is greater than or equal to a predetermined numerical value is an example, and depending on the size of the predetermined numerical value, a predetermined numerical value may be used. It may also be a determination as to whether or not the value exceeds a predetermined value, and the determination as to whether or not the value is less than or equal to a predetermined value may also be a determination as to whether or not the value is less than a predetermined value depending on the size of the predetermined value. .
〔実施の形態2〕
上記の実施の形態1では、本発明に係る変換処理装置を変換処理部30として、画像形成装置100が有する画像処理装置1に適用した構成について説明したが、本発明の構成は、これに限るものではない。実施の形態2では、本発明に係る変換処理装置を変換処理部30として、フラットベッドスキャナ等の画像読取装置100aが有する画像処理装置1aに適用した例について説明する。
なお、実施の形態1の説明に用いた図面に記載されている部材と同じ機能を有する部材については、以下の説明においても同じ符号を付記する。また、それらの各部材の詳細な説明はここでは繰り返さない。
[Embodiment 2]
In the first embodiment described above, the configuration in which the conversion processing apparatus according to the present invention is applied to the
In addition, about the member which has the same function as the member described in drawing used for description of
図23は、実施の形態2に係る画像処理装置1aを備える画像読取装置100a(情報処理装置)の構成を示すブロック図である。図23に示すように、画像読取装置100aは、画像処理装置1a、画像入力装置2、送信装置4、記憶部6、及び操作パネル5を備えている。画像処理装置1aは、A/D変換部10、シェーディング補正部11、原稿種別判別部12、入力階調補正部13、領域分離処理部14、圧縮処理部20、及び変換処理部30(変換処理装置)を備えている。当該変換処理部30により、実施の形態1において説明したのと同様に、指定されたファイル形式に変換されたファイルが出力される。画像読取装置100aで実行される各種処理は、画像読取装置100aに備えられる図示しない制御部(CPU(Central Processing Unit)あるいはDSP(Digital Signal Processor)等のプロセッサを含むコンピュータ)により制御される。実施の形態2では、画像読取装置100aは、スキャナに限定されることはなく、たとえば、デジタルスチルカメラ、書画カメラ、あるいは、カメラを搭載した電子機器類(たとえば、携帯電話、スマートフォン、タブレット端末等)であってもよい。
FIG. 23 is a block diagram illustrating a configuration of an image reading apparatus 100a (information processing apparatus) including the image processing apparatus 1a according to the second embodiment. As shown in FIG. 23, the image reading apparatus 100a includes an image processing apparatus 1a, an
〔実施の形態3〕
実施の形態1及び2において、本発明に係る変換処理装置を変換処理部30として、画像形成装置100、または画像読取装置100aが有する画像処理装置1、1aに適用する例を示したが、本発明の構成は、これに限るものではない。本発明に係る変換処理装置を、たとえばサーバ装置に適用してもよい。この場合のサーバ装置の構成の一例は、画像形成装置100、または画像読取装置100aにより画像読取及び各種画像処理が施された文書画像をネットワークを介して受信する受信装置と、実施の形態1にて説明した変換処理部での処理を実行する変換処理装置と、当該変換処理装置が備えるファイル記述部から出力された文書ファイルを、ネットワークを介して送信する送信装置と、を備えたサーバ装置(情報処理装置)である。このようにサーバ装置を構成することにより、画像形成装置100、または画像読取装置100aにより画像読取及び各種画像処理が施された文書画像を、ネットワークを経由して受信して、前記の変換処理部での処理を実行する変換処理装置により文書ファイルを作成し、出力されたファイルをユーザの端末装置(たとえば、パーソナルコンピュータやタブレット端末等)に送信する、という使い方が可能となる。また、このサーバ装置により、既に設置された画像形成装置あるいは画像読取装置を交換することなく、フォーマット変換機能を利用することが可能となる。
[Embodiment 3]
In
また、前記変換処理装置を、ファイル記述部36を除いて構成し、文書を構造化するための各種情報を作成し、ネットワークを介して送信するようにしても良い。この場合、ファイル記述部36が実行する処理手段を、前記各種情報を受信した前記端末装置側が実行することで、文書の構造化に必要な各種情報の取得を何度も繰り返すことなく、所望のファイルへの変換をスムーズに実行することができるので、操作ミスにより誤ったファイル形式を指定してしまった場合や、指定したファイル形式の変換結果に満足できない場合などに、異なるファイル形式に変換し直すことが容易となる。
Further, the conversion processing device may be configured without the
実施の形態1、2、3における画像処理装置1、1a(特に、変換処理部30)やサーバ装置(特に、変換処理装置)は、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェアによって実現してもよい。後者の場合、画像処理装置1、1aやサーバ装置は、各機能を実現するソフトウェアであるプログラムの命令を実行するCPU、前記プログラム及び各種データがコンピュータ(又はCPU)で読み取り可能に記録されたROM(Read Only Memory)又は記憶装置(これらを「記録媒体」と称する)、前記プログラムを展開するRAM(Random Access Memory)等を備えている。そして、コンピュータ(又はCPU)が前記プログラムを前記記録媒体から読み取って実行することにより、本発明の目的が達成される。前記記録媒体としては、「一時的でない有形の媒体」、たとえば、テープ、ディスク、カード、半導体メモリ、プログラマブルな論理回路等を用いることができる。また、前記プログラムは、該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して前記コンピュータに供給されてもよい。なお、本発明は、前記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。なお、前記した画像処理装置1、1a及び画像処理方法は、カラーの画像データを扱う構成としたが、これに限るものではなく、白黒の画像データを扱う構成であってもよい。
The
本発明は上述した各実施の形態に限定されるものではなく、種々の変更が可能である。すなわち、本発明の要旨を逸脱しない範囲内において適宜変更した技術的手段を組み合わせて得られる実施の形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the above-described embodiments, and various modifications can be made. That is, embodiments obtained by combining technical means appropriately changed within the scope not departing from the gist of the present invention are also included in the technical scope of the present invention.
30 変換処理部
31 文字抽出処理部
32 ライン抽出処理部
33 表領域抽出処理部
34 図領域抽出処理部
35 表構造化処理部
36 ファイル記述部
341 非文字列マップ生成処理部
342 非文字列エリア追加処理部
343 オブジェクトマップ生成処理部
344 有効オブジェクトエリア判定処理部
30
Claims (11)
前記文書画像情報に存在する線分を抽出するライン抽出処理部と、
前記ライン抽出処理部より抽出される前記線分の情報を用い、表領域を抽出する表領域抽出処理部と、
前記文書画像情報に対して、予め定められる局所領域を設定し、前記局所領域の輝度ヒストグラムを作成して前記局所領域の輝度変化情報を求め、前記輝度変化情報と、前記文字抽出処理部より抽出される前記文字領域の情報と、前記ライン抽出処理部より抽出される線分の情報と、前記表領域抽出処理部より抽出される表領域の情報と、を用いて前記表領域の外、または前記表領域の中に存在する図、または写真を含む画像オブジェクト領域の抽出を行う図領域抽出処理部と、
前記表領域における前記文字領域の情報、前記線分の情報、および前記画像オブジェクト領域の情報をもとに表構造を解析し、表を再構成する表構造情報を取得する表構造化処理部と、
を備えることを特徴とする変換処理装置。 A character extraction processing unit for extracting a character region existing in the document image information;
A line extraction processing unit for extracting a line segment existing in the document image information;
A table region extraction processing unit for extracting a table region using the line segment information extracted from the line extraction processing unit;
A predetermined local region is set for the document image information, a luminance histogram of the local region is created to determine luminance change information of the local region, and the luminance change information and the character extraction processing unit extract The outside of the table area using the information on the character area, the line segment information extracted from the line extraction processing section, and the table area information extracted from the table area extraction processing section, or A diagram area extraction processing unit for extracting an image object area including a picture or a photograph existing in the table area;
A table structuring processing unit that analyzes the table structure based on the information on the character area in the table area, the information on the line segment, and the information on the image object area, and acquires table structure information for reconfiguring the table; ,
A conversion processing apparatus comprising:
前記図領域抽出処理部は、
前記文書画像情報に対して、予め定められる局所領域を設定し、前記局所領域の輝度ヒストグラムを作成して前記局所領域の輝度変化情報を求め、前記輝度変化情報と、前記文字抽出処理部より抽出される前記文字列領域の情報と、前記ライン抽出処理部より抽出される線分の情報と、前記表領域抽出処理部より抽出される表領域の情報と、を用いて前記表領域の外、または前記表領域の中に存在する図、または写真を含む画像オブジェクト領域の抽出を行い、
前記表構造化処理部は、
前記表領域における前記文字列領域の情報、前記線分の情報、および前記画像オブジェクト領域の情報をもとに表構造を解析し、表を再構成する表構造情報を取得する
ことを特徴とする請求項1に記載の変換処理装置。 The character region extracted from the document image information by the character extraction processing unit includes a character string region including a character string,
The figure region extraction processing unit
A predetermined local region is set for the document image information, a luminance histogram of the local region is created to determine luminance change information of the local region, and the luminance change information and the character extraction processing unit extract Using the information on the character string region, the line segment information extracted from the line extraction processing unit, and the table region information extracted from the table region extraction processing unit. Or, extract the image object area including the figure or photo that exists in the table area,
The table structuring processing unit
Analyzing the table structure based on the information on the character string area in the table area, the information on the line segment, and the information on the image object area, and obtaining table structure information for reconfiguring the table. The conversion processing apparatus according to claim 1.
をさらに備えることを特徴とする請求項2に記載の変換処理装置。 Order of the character string area object, the table area object, the line segment object, the image object, or the character string area object, the table area object, the image object, the line object The conversion processing apparatus according to claim 2, further comprising: a file description unit described in a file format designated to arrange objects in order.
前記文書画像情報に対してエッジ検出を行い、前記エッジ検出の結果から、前記文字抽出処理部より抽出される文書構成要素の1つである文字列領域を除外することにより、前記画像オブジェクト領域の候補となる非文字列マップを生成する非文字列マップ生成処理部と、
前記輝度変化情報として、前記文書画像情報の局所領域におけるヒストグラムのエントロピーを算出し、算出したエントロピーの値が高い値である領域を前記画像オブジェクト領域の候補として前記非文字列マップに追加する非文字列エリア追加処理部と、
前記画像オブジェクト領域の候補が追加された前記非文字列マップに対し、前記表領域抽出処理部より抽出される前記表領域の線分を削除し、前記表領域の線分を削除した非文字列マップに対してラベリング処理を行うことにより前記画像オブジェクト領域のラベル付けを行い、ラベル付けされた画像オブジェクト領域の矩形領域を求めることによりオブジェクトマップを生成するオブジェクトマップ生成処理部と、
を備えることを特徴とする請求項2に記載の変換処理装置。 The figure region extraction processing unit
Edge detection is performed on the document image information, and a character string region that is one of the document components extracted by the character extraction processing unit is excluded from the result of the edge detection. A non-character string map generation processing unit for generating a candidate non-character string map;
As the brightness change information, the entropy of the histogram in the local region of the document image information is calculated, and a region having a high value of the calculated entropy is added to the non-character string map as the image object region candidate. A column area addition processing unit;
For the non-character string map to which the candidate for the image object area is added, the line segment of the table area extracted by the table area extraction processing unit is deleted, and the non-character string from which the line segment of the table area is deleted Labeling the image object region by performing a labeling process on the map, and generating an object map by obtaining a rectangular region of the labeled image object region;
The conversion processing apparatus according to claim 2, further comprising:
前記画像オブジェクト領域の矩形領域それぞれについて、前記矩形領域の統合処理、または、前記矩形領域の分割処理を行う有効オブジェクトエリア判定処理部
を備えることを特徴とする請求項4に記載の変換処理装置。 The figure region extraction processing unit
The conversion processing apparatus according to claim 4, further comprising: an effective object area determination processing unit that performs integration processing of the rectangular regions or division processing of the rectangular regions for each of the rectangular regions of the image object region.
複数の前記画像オブジェクト領域の矩形領域が重複している場合には、複数の画像オブジェクトの矩形領域座標の最大値と最小値を算出し、重複している画像オブジェクト領域を1つの矩形領域に統合する
ことを特徴とする請求項5に記載の変換処理装置。 The effective object area determination processing unit
When the rectangular areas of the plurality of image object areas overlap, the maximum and minimum values of the rectangular area coordinates of the plurality of image objects are calculated, and the overlapping image object areas are integrated into one rectangular area. The conversion processing device according to claim 5, wherein:
前記画像オブジェクト領域の矩形領域に対し、前記文字列領域が重複している場合には、前記画像オブジェクトの矩形領域と前記文字列領域よりなる領域の、座標の最大値と最小値を算出し、前記画像オブジェクト領域と重複している文字列領域を1つの矩形領域に統合する
ことを特徴とする請求項5又は6に記載の変換処理装置。 The effective object area determination processing unit
When the character string area overlaps the rectangular area of the image object area, the maximum and minimum coordinates of the rectangular area of the image object and the area of the character string area are calculated, The conversion processing apparatus according to claim 5, wherein the character string area overlapping with the image object area is integrated into one rectangular area.
前記画像オブジェクト領域の矩形領域に対し、前記表領域が重複している場合には、前記画像オブジェクト領域の矩形領域から前記表領域が重複している領域を排除すると共に、前記重複している表領域の水平方向の枠線、または、垂直方向の枠線の延長線上に沿って前記画像オブジェクト領域の矩形領域を分割する
ことを特徴とする請求項5から7のいずれか1項に記載の変換処理装置。 The effective object area determination processing unit
When the table area overlaps the rectangular area of the image object area, the overlapping area of the table area is excluded from the rectangular area of the image object area and the overlapping table is excluded. 8. The conversion according to claim 5, wherein the rectangular area of the image object area is divided along a horizontal frame line of the area or an extension line of the vertical frame line. 9. Processing equipment.
を備えることを特徴とする情報処理装置。 An information processing apparatus comprising the conversion processing apparatus according to claim 1.
文書画像情報に存在する文字領域を抽出する文字抽出処理手段、
前記文書画像情報に存在する線分を抽出するライン抽出処理手段、
前記ライン抽出処理手段より抽出される前記線分の情報を用い、表領域を抽出する表領域抽出処理手段、
前記文書画像情報に対して、予め定められる局所領域を設定し、前記局所領域の輝度ヒストグラムを作成して前記局所領域の輝度変化情報を求め、前記輝度変化情報と、前記文字抽出処理手段より抽出される前記文字領域の情報と、前記ライン抽出処理手段より抽出される線分の情報と、前記表領域抽出処理手段より抽出される表領域の情報と、を用いて前記表領域の外、または前記表領域の中に存在する図、または写真を含む画像オブジェクト領域の抽出を行う図領域抽出処理手段、
前記表領域における前記文字領域の情報、前記線分の情報、および前記画像オブジェクト領域の情報をもとに表構造を解析し、表を再構成する表構造情報を取得する表構造化処理手段、
として機能させるためのプログラム。 Computer
Character extraction processing means for extracting a character region existing in the document image information;
Line extraction processing means for extracting a line segment existing in the document image information;
Table area extraction processing means for extracting a table area using the line segment information extracted by the line extraction processing means,
A predetermined local region is set for the document image information, a luminance histogram of the local region is created to determine luminance change information of the local region, and the luminance change information and the character extraction processing unit extract The outside of the table area using the information on the character area, the line segment information extracted by the line extraction processing means, and the table area information extracted by the table area extraction processing means, or Figure area extraction processing means for extracting a picture existing in the table area or an image object area including a photograph;
Table structuring processing means for analyzing the table structure based on the information on the character area in the table area, the information on the line segment, and the information on the image object area, and acquiring table structure information for reconfiguring the table;
Program to function as.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015210168A JP6607490B2 (en) | 2015-10-26 | 2015-10-26 | CONVERSION PROCESSING DEVICE, INFORMATION PROCESSING DEVICE EQUIPPED WITH THE SAME, PROGRAM, AND RECORDING MEDIUM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015210168A JP6607490B2 (en) | 2015-10-26 | 2015-10-26 | CONVERSION PROCESSING DEVICE, INFORMATION PROCESSING DEVICE EQUIPPED WITH THE SAME, PROGRAM, AND RECORDING MEDIUM |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017084012A JP2017084012A (en) | 2017-05-18 |
JP6607490B2 true JP6607490B2 (en) | 2019-11-20 |
Family
ID=58714249
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015210168A Active JP6607490B2 (en) | 2015-10-26 | 2015-10-26 | CONVERSION PROCESSING DEVICE, INFORMATION PROCESSING DEVICE EQUIPPED WITH THE SAME, PROGRAM, AND RECORDING MEDIUM |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6607490B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101907029B1 (en) * | 2017-08-24 | 2018-10-12 | (주) 더존비즈온 | Apparatus and method for generating table for creating document form automatically |
JP7043667B1 (en) | 2021-09-02 | 2022-03-29 | 株式会社両備システムズ | Information processing equipment, programs, and information processing methods |
JP7403108B2 (en) * | 2021-10-28 | 2023-12-22 | 株式会社 Sai | Building structure recognition system and building structure recognition method |
KR20240012686A (en) * | 2022-07-21 | 2024-01-30 | 가톨릭대학교 산학협력단 | Artificial intelligence-based paraffin block recognition device using camera and a method using the same |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5350303A (en) * | 1991-10-24 | 1994-09-27 | At&T Bell Laboratories | Method for accessing information in a computer |
JP4029316B2 (en) * | 2001-10-18 | 2008-01-09 | 日本電気株式会社 | Image type identification method and apparatus and image processing program |
JP4420440B2 (en) * | 2004-02-19 | 2010-02-24 | 株式会社リコー | Image processing apparatus, image processing method, character recognition apparatus, program, and recording medium |
JP2008129793A (en) * | 2006-11-20 | 2008-06-05 | Canon Inc | Document processing system, apparatus and method, and recording medium with program recorded thereon |
-
2015
- 2015-10-26 JP JP2015210168A patent/JP6607490B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017084012A (en) | 2017-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9807280B2 (en) | Image processing apparatus, method, and storage medium | |
US8224095B2 (en) | Image processing apparatus, image forming apparatus, image processing system, and image processing method | |
US6865290B2 (en) | Method and apparatus for recognizing document image by use of color information | |
US8417029B2 (en) | Image processing apparatus and method, including fill-up processing | |
US8055079B2 (en) | Image processing method, image processing apparatus, and image forming apparatus | |
US8384964B2 (en) | Image processing apparatus and image processing method | |
US8395813B2 (en) | Subtractive color method, subtractive color processing apparatus, image forming apparatus, and computer-readable storage medium for computer program | |
US8611658B2 (en) | Image processing apparatus and image processing method | |
JP6607490B2 (en) | CONVERSION PROCESSING DEVICE, INFORMATION PROCESSING DEVICE EQUIPPED WITH THE SAME, PROGRAM, AND RECORDING MEDIUM | |
JP4582204B2 (en) | Image processing apparatus, image conversion method, and computer program | |
JP2003152995A (en) | Image processing device | |
US7672008B2 (en) | Image processing device, method and program product for separating character, halftone graphic, and halftone photographic regions | |
JP2012105015A (en) | Image processing apparatus, image processing method, program, and storage medium | |
JP4582200B2 (en) | Image processing apparatus, image conversion method, and computer program | |
US8363934B2 (en) | Image processing apparatus, image processing method, and computer program | |
JP6607496B2 (en) | CONVERSION PROCESSING DEVICE, INFORMATION PROCESSING DEVICE EQUIPPED WITH THE SAME, PROGRAM, AND RECORDING MEDIUM | |
US8810877B2 (en) | Image processing apparatus, image processing method, and storage medium for eliminating blurring of scanned image | |
US8270722B2 (en) | Image processing with preferential vectorization of character and graphic regions | |
JP2005275854A (en) | Image processor, image processing method, image processing program and recording medium with this program stored thereon | |
JP3899872B2 (en) | Image processing apparatus, image processing method, image processing program, and computer-readable recording medium recording the same | |
JP6262102B2 (en) | Image processing apparatus, image processing system, computer program, and recording medium | |
JP4710672B2 (en) | Character color discrimination device, character color discrimination method, and computer program | |
JP5517028B2 (en) | Image processing device | |
US11405525B2 (en) | Image processing apparatus, control method, and product capable of improving compression efficiency by converting close color to background color in a low light reading mode | |
JP4228905B2 (en) | Image processing apparatus and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180920 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190808 |
|
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: 20190924 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20191011 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6607490 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |