JP7700541B2 - Image processing device, image processing method, and program - Google Patents
Image processing device, image processing method, and program Download PDFInfo
- Publication number
- JP7700541B2 JP7700541B2 JP2021110009A JP2021110009A JP7700541B2 JP 7700541 B2 JP7700541 B2 JP 7700541B2 JP 2021110009 A JP2021110009 A JP 2021110009A JP 2021110009 A JP2021110009 A JP 2021110009A JP 7700541 B2 JP7700541 B2 JP 7700541B2
- Authority
- JP
- Japan
- Prior art keywords
- font size
- character
- cells
- cell
- classification
- 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
Landscapes
- Character Input (AREA)
- Character Discrimination (AREA)
- Facsimile Image Signal Circuits (AREA)
Description
本発明は、画像処理装置、画像処理方法、及びプログラムに関する。 The present invention relates to an image processing device, an image processing method, and a program.
従来、記録媒体に印刷された文書を印刷前の電子文書データに戻すことにより、電子文書データを再利用することでき、利便性が向上していた。
そこで、スキャナを用いて印刷された文書をスキャンして、像域分離処理等を行った後の文字画像にOCR(文字認識)を施して、例えばMicrosoft Office(登録商標)で採用されている、Office Open XML Document形式に変換する技術(Office変換、Word変換)が知られている。
Conventionally, by restoring a document printed on a recording medium to the original electronic document data before printing, it has become possible to reuse the electronic document data, thereby improving convenience.
In view of this, a technology is known in which a printed document is scanned using a scanner, and after image area separation processing and the like, OCR (character recognition) is performed on the character image, and the document is converted into, for example, an Office Open XML Document format (Office conversion, Word conversion) that is adopted in Microsoft Office (registered trademark).
特許文献1には、文字コード毎にフォントサイズを求めるテーブルを設けることなく、画像データから文字画像のフォントサイズを的確に検出することを目的として、画像データ中の1文字の画像毎に外接矩形を検出すると共に、画像データを複数の塊に区分し、仮判定領域として設定する。各仮判定領域単位で構成要素である個々の文字の画像の外接矩形の高さに関する度数分布を作成し、有効な外接矩形の高さが2種類以上ある仮判定領域を正規判定領域とみなす。正規判定領域とみなされなかった仮判定領域について、正規判定領域の条件を満たすまで隣接する他の判定領域と統合し、正規判定領域毎に、その中の文字画像の外接矩形のうち最大の高さを代表値としてフォントサイズを決定するという技術が開示されている。
このように、特許文献1にあっては、一文字ごとに外接矩形を取得し、所定の基準でフォントサイズを検出し、文字画像の外接矩形のうち最大の高さを代表値としてフォントサイズを決定していた。
このため、特許文献1にあっては、例えばExcelやWord等により記録媒体上に印刷された表において、互いに隣接しない領域(セル)のフォントサイズを統一できないという問題があった。
Patent Document 1 discloses a technique for detecting a circumscribing rectangle for each character image in image data, dividing the image data into a plurality of blocks, and setting them as provisional judgment regions, for the purpose of accurately detecting the font size of a character image from image data without providing a table for determining the font size for each character code. A frequency distribution is created for the height of the circumscribing rectangle of each character image, which is a component of each provisional judgment region, and a provisional judgment region having two or more valid circumscribing rectangle heights is regarded as a regular judgment region. A provisional judgment region that is not regarded as a regular judgment region is integrated with other adjacent judgment regions until it satisfies the conditions for a regular judgment region, and a font size is determined for each regular judgment region by using the maximum height of the circumscribing rectangle of the character images therein as a representative value.
In this way, in Patent Document 1, a circumscribing rectangle is obtained for each character, the font size is detected based on a predetermined criterion, and the font size is determined by using the maximum height of the circumscribing rectangle of the character image as a representative value.
For this reason, in Japanese Patent Laid-Open No. 2003-233699, there is a problem in that the font sizes of non-adjacent areas (cells) in a table printed on a recording medium using, for example, Excel or Word, cannot be unified.
また、従来の文字認識処理にあっては、フォントサイズの算出処理において、原稿の画像データからフォントサイズを判定する領域(セル)として、注目したセルに対して隣接するセル内の文字や、単語としていた。
しかし、例えばExcel(登録商標)やWord(登録商標)などの表形式のセルを印刷した文書では、注目したセルに対して互いに隣接しないセル、すなわち、注目したセルからある程度離れているセルについては、フォントサイズを統一できないという問題があった。
In addition, in conventional character recognition processing, in font size calculation processing, the region (cell) for determining the font size from the image data of the document is the character or word in the cell adjacent to the cell of interest.
However, in documents printed with tabular cells in Excel (registered trademark) or Word (registered trademark), for example, there is a problem in that the font sizes of cells that are not adjacent to the focused cell, i.e., cells that are a certain distance away from the focused cell, cannot be unified.
本発明の一実施形態は、上記に鑑みてなされたもので、その目的は、記録媒体上に印刷された表において、互いに隣接しないセル内の文字画像に対応するフォントサイズを統一することにある。 One embodiment of the present invention has been made in consideration of the above, and its purpose is to unify the font sizes corresponding to character images in non-adjacent cells in a table printed on a recording medium.
上記課題を解決するために、請求項1記載の発明は、複数のセル内にそれぞれ文字画像を含んだ原稿に係わる画像データから、前記複数のセルの各セル内の文字画像に対応する文字コードを特定するとともに、前記文字コードに対応するフォントサイズを決定する画像処理装置であって、注目したセルに隣接するセル内の文字画像に基づいて、前記注目したセルのフォントサイズを仮に決定するフォントサイズ仮決定部と、前記注目したセルに含まれる文字画像の特徴を表す属性を検出するセル属性検出部と、前記セル内の文字画像の属性と、前記セル内の文字画像に対して仮に決定されたフォントサイズとに基づいて、前記画像データに含まれるすべてのセル内の文字画像を分類するフォントサイズ群分類部と、前記フォントサイズ群分類部による分類の結果と前記仮に決定されたフォントサイズとに基づいて、前記分類の結果ごとのフォントサイズを決定するフォントサイズ本決定部と、を備えることを特徴とする。 In order to solve the above problem, the invention described in claim 1 is an image processing device that identifies a character code corresponding to a character image in each of a plurality of cells from image data related to a document containing character images in each of the plurality of cells, and determines a font size corresponding to the character code, and is characterized in that it comprises: a font size provisional determination unit that provisionally determines a font size of a focused cell based on character images in cells adjacent to the focused cell; a cell attribute detection unit that detects attributes that represent characteristics of the character image included in the focused cell; a font size group classification unit that classifies character images in all cells included in the image data based on attributes of the character image in the cell and the provisionally determined font size for the character image in the cell; and a font size final determination unit that determines a font size for each of the classification results based on a result of the classification by the font size group classification unit and the provisionally determined font size.
本発明によれば、記録媒体上に印刷された表において、互いに隣接しないセル内の文字画像に対応するフォントサイズを統一することができる。 According to the present invention, it is possible to unify the font sizes corresponding to character images in non-adjacent cells in a table printed on a recording medium.
以下、本発明を図面に示した実施の形態により詳細に説明する。
本発明は、互いに隣接しないセル内の文字画像に対応するフォントサイズを統一するために、以下の構成を有する。
すなわち、本発明の画像処理装置は、複数のセル内にそれぞれ文字画像を含んだ原稿に係わる画像データから、複数のセルの各セル内の文字画像に対応する文字コードを特定するとともに、文字コードに対応するフォントサイズを決定する画像処理装置であって、注目したセルに隣接するセル内の文字画像に基づいて、注目したセルのフォントサイズを仮に決定するフォントサイズ仮決定部と、注目したセルに含まれる文字画像の特徴を表す属性を検出するセル属性検出部と、セル内の文字画像の属性と、セル内の文字画像に対して仮に決定されたフォントサイズとに基づいて、画像データに含まれるすべてのセル内の文字画像を分類するフォントサイズ群分類部と、フォントサイズ群分類部による分類の結果と仮に決定されたフォントサイズとに基づいて、分類の結果ごとのフォントサイズを決定するフォントサイズ決定部と、を備えることを特徴とする。
以上の構成を備えることにより、互いに隣接しないセル内の文字画像に対応するフォントサイズを統一することができる。
上記記載の本発明の特徴について、以下の図面を用いて詳細に解説する。但し、この実施形態に記載される構成要素、種類、組み合わせ、形状、その相対配置などは特定的な記載がない限り、この発明の範囲をそれのみに限定する主旨ではなく単なる説明例に過ぎない。
上記の本発明の特徴に関して、以下、図面を用いて詳細に説明する。
Hereinafter, the present invention will be described in detail with reference to the embodiments shown in the drawings.
The present invention has the following configuration in order to unify the font sizes corresponding to character images in cells that are not adjacent to each other.
That is, the image processing device of the present invention is an image processing device that identifies a character code corresponding to a character image in each of a plurality of cells from image data related to a document containing character images in each of the plurality of cells, and determines a font size corresponding to the character code, and is characterized by comprising: a font size provisional determination unit that provisionally determines the font size of a focused cell based on character images in cells adjacent to the focused cell; a cell attribute detection unit that detects attributes that represent the characteristics of the character image contained in the focused cell; a font size group classification unit that classifies the character images in all cells included in the image data based on the attributes of the character images in the cell and the font size provisionally determined for the character images in the cell; and a font size determination unit that determines a font size for each classification result based on the results of the classification by the font size group classification unit and the provisionally determined font size.
With the above configuration, it is possible to unify the font sizes of character images in cells that are not adjacent to each other.
The features of the present invention described above will be described in detail with reference to the following drawings. However, unless otherwise specified, the components, types, combinations, shapes, relative arrangements, etc. described in the embodiments are merely illustrative examples and do not intend to limit the scope of the present invention.
The above-mentioned features of the present invention will be described in detail below with reference to the drawings.
<システム構成>
図1は、本発明の一実施形態に係わる画像処理装置を含むシステムの構成を例示する図である。
システム1は、画像形成装置10、2つのパーソナルコンピュータであるPC80、PC90を備え、これらが通信ネットワークNを介して相互にデータの送受信を行う構成となっている。
画像形成装置10は、原稿シートを読み取るスキャナ部31、シート上に画像を形成するプリンタ部32、および通信機能などを備えるMFP(Multifunction Peripheral)である。スキャナ部31は、ADF(Auto Document Feeder:自動原稿送り装置)が設けられている場合はADFにセットされた原稿シートを読み取る。画像形成装置10は、スキャナ部31、プリンタ部32を用いることで、コピー、プリンタ、スキャナ、ファクシミリの各機能を利用者に提供する。また操作パネル40を介して利用者から指示を受け付け、もしくは通信ネットワークNを介してPC80、PC90から指示を受け付けることで、画像形成装置10はこれら機能を実行する。
<System Configuration>
FIG. 1 is a diagram illustrating an example of the configuration of a system including an image processing apparatus according to an embodiment of the present invention.
The system 1 includes an
The
また画像形成装置10は、光学文字認識(以下、必要に応じて単に「文字認識」、もしくは「OCR」と称する)の技術を用いて、スキャナ部31により読み取られたスキャン画像から、電子データのテキストを抽出する機能,およびそのテキストとスキャン画像をもとに,編集可能な文書(ex.マイクロソフトWord文書)を作成する機能を有している。
なお、PC80、PC90は、画像形成装置10を利用する一般ユーザが用いる端末(コンピュータ)である。
本発明に係わる画像処理装置は、図1に示すPC80、PC90により構成される。
The
The PC 80 and the PC 90 are terminals (computers) used by general users who use the
The image processing apparatus according to the present invention is composed of a
<画像形成装置のハードウェア構成>
図2は、図1に示す画像形成装置10のハードウェア構成の一例を示す図である。
図2に示されているように、画像形成装置10は、コントローラ20、近距離通信回路60、エンジン制御部30、操作パネル40、ネットワークI/F(Interface)50を備えている。
コントローラ20は、コンピュータの主要部であるCPU25a、システムメモリ(MEM-P)22、ノースブリッジ(NB)25b、サウスブリッジ(SB)24、ASIC(Application Specific Integrated Circuit)26、記憶部であるローカルメモリ(MEM-C)27、HDD(Hard Disk Drive)コントローラ28、および、記憶部であるHD29を有する。またNB25bとCPU25aとは、SoC(System on a Chip)25により統合されている。
CPU25aは、画像形成装置10の全体制御を行う制御部である。NB25bは、CPU25aと、MEM-P22、SB24とを接続するためのブリッジであり、MEM-P22に対する読み書きなどを制御するメモリコントローラと、PCI(Peripheral Component Interconnect)マスタおよびAGPターゲットとを有する。
<Hardware Configuration of Image Forming Apparatus>
FIG. 2 is a diagram showing an example of a hardware configuration of the
As shown in FIG. 2, the
The
The CPU 25a is a control unit that performs overall control of the
MEM-P22は、コントローラ20の各機能を実現させるプログラムやデータの格納用メモリであるROM22a、プログラムやデータの展開、およびメモリ印刷時の描画用メモリなどとして用いるRAM22bとからなる。尚、RAM22bに記憶されているプログラムは、インストール可能な形式または実行可能な形式のファイルでCD-ROM、CD-R、DVD等のコンピュータで読み取り可能な記録媒体に記録して提供するように構成してもよい。
The MEM-P22 consists of a ROM22a, which is memory for storing programs and data that realize the various functions of the
SB24は、NB25bとPCIデバイス、周辺デバイスとを接続するためのブリッジである。ASIC26は、画像処理用のハードウェア要素を有する画像処理用途向けのIC(Integrated Circuit)であり、PCIバス23、HDDコントローラ28およびMEM-C27をそれぞれ接続するブリッジの役割を有する。このASIC26は、PCIターゲットおよびAGPマスタ、ASIC26の中核をなすアービタ(ARB)、MEM-C27を制御するメモリコントローラ、ハードウェアロジックなどにより画像データの回転などを行う複数のDMAC(Direct Memory Access Controller)、並びに、スキャナ部31およびプリンタ部32との間でPCIバス23を介したデータ転送を行うPCIユニットからなる。尚、ASIC26には、USB(Universal Serial Bus)のインターフェースや、IEEE1394(Institute of Electrical and Electronics Engineers 1394)のインターフェースを接続するようにしてもよい。
SB24 is a bridge for connecting NB25b to PCI devices and peripheral devices. ASIC26 is an IC (Integrated Circuit) for image processing applications that has hardware elements for image processing, and plays the role of a bridge connecting
MEM-C27は、コピー用画像バッファおよび符号バッファとして用いるローカルメモリである。HD29は、後述の動作を実行するためのプログラムや各種制御用のデータを事前に記憶したストレージであり、画像データの蓄積、印刷時に用いるフォントデータやフォームの蓄積を行う用途にも用いられる。HD29は、CPU25aの制御にしたがってHD29に対するデータの読出または書込を制御する。
また、近距離通信回路60には、NFC、Bluetooth(登録商標)等の通信回路60aが備わっており、ユーザが所持しているICカードとの間でのデータ通信を実現する。ユーザがICカードを通信回路60aの近傍にかざすと、近距離通信回路60は、ICカードに記録されている各種データを読み取る。
The MEM-C 27 is a local memory used as a copy image buffer and a code buffer. The
The short-
エンジン制御部30は、スキャナ部31およびプリンタ部32の制御を行う。操作パネル40は、現在の設定値や選択画面等を表示させ、操作者からの入力を受け付けるタッチパネル等のパネル表示部40a、並びに、濃度の設定条件などの画像形成に関する条件の設定値を受け付けるテンキーおよびコピー開始指示を受け付けるスタートキー等からなる操作パネル40bを備えている。コントローラ20は、画像形成装置10全体の制御を行い、例えば、描画、通信、操作パネル40からの入力等を制御する。スキャナ部31またはプリンタ部32には、誤差拡散やガンマ変換などの画像処理部分が含まれている。
尚、画像形成装置10は、操作パネル40のアプリケーション切り替えキーにより、ドキュメントボックス機能(=スキャナ機能)、コピー機能、プリンタ機能、およびファクシミリ機能を順次に切り替えて選択することが可能となる。またドキュメントボックス機能(スキャナ機能)には、OCRにより画像からテキストを抽出し、オフィス系の各種アプリケーションで使用可能なフォーマットに変換する機能も備えられている。
また、ネットワークI/F50は、通信ネットワークNを利用してデータ通信をするためのインターフェースである。近距離通信回路60およびネットワークI/F50は、PCIバス23を介して、ASIC26に電気的に接続されている。
The
The
The network I/
<PCのハードウェア構成>
図3は、図1に示すPCのハードウェア構成図である。ここでは、PCのハードウェア構成について説明する。
図3に示されているように、PC80,90は、コンピュータによって構築されており、図3に示されているように、CPU201、ROM202、RAM203、HD204、HDD(Hard Disk Drive)コントローラ205、ディスプレイ206、外部機器接続I/F(Interface)208、ネットワークI/F209、データバス210、キーボード211、ポインティングデバイス212、DVD-RW(Digital Versatile Disk Rewritable)ドライブ214、メディアI/F216を備えている。
これらのうち、CPU201は、PC80,90全体の動作を制御する。ROM202は、IPL等のCPU201の駆動に用いられるプログラムを記憶する。RAM203は、CPU201のワークエリアとして使用される。HD204は、プログラム等の各種データを記憶する。HDDコントローラ205は、CPU201の制御にしたがってHD204に対する各種データの読み出し又は書き込みを制御する。
<PC hardware configuration>
Fig. 3 is a diagram showing the hardware configuration of the PC shown in Fig. 1. Here, the hardware configuration of the PC will be described.
As shown in FIG. 3, the
Of these, the CPU 201 controls the overall operation of the
ディスプレイ206は、カーソル、メニュー、ウィンドウ、文字、又は画像などの各種情報を表示する。外部機器接続I/F208は、各種の外部機器を接続するためのインターフェースである。この場合の外部機器は、例えば、USB(Universal Serial Bus)メモリやプリンタ等である。ネットワークI/F209は、通信ネットワークNを利用してデータ通信をするためのインターフェースである。バスライン210は、図3に示されているCPU201等の各構成要素を電気的に接続するためのアドレスバスやデータバス等である。
また、キーボード211は、文字、数値、各種指示などの入力のための複数のキーを備えた入力手段の一種である。ポインティングデバイス212は、各種指示の選択や実行、処理対象の選択、カーソルの移動などを行う入力手段の一種である。DVD-RWドライブ214は、着脱可能な記録媒体の一例としてのDVD-RW213に対する各種データの読み出し又は書き込みを制御する。なお、DVD-RWに限らず、DVD-R等であってもよい。メディアI/F216は、フラッシュメモリ等の記録メディア215に対するデータの読み出し又は書き込み(記憶)を制御する。
The display 206 displays various information such as a cursor, a menu, a window, characters, or an image. The external device connection I/F 208 is an interface for connecting various external devices. In this case, the external devices are, for example, a USB (Universal Serial Bus) memory or a printer. The network I/F 209 is an interface for data communication using the communication network N. The bus line 210 is an address bus, a data bus, or the like for electrically connecting each component such as the CPU 201 shown in FIG. 3.
The keyboard 211 is a type of input means having a plurality of keys for inputting characters, numbers, various instructions, etc. The pointing device 212 is a type of input means for selecting and executing various instructions, selecting a processing target, moving a cursor, etc. The DVD-RW drive 214 controls reading and writing of various data from a DVD-RW 213, which is an example of a removable recording medium. Note that this is not limited to a DVD-RW, and may be a DVD-R or the like. The media I/F 216 controls reading and writing (storing) of data from a recording medium 215, such as a flash memory.
<画像処理装置の機能構成>
図4は、図3に示すPCにより構成された画像処理装置の機能構成の一例を示す図である。
画像処理装置120は、原稿の画像データから、文字コードを作成するとともに、フォントサイズを検出する機能を備えており、画像取得部125、オブジェクト認識部130、フォントサイズ決定部140及び電子データ生成部150を備えおり、例えば、パーソナルコンピュータのHD104に、以下に説明する処理を実行するためのプログラムをインストールしておき、CPUがHD104から読み出したプログラムを実行することにより構成される。
なお、画像処理装置120は、図2に示す画像形成装置10のHD29に、以下に説明する処理を実行するためのプログラムをインストールしておき、CPU25aがHD29から読み出したプログラムを実行することにより構成されてもよい。
<Functional configuration of the image processing device>
FIG. 4 is a diagram showing an example of a functional configuration of an image processing apparatus constituted by the PC shown in FIG.
The
In addition, the
画像取得部120は、外部の端末からLANを介して、もしくは、USBメモリなどの携帯記憶媒体から、原稿の画像データを取得する。外部の画像処理装置10のスキャナ部31から通信ネットワークNを介して、または外部のカメラを用いて、文書を含む原稿を読み取って画像データを取得するように構成してもよい。
The
オブジェクト認識部130は、上記取得した原稿の画像データをページメモリに展開して、オブジェクトを認識する。オブジェクトには、文字、表、絵、図形などがある。このようにオブジェクトを認識する手段として公知の技術が用いられる。例えば、画像データにエッジ強調処理を施し、縦および/または横方向に画素をスキャンしてエッジを検出し、その検出頻度が一定の閾値より高い領域を文字オブジェクトと判定できる。また、表の抽出には、特許第5153857号公報で挙げられる方法により表の領域を表オブジェクトとして抽出することができる。それ以外の領域を絵、図形オブジェクトと判定することができる。
文字オブジェクトの画像データについて、公知の文字認識処理を実行してテキストデータを生成する。
例えば、文字オブジェクトの画像データについて、水平方向及び垂直方向における濃度ヒストグラムを作成して、1文字ずつ画像を切り出し、切り出した各文字画像から特徴点(例えば、閉ループや独立点の個数およびそれらの位置など)を抽出して、予め用意していたテーブルに納められていた文字のパターンとのマッチングを行って、その文字コードを特定する。
The
A known character recognition process is performed on the image data of the character object to generate text data.
For example, for image data of a character object, density histograms in the horizontal and vertical directions are created, the image is cut out for each character, feature points (e.g., the number of closed loops or independent points and their positions) are extracted from each cut-out character image, and the character code is identified by matching with character patterns stored in a previously prepared table.
オブジェクト認識部130は、文字オブジェクトについて文字認識処理して得られた文字コードをその位置情報と共に文字コードデータとして電子データ生成部150に送信する。表、絵、図形のオブジェクトは、その領域内の画像データと位置情報(メモリアドレス)を電子データ生成部150に送信する。また、文字コードデータ、文字オブジェクトの画像データおよび、表オブジェクトの画像データをフォントサイズ決定部140に送信する。
The
フォントサイズ決定部140は、オブジェクト認識部130から送信されてきた文字オブジェクトの画像データおよび表オブジェクトの画像データに基づいて各文字についてフォントサイズを決定する。
電子データ生成部150は、フォントサイズ決定部140により決定されたフォントサイズで、オブジェクト認識部130により作成された文字コードの文字を表示することができるように、各文字のフォントサイズと文字コードを、それらの位置情報に基づいて関連付けると共に、画像取得部120により取得された画像データの表、絵、図形オブジェクトと統合して、所定の編集アプリケーションで編集できる形式の電子データを生成する。
The font
The electronic
上記で説明した実施形態の各機能は、一又は複数の処理回路によって実現することが可能である。ここで、本明細書における「処理回路」とは、電子回路により実装されるプロセッサのようにソフトウェアによって各機能を実行するようプログラミングされたプロセッサや、上記で説明した各機能を実行するよう設計されたASIC(Application Specific Integrated Circuit)、DSP(digital signal processor)、FPGA(field programmable gate array)や従来の回路モジュール等のデバイスを含むものとする。 Each function of the above-described embodiments can be realized by one or more processing circuits. In this specification, the term "processing circuit" includes a processor programmed to execute each function by software, such as a processor implemented by an electronic circuit, and devices such as an ASIC (Application Specific Integrated Circuit), DSP (digital signal processor), FPGA (field programmable gate array), and conventional circuit modules designed to execute each function described above.
<フォントサイズ決定部の構成>
図5は、図4に示すフォントサイズ決定部140の詳細な構成を示す機能ブロック図である。
フォントサイズ決定部140は、フォントサイズ仮決定部141、表内文字判定部142、セル属性検出部143、フォントサイズ群分類部144、フォントサイズ本決定部145を備える。
フォントサイズ仮決定部141は、オブジェクト認識部130から受信した文字オブジェクトの画像データに基づいて各文字についてフォントサイズを仮決定する。フォントサイズの仮決定の手段には、例えば特許文献1に記載された技術を用いる。
特許文献1では、一文字ごとに外接矩形を取得し、所定の基準でフォントサイズを検出する。さらに注目文字の周辺の文字(隣接する文字、単語)の情報を加味し、フォントサイズを調整することで、単語単位、あるいは文章単位でフォントサイズを統一させることができる。
<Configuration of Font Size Determination Unit>
FIG. 5 is a functional block diagram showing a detailed configuration of the font
The font
The font size tentative determination unit 141 tentatively determines the font size for each character based on the image data of the character object received from the
In Patent Document 1, a circumscribing rectangle is obtained for each character, and the font size is detected based on a predetermined criterion. Furthermore, the font size is adjusted by taking into account information about characters (adjacent characters, words) surrounding the character of interest, thereby making it possible to unify the font size on a word-by-word or sentence-by-sentence basis.
表内文字判定部142は、文字が表の内側に在るか否か文字オブジェクトの位置情報と表オブジェクトの位置情報に基づいて判定する。
セル属性検出部143は、表オブジェクトが持つ各セル内の文字画像の属性を検出する。検出されるセル情報としては少なくとも、英字、数字、日本語文字(漢字、仮名)といった文字体系の種別や、中央揃え、左揃え、右揃え、といった文字揃えの種別、背景色の種別を含む。文字体系の種別を検出する場合には、文字コードデータに基づいて決定できる。また、セル属性検出部143は、文字揃えの種別については、セル中の濃度ヒストグラムを作成し、その偏り度合いから決定できる。セル属性検出部143は、背景色の種別については、例えば、セル内の文字画像中の文字部を除いた部分のRGB値の平均値を算出し、マイクロソフト・オフィース(Microsoft Office)(登録商標)に定義された複数の標準の色(10色)のうちで最もユークリッド距離が小さい色を背景色として決定する。
The in-table
The cell
フォントサイズ群分類部144は、各セル内の文字画像の属性および仮決定されたフォントサイズに基づいて、表オブジェクト内でのフォントサイズ群の分類を行う。分類の詳細方法は図6に示す。
フォントサイズ本決定部145は、フォントサイズ仮決定部で決定されたフォントサイズおよび、表内文字判定部で決定された表内文字判定結果、フォントサイズ群分類部で分類されたフォントサイズ群情報に基づいて、フォントサイズを本決定する。表内文字でなければ、仮決定されたフォントサイズを本決定とする。表内文字と判定されている場合は、フォントサイズ群情報より、同じ分類となった文字の仮決定フォントサイズのうち最も多いサイズに決定する。ただし、同数だった場合は、平均値とする。
The font size
The font size
<フォントサイズ決定部の動作>
図6は、図5に示すフォントサイズ決定部140においてフォットサイズを決定する動作を示すフローチャートである。
ステップS10では、フォントサイズ仮決定部141は、オブジェクト認識部130から受信した文字オブジェクトデータおよび文字コードデータに基づいてフォントサイズを仮決定する。
ステップS20では、表内文字判定部142は、オブジェクト認識部130から受信した文字オブジェクトデータおよび表オブジェクトデータに基づいて、注目の文字オブジェクトが表内文字か否かを判定する。判定の結果、表内の文字オブジェクトである場合は、S20へ、表内でない文字オブジェクトである場合はS30へ進む。
<Operation of Font Size Determination Unit>
FIG. 6 is a flowchart showing the operation of determining a font size in the font
In step S10, the font size tentative determination unit 141 tentatively determines a font size based on the character object data and character code data received from the
In step S20, the in-table
ステップS30では、表内文字判定部142において、すべての文字オブジェクトの判定が終了した後に、セル属性検出部143は、各セル内の文字画像のセル内文字オブジェクトおよび文字コードデータに基づいて、セル属性を検出する。
セル属性検出部143は、注目したセルに含まれる文字画像の特徴を表す属性を検出する。セル属性検出部143は、文字体系の種別、背景色の種別、文字揃えの種別のうちの何れか1つをセル内の文字画像の属性として用いる。
セル属性検出部143は、背景色の種別として、注目したセル内の文字画像の色成分に基づいて、マイクロソフト・オフィース(登録商標)において定義される複数の標準の色のうち、最もユークリッド距離が小さい色に割り当てる。
In step S30, after intra-table
The cell
The cell
ステップS40では、フォントサイズ群分類部144は、仮決定されたフォントサイズおよび、セル属性情報に基づいて、各文字オブジェクトをどのフォントサイズ群属するか分類する。
フォントサイズ群分類部144は、セル内の文字画像の属性と、セル内の文字画像に対して仮に決定されたフォントサイズとに基づいて、画像データに含まれるすべてのセル内の文字画像を分類する。
フォントサイズ群分類部144は、セル属性がすべてそろっており、かつ、隣接セルであり、かつ隣接セル内の文字と注目文字との仮に決定されたフォントサイズとの差が所定値以下である場合に、同じ分類の結果とする。
フォントサイズ群分類部144は、セル属性がすべてそろっており、かつ、隣接セルであり、かつ隣接セル内の文字と注目文字との仮に決定されたフォントサイズとの差が所定値以下である場合に、同じ分類の結果とする。
フォントサイズ群分類部144は、分類動作において分類されなかった文字に対して、セル属性のうち文字体系の種別、揃えの種別がそろっており、隣接するセルであり、かつ隣接するセル内の文字と注目文字との仮に決定されたフォントサイズとの差が所定値以下である場合に、同じ分類の結果とする。
フォントサイズ群分類部144は、分類動作において分類されなかった文字は、仮に決定されたフォントサイズをそのまま注目文字のフォントサイズとして決定する。
In step S40, the font size
The font size
The font size
The font size
The font size
For characters that have not been classified in the classification operation, the font size
ステップS50では、フォントサイズ本決定部145において、同一のフォントサイズ群に分類された文字オブジェクトは、そのフォントサイズ群の最も多いフォントサイズに統一し、フォントサイズを本決定する。
フォントサイズ本決定部145は、フォントサイズ群分類部144による分類の結果と仮に決定されたフォントサイズとに基づいて、分類の結果ごとのフォントサイズを本決定する。
フォントサイズ本決定部145は、フォントサイズ群分類部144による分類の結果ごとのフォントサイズのうち最も多いフォントサイズに本決定する。
フォントサイズ本決定部145は、フォントサイズ群分類部144による分類の結果ごとのフォントサイズのうち最も多いフォントサイズが同数だった場合は、平均したフォントサイズに本決定する。
ステップS60では、表内文字判定部142において、表内でないと判定された文字オブジェクトは、仮決定されたフォントサイズをそのまま本決定する。
In step S50, the font size
The font size
The font size
If the number of most common font sizes for each result of classification by the font size
In step S60, for character objects that are determined not to be within a table by the in-table
<各セルの分類方法>
図7(a)~(d)は、セル属性に基づいた各セル内の文字画像の分類方法の具体例を示す図である。
図7(a)は、画像データを記録媒体に印刷された原稿を示す図である。
図7(a)には、一般的な表の各部位の名称として、最上行に左から右に向かって、表側頭HST、表頭HD1、表頭HD3、表頭HD3が配列されている。図7(a)に示す表には、最上行に左から右に向かって、食品名、タンパク質、脂質、糖質という文字が印刷されている。
また、一般的な表の各部位の名称として、最左列に上から下に向かって、表側頭HST、表側HS1、表側HS2、表側HS3、が配列されている。図7(a)に示す表には、最左列に上から下に向かって、食品名、牛乳、濃厚牛乳、低脂肪乳という文字が印刷されている。
<Classification method for each cell>
7A to 7D are diagrams showing a specific example of a method for classifying character images in each cell based on the cell attributes.
FIG. 7A is a diagram showing an original in which image data is printed on a recording medium.
In Fig. 7(a), the names of each part of a typical table are arranged from left to right on the top row as follows: table temporal HST, table head HD1, table head HD3, and table head HD3. In the table shown in Fig. 7(a), the food name, protein, lipid, and carbohydrate are printed from left to right on the top row.
In addition, the names of the parts of a typical table are arranged from top to bottom in the leftmost column as follows: front head HST, front side HS1, front side HS2, front side HS3. In the table shown in Fig. 7(a), the food name, milk, thick milk, and low-fat milk are printed from top to bottom in the leftmost column.
図7(b)は、記録媒体に印刷された原稿のフォントと、そのフォントのフォントサイズを示す図である。
電子データを生成した後も、図7(b)に示す状態になっていることが理想的である。なお、図7(b)において、原稿のフォントのフォントサイズは、()内に注記している。
FIG. 7B is a diagram showing the font of the document printed on the recording medium and the font size of the font.
Ideally, after the electronic data is generated, it will be in the state shown in Fig. 7(b). Note that in Fig. 7(b), the font size of the original font is noted in parentheses.
図7(c)は、フォントサイズ仮決定部141により、フォントサイズを仮決定した後の一例を示す図である。図7(c)においても、()内にはフォントサイズを注記している。また図7(c)に示す()内の下線「_」は原稿のフォントサイズとの相違が出現している箇所である。
一部(_のある箇所)は原稿のフォントサイズを正確に再現できていない。フォントサイズ仮決定部141により、フォントサイズを仮に決定した時点では、隣接する文字だけを考慮してフォントサイズが決定されるため、セル内の文字画像のフォントサイズは統一することができる。
しかし、他セル内の文字画像のフォントサイズが考慮されないため、セル間でフォントサイズがバラバラになってしまうケースがある。例えば、図7(c)に示すように、脂質列の数字は「40」のみpt20となっており、上下の数値のフォントサイズと異なっている。通常のオフィス文書では同じ文字揃えの種別、同一の文字体系の種別、同じ背景色の種別であれば、フォントサイズが同じになる方が目視した際の違和感がなく、自然である。
Fig. 7C is a diagram showing an example of a font size after it has been provisionally determined by the font size provisional determination unit 141. In Fig. 7C, the font size is also noted in parentheses. The underlined "_" in the parentheses shown in Fig. 7C indicates a portion where a difference appears with the font size of the original document.
In some parts (places marked with _), the font size of the original document cannot be accurately reproduced. When the font size tentatively determined by the font size tentative determination unit 141, the font size is determined taking into consideration only adjacent characters, so that the font sizes of character images in a cell can be unified.
However, since the font size of the character images in other cells is not taken into consideration, there are cases where the font size varies between cells. For example, as shown in Fig. 7(c), only the number "40" in the upper and lower columns is pt20, and the font size is different from the numbers above and below. In normal office documents, if the characters have the same character alignment type, the same character system type, and the same background color type, it is more natural and comfortable to the eye if the font size is the same.
<分類のルール>
次に、フォントサイズ群分類部144により、セル属性、仮に決定されたフォントサイズに基づいたフォントサイズ群の分類のルールについて説明する。分類のルールは以下である。
フォントサイズ群分類部144では、以下、[1]~[3]に段階分けして文字オブジェクトをフォントサイズ群に分類する。
[1]以下、条件を満たす文字オブジェクトは同じフォントサイズ群とする。
(ア)文字体系の種別(英字、数字、日本語字)、背景色の種別、文字揃えの種別が同じ
(イ)隣接している
(ウ)隣接セルの文字オブジェクトとの仮に決定されたフォントサイズとの差が所定値以下であること
<Classification rules>
Next, a description will be given of the rules for classifying font sizes into groups based on cell attributes and provisionally determined font sizes by the font size
The font size
[1] Hereinafter, character objects that satisfy the conditions are considered to be in the same font size group.
(a) The type of character system (English letters, numbers, Japanese characters), background color, and character justification are the same. (b) They are adjacent. (c) The difference in the provisionally determined font size between the character objects in the adjacent cells is less than a specified value.
[2][1]において分類されなかったセル内の文字画像に対し、以下の条件を満たす文字オブジェクトは同じフォントサイズ群とする。
(エ)文字体系の種別(英字、数字、日本語)、文字揃えの種別がそろっている
(オ)隣接している
(カ)隣接セルの文字オブジェクトとの仮に決定されたフォントサイズとの差が所定値以下であること
[2] For character images in cells that were not classified in [1], character objects that satisfy the following conditions are grouped into the same font size group.
(D) The type of character system (English letters, numbers, Japanese) and the type of character justification are consistent. (E) They are adjacent. (F) The difference in the provisionally determined font size between the character objects in the adjacent cells is less than a specified value.
[3][1]および[2]において分類されなかったセルは、その他フォントサイズ群とする。
上記の分類ルールに従い、図7(c)を分類した結果が図7(d)となる。
なお、[1]の(ウ)および[2]の(カ)におけるフォントサイズとの差は、ここでは2ptとする。[1]の段階でI~IV群が分類される。
[2]の段階でV群が分類され、[3]でVI群が分類される。例えば[1]におえるIII群における文字オブジェクトは文字体系の種別が数字、背景色の種別は淡いグレー、文字揃えの種別は右揃えとなり、同じ群となる。III群とIV群を見比べると文字体系の種別、文字揃えの種別はそろっており、かつ隣接しており、フォントサイズの差も2pt以下だが、背景色の種別が異なるため、III群とIV群は別の群となっている。
[3] Cells that are not classified under [1] and [2] are classified as other font sizes.
FIG. 7(d) is the result of classifying FIG. 7(c) according to the above classification rules.
The difference in font size between (c) of [1] and (f) of [2] is set to 2pt here. Groups I to IV are classified at the stage of [1].
Group V is classified at the stage [2], and group VI is classified at the stage [3]. For example, the character objects in group III in [1] have the same group, with the type of font system being numbers, the type of background color being light gray, and the type of justification being right justified. Comparing groups III and IV, the type of font system and the type of justification are the same, they are adjacent, and the difference in font size is less than 2pt, but because the types of background colors are different, groups III and IV are separate groups.
フォントサイズ本決定部145では、群ごとのフォントサイズのうち最も多いサイズにその群のサイズを統一する。ただし、その群のサイズが同数である場合は、その群のサイズを平均サイズに統一する。例えばI群の場合は、20,16,18ptと最も多いサイズが同数になるため、平均サイズとなる18ptに修正され、フォントサイズが本決定される。
The font size
<従来技術による処理結果>
図8は、従来の画像処理装置による処理結果の一例を表として示した図である。
従来の画像処理装置にあっては、処理結果として表J1が生成され、表J1に含まれる枠J3内には、横方向に配列された4つのセルが含まれている。枠J3内の4つのセルには、それぞれフォントサイズが異なる文字画像が収容されている。すなわち、従来の処理結果によれば、セル単位で異なるフォントサイズの文字画像が決定されていた。
従来の画像処理装置では、原稿の画像データからフォントサイズを判定する領域として、“隣接”する文字、単語としていた。また、画像データにセルが含まれる場合、セル単位でフォントサイズを判定していた。
<Processing results using conventional technology>
FIG. 8 is a diagram showing, in the form of a table, an example of a processing result obtained by a conventional image processing device.
In the conventional image processing device, table J1 is generated as a processing result, and table J1 includes a frame J3 containing four cells arranged in the horizontal direction. Each of the four cells in frame J3 contains a character image with a different font size. In other words, according to the conventional processing result, character images with different font sizes are determined for each cell.
In conventional image processing devices, the area for determining the font size from the image data of a document is "adjacent" characters or words. Also, when the image data includes cells, the font size is determined on a cell-by-cell basis.
<本発明による処理結果>
図9は、本発明の画像処理装置による認識結果を表として示した図である。
本発明の画像処理装置にあっては、処理結果として表J5が生成され、表J5に含まれる枠J7内には、横方向に配列された4つのセルが含まれている。枠J7内の4つのセルには、それぞれフォントサイズが同一になる文字画像が収容されている。すなわち、本発明の処理結果によれば、同一分類に含まれるセル内の文字画像に対しては同一になるフォントサイズの文字画像が決定される。
<Results of processing according to the present invention>
FIG. 9 is a diagram showing, in the form of a table, the recognition results obtained by the image processing apparatus of the present invention.
In the image processing apparatus of the present invention, table J5 is generated as a processing result, and table J5 includes a frame J7 containing four cells arranged in the horizontal direction. Each of the four cells in frame J7 contains character images with the same font size. In other words, according to the processing result of the present invention, character images with the same font size are determined for character images in cells of the same classification.
本発明の画像処理装置にあっては、同一表内の各セル内の文字画像を分類し、分類ごとにフォントサイズを判定するので、同一表内における不本意なフォントサイズの不一致を解消することができる。
なお、分類には、各セル内の文字画像の属性である文字体系の種別、背景色の種別、文字揃えの種別のうちいずれか1つを用いる。ここで、セル内の文字画像の属性がより似ているものは、フォントサイズが同じになることを前提としている。
本発明では、表形式内の文字のフォントサイズを決定するのに際して、以下の特徴を有する。
単一セル内の文字画像のフォントサイズを仮に決定し、単一のセル内の文字画像の属性を検出し、セル内の文字画像の属性と仮に決定されたフォントサイズとに基づいてすべてのセルを分類し、分類と単一セルのフォントサイズに基づいて分類ごとのフォントサイズを決定する。
要するに、単一セル内の文字画像のフォントサイズとセルの分類により、フォントサイズを決定することが特徴になっている。
本発明によれば、同一表内の各セルを分類し、分類ごとにフォントサイズを判定するので、同一表内における不本意なフォントサイズの不一致を解消することができる。分類には、各セルの属性である文字体系の種別、背景色の種別、文字揃えの種別のうちいずれか1つを用いる。
In the image processing apparatus of the present invention, character images in each cell in the same table are classified and the font size is determined for each classification, so that undesired discrepancies in font sizes within the same table can be eliminated.
For classification, any one of the following attributes of the character image in each cell is used: type of font, type of background color, or type of justification. Here, it is assumed that character images in cells with more similar attributes have the same font size.
The present invention has the following features when determining the font size of characters in a table format.
The font size of a character image in a single cell is provisionally determined, attributes of the character image in the single cell are detected, all cells are classified based on the attributes of the character images in the cells and the provisionally determined font size, and a font size for each classification is determined based on the classification and the font size of the single cell.
In short, the feature of this method is that the font size is determined by the font size of the character image in a single cell and the classification of the cell.
According to the present invention, each cell in a table is classified and the font size is determined for each classification, thereby eliminating undesired font size discrepancies within the same table. For classification, any one of the following attributes of each cell is used: type of character system, type of background color, and type of justification.
<本実施形態の態様例の作用、効果のまとめ>
<第1態様>
本態様の画像処理装置120は、複数のセル内にそれぞれ文字画像を含んだ原稿に係わる画像データから、複数のセルの各セル内の文字画像に対応する文字コードを特定するとともに、文字コードに対応するフォントサイズを決定する画像処理装置であって、注目したセルに隣接するセル内の文字画像に基づいて、注目したセルのフォントサイズを仮に決定するフォントサイズ仮決定部141と、注目したセルに含まれる文字画像の特徴を表す属性を検出するセル属性検出部143と、セル内の文字画像の属性と、セル内の文字画像に対して仮に決定されたフォントサイズとに基づいて、画像データに含まれるすべてのセル内の文字画像を分類するフォントサイズ群分類部144と、フォントサイズ群分類部144による分類の結果と仮に決定されたフォントサイズとに基づいて、分類の結果ごとのフォントサイズを決定するフォントサイズ本決定部145と、を備えることを特徴とする。
本態様によれば、注目したセルに隣接するセル内の文字画像に基づいて、注目したセルのフォントサイズを仮に決定しておき、注目したセルに含まれる文字画像の特徴を表す属性を検出し、セル内の文字画像の属性と、セル内の文字画像に対して仮に決定されたフォントサイズとに基づいて、画像データに含まれるすべてのセル内の文字画像を分類し、分類の結果と仮に決定されたフォントサイズに基づいて、分類の結果ごとのフォントサイズを決定することができる。
これにより、互いに隣接しないセル内の文字画像に対応するフォントサイズを統一することができる。
<Summary of the functions and effects of the embodiment>
<First aspect>
The
According to this aspect, the font size of a focused cell is provisionally determined based on the character images in cells adjacent to the focused cell, attributes representative of the characteristics of the character images contained in the focused cell are detected, the character images in all cells contained in the image data are classified based on the attributes of the character images in the cells and the provisionally determined font size for the character images in the cells, and a font size for each classification result is determined based on the classification results and the provisionally determined font size.
This allows the font sizes of character images in non-adjacent cells to be unified.
<第2態様>
本態様のセル属性検出部143は、文字体系の種別、背景色の種別、文字揃えの種別のうちの何れか1つをセル内の文字画像の属性として用いることを特徴とする。
本態様によれば、セル属性検出部143は、文字体系の種別、背景色の種別、文字揃えの種別のうちの何れか1つをセル内の文字画像の属性として用いることで、注目したセルに含まれる文字画像の特徴を表す属性を検出することができる。
<Second aspect>
The cell
According to this embodiment, the cell
<第3態様>
本態様のセル属性検出部143は、背景色の種別として、注目したセル内の文字画像の色成分に基づいて、マイクロソフト・オフィース(登録商標)において定義される複数の標準の色のうち、最もユークリッド距離が小さい色に割り当てることを特徴とする。
本態様によれば、セル属性検出部143は、背景色の種別として、注目したセル内の文字画像の色成分に基づいて、マイクロソフト・オフィース(登録商標)において定義される複数の標準の色のうち、最もユークリッド距離が小さい色に割り当てることで、注目したセルに含まれる文字画像の色成分の特徴を表す属性を検出することができる。
<Third aspect>
The cell
According to this embodiment, the cell
<第4態様>
本態様のフォントサイズ群分類部144は、セル属性がすべてそろっており、かつ、隣接セルであり、かつ隣接セル内の文字と注目文字との仮に決定されたフォントサイズとの差が所定値以下である場合に、同じ分類の結果とすることを特徴とする。
本態様によれば、フォントサイズ群分類部144は、セル属性がすべてそろっており、かつ、隣接セルであり、かつ隣接セル内の文字と注目文字との仮に決定されたフォントサイズとの差が所定値以下である場合に、同じ分類の結果とすることで、セル内の文字画像を分類することができる。
<Fourth aspect>
The font size
According to this embodiment, the font size
<第5態様>
本態様のフォントサイズ群分類部144は、分類動作において分類されなかった文字に対して、セル属性のうち文字体系の種別、揃えの種別がそろっており、隣接するセルであり、かつ隣接するセル内の文字と注目文字との仮に決定されたフォントサイズとの差が所定値以下である場合に、同じ分類の結果とすることを特徴とする。
本態様によれば、フォントサイズ群分類部144は、分類動作において分類されなかった文字に対して、セル属性のうち文字体系の種別、揃えの種別がそろっており、隣接するセルであり、かつ隣接するセル内の文字と注目文字との仮に決定されたフォントサイズとの差が所定値以下である場合に、同じ分類の結果とすることで、セル内の文字画像を分類することができる。
<Fifth aspect>
The font size
According to this embodiment, the font size
<第6態様>
本態様のフォントサイズ群分類部144は、分類動作において分類されなかった文字は、仮に決定されたフォントサイズをそのまま注目文字のフォントサイズとして決定することを特徴とする。
本態様によれば、フォントサイズ群分類部144は、分類動作において分類されなかった文字は、仮に決定されたフォントサイズをそのまま注目文字のフォントサイズとして決定することで、分類動作において分類されなかった文字に対して、フォントサイズを決定することができる。
<Sixth aspect>
The font size
According to this embodiment, the font size
<第7態様>
本態様のフォントサイズ本決定部145は、分類の結果ごとのフォントサイズのうち最も多いフォントサイズに決定することを特徴とする。
本態様によれば、フォントサイズ本決定部145は、分類の結果ごとのフォントサイズのうち最も多いフォントサイズに決定することで、フォントサイズを決定することができる。
<Seventh aspect>
The main font
According to this aspect, the final font
<第8態様>
本態様のフォントサイズ本決定部145は、分類の結果ごとのフォントサイズのうち最も多いフォントサイズが同数だった場合は、平均したフォントサイズに決定することを特徴とする。
本態様によれば、フォントサイズ本決定部145は、分類の結果ごとのフォントサイズのうち最も多いフォントサイズが同数だった場合は、平均したフォントサイズに決定することで、フォントサイズを決定することができる。
<Eighth aspect>
The font size
According to this aspect, when the number of font sizes for each classification result that are the most common is the same, the font size
<第9態様>
本態様の画像処理方法は、複数のセル内にそれぞれ文字画像を含んだ原稿に係わる画像データから、複数のセルの各セル内の文字画像に対応する文字コードを特定するとともに、文字コードに対応するフォントサイズを決定する画像処理方法であって、注目したセルに隣接するセル内の文字画像に基づいて、注目したセルのフォントサイズを仮に決定するフォントサイズ仮決定ステップ(S10)と、注目したセルに含まれる文字画像の特徴を表す属性を検出するセル属性検出ステップ(S30)と、セル内の文字画像の属性と、セル内の文字画像に対して仮に決定されたフォントサイズとに基づいて、画像データに含まれるすべてのセル内の文字画像を分類するフォントサイズ群分類ステップ(S40)と、フォントサイズ群分類ステップ(S40)による分類の結果と仮に決定されたフォントサイズとに基づいて、分類の結果ごとのフォントサイズを決定するフォントサイズ本決定ステップ(S50)と、を備えることを特徴とする。
本態様によれば、注目したセルに隣接するセル内の文字画像に基づいて、注目したセルのフォントサイズを仮に決定しておき、注目したセルに含まれる文字画像の特徴を表す属性を検出し、セル内の文字画像の属性と、セル内の文字画像に対して仮に決定されたフォントサイズとに基づいて、画像データに含まれるすべてのセル内の文字画像を分類し、分類の結果と仮に決定されたフォントサイズに基づいて、分類の結果ごとのフォントサイズを決定することができる。
これにより、互いに隣接しないセル内の文字画像に対応するフォントサイズを統一することができる。
<Ninth aspect>
The image processing method of this embodiment is an image processing method for identifying character codes corresponding to character images in each of a plurality of cells from image data related to a document containing character images in each of a plurality of cells, and for determining a font size corresponding to the character code, and is characterized by comprising: a font size tentative determination step (S10) for tentatively determining a font size of a focused cell based on character images in cells adjacent to the focused cell; a cell attribute detection step (S30) for detecting attributes representative of characteristics of the character image included in the focused cell; a font size group classification step (S40) for classifying character images in all cells included in the image data based on the attributes of the character images in the cells and the font size provisionally determined for the character images in the cells; and a font size final determination step (S50) for determining a font size for each classification result based on the results of the classification by the font size group classification step (S40) and the provisionally determined font size.
According to this aspect, the font size of a focused cell is provisionally determined based on the character images in cells adjacent to the focused cell, attributes representative of the characteristics of the character images contained in the focused cell are detected, the character images in all cells contained in the image data are classified based on the attributes of the character images in the cells and the provisionally determined font size for the character images in the cells, and a font size for each classification result is determined based on the classification results and the provisionally determined font size.
This allows the font sizes of character images in non-adjacent cells to be unified.
<第10態様>
本態様のプログラムは、第9態様記載の画像処理方法における各ステップをプロセッサに実行させることを特徴とする。
本態様によれば、各ステップをプロセッサに実行させることができる。
<Tenth aspect>
The program of this aspect is characterized in that it causes a processor to execute each step of the image processing method according to the ninth aspect.
According to this aspect, each step can be executed by a processor.
1…システム、10…画像処理装置、20…コントローラ、22a…ROM、22b…RAM、23…PCIバス、25a…CPU、26…ASIC、28…HDDコントローラ、30…エンジン制御部、31…スキャナ部、32…プリンタ部、40…操作パネル、40a…パネル表示部、40b…操作パネル、50…ネットワークI/F、60…近距離通信回路、60…近距離通信回路、60a…通信回路、80…PC、90…PC、101…CPU、102…ROM、103…RAM、105…コントローラ、105…HDDコントローラ、106…ディスプレイ、108…外部機器接続I/F、109…ネットワークI/F、120…画像処理装置、125…画像取得部、111…キーボード、112…ポインティングデバイス、115…記録メディア、116…メディアI/F、120…画像取得部、130…オブジェクト認識部、140…フォントサイズ決定部、141…フォントサイズ仮決定部、142…表内文字判定部、143…セル属性検出部、144…フォントサイズ群分類部、145…フォントサイズ本決定部、150…電子データ生成部、208…コントローラ 1...system, 10...image processing device, 20...controller, 22a...ROM, 22b...RAM, 23...PCI bus, 25a...CPU, 26...ASIC, 28...HDD controller, 30...engine control unit, 31...scanner unit, 32...printer unit, 40...operation panel, 40a...panel display unit, 40b...operation panel, 50...network I/F, 60...short-range communication circuit, 60...short-range communication circuit, 60a...communication circuit, 80...PC, 90...PC, 101...CPU, 102...ROM, 103...RAM, 105...controller, 105...HDD controller , 106...display, 108...external device connection I/F, 109...network I/F, 120...image processing device, 125...image acquisition unit, 111...keyboard, 112...pointing device, 115...recording media, 116...media I/F, 120...image acquisition unit, 130...object recognition unit, 140...font size determination unit, 141...temporary font size determination unit, 142...table character determination unit, 143...cell attribute detection unit, 144...font size group classification unit, 145...formal font size determination unit, 150...electronic data generation unit, 208...controller
Claims (10)
注目したセルに隣接するセル内の文字画像に基づいて、前記注目したセルのフォントサイズを仮に決定するフォントサイズ仮決定部と、
前記注目したセルに含まれる文字画像の特徴を表す属性を検出するセル属性検出部と、
前記セル内の文字画像の属性と、前記セル内の文字画像に対して仮に決定されたフォントサイズとに基づいて、前記画像データに含まれるすべてのセル内の文字画像を分類するフォントサイズ群分類部と、
前記フォントサイズ群分類部による分類の結果と前記仮に決定されたフォントサイズとに基づいて、前記分類の結果ごとのフォントサイズを決定するフォントサイズ本決定部と、を備えることを特徴とする画像処理装置。 1. An image processing device that, from image data relating to a document including character images in each of a plurality of cells, identifies a character code corresponding to a character image in each of the plurality of cells, and determines a font size corresponding to the character code, comprising:
a font size provisional determination unit for provisionally determining a font size of a cell of interest based on character images in cells adjacent to the cell of interest;
a cell attribute detection unit that detects an attribute representing a feature of a character image included in the cell of interest;
a font size group classification unit that classifies character images in all cells included in the image data based on attributes of the character images in the cells and font sizes provisionally determined for the character images in the cells;
an image processing device comprising: a font size final determination unit that determines a font size for each result of the classification based on the result of the classification by the font size group classification unit and the provisionally determined font size.
注目したセルに隣接するセル内の文字画像に基づいて、前記注目したセルのフォントサイズを仮に決定するフォントサイズ仮決定ステップと、
前記注目したセルに含まれる文字画像の特徴を表す属性を検出するセル属性検出ステップと、
前記セル内の文字画像の属性と、前記セル内の文字画像に対して仮に決定されたフォントサイズとに基づいて、前記画像データに含まれるすべてのセル内の文字画像を分類するフォントサイズ群分類ステップと、
前記フォントサイズ群分類ステップによる分類の結果と前記仮に決定されたフォントサイズとに基づいて、前記分類の結果ごとのフォントサイズを決定するフォントサイズ本決定ステップと、を備えることを特徴とする画像処理方法。 1. An image processing method for identifying a character code corresponding to a character image in each of a plurality of cells from image data relating to a document including character images in the respective cells, and determining a font size corresponding to the character code, comprising:
a font size provisional determination step of provisionally determining a font size of the cell of interest based on character images in cells adjacent to the cell of interest;
a cell attribute detection step of detecting an attribute representing a feature of a character image included in the cell of interest;
a font size group classification step of classifying character images in all cells included in the image data based on attributes of the character images in the cells and font sizes provisionally determined for the character images in the cells;
a final font size determination step of determining a font size for each result of the classification based on the results of the classification in the font size group classification step and the provisionally determined font size.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021110009A JP7700541B2 (en) | 2021-07-01 | 2021-07-01 | Image processing device, image processing method, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021110009A JP7700541B2 (en) | 2021-07-01 | 2021-07-01 | Image processing device, image processing method, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2023007044A JP2023007044A (en) | 2023-01-18 |
| JP7700541B2 true JP7700541B2 (en) | 2025-07-01 |
Family
ID=85107330
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021110009A Active JP7700541B2 (en) | 2021-07-01 | 2021-07-01 | Image processing device, image processing method, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7700541B2 (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003058556A (en) | 2001-08-16 | 2003-02-28 | Ricoh Co Ltd | Title extraction method, extraction program, and title extraction device for document image |
| JP2011192274A (en) | 2010-03-11 | 2011-09-29 | Ricoh Co Ltd | Method and apparatus for form template definition |
-
2021
- 2021-07-01 JP JP2021110009A patent/JP7700541B2/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003058556A (en) | 2001-08-16 | 2003-02-28 | Ricoh Co Ltd | Title extraction method, extraction program, and title extraction device for document image |
| JP2011192274A (en) | 2010-03-11 | 2011-09-29 | Ricoh Co Ltd | Method and apparatus for form template definition |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2023007044A (en) | 2023-01-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8126270B2 (en) | Image processing apparatus and image processing method for performing region segmentation processing | |
| US8041113B2 (en) | Image processing device, image processing method, and computer program product | |
| JP7600805B2 (en) | Image processing device, image processing method, and program | |
| JP2001297303A (en) | Document image recognition method and apparatus, and computer-readable recording medium | |
| JPH11259655A (en) | Image processing method and apparatus | |
| US8201084B2 (en) | Image processing apparatus and computer readable medium | |
| JPH08212298A (en) | Document orientation automatic discrimination device and document orientation automatic correction device | |
| JP4232679B2 (en) | Image forming apparatus and program | |
| JP2022074466A (en) | Image processing apparatus and image forming apparatus | |
| JP4626777B2 (en) | Information processing apparatus and information processing program | |
| JP2012205181A (en) | Image processing device and program | |
| JP2002015280A (en) | IMAGE RECOGNITION DEVICE, IMAGE RECOGNITION METHOD, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING IMAGE RECOGNITION PROGRAM | |
| CN113378839A (en) | Information processing apparatus, information processing method, and computer readable medium | |
| JP7700541B2 (en) | Image processing device, image processing method, and program | |
| JP7379876B2 (en) | Character recognition device, document file generation method, document file generation program | |
| JP4780184B2 (en) | Image processing apparatus and image processing program | |
| JP7697300B2 (en) | Image processing device, image processing method, and program | |
| JP2005303740A (en) | Image forming apparatus, image forming method, and program | |
| US8295602B2 (en) | Image processing apparatus and image processing method | |
| JP2019153230A (en) | Information processor and information processing program | |
| JP6606885B2 (en) | Image processing apparatus and image processing program | |
| JP7497620B2 (en) | Document data generation device, image forming device, and document data generation program | |
| JP4710672B2 (en) | Character color discrimination device, character color discrimination method, and computer program | |
| JP2016163141A (en) | Image processing apparatus, image processing method and program | |
| AU2007237365B2 (en) | Colour reproduction in a colour document image |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240527 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20250214 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20250225 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20250306 |
|
| 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: 20250520 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250602 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7700541 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |