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

Image processing apparatus and image processing program Download PDF

Info

Publication number
JP6676955B2
JP6676955B2 JP2015247177A JP2015247177A JP6676955B2 JP 6676955 B2 JP6676955 B2 JP 6676955B2 JP 2015247177 A JP2015247177 A JP 2015247177A JP 2015247177 A JP2015247177 A JP 2015247177A JP 6676955 B2 JP6676955 B2 JP 6676955B2
Authority
JP
Japan
Prior art keywords
pixel block
ruby
center line
image
distance
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
Application number
JP2015247177A
Other languages
Japanese (ja)
Other versions
JP2017111720A (en
Inventor
井原 富士夫
富士夫 井原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2015247177A priority Critical patent/JP6676955B2/en
Publication of JP2017111720A publication Critical patent/JP2017111720A/en
Application granted granted Critical
Publication of JP6676955B2 publication Critical patent/JP6676955B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置及び画像処理プログラムに関する。   The present invention relates to an image processing device and an image processing program.

特許文献1には、本文行に対するルビ・脚注行といった、本文行群と別に扱いたい行を検出する場合に、対象ルビ行が原稿上のどこに在っても(前提条件を置かずに)検出可能とし、検出結果を利用し文字列の切出し精度の向上を図ることを課題とし、文字外接矩形統合法により対象文字列から切出された全行矩形の一つを基準行として選択し、基準行の高さの半分を閾値として各切出し行がルビ行であるか、否(本文行)かを行高さにより判定し、基準行の選択処理は、認識処理の対象となる複数の行に、行幅、行高さに対するメンバシップ関数を適用し、各評価値の和を算出し、その和が最大値となる行を選択し、ルビ行であるか、否かの判定結果により、ルビ行の行データを削除するか、或いは判定結果を添付した行データを後段の認識処理部に出力することが開示されている。   Patent Document 1 discloses that, when detecting a line that is to be treated separately from a body line group, such as a ruby / footnote line for a body line, the target ruby line can be detected anywhere in the manuscript (without setting a precondition). It is an object of the present invention to improve the extraction accuracy of a character string by using the detection result, and to select one of all line rectangles extracted from the target character string by a character circumscribed rectangle integration method as a reference line, Using half the line height as a threshold, each cut line is determined to be a ruby line or not (text line) based on the line height, and the reference line selection process is performed on a plurality of lines to be subjected to recognition processing. Apply the membership function to the row width and row height, calculate the sum of each evaluation value, select the row with the maximum sum, and determine whether the row is a ruby row or not. Delete the row data of the row, or check the row data with the It is disclosed that outputs to the processing unit.

特許文献2には、文字行方向が不明で、文字の大きさやピッチ、文字行方向の異なる文字行や写真等の領域が混在する文書からの文字行抽出を可能にすることを課題とし、文字行候補生成部で、画像データより生成した画素連結矩形を接続し、文字行候補を生成し、文字矩形生成部で、生成された文字行候補を非分割領域として、主方向、副方向に適宜分割して、副方向の文字行を抽出するとともに、文字行候補内で基本矩形の統合を行うことにより文字矩形を生成し、文字行候補分割部で、文字矩形サイズの平均値、分散値から文字行候補の構成を判定し、構成に応じて文字行候補を分割し、文字矩形接続部で、分割された文字行候補の領域内において文字矩形を接続することにより文字行を抽出することが開示されている。   Patent Literature 2 has an object to enable extraction of a character line from a document in which the character line direction is unknown and the character size and pitch of the character and the region of the character line direction and the like having different character line directions are mixed. The line candidate generation unit connects the pixel connection rectangles generated from the image data to generate character line candidates, and the character rectangle generation unit sets the generated character line candidates as non-divided regions in the main direction and the sub direction as appropriate. In addition to extracting the character lines in the sub-direction and extracting the character rectangles in the sub-direction, the character rectangles are generated by integrating the basic rectangles in the character line candidates. It is possible to determine the configuration of the character line candidates, divide the character line candidates according to the configuration, and extract the character lines by connecting the character rectangles in the divided character line candidate regions at the character rectangle connection unit. It has been disclosed.

特開2004−094292号公報Japanese Patent Application Laid-Open No. 2004-094292 特開平10−031716号公報JP-A-10-031716

本文にルビが付された画像からルビを削除することが行われている。例えば、本文に対する文字認識において、文字認識率を向上させるためである。
前述の特許文献では、1回の判断でルビを抽出している。
本発明は、1回目のルビの抽出結果を利用して、1回目の抽出ではルビとされなかった画素塊をルビとして抽出できるようにした画像処理装置及び画像処理プログラムを提供することを目的としている。
It has been practiced to delete ruby from images with ruby added to the text. For example, this is to improve the character recognition rate in character recognition of the text.
In the above-mentioned patent document, ruby is extracted by one judgment.
SUMMARY OF THE INVENTION An object of the present invention is to provide an image processing apparatus and an image processing program capable of extracting a pixel block that was not ruby in the first extraction as ruby by using the result of the first ruby extraction. I have.

かかる目的を達成するための本発明の要旨とするところは、次の各項の発明に存する。
請求項1の発明は、画像から本文に付されたルビを抽出する第1の抽出手段と、前記本文の中心線を抽出する中心線抽出手段と、前記画像内の画素塊と該画素塊に隣接する前記中心線間の距離が、前記ルビと該ルビに隣接する前記中心線間の距離より大きい又は以上である場合、該画素塊をルビとして抽出する第2の抽出手段を有し、前記中心線抽出手段は、既に抽出した中心線間の統計的間隔と該中心線の先頭にある画素塊の位置にしたがって、中心線群の外側に中心線を外挿する、画像処理装置である。
The gist of the present invention to achieve this object lies in the inventions in the following items.
The invention according to claim 1 includes a first extraction unit for extracting ruby added to a text from an image, a center line extraction unit for extracting a center line of the text, a pixel block in the image and a pixel block in the image. the distance between the center line adjacent, if the is ruby and the distance is greater than or more between the center lines adjacent to the ruby, have a second extraction means for extracting a該画pixel block as ruby, the The center line extracting unit is an image processing device that extrapolates the center line outside the center line group according to the statistical interval between the center lines already extracted and the position of the pixel block at the head of the center line .

請求項2の発明は、前記第1の抽出手段によって抽出されたルビと前記第2の抽出手段によって抽出されたルビを前記画像から削除する削除手段と、前記削除手段によって前記画像からルビを削除した画像を出力する出力手段をさらに有する請求項1に記載の画像処理装置である。   According to a second aspect of the present invention, there is provided a deleting unit for deleting ruby extracted by the first extracting unit and ruby extracted by the second extracting unit from the image, and deleting ruby from the image by the deleting unit. The image processing apparatus according to claim 1, further comprising an output unit that outputs the output image.

請求項3の発明は、前記ルビと該ルビに隣接する前記中心線間の距離として、該ルビの外接矩形の該中心線に近い角から該中心線間の距離とし、前記画素塊と該画素塊に隣接する前記中心線間の距離として、該画素塊の外接矩形の中心から該中心線間の距離とする、請求項1又は2に記載の画像処理装置である。   The invention according to claim 3, wherein the distance between the ruby and the center line adjacent to the ruby is a distance between the center line and a corner close to the center line of a circumscribed rectangle of the ruby; 3. The image processing apparatus according to claim 1, wherein a distance between the center lines adjacent to the block is a distance from the center of a circumscribed rectangle of the pixel block to the center line. 4.

請求項の発明は、前記第1の抽出手段は、前記画像の予め定められた方向にRLSA処理を行うRLSA手段と、前記RLSA手段による処理結果の第1の画素塊の予め定められた倍数より大きい又は以上の大きさを有する第2の画素塊を抽出する第3の抽出手段と、前記第1の画素塊と前記第2の画素塊間の距離が予め定められた距離未満又は以下である場合は、該第1の画素塊をルビとして抽出し、又は、該第1の画素塊と該第2の画素塊が重なり、該第1の画素塊は該第2の画素塊よりも小さく、該第1の画素塊の位置が該第2の画素塊内の予め定められた領域内である場合は、該第1の画素塊をルビとして抽出するルビ抽出手段を含む、請求項1から3のいずれか一項に記載の画像処理装置である。 The invention according to claim 4 , wherein the first extracting means performs RLSA processing in a predetermined direction of the image, and a predetermined multiple of a first pixel block of a processing result by the RLSA means. A third extraction unit for extracting a second pixel block having a larger or larger size, wherein a distance between the first pixel block and the second pixel block is less than or less than a predetermined distance. In some cases, the first pixel block is extracted as ruby, or the first pixel block overlaps with the second pixel block, and the first pixel block is smaller than the second pixel block. And a ruby extracting means for extracting the first pixel block as ruby when the position of the first pixel block is within a predetermined area in the second pixel block. 3. The image processing device according to claim 3.

請求項の発明は、コンピュータを、画像から本文に付されたルビを抽出する第1の抽出手段と、前記本文の中心線を抽出する中心線抽出手段と、前記画像内の画素塊と該画素塊に隣接する前記中心線間の距離が、前記ルビと該ルビに隣接する前記中心線間の距離より大きい又は以上である場合、該画素塊をルビとして抽出する第2の抽出手段として機能させ、前記中心線抽出手段は、既に抽出した中心線間の統計的間隔と該中心線の先頭にある画素塊の位置にしたがって、中心線群の外側に中心線を外挿する、画像処理プログラムである。 According to a fifth aspect of the present invention, there is provided a computer, comprising: a first extraction unit for extracting ruby added to a text from an image; a center line extraction unit for extracting a center line of the text; a pixel block in the image; When the distance between the center lines adjacent to the pixel block is greater than or equal to the distance between the ruby and the center line adjacent to the ruby, the pixel block functions as second extraction means for extracting the pixel block as ruby An image processing program that extrapolates the center line outside the center line group according to the statistical interval between the center lines already extracted and the position of a pixel block at the head of the center line. It is.

請求項1の画像処理装置によれば、1回目のルビの抽出結果を利用して、1回目の抽出ではルビとされなかった画素塊をルビとして抽出できる。また、既に抽出した中心線間の統計的間隔とその中心線の先頭にある画素塊の位置にしたがって、中心線群の外側に中心線を外挿することができる。 According to the image processing apparatus of the first aspect, a pixel block that is not ruby in the first extraction can be extracted as ruby using the result of the first ruby extraction. In addition, the center line can be extrapolated outside the center line group according to the statistical interval between the center lines already extracted and the position of the pixel block at the head of the center line.

請求項2の画像処理装置によれば、ルビを削除した画像を出力することができる。   According to the image processing device of the second aspect, it is possible to output an image from which ruby has been deleted.

請求項3の画像処理装置によれば、ルビとそのルビに隣接する中心線間の距離として、そのルビの外接矩形のその中心線に近い角からその中心線間の距離とし、画素塊とその画素塊に隣接する中心線間の距離として、その画素塊の外接矩形の中心からその中心線間の距離とした処理を行うことができる。   According to the image processing apparatus of the third aspect, the distance between the ruby and the center line adjacent to the ruby is a distance between the center line of the circumscribed rectangle of the ruby and the distance from the center line, and the pixel block and the A process can be performed in which the distance between the center lines adjacent to the pixel block is the distance from the center of the circumscribed rectangle of the pixel block to the center line.

請求項の画像処理装置によれば、RLSA処理を用いてルビを抽出することができる。 According to the image processing device of the fourth aspect , ruby can be extracted using the RLSA process.

請求項の画像処理プログラムによれば、1回目のルビの抽出結果を利用して、1回目の抽出ではルビとされなかった画素塊をルビとして抽出できる。また、既に抽出した中心線間の統計的間隔とその中心線の先頭にある画素塊の位置にしたがって、中心線群の外側に中心線を外挿することができる。 According to the image processing program according to claim 5, by using the extraction result of the first ruby, a first extract may be extracted pixel block that has not been a ruby as ruby. In addition, the center line can be extrapolated outside the center line group according to the statistical interval between the center lines already extracted and the position of the pixel block at the head of the center line.

本実施の形態の構成例についての概念的なモジュール構成図である。FIG. 2 is a conceptual module configuration diagram illustrating a configuration example according to the present embodiment. 本実施の形態を利用したシステム構成例を示す説明図である。FIG. 2 is an explanatory diagram illustrating an example of a system configuration using the present embodiment. 本実施の形態による処理例を示すフローチャートである。5 is a flowchart illustrating a processing example according to the exemplary embodiment; 本実施の形態による処理例を示すフローチャートである。5 is a flowchart illustrating a processing example according to the exemplary embodiment; 本実施の形態による処理例を示す説明図である。FIG. 9 is an explanatory diagram illustrating a processing example according to the exemplary embodiment; 本実施の形態による処理例を示すフローチャートである。5 is a flowchart illustrating a processing example according to the exemplary embodiment; 本実施の形態による処理例を示す説明図である。FIG. 9 is an explanatory diagram illustrating a processing example according to the exemplary embodiment; 本実施の形態による処理例を示す説明図である。FIG. 9 is an explanatory diagram illustrating a processing example according to the exemplary embodiment; 本実施の形態による処理例を示すフローチャートである。5 is a flowchart illustrating a processing example according to the exemplary embodiment; 本実施の形態による処理例を示す説明図である。FIG. 9 is an explanatory diagram illustrating a processing example according to the exemplary embodiment; 本実施の形態による処理例を示す説明図である。FIG. 9 is an explanatory diagram illustrating a processing example according to the exemplary embodiment; 本実施の形態による処理例を示す説明図である。FIG. 9 is an explanatory diagram illustrating a processing example according to the exemplary embodiment; 本実施の形態による処理例を示す説明図である。FIG. 9 is an explanatory diagram illustrating a processing example according to the exemplary embodiment; 本実施の形態による処理例を示すフローチャートである。5 is a flowchart illustrating a processing example according to the exemplary embodiment; 本実施の形態による処理例を示す説明図である。FIG. 9 is an explanatory diagram illustrating a processing example according to the exemplary embodiment; 本実施の形態を実現するコンピュータのハードウェア構成例を示すブロック図である。FIG. 2 is a block diagram illustrating an example of a hardware configuration of a computer that implements the exemplary embodiment.

以下、図面に基づき本発明を実現するにあたっての好適な一実施の形態の例を説明する。
図1は、本実施の形態の構成例についての概念的なモジュール構成図を示している。
なお、モジュールとは、一般的に論理的に分離可能なソフトウェア(コンピュータ・プログラム)、ハードウェア等の部品を指す。したがって、本実施の形態におけるモジュールはコンピュータ・プログラムにおけるモジュールのことだけでなく、ハードウェア構成におけるモジュールも指す。それゆえ、本実施の形態は、それらのモジュールとして機能させるためのコンピュータ・プログラム(コンピュータにそれぞれの手順を実行させるためのプログラム、コンピュータをそれぞれの手段として機能させるためのプログラム、コンピュータにそれぞれの機能を実現させるためのプログラム)、システム及び方法の説明をも兼ねている。ただし、説明の都合上、「記憶する」、「記憶させる」、これらと同等の文言を用いるが、これらの文言は、実施の形態がコンピュータ・プログラムの場合は、記憶装置に記憶させる、又は記憶装置に記憶させるように制御するという意味である。また、モジュールは機能に一対一に対応していてもよいが、実装においては、1モジュールを1プログラムで構成してもよいし、複数モジュールを1プログラムで構成してもよく、逆に1モジュールを複数プログラムで構成してもよい。また、複数モジュールは1コンピュータによって実行されてもよいし、分散又は並列環境におけるコンピュータによって1モジュールが複数コンピュータで実行されてもよい。なお、1つのモジュールに他のモジュールが含まれていてもよい。また、以下、「接続」とは物理的な接続の他、論理的な接続(データの授受、指示、データ間の参照関係等)の場合にも用いる。「予め定められた」とは、対象としている処理の前に定まっていることをいい、本実施の形態による処理が始まる前はもちろんのこと、本実施の形態による処理が始まった後であっても、対象としている処理の前であれば、そのときの状況・状態にしたがって、又はそれまでの状況・状態にしたがって定まることの意を含めて用いる。「予め定められた値」が複数ある場合は、それぞれ異なった値であってもよいし、2以上の値(もちろんのことながら、全ての値も含む)が同じであってもよい。また、「Aである場合、Bをする」という意味を有する記載は、「Aであるか否かを判断し、Aであると判断した場合はBをする」の意味で用いる。ただし、Aであるか否かの判断が不要である場合を除く。
また、システム又は装置とは、複数のコンピュータ、ハードウェア、装置等がネットワーク(一対一対応の通信接続を含む)等の通信手段で接続されて構成されるほか、1つのコンピュータ、ハードウェア、装置等によって実現される場合も含まれる。「装置」と「システム」とは、互いに同義の用語として用いる。もちろんのことながら、「システム」には、人為的な取り決めである社会的な「仕組み」(社会システム)にすぎないものは含まない。
また、各モジュールによる処理毎に又はモジュール内で複数の処理を行う場合はその処理毎に、対象となる情報を記憶装置から読み込み、その処理を行った後に、処理結果を記憶装置に書き出すものである。したがって、処理前の記憶装置からの読み込み、処理後の記憶装置への書き出しについては、説明を省略する場合がある。なお、ここでの記憶装置としては、ハードディスク、RAM(Random Access Memory)、外部記憶媒体、通信回線を介した記憶装置、CPU(Central Processing Unit)内のレジスタ等を含んでいてもよい。
Hereinafter, an example of a preferred embodiment for realizing the present invention will be described with reference to the drawings.
FIG. 1 is a conceptual module configuration diagram of a configuration example according to the present embodiment.
Note that a module generally refers to a component such as software (computer program) and hardware that can be logically separated. Therefore, the module in the present embodiment indicates not only a module in a computer program but also a module in a hardware configuration. Therefore, the present embodiment is directed to a computer program (program for causing a computer to execute each procedure, a program for causing a computer to function as each means, And a description of the system and method. However, for the sake of explanation, the words “store”, “store”, and equivalent words are used. However, when the embodiment is a computer program, these words are stored in a storage device or stored. This means that control is performed so as to be stored in the device. Also, the modules may correspond to the functions one-to-one, but in implementation, one module may be configured with one program, a plurality of modules may be configured with one program, and conversely, one module may be configured. May be composed of a plurality of programs. Further, a plurality of modules may be executed by one computer, or one module may be executed by a plurality of computers in a distributed or parallel environment. Note that one module may include another module. Hereinafter, the term “connection” is used not only for a physical connection but also for a logical connection (data transmission / reception, instruction, reference relationship between data, and the like). "Predetermined" means that the process is determined before the process of interest, not only before the process according to the present embodiment starts, but also after the process according to the present embodiment starts. Also, before the target processing, it is used in accordance with the situation / state at that time or with the intention of being determined according to the situation / state up to that time. When there are a plurality of “predetermined values”, the values may be different from each other, or two or more values (including all values, of course) may be the same. In addition, the description having the meaning of “if A, do B” is used to mean “determine whether or not A, and if it is A, perform B”. However, this does not apply to cases where it is not necessary to determine whether or not it is A.
In addition, a system or a device is configured by connecting a plurality of computers, hardware, devices, and the like by communication means such as a network (including one-to-one communication connection), and also includes one computer, hardware, and device. Etc. are also included. “Apparatus” and “system” are used as terms having the same meaning. Needless to say, the “system” does not include anything that is merely a social “mechanism” (social system) that is an artificial arrangement.
In addition, for each process performed by each module or when a plurality of processes are performed in a module, target information is read from a storage device, and after performing the process, a processing result is written to the storage device. is there. Therefore, the description of reading from the storage device before processing and writing to the storage device after processing may be omitted. Note that the storage device here may include a hard disk, a RAM (Random Access Memory), an external storage medium, a storage device via a communication line, a register in a CPU (Central Processing Unit), and the like.

本実施の形態である画像処理装置100は、文書画像からルビを抽出するものであって、図1の例に示すように、画像受付モジュール110、ルビ抽出(A)モジュール120、本文中心線抽出モジュール130、ルビ抽出(B)モジュール140、ルビ削除モジュール150、本文画像出力モジュール160を有している。画像受付モジュール110、ルビ抽出(A)モジュール120、本文中心線抽出モジュール130、ルビ抽出(B)モジュール140、ルビ削除モジュール150、本文画像出力モジュール160は、それぞれ接続されている。
文書画像を認識するにあたって、ルビが付されたままであると認識率を向上させることができない。例えば、古文書をテキスト化してデータベースにする場合に、ルビを抽出することが必要である。なお、ここでルビとは、一般的に、ふりがなのことをいう。漢字等の読みがなとして通常、縦書きならその漢字等の右、横書きならその漢字等の上に本文の文字よりも小さな文字(一般的には、ひらがな、カタカナ等)で書かれるものである。また、本実施の形態では、強調するためにふる傍点もルビに含む。
特に、ルビが本文に近い場合、画像全体にノイズが多い場合、又は、画像に幾何的な歪みがある場合では、ルビと本文行を完全に分離して抽出することは困難である。特に、古文書では、現代文に比較して、ルビが本文に近いものが多く、元の文書そのものが古いことから、画像全体にノイズが多くなり、また、文書そのものは貴重であることから大切に扱う必要があり、スキャナで読み込ませる場合に、プラテンガラスに押しつける等のように取り扱うことはできないので、読み込んだ画像に幾何的な歪みが発生してしまう場合が多い。
なお、主に縦書きを例示して説明する。横書きに対する処理については、90度回転で対応することが可能である。つまり、「縦方向への走査」は「横方向への走査」とし、「本文の右側」は「本文の上側」等と読み替えることで対応できる。また、横書きの場合は、画像受付モジュール110が、右への90度回転を施して、縦書きと同等の処理を行い、出力の際に左へ90度回転を施して元に戻すようにしてもよい。
The image processing apparatus 100 according to the present embodiment extracts ruby from a document image. As shown in the example of FIG. 1, an image receiving module 110, a ruby extraction (A) module 120, a text center line extraction It has a module 130, a ruby extraction (B) module 140, a ruby deletion module 150, and a text image output module 160. The image receiving module 110, the ruby extraction (A) module 120, the text center line extraction module 130, the ruby extraction (B) module 140, the ruby deletion module 150, and the text image output module 160 are connected to each other.
In recognizing a document image, if the ruby is still attached, the recognition rate cannot be improved. For example, it is necessary to extract ruby when an old document is converted to text and used as a database. Note that ruby here generally means furigana. As for the reading of kanji, etc., it is usually written with characters smaller than the characters in the text (generally, hiragana, katakana, etc.) on the right of the kanji etc. in vertical writing and on the kanji etc. in horizontal writing . Further, in the present embodiment, ruby includes a side point to be emphasized for emphasis.
In particular, when ruby is close to the text, when there is much noise in the entire image, or when there is geometric distortion in the image, it is difficult to completely separate and extract ruby and text lines. In particular, in old documents, ruby is more similar to the main text than in modern sentences, and since the original document itself is old, the entire image contains more noise, and the document itself is valuable because it is valuable. When the image is read by a scanner, the image cannot be handled such as pressing against a platen glass, so that a geometrical distortion often occurs in the read image.
The description will be mainly given of vertical writing. The processing for horizontal writing can be handled by rotating by 90 degrees. That is, "scanning in the vertical direction" can be dealt with as "scanning in the horizontal direction", and "right side of the text" can be read as "top of the text" or the like. Also, in the case of horizontal writing, the image receiving module 110 performs a process equivalent to vertical writing by performing a 90-degree rotation to the right, and performs a 90-degree rotation to the left to return to the original state when outputting. Is also good.

画像受付モジュール110は、画像を受け付けて、その画像を他のモジュール(例えば、ルビ抽出(A)モジュール120等)に渡す。画像を受け付けるとは、例えば、スキャナ、カメラ等で画像を読み込むこと、ファックス等で通信回線を介して外部機器から画像を受信すること、ハードディスク(コンピュータに内蔵されているものの他に、ネットワークを介して接続されているもの等を含む)等に記憶されている画像を読み出すこと等が含まれる。画像は、2値画像、多値画像(カラー画像を含む)であってもよい。受け付ける画像は、1枚であってもよいし、複数枚であってもよい。また、画像は、本文にルビが付されているものであって、画像の内容として、前述したような古文書、ビジネスに用いられる文書、広告宣伝用のパンフレット等であってもよい。   The image receiving module 110 receives an image and passes the image to another module (for example, the ruby extraction (A) module 120). Accepting an image includes, for example, reading an image with a scanner, a camera, or the like, receiving an image from an external device via a communication line by facsimile, etc., a hard disk (aside from a built-in computer, and a network) Read-out of an image stored in an image (e.g., an image or the like connected to an image). The image may be a binary image or a multi-value image (including a color image). The number of received images may be one or more. The image has ruby added to the text, and the content of the image may be an old document as described above, a document used for business, a pamphlet for advertising, or the like.

ルビ抽出(A)モジュール120は、画像受付モジュール110が受け付けた画像から本文に付されたルビを抽出する。例えば、特許文献1、特許文献2等に記載された既に知られた技術を用いてもよい。
また、ルビ抽出(A)モジュール120は、次のような処理を行うようにしてもよい。また、このルビ抽出(A)モジュール120による処理結果を、画像処理装置100によるルビの抽出結果としてもよい。その場合、画像処理装置100は、画像受付モジュール110、ルビ抽出(A)モジュール120、ルビ削除モジュール150、本文画像出力モジュール160によって構成するようにしてもよい。
(1)画像受付モジュール110が受け付けた画像の予め定められた方向にRLSA処理を行う。ここで「予め定められた方向」として、縦書きの文書画像である場合は、縦方向であり、横書きの文書画像である場合は、横方向である。
(2)(1)の処理結果の第1の画素塊の予め定められた倍数より大きい又は以上の大きさを有する第2の画素塊を抽出する。第1の画素塊は、RLSA処理の処理結果であれば、任意の画素塊であってよい。
(3)第1の画素塊と第2の画素塊間の距離が予め定められた距離未満又は以下である場合は、その第1の画素塊をルビとして抽出し、又は、その第1の画素塊とその第2の画素塊が重なり、その第1の画素塊はその第2の画素塊よりも小さく、その第1の画素塊の位置がその第2の画素塊内の予め定められた領域内である場合は、その第1の画素塊をルビとして抽出する。
「予め定められた倍数」として、1以上の倍数(実数)であればよく、例えば、2倍、2.5倍等がある。
「予め定められた領域」は、第2の画素塊を本文とした場合にルビがふられている方向にある領域であり、具体的には、縦書きである場合は、第2の画素塊の右半分の領域であり、横書きである場合は、第2の画素塊の上半分の領域である。
The ruby extraction (A) module 120 extracts ruby added to the text from the image received by the image receiving module 110. For example, a known technique described in Patent Literature 1, Patent Literature 2, or the like may be used.
The ruby extraction (A) module 120 may perform the following processing. Further, the processing result by the ruby extraction (A) module 120 may be used as the ruby extraction result by the image processing apparatus 100. In that case, the image processing apparatus 100 may be configured by the image receiving module 110, the ruby extraction (A) module 120, the ruby deletion module 150, and the text image output module 160.
(1) The RLSA process is performed in a predetermined direction of the image received by the image receiving module 110. Here, the “predetermined direction” is the vertical direction when the document image is a vertically written document image, and is the horizontal direction when the document image is a horizontally written document image.
(2) A second pixel block having a size that is greater than or greater than a predetermined multiple of the first pixel block as a result of the processing of (1) is extracted. The first pixel block may be any pixel block as long as it is a processing result of the RLSA process.
(3) When the distance between the first pixel block and the second pixel block is less than or less than a predetermined distance, the first pixel block is extracted as ruby, or the first pixel block is extracted. The chunk and its second pixel chunk overlap, the first pixel chunk is smaller than the second pixel chunk, and the location of the first pixel chunk is a predetermined area within the second pixel chunk. If it is within, the first pixel block is extracted as ruby.
The "predetermined multiple" may be any multiple (real number) of 1 or more, and includes, for example, 2 times and 2.5 times.
The “predetermined region” is a region in the direction in which ruby is applied when the second pixel block is set as the text. Specifically, when the vertical writing is performed, the second pixel block is used. Of the second pixel block in the case of horizontal writing.

本文中心線抽出モジュール130は、ルビ抽出(A)モジュール120によってルビを抽出された画像内の本文の中心線を抽出する。
また、本文中心線抽出モジュール130は、画像内の画素塊の形状が正方形に類似するものの中心を接続することによって、中心線を抽出するようにしてもよい。
また、本文中心線抽出モジュール130は、既に抽出した中心線間の統計的間隔にしたがって、中心線間に中心線を内挿するようにしてもよい。なお、「統計的間隔」とは、複数の中心線間の距離に対して、統計的処理を施した結果であり、例えば、中心線間の距離の平均値、中央値、最頻値等をいう。
また、本文中心線抽出モジュール130は、既に抽出した中心線間の統計的間隔とその中心線の先頭にある画素塊の位置にしたがって、中心線群の外側に中心線を外挿するようにしてもよい。
The text center line extraction module 130 extracts a text center line in the image from which the ruby is extracted by the ruby extraction (A) module 120.
Further, the text center line extraction module 130 may extract the center line by connecting the centers of pixels having a shape similar to a square in the image.
Further, the text center line extraction module 130 may interpolate the center lines between the center lines according to the statistical intervals between the center lines already extracted. The “statistical interval” is a result of performing a statistical process on a distance between a plurality of center lines. For example, an average value, a median value, a mode value, and the like of the distance between the center lines are calculated. Say.
In addition, the text center line extraction module 130 extrapolates the center line outside the center line group according to the statistical interval between the center lines already extracted and the position of the pixel block at the head of the center line. Is also good.

ルビ抽出(B)モジュール140は、画像内の画素塊とその画素塊に隣接する中心線間の距離が、ルビとそのルビに隣接する中心線間の距離より大きい又は以上である場合、その画素塊をルビとして抽出する。「ルビに隣接する中心線」として、例えば、そのルビに最も近い中心線がある。さらに、縦書きである場合、そのルビの左側に中心線があること(中心線の右側にそのルビがあること)を条件として付加してもよい。横書きである場合、そのルビの下側に中心線があること(中心線の上側にそのルビがあること)を条件として付加してもよい。
同様に、「画素塊に隣接する中心線」として、例えば、その画素塊に最も近い中心線がある。さらに、縦書きである場合、その画素塊の左側に中心線があること(中心線の右側にその画素塊があること)を条件として付加してもよい。横書きである場合、その画素塊の下側に中心線があること(中心線の上側にその画素塊があること)を条件として付加してもよい。
ここで「ルビとそのルビに隣接する中心線間の距離」として、そのルビの外接矩形のその中心線に近い角からその中心線間の距離としてもよい。そして、「画素塊とその画素塊に隣接する中心線間の距離」として、その画素塊の外接矩形の中心からその中心線間の距離としてもよい。
If the distance between the pixel block in the image and the center line adjacent to the pixel block is greater than or equal to the distance between ruby and the center line adjacent to the ruby, the ruby extraction (B) module 140 determines that pixel Extract the mass as ruby. As the “center line adjacent to ruby”, for example, there is a center line closest to the ruby. Furthermore, in the case of vertical writing, the condition that the center line is on the left side of the ruby (the ruby is on the right side of the center line) may be added as a condition. In the case of horizontal writing, it may be added as a condition that there is a center line below the ruby (the ruby exists above the center line).
Similarly, the “center line adjacent to the pixel block” includes, for example, a center line closest to the pixel block. Furthermore, in the case of vertical writing, the condition that a center line is on the left side of the pixel block (the pixel block is on the right side of the center line) may be added as a condition. In the case of horizontal writing, a condition that a center line exists below the pixel block (the pixel block exists above the center line) may be added as a condition.
Here, “distance between ruby and a center line adjacent to the ruby” may be a distance between the center line and a corner of the circumscribed rectangle of the ruby that is close to the center line. Then, the “distance between the pixel block and the center line adjacent to the pixel block” may be the distance between the center line of the circumscribed rectangle of the pixel block and the center line.

ルビ削除モジュール150は、ルビ抽出(A)モジュール120によって抽出されたルビとルビ抽出(B)モジュール140によって抽出されたルビを画像から削除する。本文だけの画像を生成するものである。
本文画像出力モジュール160は、ルビ削除モジュール150によって画像からルビを削除した画像を出力する。ここで画像を出力するとは、例えば、プリンタ等の印刷装置で印刷すること、ディスプレイ等の表示装置に表示すること、ファックス等の画像送信装置で画像を送信すること、画像データベース等の画像記憶装置へ画像を書き込むこと、メモリーカード等の記憶媒体に記憶すること、他の情報処理装置(例えば、文字認識装置等)へ渡すこと等が含まれる。
The ruby deletion module 150 deletes the ruby extracted by the ruby extraction (A) module 120 and the ruby extracted by the ruby extraction (B) module 140 from the image. This generates an image of only the text.
The body image output module 160 outputs an image in which ruby has been deleted from the image by the ruby deletion module 150. Outputting an image here means, for example, printing with a printing device such as a printer, displaying on a display device such as a display, transmitting an image with an image transmitting device such as a fax, or an image storage device such as an image database. Writing an image to a storage medium such as a memory card, passing the image to another information processing device (for example, a character recognition device or the like), and the like.

図2は、本実施の形態を利用したシステム構成例を示す説明図である。
図2(a)に示す例は、画像読取装置210と画像処理装置100と文字認識装置220によって構成されたシステムであり、具体的には、複写機、スキャナ、複合機(スキャナ、プリンタ、複写機、ファックス等のいずれか2つ以上の機能を有している画像処理装置)等として実現してもよい。
画像読取装置210は、画像処理装置100と接続されている。画像読取装置210は、本文にルビが付されている文書を読み取って、画像データとして画像処理装置100に渡す。
画像処理装置100は、画像読取装置210、文字認識装置220と接続されている。画像処理装置100は、画像読取装置210から受け取った画像からルビを削除し、本文だけとなった画像を生成する。なお、画像処理装置100は、図1の例に示した構成の他に、前述したように、画像受付モジュール110、ルビ抽出(A)モジュール120、ルビ削除モジュール150、本文画像出力モジュール160によって構成されていてもよい。
文字認識装置220は、画像処理装置100と接続されている。文字認識装置220は、画像処理装置100から受け取った画像に対して文字認識を行い、認識結果を出力する。例えば、画像読取装置210が読み込んだ画像と対応付けて、文書データベース等に記憶させてもよい。
FIG. 2 is an explanatory diagram showing a system configuration example using the present embodiment.
The example illustrated in FIG. 2A is a system configured by the image reading device 210, the image processing device 100, and the character recognition device 220. Specifically, a copier, a scanner, and a multifunction peripheral (scanner, printer, copier) Or an image processing device having at least two functions such as a machine and a facsimile.
The image reading device 210 is connected to the image processing device 100. The image reading device 210 reads a document in which ruby is added to the text and transfers it to the image processing device 100 as image data.
The image processing device 100 is connected to the image reading device 210 and the character recognition device 220. The image processing apparatus 100 deletes ruby from the image received from the image reading apparatus 210 and generates an image including only a text. The image processing apparatus 100 includes the image receiving module 110, the ruby extraction (A) module 120, the ruby deletion module 150, and the text image output module 160, as described above, in addition to the configuration shown in the example of FIG. It may be.
The character recognition device 220 is connected to the image processing device 100. The character recognition device 220 performs character recognition on the image received from the image processing device 100, and outputs a recognition result. For example, the information may be stored in a document database or the like in association with the image read by the image reading device 210.

図2(b)に示す例では、画像処理装置100、画像読取装置210、複合機215、文字認識装置220、文書DB装置230は、通信回線290を介してそれぞれ接続されているシステムである。通信回線290は、無線、有線、これらの組み合わせであってもよく、例えば、通信インフラとしてのインターネット、イントラネット等であってもよい。また、画像処理装置100、文字認識装置220、文書DB装置230による機能は、クラウドサービスとして実現してもよい。
画像読取装置210、複合機215は、文書を読み取って、通信回線290を介して、画像処理装置100にその画像を送信する。
画像処理装置100は、画像読取装置210、複合機215から画像を受け取って、処理結果(ルビを削除した画像)を、通信回線290を介して、文字認識装置220に送信する。
文字認識装置220は、画像処理装置100から画像を受け取って、文字認識処理を行って、通信回線290を介して、その認識処理結果を画像処理装置100に送信する。
In the example shown in FIG. 2B, the image processing device 100, the image reading device 210, the multifunction peripheral 215, the character recognition device 220, and the document DB device 230 are systems connected via a communication line 290, respectively. The communication line 290 may be wireless, wired, or a combination thereof, and may be, for example, the Internet or an intranet as a communication infrastructure. Further, the functions of the image processing device 100, the character recognition device 220, and the document DB device 230 may be realized as a cloud service.
The image reading device 210 and the multifunction peripheral 215 read a document and transmit the image to the image processing device 100 via the communication line 290.
The image processing apparatus 100 receives an image from the image reading apparatus 210 and the multifunction peripheral 215, and transmits a processing result (an image in which ruby has been deleted) to the character recognition apparatus 220 via the communication line 290.
The character recognition device 220 receives the image from the image processing device 100, performs a character recognition process, and transmits the result of the recognition process to the image processing device 100 via the communication line 290.

図3は、本実施の形態による処理例を示すフローチャートである。
ステップS302では、画像受付モジュール110は、画像を受け付ける。
ステップS304では、画像受付モジュール110は、ルビ抽出のための前処理を行う。ステップS304の詳細な処理については、図4の例に示すフローチャートを用いて後述する。
ステップS306では、ルビ抽出(A)モジュール120は、第1段のルビ抽出を行う。ステップS306の詳細な処理については、図6の例に示すフローチャートを用いて後述する。
ステップS308では、本文中心線抽出モジュール130は、本文における中心線を抽出する。ステップS308の詳細な処理については、図9の例に示すフローチャートを用いて後述する。
ステップS310では、ルビ抽出(B)モジュール140は、ステップS306、ステップS308の処理結果を用いて、第2段のルビ抽出を行う。ステップS310の詳細な処理については、図14の例に示すフローチャートを用いて後述する。
ステップS312では、ルビ削除モジュール150は、画像からルビを削除する。
ステップS314では、本文画像出力モジュール160は、ルビを削除した画像を出力する。この後、例えば、本文の画像に対して文字認識処理を行う。
FIG. 3 is a flowchart illustrating a processing example according to the present embodiment.
In step S302, the image receiving module 110 receives an image.
In step S304, the image receiving module 110 performs preprocessing for ruby extraction. The detailed processing of step S304 will be described later using the flowchart shown in the example of FIG.
In step S306, the ruby extraction (A) module 120 performs first-stage ruby extraction. The detailed processing of step S306 will be described later with reference to the flowchart shown in the example of FIG.
In step S308, the text center line extraction module 130 extracts a center line in the text. Detailed processing of step S308 will be described later using a flowchart shown in the example of FIG.
In step S310, the ruby extraction (B) module 140 performs second-stage ruby extraction using the processing results of steps S306 and S308. The detailed process of step S310 will be described later using a flowchart shown in the example of FIG.
In step S312, the ruby deletion module 150 deletes ruby from the image.
In step S314, the body image output module 160 outputs an image from which ruby has been deleted. Thereafter, for example, character recognition processing is performed on the image of the body.

図4は、本実施の形態(画像受付モジュール110)による処理例(ステップS304での処理例)を示すフローチャートである。
ステップS402では、受け付けた画像は、2値画像であるか否かを判断し、2値画像の場合はステップS406へ進み、それ以外の場合はステップS404へ進む。
ステップS404では、受け付けた画像に対して、2値化処理を行う。ここでの2値化処理は、既存の処理を採用すればよい。
ステップS406では、垂直方向にRLSA(Run Length Smoothing Algorithm)処理を行う。もちろんのことながら、横書きの文書であれば、水平方向にRLSA処理を行う。
例えば、本文文字2文字分以内の白ランは黒に変換する。RLSA処理とは、黒画素に挟まれた白画素の短いラン(長さM以下)を黒画素に置き換えることにより、図形融合を実現する処理である(K.Y.Wong, R.Casey, and F.M.Wahl. Document analysis system.IBM Journal of Research and Development, Vol.26, pp647−656, 1982 参照)。なお、「本文文字2文字分」としたが、予め定められた値の例示であって、これ以外の長さの白ランを黒に変換してもよい。
RLSA処理だけでルビ抽出を行うと、ルビと本文が近かったり、ごみ(ノイズ)があったり、本文に傾きがあると、ルビと本文も融合してしまうという欠点がある。したがって、このRLSA処理だけでルビを抽出することは困難である。
図5の例を用いて説明する。図5は、本実施の形態による処理例を示す説明図である。
図5(a)に示す例は、処理対象の2値画像である。縦書きでルビが付されている。
図5(b)に示す例は、図5(a)に示す2値画像に対して、RLSA処理を施したものである。本文文字2文字分以内の白ランを黒に変換したものである。
図5(c)に示す例は、図5(b)に示すRLSA処理後画像の先頭部分である領域500を拡大して示したものである。ルビRLSA結果510内のルビは本文RLSA結果520内の本文と離れているので、抽出することができ、ルビRLSA結果532内のルビも本文RLSA結果540内の本文と離れているので、抽出することができる。しかし、ルビRLSA結果512内のルビは本文RLSA結果520内の本文との距離が近いため、ルビRLSA結果512と本文RLSA結果520は接触している。そして、ルビRLSA結果530内のルビは本文RLSA結果540内の本文との距離が近いため、ルビRLSA結果530と本文RLSA結果540は接触している。
FIG. 4 is a flowchart illustrating a processing example (processing example in step S304) according to the present embodiment (image reception module 110).
In step S402, it is determined whether the received image is a binary image. If the image is a binary image, the process proceeds to step S406; otherwise, the process proceeds to step S404.
In step S404, a binarization process is performed on the received image. The binarization process here may employ an existing process.
In step S406, RLSA (Run Length Smoothing Algorithm) processing is performed in the vertical direction. Of course, in the case of a horizontally written document, the RLSA process is performed in the horizontal direction.
For example, a white run within two text characters is converted to black. The RLSA process is a process for realizing figure fusion by replacing short runs (length M or less) of white pixels sandwiched between black pixels with black pixels (KY Wong, R. Casey, and). FM Wahl.Document analysis system.IBM Journal of Research and Development, Vol.26, pp647-656, 1982). It should be noted that “two text characters” is described as an example of a predetermined value, and white runs of other lengths may be converted to black.
When ruby extraction is performed only by the RLSA process, there is a disadvantage that the ruby and the text are merged if the ruby and the text are close to each other, if there is dust (noise), or if the text is inclined. Therefore, it is difficult to extract ruby only by the RLSA process.
This will be described with reference to the example of FIG. FIG. 5 is an explanatory diagram illustrating a processing example according to the present embodiment.
The example shown in FIG. 5A is a binary image to be processed. Ruby is written vertically.
The example shown in FIG. 5B is obtained by performing RLSA processing on the binary image shown in FIG. The white run within two text characters is converted to black.
The example shown in FIG. 5C is an enlarged view of an area 500 which is the head of the RLSA-processed image shown in FIG. 5B. Since the ruby in the ruby RLSA result 510 is separated from the text in the text RLSA result 520, it can be extracted, and the ruby in the ruby RLSA result 532 is also separated from the text in the text RLSA result 540, so it is extracted. be able to. However, since the ruby in the ruby RLSA result 512 is close to the text in the text RLSA result 520, the ruby RLSA result 512 and the text RLSA result 520 are in contact with each other. Since the ruby in the ruby RLSA result 530 is close to the text in the text RLSA result 540, the ruby RLSA result 530 and the text RLSA result 540 are in contact with each other.

ステップS408では、ラベリング処理を行う。つまり、黒画素塊(Connection Component:CCともいわれる)のそれぞれを特定できるようにする。RLSA適用画像に対してラベリングして外接矩形を求める。図5(c)の例では、ルビRLSA結果510と本文RLSA結果520が別のラベルが付されるが、ルビRLSA結果512と本文RLSA結果520が接触しているため、同じラベルが付されることになる。なお、黒画素塊とは、黒画素が4連結又は8連結で連続する画素領域である。
ステップS410では、ノイズ除去処理を行う。行とは考えられないほど大きな幅を持つ黒画素塊や文字の一部(文字偏とか)とは考えられないほど小さな黒画素塊を除去する。例えば、各黒画素塊の大きさ(縦、幅、又は面積等)が予め定められた範囲内でない場合は、ノイズであると判断して除去すればよい。
In step S408, a labeling process is performed. In other words, each of the black pixel blocks (Connection Component: CC) can be specified. A circumscribed rectangle is obtained by labeling the RLSA application image. In the example of FIG. 5C, the ruby RLSA result 510 and the body RLSA result 520 are given different labels, but the same label is given because the ruby RLSA result 512 and the body RLSA result 520 are in contact with each other. Will be. Note that a black pixel block is a pixel region in which black pixels are consecutively connected in four connections or eight connections.
In step S410, a noise removal process is performed. A black pixel block having a width that is too large to be considered as a line and a black pixel block that is too small to be considered as a part of a character (such as character deviation) are removed. For example, if the size (length, width, area, etc.) of each black pixel block is not within a predetermined range, it may be determined to be noise and removed.

図6は、本実施の形態(ルビ抽出(A)モジュール120)による処理例(ステップS306での処理例)を示すフローチャートである。
ステップS602では、対象とする黒画素塊を選択する。ラベリング処理された黒画素塊であれば、いずれの黒画素塊であってもよい。
FIG. 6 is a flowchart illustrating a processing example (processing example in step S306) according to the present embodiment (ruby extraction (A) module 120).
In step S602, a target black pixel block is selected. Any black pixel block that has been subjected to labeling processing may be used.

ステップS604では、(対象黒画素塊の外接矩形の幅)*2以上の外接矩形の幅を有する黒画素塊(A)を抽出する。なお、ここでの「2」は、予め定められた倍数の例示であって、他の倍数、例えば、「2.5」等であってもよい。
ステップS606では、対象黒画素塊の外接矩形と黒画素塊(A)の外接矩形間のX軸距離を算出する。ここでの「X軸距離」は、黒画素塊(A)の外接矩形の右端のX座標と対象黒画素塊の左端のX座標間の距離である。図7の例に示すように、他黒画素塊720が黒画素塊(A)の外接矩形に該当し、対象黒画素塊710が対象黒画素塊の外接矩形に該当する。距離725がX軸距離に該当する。なお、横書きの場合は、Y軸距離となり、黒画素塊(A)の外接矩形の上端のX座標と対象黒画素塊の下端のY座標間の距離である。
In step S604, a black pixel block (A) having a width of a circumscribed rectangle equal to or more than (width of a circumscribed rectangle of the target black pixel block) * 2 is extracted. Here, “2” is an example of a predetermined multiple, and may be another multiple, for example, “2.5”.
In step S606, the X-axis distance between the circumscribed rectangle of the target black pixel block and the circumscribed rectangle of the black pixel block (A) is calculated. The “X-axis distance” here is the distance between the X coordinate of the right end of the circumscribed rectangle of the black pixel block (A) and the X coordinate of the left end of the target black pixel block. As shown in the example of FIG. 7, the other black pixel block 720 corresponds to a circumscribed rectangle of the black pixel block (A), and the target black pixel block 710 corresponds to a circumscribed rectangle of the target black pixel block. The distance 725 corresponds to the X-axis distance. In the case of horizontal writing, the distance is the Y-axis distance, which is the distance between the X coordinate of the upper end of the circumscribed rectangle of the black pixel block (A) and the Y coordinate of the lower end of the target black pixel block.

ステップS608では、「X軸距離≦rubi_distance_max」か否かを判断し、「X軸距離≦rubi_distance_max」である場合はステップS612へ進み、それ以外の場合はステップS610へ進む。なお、「rubi_distance_max」は、ルビと本文間の最大距離であり、予め定められた値である。図7の例では、「距離725≦rubi_distance_max」である場合は、対象黒画素塊710をルビとして抽出することになる。   In step S608, it is determined whether or not “X-axis distance ≦ rubi_distance_max”. If “X-axis distance ≦ rubi_distance_max”, the process proceeds to step S612. Otherwise, the process proceeds to step S610. Note that “rubi_distance_max” is the maximum distance between the ruby and the text, and is a predetermined value. In the example of FIG. 7, when “distance 725 ≦ rubi_distance_max”, the target black pixel block 710 is extracted as ruby.

ステップS610では、対象黒画素塊の外接矩形と黒画素塊(A)の外接矩形領域が重なり、かつ、対象黒画素塊の方が小さく、かつ、対象黒画素塊のX座標が相手の右半分側に存在するか否かを判断し、存在する場合はステップS612へ進み、それ以外の場合はステップS614へ進む。「対象黒画素塊の外接矩形と黒画素塊(A)の外接矩形領域が重なり」として、「対象黒画素塊の外接矩形」の全てが「黒画素塊(A)の外接矩形領域」に含まれている場合、「対象黒画素塊の外接矩形」の一部が「黒画素塊(A)の外接矩形領域」に含まれている場合を含む。図8(a)の例では、対象黒画素塊810の全体が他黒画素塊820に含まれており、図8(b)の例では、対象黒画素塊830の一部が他黒画素塊840に含まれており、いずれの例も「対象黒画素塊の外接矩形と黒画素塊(A)の外接矩形領域が重なっている」と判断する。また、「対象黒画素塊の方が小さく」とは、例えば、対象黒画素塊と黒画素塊(A)の外接矩形の幅、高さ、面積等を比較して、対象黒画素塊が黒画素塊(A)よりも小さい場合をいう。図8(a)の例では、対象黒画素塊810は他黒画素塊820よりも小さく、図8(b)の例では、対象黒画素塊830は他黒画素塊840よりも小さく、いずれの例も「対象黒画素塊の方が小さい」と判断する。また、「対象黒画素塊のX座標が相手の右半分側に存在する」とは、対象黒画素塊の位置が黒画素塊(A)の外接矩形領域の中心よりも右側にあることをいう。図8(a)の例では、対象黒画素塊810は他黒画素塊820の右半分側に存在し、図8(b)の例では、対象黒画素塊830は他黒画素塊840の右半分側に存在し、いずれの例も「対象黒画素塊のX座標が相手の右半分側に存在する」と判断する。この3つの条件を満たしているので、対象黒画素塊810、対象黒画素塊830はルビとして抽出されることとなる。
ステップS612では、対象黒画素塊をルビとする。
In step S610, the circumscribed rectangle of the target black pixel block and the circumscribed rectangular area of the black pixel block (A) overlap, the target black pixel block is smaller, and the X coordinate of the target black pixel block is the right half of the partner. It is determined whether or not it exists on the side. If it exists, the process proceeds to step S612; otherwise, the process proceeds to step S614. As “the circumscribed rectangle of the target black pixel block and the circumscribed rectangular region of the black pixel block (A) overlap”, all of the “circumscribed rectangle of the target black pixel block” are included in the “circumscribed rectangular region of the black pixel block (A)”. This includes the case where a part of the “circumscribed rectangle of the target black pixel block” is included in the “circumscribed rectangular area of the black pixel block (A)”. In the example of FIG. 8A, the entirety of the target black pixel block 810 is included in the other black pixel block 820, and in the example of FIG. 840, it is determined that “the circumscribed rectangle of the target black pixel block and the circumscribed rectangular region of the black pixel block (A) overlap”. Further, “the target black pixel block is smaller” means that, for example, the width, height, area, etc. of the circumscribed rectangle of the target black pixel block and the black pixel block (A) are compared, and the target black pixel block is black. This is the case where the pixel block is smaller than the pixel block (A). In the example of FIG. 8A, the target black pixel block 810 is smaller than the other black pixel block 820, and in the example of FIG. 8B, the target black pixel block 830 is smaller than the other black pixel block 840. Also in the example, it is determined that “the target black pixel block is smaller”. Further, “the X coordinate of the target black pixel block exists on the right half side of the other party” means that the position of the target black pixel block is on the right side of the center of the circumscribed rectangular area of the black pixel block (A). . In the example of FIG. 8A, the target black pixel block 810 exists on the right half side of the other black pixel block 820. In the example of FIG. 8B, the target black pixel block 830 is located on the right of the other black pixel block 840. It exists on the half side, and in each case, it is determined that “the X coordinate of the target black pixel block exists on the right half side of the other party”. Since these three conditions are satisfied, the target black pixel block 810 and the target black pixel block 830 are extracted as ruby.
In step S612, the target black pixel block is set to ruby.

ステップS614では、全ての黒画素塊を対象としたか否かを判断し、全ての黒画素塊を対象とした場合は処理を終了し(ステップS699)、それ以外の場合はステップS602に戻る。例えば、各黒画素塊に対して、処理済みであるか否かを示すフラグを付して処理を行えばよい。具体的には、ステップS614までの処理を行った黒画素塊に対しては、処理済みであることを示すフラグを付し、処理済みであることを示すフラグが付されていない黒画素塊があるか否かによってステップS614の判断処理(処理済みであることを示すフラグが付されていない黒画素塊がある場合はステップS614で「N」、処理済みであることを示すフラグが付されていない黒画素塊がない場合はステップS614で「Y」)を行えばよい。
なお、図6に示すフローチャート例では、ステップS608の判断処理とステップS610の判断処理の両方を行っているが、いずれか一方の判断処理としてもよい。
また、さらに、対象黒画素塊の外接矩形の幅が、予め定められた値(rubi_width_max)未満又は以下であることを条件として、ルビと判断するようにしてもよい。
In step S614, it is determined whether or not all the black pixel clusters have been targeted. If all the black pixel clusters have been targeted, the process ends (step S699), and otherwise, the process returns to step S602. For example, a process may be performed by attaching a flag indicating whether or not each black pixel block has been processed. More specifically, a flag indicating that processing has been performed is attached to the black pixel block that has been processed up to step S614, and a black pixel block that has not been flagged indicating that processing has been performed is added. The determination process of step S614 (if there is a black pixel block to which no flag indicating that processing has been performed is determined based on whether or not there is a black pixel block in step S614, a flag indicating that processing has been performed is added) If no black pixel block exists, “Y”) may be performed in step S614.
In the example of the flowchart shown in FIG. 6, both the determination processing in step S608 and the determination processing in step S610 are performed, but either one of the determination processing may be performed.
Further, it may be determined that the target pixel is a ruby on the condition that the width of the circumscribed rectangle of the target black pixel block is less than or less than a predetermined value (rubi_width_max).

図9は、本実施の形態(本文中心線抽出モジュール130)による処理例(ステップS308での処理例)を示すフローチャートである。
ステップS902では、ラベリング処理を行う。元の2値画像(RLSA処理後の画像ではない)をラベリングし、外接矩形を求める。
ステップS904では、ノイズ除去処理を行う。大きさを考慮して、文字ではない黒画素塊を除去する。例えば、各黒画素塊の大きさ(縦、幅、又は面積等)が予め定められた範囲内でない場合は、ノイズであると判断して除去すればよい。
ステップS906では、ルビ除去処理を行う。ルビ検出第1段(図6の例に示すフローチャート内のステップS612)で検出されたルビを除去する。したがって、以下の処理では、ルビが削除された画像、つまり、本文だけで構成されている画像(外接矩形群)が対象となる。
FIG. 9 is a flowchart illustrating a processing example (processing example in step S308) according to the present embodiment (text center line extraction module 130).
In step S902, a labeling process is performed. The original binary image (not the image after the RLSA processing) is labeled to obtain a circumscribed rectangle.
In step S904, a noise removal process is performed. A black pixel block that is not a character is removed in consideration of the size. For example, if the size (length, width, area, etc.) of each black pixel block is not within a predetermined range, it may be determined to be noise and removed.
In step S906, ruby removal processing is performed. The ruby detected in the first stage of ruby detection (step S612 in the flowchart shown in the example of FIG. 6) is removed. Therefore, in the following processing, an image from which ruby has been deleted, that is, an image (circumscribed rectangle group) composed of only the text is targeted.

ステップS908では、黒画素塊の重なり合成処理を行う。外接矩形に重なりがある場合、それらを合成する。ここで合成処理を行うのは、なるべく正方形に近い外接矩形の数を増やすためである。図10の例を用いて説明する。図10(a)の例では、「た」の文字画像について、黒画素塊の外接矩形として、黒画素塊外接矩形1010、黒画素塊外接矩形1020、黒画素塊外接矩形1030があることを示している。黒画素塊外接矩形1010と黒画素塊外接矩形1020との間、黒画素塊外接矩形1010と黒画素塊外接矩形1030との間で重なりがある。黒画素塊外接矩形1010と黒画素塊外接矩形1020を結合し、さらに、黒画素塊外接矩形1010と黒画素塊外接矩形1030を結合して、図10(b)の例に示すような合成黒画素塊外接矩形1050を生成する。   In step S908, an overlapping synthesis process of black pixel blocks is performed. If the circumscribed rectangles overlap, combine them. The reason why the combining process is performed here is to increase the number of circumscribed rectangles that are as close to square as possible. This will be described with reference to the example of FIG. In the example of FIG. 10A, the character image of “ta” indicates that there are a black pixel block circumscribed rectangle 1010, a black pixel block circumscribed rectangle 1020, and a black pixel block circumscribed rectangle 1030 as circumscribed rectangles of the black pixel block. ing. There is an overlap between the black pixel block circumscribed rectangle 1010 and the black pixel block circumscribed rectangle 1020, and between the black pixel block circumscribed rectangle 1010 and the black pixel block circumscribed rectangle 1030. The black pixel block circumscribed rectangle 1010 and the black pixel block circumscribed rectangle 1020 are combined, and the black pixel block circumscribed rectangle 1010 and the black pixel block circumscribed rectangle 1030 are combined to form a composite black as shown in the example of FIG. A pixel block circumscribed rectangle 1050 is generated.

ステップS910では、アスペクト比(縦横比)が1に近い外接矩形をピックアップ(抽出)する。日本語の場合、外接矩形が正方形に近い文字が多くあることを利用している。なお、「1に近い」とは、例えば、「縦/横」の算出結果と「1」の差分が、予め定められた値未満又は以下であるか否かによって判断すればよい。
ステップS912では、行毎にステップS910でピックアップした外接矩形の中心座標を収集する。収集した中心座標にフィッティングする直線を求める。これは本文の本文中心線になる。図11の例を用いて説明する。この例では、白い縦線(本文中心線1102〜1146)が、本文中心線である。白い矩形がステップS910でピックアップされた外接矩形である。本文中心線は、白い矩形の中心を通る線分である。したがって、本文中心線を求めるのに、2個以上の外接矩形が必要である。なお、本文中心線は縦線であり、予め定められた値未満又は以下の傾きは許容する。
In step S910, a circumscribed rectangle having an aspect ratio (aspect ratio) close to 1 is picked up (extracted). In the case of Japanese, the fact that there are many characters whose circumscribed rectangle is close to a square is used. Note that “close to 1” may be determined based on, for example, whether the difference between the “vertical / horizontal” calculation result and “1” is less than or less than a predetermined value.
In step S912, the center coordinates of the circumscribed rectangle picked up in step S910 are collected for each row. Find a straight line that fits the collected center coordinates. This is the text centerline of the text. This will be described with reference to the example of FIG. In this example, white vertical lines (text center lines 1102 to 1146) are text center lines. The white rectangle is the circumscribed rectangle picked up in step S910. The text center line is a line segment passing through the center of the white rectangle. Therefore, two or more circumscribed rectangles are required to obtain the text center line. Note that the text center line is a vertical line, and a slope less than or equal to a predetermined value is allowed.

ステップS914では、直線の内挿処理と外挿処理を行う。ステップS912までの処理では、同じ行内に2つ以上の正方矩形がなかった場合は、直線が求められないので、その場合は周辺の直線から内挿又は外挿をする。図12の例を用いて内挿処理、図13の例を用いて外挿処理を説明する。   In step S914, straight line interpolation processing and extrapolation processing are performed. In the processing up to step S912, if there are no two or more square rectangles in the same row, no straight line is obtained. In this case, interpolation or extrapolation is performed from the surrounding straight lines. The interpolation process will be described using the example of FIG. 12 and the extrapolation process will be described using the example of FIG.

図12は、本実施の形態による処理例を示す説明図である。直線の内挿は、予め定められた間隔内にある直線群から平均間隔を求め、それを利用して何本の直線の内挿が必要かを計算する。N本必要なら両側の有効な直線のy=0(画像の上端)の場所のX座標間を(N+1)等分し、両側の直線の傾きの平均を傾きとする直線を本文中心線とする。図12の例では、本文中心線1204〜1210の4本の線分から平均間隔を算出する。そして、本文中心線1202と本文中心線1204の間隔は、平均間隔の2倍以上であるので、その間隔に内挿中心線1252、内挿中心線1254を生成する。内挿中心線1252、内挿中心線1254の傾きは、本文中心線1202と本文中心線1204の傾きの平均としている。   FIG. 12 is an explanatory diagram illustrating a processing example according to the present embodiment. In the interpolation of a straight line, an average interval is obtained from a group of straight lines within a predetermined interval, and the number of straight lines to be interpolated is calculated using the average interval. If N lines are required, the X coordinate of the effective straight line on both sides at y = 0 (upper end of the image) is equally divided into (N + 1), and a straight line having the average of the slopes of the straight lines on both sides as the text center line . In the example of FIG. 12, an average interval is calculated from four line segments of the text center lines 1204 to 1210. Since the interval between the text center line 1202 and the text center line 1204 is twice or more the average interval, the interpolation center line 1252 and the interpolation center line 1254 are generated at the interval. The inclination of the interpolation center line 1252 and the interpolation center line 1254 is the average of the inclinations of the body center line 1202 and the body center line 1204.

図13は、本実施の形態による処理例を示す説明図である。直線の外挿は、まずラベリング画像を対象として、行の平均的な先頭位置を抽出する。次に、内挿の場合と同じように直線の平均間隔を求め、一番端の直線の平均間隔分離れた場所で、平均的な先頭位置周辺に文字らしい黒画素塊があるかを調べ、あればその位置に直線を置く。この場合、直線の傾きは一番端の直線と同じ値とする。図13の例では、本文中心線1302、本文中心線1304、本文中心線1306の3本の線分を、ステップS912で抽出している。そして、各線分の先頭にある黒画素塊の外接矩形(黒画素塊外接矩形1328、黒画素塊外接矩形1334、黒画素塊外接矩形1342)を抽出する。そして、多数の黒画素塊の外接矩形の下端である先頭位置1370を算出する。本文中心線1302、本文中心線1304、本文中心線1306の平均間隔を算出し、一番端の本文中心線1302の先頭(先頭位置1370)の右側(本文中心線1306の先頭の左側であってもよい)に、その平均間隔分離れた位置(探索範囲1360)に、黒画素塊があるか否かを判断する。探索範囲1360には、黒画素塊外接矩形1322、黒画素塊外接矩形1324があるので、外挿中心線1352を挿入する。外挿中心線1352の傾きは、本文中心線1302と同じとする。なお、外挿中心線1352の傾きを、本文中心線1302、本文中心線1304、本文中心線1306の傾きの平均としてもよい。   FIG. 13 is an explanatory diagram illustrating a processing example according to the present embodiment. In the extrapolation of a straight line, first, an average head position of a row is extracted from a labeling image. Next, in the same way as in the case of interpolation, find the average interval of the straight line, at the place separated by the average interval of the end straight line, check whether there is a character-like black pixel block around the average head position, If so, place a straight line at that position. In this case, the slope of the straight line has the same value as the endmost straight line. In the example of FIG. 13, three line segments of the text center line 1302, the text center line 1304, and the text center line 1306 are extracted in step S912. Then, a circumscribed rectangle of the black pixel block at the head of each line segment (black pixel block circumscribed rectangle 1328, black pixel block circumscribed rectangle 1334, black pixel block circumscribed rectangle 1342) is extracted. Then, the head position 1370 which is the lower end of the circumscribed rectangle of many black pixel blocks is calculated. The average interval between the main text center line 1302, main text center line 1304, and main text center line 1306 is calculated, and the right side of the head (top position 1370) of the end main text center line 1302 (the left side of the front of the main text center line 1306) is calculated. Then, it is determined whether or not there is a black pixel block at the position (search range 1360) separated by the average interval. The search range 1360 includes a black pixel block circumscribed rectangle 1322 and a black pixel block circumscribed rectangle 1324, so that the extrapolation center line 1352 is inserted. The inclination of the extrapolation center line 1352 is the same as the body center line 1302. Note that the inclination of the extrapolation center line 1352 may be an average of the inclinations of the body center line 1302, the body center line 1304, and the body center line 1306.

図14は、本実施の形態(ルビ抽出(B)モジュール140)による処理例(ステップS310での処理例)を示すフローチャートである。
ステップS1402では、第1段のルビ抽出(図6の例に示すフローチャート)で抽出されたルビの外接矩形の左上座標と最も近い本文中心線との距離を求め、その平均値を算出する。図15の例では、対象黒画素塊外接矩形1502の左上の座標と本文中心線1504間の距離である距離1512が対象となる。
ステップS1404では、対象とする黒画素塊を選択する。黒画素塊であれば、いずれの黒画素塊であってもよい。
ステップS1406では、対象黒画素塊の外接矩形の中心と対象黒画素塊に最も近い本文中心線との間の距離を算出する。図15の例では、対象黒画素塊外接矩形1502の中心の座標と本文中心線1504間の距離である距離1514が対象となる。
FIG. 14 is a flowchart illustrating a processing example (processing example in step S310) according to the present embodiment (ruby extraction (B) module 140).
In step S1402, the distance between the upper-left coordinate of the circumscribed rectangle of the ruby extracted in the first-stage ruby extraction (the flowchart shown in the example of FIG. 6) and the nearest text center line is calculated, and the average value is calculated. In the example of FIG. 15, the distance 1512 that is the distance between the upper left coordinate of the target black pixel block circumscribed rectangle 1502 and the text center line 1504 is targeted.
In step S1404, a target black pixel block is selected. Any black pixel block may be used as long as it is a black pixel block.
In step S1406, the distance between the center of the circumscribed rectangle of the target black pixel block and the text center line closest to the target black pixel block is calculated. In the example of FIG. 15, the distance 1514 which is the distance between the coordinates of the center of the target black pixel block circumscribed rectangle 1502 and the text center line 1504 is targeted.

ステップS1408では、(ステップS1406で算出した距離)>(ステップS1402で算出した平均値)であるか否かを判断し、(ステップS1406で算出した距離)>(ステップS1402で算出した平均値)である場合はステップS1410へ進み、それ以外の場合はステップS1412へ進む。
ステップS1410では、対象黒画素塊をルビとする。
ステップS1412では、全ての黒画素塊を対象としたか否かを判断し、全ての黒画素塊を対象とした場合は処理を終了し(ステップS1499)、それ以外の場合はステップS1404へ戻る。例えば、各黒画素塊に対して、処理済みであるか否かを示すフラグを付して処理を行えばよい。具体的には、ステップS1412までの処理を行った黒画素塊に対しては、処理済みであることを示すフラグを付し、処理済みであることを示すフラグが付されていない黒画素塊があるか否かによってステップS1412の判断処理(処理済みであることを示すフラグが付されていない黒画素塊がある場合はステップS1412で「N」、処理済みであることを示すフラグが付されていない黒画素塊がない場合はステップS1412で「Y」)を行えばよい。
In step S1408, it is determined whether (distance calculated in step S1406)> (average value calculated in step S1402), and (distance calculated in step S1406)> (average value calculated in step S1402). If there is, the process proceeds to step S1410; otherwise, the process proceeds to step S1412.
In step S1410, the target black pixel block is set to ruby.
In step S1412, it is determined whether all the black pixel clusters have been targeted. If all the black pixel clusters have been targeted, the process ends (step S1499). Otherwise, the process returns to step S1404. For example, a process may be performed by attaching a flag indicating whether or not each black pixel block has been processed. More specifically, a flag indicating that processing has been performed is attached to the black pixel block that has been processed up to step S1412, and a black pixel block that has not been flagged indicating that processing has been performed is added. The determination process of step S1412 (if there is a black pixel block to which a flag indicating that processing has been performed is not performed, “N” is determined in step S1412, and a flag indicating that processing has been performed is determined based on whether or not there is a black pixel block. If there is no black pixel block, “Y”) may be performed in step S1412.

なお、距離1512は、ステップS1402で算出する距離(左上が起点)とし、距離1514は、ステップS1406で算出する距離(中心が起点)とし、両者を異ならせている。具体的には、ステップS1402で算出する距離をステップS1406で算出する距離よりも短くなるようにしている。これは、ルビを確実に抽出するためである。なお、ステップS1402で算出する距離とステップS1406で算出する距離を同じとしてもよい。   The distance 1512 is the distance calculated at step S1402 (the upper left is the starting point), and the distance 1514 is the distance calculated at the step S1406 (the center is the starting point). Specifically, the distance calculated in step S1402 is shorter than the distance calculated in step S1406. This is to ensure that ruby is extracted. Note that the distance calculated in step S1402 and the distance calculated in step S1406 may be the same.

図16を参照して、本実施の形態の画像処理装置のハードウェア構成例について説明する。図16に示す構成は、例えばパーソナルコンピュータ(PC)等によって構成されるものであり、スキャナ等のデータ読み取り部1617と、プリンタ等のデータ出力部1618を備えたハードウェア構成例を示している。   An example of a hardware configuration of the image processing apparatus according to the present embodiment will be described with reference to FIG. The configuration illustrated in FIG. 16 is configured by, for example, a personal computer (PC) or the like, and illustrates a hardware configuration example including a data reading unit 1617 such as a scanner and a data output unit 1618 such as a printer.

CPU(Central Processing Unit)1601は、前述の実施の形態において説明した各種のモジュール、すなわち、画像受付モジュール110、ルビ抽出(A)モジュール120、本文中心線抽出モジュール130、ルビ抽出(B)モジュール140、ルビ削除モジュール150、本文画像出力モジュール160等の各モジュールの実行シーケンスを記述したコンピュータ・プログラムにしたがった処理を実行する制御部である。   The CPU (Central Processing Unit) 1601 is composed of various modules described in the above embodiment, that is, the image receiving module 110, the ruby extraction (A) module 120, the text center line extraction module 130, and the ruby extraction (B) module 140 , A ruby deletion module 150, a body image output module 160, and the like.

ROM(Read Only Memory)1602は、CPU1601が使用するプログラムや演算パラメータ等を格納する。RAM(Random Access Memory)1603は、CPU1601の実行において使用するプログラムや、その実行において適宜変化するパラメータ等を格納する。これらはCPUバス等から構成されるホストバス1604により相互に接続されている。   A ROM (Read Only Memory) 1602 stores a program used by the CPU 1601, an operation parameter, and the like. A RAM (Random Access Memory) 1603 stores programs used in the execution of the CPU 1601, parameters that change as appropriate in the execution, and the like. These are mutually connected by a host bus 1604 composed of a CPU bus and the like.

ホストバス1604は、ブリッジ1605を介して、PCI(Peripheral Component Interconnect/Interface)バス等の外部バス1606に接続されている。   The host bus 1604 is connected via a bridge 1605 to an external bus 1606 such as a PCI (Peripheral Component Interconnect / Interface) bus.

キーボード1608、マウス等のポインティングデバイス1609は、操作者により操作されるデバイスである。ディスプレイ1610は、液晶表示装置又はCRT(Cathode Ray Tube)等があり、各種情報をテキストやイメージ情報として表示する。また、ポインティングデバイス1609とディスプレイ1610の両方の機能を備えているタッチスクリーン等であってもよい。   A pointing device 1609 such as a keyboard 1608 and a mouse is a device operated by an operator. The display 1610 includes a liquid crystal display device or a CRT (Cathode Ray Tube), and displays various information as text or image information. Further, a touch screen or the like having both functions of the pointing device 1609 and the display 1610 may be used.

HDD(Hard Disk Drive)1611は、ハードディスク(フラッシュメモリ等であってもよい)を内蔵し、ハードディスクを駆動し、CPU1601によって実行するプログラムや情報を記録又は再生させる。ハードディスクには、対象とする画像、ルビを削除した画像(本文だけの画像)、各モジュールの処理結果(途中結果を含む)等が格納される。さらに、その他の各種データ、各種コンピュータ・プログラム等が格納される。   An HDD (Hard Disk Drive) 1611 incorporates a hard disk (which may be a flash memory or the like), drives the hard disk, and records or reproduces a program or information executed by the CPU 1601. The hard disk stores an image to be processed, an image from which ruby has been deleted (image of only the text), a processing result of each module (including an intermediate result), and the like. Further, various other data, various computer programs, and the like are stored.

ドライブ1612は、装着されている磁気ディスク、光ディスク、光磁気ディスク、又は半導体メモリ等のリムーバブル記録媒体1613に記録されているデータ又はプログラムを読み出して、そのデータ又はプログラムを、インタフェース1607、外部バス1606、ブリッジ1605、及びホストバス1604を介して接続されているRAM1603に供給する。なお、リムーバブル記録媒体1613も、データ記録領域として利用可能である。   The drive 1612 reads data or a program recorded on a removable recording medium 1613 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, and reads the data or the program into the interface 1607 and the external bus 1606. , A bridge 1605, and a RAM 1603 connected via a host bus 1604. Note that the removable recording medium 1613 can also be used as a data recording area.

接続ポート1614は、外部接続機器1615を接続するポートであり、USB、IEEE1394等の接続部を持つ。接続ポート1614は、インタフェース1607、及び外部バス1606、ブリッジ1605、ホストバス1604等を介してCPU1601等に接続されている。通信部1616は、通信回線に接続され、外部とのデータ通信処理を実行する。データ読み取り部1617は、例えばスキャナであり、ドキュメントの読み取り処理を実行する。データ出力部1618は、例えばプリンタであり、ドキュメントデータの出力処理を実行する。   The connection port 1614 is a port for connecting an externally connected device 1615, and has a connection unit such as USB, IEEE1394, or the like. The connection port 1614 is connected to the CPU 1601 and the like via the interface 1607, the external bus 1606, the bridge 1605, the host bus 1604, and the like. The communication unit 1616 is connected to a communication line and executes data communication processing with the outside. The data reading unit 1617 is, for example, a scanner, and executes a document reading process. The data output unit 1618 is, for example, a printer, and executes a document data output process.

なお、図16に示す画像処理装置のハードウェア構成は、1つの構成例を示すものであり、本実施の形態は、図16に示す構成に限らず、本実施の形態において説明したモジュールを実行可能な構成であればよい。例えば、一部のモジュールを専用のハードウェア(例えば特定用途向け集積回路(Application Specific Integrated Circuit:ASIC)等)で構成してもよく、一部のモジュールは外部のシステム内にあり通信回線で接続している形態でもよく、さらに図16に示すシステムが複数互いに通信回線によって接続されていて互いに協調動作するようにしてもよい。また、特に、パーソナルコンピュータの他、携帯情報通信機器(携帯電話、スマートフォン、モバイル機器、ウェアラブルコンピュータ等を含む)、情報家電、ロボット、複写機、ファックス、スキャナ、プリンタ、複合機(スキャナ、プリンタ、複写機、ファックス等のいずれか2つ以上の機能を有している画像処理装置)などに組み込まれていてもよい。   Note that the hardware configuration of the image processing apparatus illustrated in FIG. 16 illustrates one configuration example, and the present embodiment is not limited to the configuration illustrated in FIG. 16 and executes the modules described in the present embodiment. Any configuration is possible. For example, some modules may be constituted by dedicated hardware (for example, an application-specific integrated circuit (ASIC) or the like), and some modules may be in an external system and connected by a communication line. Alternatively, a plurality of the systems shown in FIG. 16 may be connected to each other by a communication line so as to cooperate with each other. In particular, in addition to personal computers, portable information communication devices (including mobile phones, smartphones, mobile devices, wearable computers, etc.), information appliances, robots, copiers, fax machines, scanners, printers, and multifunction devices (scanners, printers, An image processing apparatus having at least two functions such as a copying machine and a facsimile) may be incorporated.

なお、前述の実施の形態の説明において、比較処理において、「以上」、「以下」、「より大きい」、「より小さい(未満)」としたものは、その組み合わせに矛盾が生じない限り、それぞれ「より大きい」、「より小さい(未満)」、「以上」、「以下」としてもよい。   In the description of the above-described embodiment, in the comparison processing, “greater than”, “less than”, “greater than”, and “smaller (less than)” are used as long as there is no inconsistency in the combination. It may be “greater”, “smaller (less than)”, “greater than”, or “less than”.

なお、説明したプログラムについては、記録媒体に格納して提供してもよく、また、そのプログラムを通信手段によって提供してもよい。その場合、例えば、前記説明したプログラムについて、「プログラムを記録したコンピュータ読み取り可能な記録媒体」の発明として捉えてもよい。
「プログラムを記録したコンピュータ読み取り可能な記録媒体」とは、プログラムのインストール、実行、プログラムの流通等のために用いられる、プログラムが記録されたコンピュータで読み取り可能な記録媒体をいう。
なお、記録媒体としては、例えば、デジタル・バーサタイル・ディスク(DVD)であって、DVDフォーラムで策定された規格である「DVD−R、DVD−RW、DVD−RAM等」、DVD+RWで策定された規格である「DVD+R、DVD+RW等」、コンパクトディスク(CD)であって、読出し専用メモリ(CD−ROM)、CDレコーダブル(CD−R)、CDリライタブル(CD−RW)等、ブルーレイ・ディスク(Blu−ray(登録商標) Disc)、光磁気ディスク(MO)、フレキシブルディスク(FD)、磁気テープ、ハードディスク、読出し専用メモリ(ROM)、電気的消去及び書換可能な読出し専用メモリ(EEPROM(登録商標))、フラッシュ・メモリ、ランダム・アクセス・メモリ(RAM)、SD(Secure Digital)メモリーカード等が含まれる。
そして、前記のプログラムの全体又はその一部は、前記記録媒体に記録して保存や流通等させてもよい。また、通信によって、例えば、ローカル・エリア・ネットワーク(LAN)、メトロポリタン・エリア・ネットワーク(MAN)、ワイド・エリア・ネットワーク(WAN)、インターネット、イントラネット、エクストラネット等に用いられる有線ネットワーク、又は無線通信ネットワーク、さらにこれらの組み合わせ等の伝送媒体を用いて伝送させてもよく、また、搬送波に乗せて搬送させてもよい。
さらに、前記のプログラムは、他のプログラムの一部分又は全部であってもよく、又は別個のプログラムと共に記録媒体に記録されていてもよい。また、複数の記録媒体に分割して記録されていてもよい。また、圧縮や暗号化等、復元可能であればどのような態様で記録されていてもよい。
The above-described program may be provided by being stored in a recording medium, or the program may be provided by a communication unit. In this case, for example, the above-described program may be regarded as an invention of a “computer-readable recording medium on which the program is recorded”.
The “computer-readable recording medium on which the program is recorded” refers to a computer-readable recording medium on which the program is recorded, which is used for installing, executing, and distributing the program.
The recording medium is, for example, a digital versatile disk (DVD), which is a standard defined by the DVD Forum, such as "DVD-R, DVD-RW, DVD-RAM, etc.", and DVD + RW. Blu-ray discs such as "DVD + R, DVD + RW, etc." which are standards, compact discs (CDs), such as read-only memory (CD-ROM), CD recordable (CD-R), CD rewritable (CD-RW), etc. Blu-ray (registered trademark) Disc), magneto-optical disk (MO), flexible disk (FD), magnetic tape, hard disk, read-only memory (ROM), electrically erasable and rewritable read-only memory (EEPROM (registered trademark) )), Flash memory, random access memory (RAM) , SD (Secure Digital) memory card, and the like.
The whole or a part of the program may be recorded on the recording medium and stored or distributed. Further, the communication may be, for example, a wired network used for a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), the Internet, an intranet, an extranet, or a wireless communication. The data may be transmitted using a transmission medium such as a network or a combination thereof, or may be transmitted on a carrier wave.
Further, the above-mentioned program may be a part or all of another program, or may be recorded on a recording medium together with a separate program. Further, the program may be divided and recorded on a plurality of recording media. Also, the program may be recorded in any form as long as it can be restored, such as compression or encryption.

100…画像処理装置
110…画像受付モジュール
120…ルビ抽出(A)モジュール
130…本文中心線抽出モジュール
140…ルビ抽出(B)モジュール
150…ルビ削除モジュール
160…本文画像出力モジュール
210…画像読取装置
215…複合機
220…文字認識装置
230…文書DB装置
290…通信回線
REFERENCE SIGNS LIST 100 image processing device 110 image reception module 120 ruby extraction (A) module 130 text center line extraction module 140 ruby extraction (B) module 150 ruby deletion module 160 text image output module 210 image reading device 215 … MFP 220… Character recognition device 230… Document DB device 290… Communication line

Claims (5)

画像から本文に付されたルビを抽出する第1の抽出手段と、
前記本文の中心線を抽出する中心線抽出手段と、
前記画像内の画素塊と該画素塊に隣接する前記中心線間の距離が、前記ルビと該ルビに隣接する前記中心線間の距離より大きい又は以上である場合、該画素塊をルビとして抽出する第2の抽出手段
を有し、
前記中心線抽出手段は、既に抽出した中心線間の統計的間隔と該中心線の先頭にある画素塊の位置にしたがって、中心線群の外側に中心線を外挿する、
画像処理装置。
First extracting means for extracting ruby added to the text from the image;
Center line extracting means for extracting a center line of the text,
If the distance between the pixel block in the image and the center line adjacent to the pixel block is greater than or equal to the distance between the ruby and the center line adjacent to the ruby, the pixel block is extracted as ruby. second extracting means for possess,
The center line extracting unit extrapolates the center line outside the center line group according to the statistical interval between the center lines already extracted and the position of the pixel block at the head of the center line.
Image processing device.
前記第1の抽出手段によって抽出されたルビと前記第2の抽出手段によって抽出されたルビを前記画像から削除する削除手段と、
前記削除手段によって前記画像からルビを削除した画像を出力する出力手段
をさらに有する請求項1に記載の画像処理装置。
Deleting means for deleting the ruby extracted by the first extracting means and the ruby extracted by the second extracting means from the image;
The image processing apparatus according to claim 1, further comprising an output unit configured to output an image in which ruby has been deleted from the image by the deletion unit.
前記ルビと該ルビに隣接する前記中心線間の距離として、該ルビの外接矩形の該中心線に近い角から該中心線間の距離とし、
前記画素塊と該画素塊に隣接する前記中心線間の距離として、該画素塊の外接矩形の中心から該中心線間の距離とする、
請求項1又は2に記載の画像処理装置。
As the distance between the ruby and the center line adjacent to the ruby, a distance between the center lines from an angle close to the center line of a circumscribed rectangle of the ruby;
As the distance between the pixel block and the center line adjacent to the pixel block, the distance between the center line from the center of the circumscribed rectangle of the pixel block,
The image processing device according to claim 1.
前記第1の抽出手段は、
前記画像の予め定められた方向にRLSA処理を行うRLSA手段と、
前記RLSA手段による処理結果の第1の画素塊の予め定められた倍数より大きい又は以上の大きさを有する第2の画素塊を抽出する第3の抽出手段と、
前記第1の画素塊と前記第2の画素塊間の距離が予め定められた距離未満又は以下である場合は、該第1の画素塊をルビとして抽出し、又は、該第1の画素塊と該第2の画素塊が重なり、該第1の画素塊は該第2の画素塊よりも小さく、該第1の画素塊の位置が該第2の画素塊内の予め定められた領域内である場合は、該第1の画素塊をルビとして抽出するルビ抽出手段
を含む、
請求項1から3のいずれか一項に記載の画像処理装置。
The first extracting means includes:
RLSA means for performing RLSA processing in a predetermined direction of the image;
Third extraction means for extracting a second pixel block having a size larger than or greater than a predetermined multiple of the first pixel block as a processing result by the RLSA unit;
If the distance between the first pixel block and the second pixel block is less than or less than a predetermined distance, the first pixel block is extracted as ruby, or the first pixel block is extracted as ruby. And the second pixel block overlaps, the first pixel block is smaller than the second pixel block, and the position of the first pixel block is within a predetermined area in the second pixel block. If it is, ruby extracting means for extracting the first pixel block as ruby
including,
The image processing device according to claim 1 .
コンピュータを、
画像から本文に付されたルビを抽出する第1の抽出手段と、
前記本文の中心線を抽出する中心線抽出手段と、
前記画像内の画素塊と該画素塊に隣接する前記中心線間の距離が、前記ルビと該ルビに隣接する前記中心線間の距離より大きい又は以上である場合、該画素塊をルビとして抽出する第2の抽出手段
として機能させ
前記中心線抽出手段は、既に抽出した中心線間の統計的間隔と該中心線の先頭にある画素塊の位置にしたがって、中心線群の外側に中心線を外挿する、
画像処理プログラム。
Computer
First extracting means for extracting ruby added to the text from the image;
Center line extracting means for extracting a center line of the text,
If the distance between the pixel block in the image and the center line adjacent to the pixel block is greater than or equal to the distance between the ruby and the center line adjacent to the ruby, the pixel block is extracted as ruby. Function as a second extraction means ,
The center line extracting unit extrapolates the center line outside the center line group according to the statistical interval between the center lines already extracted and the position of the pixel block at the head of the center line.
Image processing program.
JP2015247177A 2015-12-18 2015-12-18 Image processing apparatus and image processing program Active JP6676955B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015247177A JP6676955B2 (en) 2015-12-18 2015-12-18 Image processing apparatus and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015247177A JP6676955B2 (en) 2015-12-18 2015-12-18 Image processing apparatus and image processing program

Publications (2)

Publication Number Publication Date
JP2017111720A JP2017111720A (en) 2017-06-22
JP6676955B2 true JP6676955B2 (en) 2020-04-08

Family

ID=59080783

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015247177A Active JP6676955B2 (en) 2015-12-18 2015-12-18 Image processing apparatus and image processing program

Country Status (1)

Country Link
JP (1) JP6676955B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2569103B2 (en) * 1988-02-01 1997-01-08 富士電機株式会社 Character detection method
JPH0271379A (en) * 1988-09-07 1990-03-09 Fuji Xerox Co Ltd Picture processor
JP3837193B2 (en) * 1996-05-13 2006-10-25 松下電器産業株式会社 Character line extraction method and apparatus
JP4162195B2 (en) * 2002-08-29 2008-10-08 株式会社リコー Image processing apparatus and image processing program
US9330070B2 (en) * 2013-03-11 2016-05-03 Microsoft Technology Licensing, Llc Detection and reconstruction of east asian layout features in a fixed format document

Also Published As

Publication number Publication date
JP2017111720A (en) 2017-06-22

Similar Documents

Publication Publication Date Title
JP4577421B2 (en) Image processing apparatus and image processing program
JP2006246435A (en) Image processing apparatus, control method thereof, and program
US20150213332A1 (en) Image processing apparatus, non-transitory computer readable medium, and image processing method
US20180225541A1 (en) Image processing apparatuses and non-transitory computer readable medium
JP4626777B2 (en) Information processing apparatus and information processing program
JP6221220B2 (en) Image processing apparatus and image processing program
JP4780184B2 (en) Image processing apparatus and image processing program
JP6676955B2 (en) Image processing apparatus and image processing program
JP6303671B2 (en) Image processing apparatus and image processing program
JP2020204905A (en) Character recognition device, document file generation method, document file generation program
US8542922B2 (en) Image processing apparatus, image processing method, and computer readable medium
JP6852364B2 (en) Image processing equipment and image processing program
JP5742367B2 (en) Image processing apparatus and image processing program
JP5440043B2 (en) Image processing apparatus and image processing program
JP5476884B2 (en) Image processing apparatus and image processing program
JP5673277B2 (en) Image processing apparatus and program
JP5262778B2 (en) Image processing apparatus and image processing program
JP7342518B2 (en) Image processing device and image processing program
JP6922421B2 (en) Reading method guidance device, reading method guidance program and image processing system
AU2007237365B2 (en) Colour reproduction in a colour document image
JP6606885B2 (en) Image processing apparatus and image processing program
JP2012022359A (en) Image processing device and image processing program
JP4872780B2 (en) Image processing system and image processing program
JP4882929B2 (en) Image processing apparatus and image processing program
JP2021189859A (en) Document data generation device, image forming apparatus, and document data generation program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181022

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190909

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191001

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191127

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: 20200212

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200225

R150 Certificate of patent or registration of utility model

Ref document number: 6676955

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350