JP4849883B2 - Row direction determination program, method and apparatus - Google Patents
Row direction determination program, method and apparatus Download PDFInfo
- Publication number
- JP4849883B2 JP4849883B2 JP2005363842A JP2005363842A JP4849883B2 JP 4849883 B2 JP4849883 B2 JP 4849883B2 JP 2005363842 A JP2005363842 A JP 2005363842A JP 2005363842 A JP2005363842 A JP 2005363842A JP 4849883 B2 JP4849883 B2 JP 4849883B2
- Authority
- JP
- Japan
- Prior art keywords
- average
- vertical
- appearance probability
- horizontal
- overlap
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Character Input (AREA)
Description
本発明は、OCR(Optical Character Recognition)技術に関し、より詳しくは縦書き又は横書きのいずれかを判定するための技術に関する。 The present invention relates to an OCR (Optical Character Recognition) technique, and more particularly to a technique for determining either vertical writing or horizontal writing.
OCR技術は、スキャナなどで読み込んだ文書画像データを対象に、レイアウトを認識し、テキスト領域について文字認識を実施する技術である。近年、帳票などの文書画像データの保管、検索、再利用のために、OCR技術を用いた文書管理システムが注目を集めている。当該文書管理システムにおいて、テキスト領域について文字認識を実施する時には、まず文字の配置から行を求めるが、テキスト領域内の文字の配置によっては、行方向の判定を誤る場合があった。 The OCR technique is a technique for recognizing a layout for text image data read by a scanner or the like and performing character recognition on a text area. In recent years, document management systems using OCR technology have attracted attention for storing, retrieving and reusing document image data such as forms. In the document management system, when character recognition is performed on a text area, a line is first obtained from the arrangement of characters. However, depending on the arrangement of characters in the text area, the line direction may be erroneously determined.
従来、行方向を判定する技術には以下のようなものがある。 Conventional techniques for determining the row direction include the following.
例えば、特開平8−263587号公報には、言語情報を使った文字列方向推定技術が開示されている。具体的には、縦方向と横方向に射影した画像のヒストグラムを生成し、当該ヒストグラムから画像と画像の間隔が狭い方向を検出して行方向と判定する。どちらの方向でも文字間隔がほぼ同じ場合には、2つの方向で文字認識を行い、認識結果の文字列を単語辞書を使って文節に分解する。この時の文節数を縦方向、横方向で比較し、文節数の少ない方の方向を出力する。たとえば、
銀行
振込
を含む画像において、横方向では「銀行」及び「振込」が文節を構成しており、文節数は2となる。縦方向では「銀」、「振」、「行」及び「込」の4つとなり、横方向が行方向として選択される。
For example, Japanese Patent Laid-Open No. 8-263587 discloses a character string direction estimation technique using language information. Specifically, a histogram of an image projected in the vertical direction and the horizontal direction is generated, and a direction in which the interval between the images is narrow is detected from the histogram to determine the row direction. When the character spacing is almost the same in either direction, character recognition is performed in two directions, and the character string of the recognition result is decomposed into phrases using a word dictionary. The number of phrases at this time is compared in the vertical and horizontal directions, and the direction with the smaller number of phrases is output. For example,
In an image including bank transfer, in the horizontal direction, “bank” and “transfer” constitute a phrase, and the number of phrases is two. In the vertical direction, there are four “silver”, “shake”, “row”, and “include”, and the horizontal direction is selected as the row direction.
また、特開平08−63545号公報には、以下のような技術が開示されている。すなわち、処理対象として特定された文字領域の外接行を抽出し、各外接行に対して文字方向を生成する。各外接行と各文字方向について文字認識処理を行って文字ラティスを生成し、文字ラティスごとに言語処理を行って各文字ラティスの構成単語率または自立語含有率を求める。文字ラティスごとに求められた構成単語率または自立語含有率に基づいて特定領域の文字方向および行方向を決定する。 Japanese Patent Application Laid-Open No. 08-63545 discloses the following technique. That is, the circumscribed line of the character area specified as the processing target is extracted, and the character direction is generated for each circumscribed line. Character recognition processing is performed for each circumscribed line and each character direction to generate a character lattice, and language processing is performed for each character lattice to determine the constituent word rate or the independent word content rate of each character lattice. The character direction and line direction of the specific area are determined based on the constituent word rate or the independent word content rate obtained for each character lattice.
さらに、特開平07−220027号公報には、以下のような技術が開示されている。すなわち、処理対象として特定された文字領域の外接行を抽出し、各外接行に対して文字方向を生成する。各外接行と各文字方向について文字認識処理を行って文字ラティスを生成し、文字ラティスごとに言語処理を行って各文字ラティスの構成単語数または表記長が1の自立語数を求める。文字ラティスごとに求められた構成単語数または表記長が1の自立語数に基づいて特定領域の文字方向および行方向を決定する。 Further, Japanese Patent Laid-Open No. 07-220027 discloses the following technique. That is, the circumscribed line of the character area specified as the processing target is extracted, and the character direction is generated for each circumscribed line. Character recognition processing is performed for each circumscribed line and each character direction to generate a character lattice, and language processing is performed for each character lattice to obtain the number of words constituting the character lattice or the number of independent words whose notation length is 1. The character direction and line direction of the specific region are determined based on the number of constituent words or the number of independent words obtained for each character lattice.
さらに、特開2000−20638号公報には、縦書き/横書きを確実に判別可能な文字列方向判別方法が開示されている。具体的には、文字列が記載された文書を画素に分解して画像データとして読み取る画像読取処理と、文書の文字列が縦書きであると仮定して、画像読取処理で読み取られた画像データから縦方向の冒頭部の文字列を抽出する第1の文字列抽出処理と、第1の文字列抽出処理で抽出された文字列から、この文字列を構成する複数の文字を切り出して認識する第1の文字認識処理と、第1の文字認識処理で認識された複数の文字でつづられる単語を、単語辞書を参照して検索する第1の単語検索処理と、文書の文字列が横書きであると仮定して、画像読取処理で読み取られた画像データから横方向の冒頭部の文字列を抽出する第2の文字列抽出処理と、第2の文字列抽出処理で抽出された文字列から、この文字列を構成する複数の文字を切り出して認識する第2の文字認識処理と、第2の文字認識処理で認識された複数の文字でつづられる単語を、単語辞書を参照して検索する第2の単語検索処理と、第1及び第2の単語検索処理の検索結果に基づいて、文書に記載された文字列の方向が縦書きか横書きかを判定する縦横判定処理とを行うものである。 Furthermore, Japanese Patent Application Laid-Open No. 2000-20638 discloses a character string direction determination method capable of reliably determining vertical writing / horizontal writing. Specifically, an image reading process in which a document in which a character string is described is decomposed into pixels and read as image data, and image data read in the image reading process on the assumption that the character string of the document is vertically written From the first character string extraction process for extracting the first character string in the vertical direction from the character string and the character string extracted by the first character string extraction process, a plurality of characters constituting this character string are cut out and recognized. A first word recognition process, a first word search process for searching a word spelled by a plurality of characters recognized in the first character recognition process by referring to a word dictionary, and a character string of a document is written horizontally Assuming that there is a second character string extraction process for extracting a character string at the beginning of the horizontal direction from the image data read by the image reading process, and a character string extracted by the second character string extraction process Cut out multiple characters that make up this string A second character recognition process for recognizing, a second word search process for searching for a word spelled by a plurality of characters recognized in the second character recognition process with reference to a word dictionary, and the first and second And vertical / horizontal determination processing for determining whether the direction of the character string described in the document is vertical writing or horizontal writing based on the search result of the word search processing.
また、特開平08−194773号公報には、以下のような技術が開示されている。すなわち、入力された文書画像から文字ごとに外接矩形を抽出し、この文書画像の行方向および列方向ごとに各外接矩形同士の重なり度を算出して、行方向と列方向の重なり度を比較して、文書画像の横書きか縦書きかを判定する第1の横書き/縦書き判定工程と、文書画像の行方向および列方向に隣接するそれぞれの外接矩形の中心間距離を求めて、行方向および、列方向における中心間距離の平均値を基にした文書画像の第2の横書き/縦書き判定工程とを有し、処理対象文字数に応じて、第1、第2の判定工程を選択して横書きか縦書きかの判定を行う。その後、外接矩形の座標変換を行い、さらに文書画像の傾きを検出して、傾き補正を行ったのち、文字の切り出しおよび文字認識を行う。 Japanese Patent Laid-Open No. 08-194773 discloses the following technique. In other words, a circumscribed rectangle is extracted for each character from the input document image, and the degree of overlap between each circumscribed rectangle is calculated for each row direction and column direction of the document image, and the degree of overlap between the row direction and the column direction is compared. Then, the first horizontal writing / vertical writing determination step for determining whether the document image is written horizontally or vertically and the distance between the centers of the respective circumscribed rectangles adjacent to each other in the row direction and the column direction of the document image are obtained. And a second horizontal / vertical writing determination step of the document image based on the average value of the center-to-center distance in the column direction, and the first and second determination steps are selected according to the number of characters to be processed. Determine whether horizontal writing or vertical writing. Thereafter, the coordinate transformation of the circumscribed rectangle is performed, and the inclination of the document image is detected and the inclination is corrected, and then the character is cut out and recognized.
さらに、特開昭62−54380号公報には、以下のような技術が開示されている。すなわち、入力画像の内、擬似正方形の領域を縦方向・横方向に走査して文字部を形成する画素についてヒストグラムを求め、このヒストグラムから求めた文字間隔長の平均値を比較することにより、簡易な方法で入力画像の行方向を抽出するものである。 Further, Japanese Patent Laid-Open No. 62-54380 discloses the following technique. That is, by simply scanning the pseudo-square area of the input image in the vertical and horizontal directions to obtain a histogram for the pixels forming the character part, and comparing the average value of the character spacing lengths obtained from this histogram, In this way, the row direction of the input image is extracted.
また、特開昭61−235990号公報には、以下のような技術が開示されている。すなわち、入力画像を縦方向・横方向に走査して文字部を形成する画素のヒストグラムを求め、ヒストグラムから求めた縦方向・横方向それぞれの文字間隔長の平均値を比較することにより、簡易に文書の行方向を抽出し、認識候補文字を編集するものである。即ち認識部には切り出された認識対象文字の矩形が順次入力され、切り出した字の各画素について、矢印が示す方向に着目画素を含んでM個以上連なっているか否かを調べ方向コードを設定する。方向コード毎に各画素の連結性を調べてストロークを抽出し、ストロークの数・位置・長さ等の特微量を抽出する。抽出した特微量を辞書に登録されている文字の特微量と照合し、最も似た文字を認識候補文字とする。 Japanese Patent Application Laid-Open No. 61-235990 discloses the following technique. That is, the input image is scanned in the vertical and horizontal directions to obtain a histogram of the pixels forming the character portion, and the average value of the lengths of the character intervals in the vertical and horizontal directions obtained from the histogram is compared. This extracts the line direction of the document and edits the recognition candidate characters. In other words, the rectangle of the recognition target character that has been cut out is sequentially input to the recognition unit, and for each pixel of the cut out character, it is checked whether there are M or more consecutive pixels including the pixel of interest in the direction indicated by the arrow, and a direction code is set To do. For each direction code, the connectivity of each pixel is examined to extract a stroke, and features such as the number, position, and length of the stroke are extracted. The extracted feature amount is collated with the feature amount of characters registered in the dictionary, and the most similar character is set as a recognition candidate character.
さらに、特開2004−272798号公報には、文字情報を含んだ画像の読み取りを行う画像読み取り装置が開示されている。具体的には、当該装置は、読み込まれた白黒2階調のモノクロ画像に含まれる、文字を構成する連続した黒ピクセルの領域をグループ化し、グループ化した黒ピクセル連続領域のグループ外接矩形情報を抽出するラベリング処理手段と、ラベリング処理手段により抽出されたグループ化された黒ピクセル連続領域のグループ外接矩形の位置情報から行矩形情報を抽出する行抽出処理手段と、ラベリング処理手段によりグループ化された黒ピクセル連続領域の位置、サイズから、句読点、ピリオド、コンマを識別する句読点識別手段と、画像に含まれる文字の行矩形に対する、句読点、ピリオド、コンマの位置関係から行の向きを判定する行方向判定手段とを備えるものである。 Further, Japanese Patent Application Laid-Open No. 2004-272798 discloses an image reading apparatus that reads an image including character information. Specifically, the apparatus groups continuous black pixel areas constituting a character and includes group circumscribing rectangle information of the black pixel continuous areas included in the read black-and-white two-tone monochrome image. Grouped by the labeling processing means, the line extraction processing means for extracting the line rectangle information from the position information of the group circumscribed rectangles of the grouped black pixel continuous areas extracted by the labeling processing means, and the labeling processing means A punctuation mark identifying means that identifies punctuation marks, periods, and commas from the position and size of the continuous area of black pixels, and a line direction that determines the line direction from the positional relationship of punctuation marks, periods, and commas with respect to the line rectangle of characters in the image Determination means.
また、特開2002−56398号公報には、以下のような技術が開示されている。すなわち、文書画像の背景となる白画素のランを縦と横の両方向で抽出し、予め与えられた閾値以上の白画素のランに対して隣接する白画素のラン同士を統合して白画素領域の矩形枠を縦と横の両方向で作成し、矩形枠で縦と横の両方向で所定の幅以上の矩形枠を抽出し、抽出した縦方向と横方向の矩形枠で数の多い方をその文書の文字列方向と決定するものである。白画素のランは、実質的にピッチに関連した情報である。
上で述べた技術には、行方向を判定する際に言語情報として単語の情報を用いる処理を開示しているものがある。しかし、単語が存在しない部分について処理を行った場合には、判断を誤る場合がある。また、ピッチを用いて行方向を判定する場合には、縦横とも同じピッチで記載された文字領域については正しく判断することができない。さらに、句読点、ピリオド、コンマの位置関係から行方向を判定する場合には、これらが存在しないものについては、判断することができない。 Some of the techniques described above disclose a process that uses word information as language information when determining the row direction. However, when processing is performed on a portion where no word exists, the determination may be wrong. In addition, when the line direction is determined using the pitch, it is not possible to correctly determine the character area described at the same pitch in both the vertical and horizontal directions. Furthermore, when the line direction is determined from the positional relationship of punctuation marks, periods, and commas, it is not possible to determine those that do not exist.
このように従来の技術では、行方向の判定につき正解率は高くない。 As described above, in the conventional technique, the accuracy rate for the determination in the row direction is not high.
従って、本発明の目的は、行方向の判定につき正解率を向上させる新規な技術を提供することである。 Therefore, an object of the present invention is to provide a novel technique for improving the accuracy rate in determining the row direction.
本発明の第1の形態に係る行方向判定方法は、縦書き又は横書きの文字群の読み取り結果に対する縦方向の文字認識処理による第1の認識文字数と、読み取り結果に対する横方向の文字認識処理による第2の認識文字数とを取得するステップと、n(nは2以上の整数)個の連続文字の出現確率を格納するnグラムデータ格納部を参照して、縦方向の文字認識処理によるn個の連続認識文字の第1の平均出現確率と、横方向の文字認識処理によるn個の連続認識文字の第2の平均出現確率とを算出するステップと、第1の認識文字数と第2の認識文字数とが所定の条件を満たす場合には、第1の平均出現確率と第2の平均出現確率の大小に応じて縦書き又は横書きを判定する判定ステップとを含む。このようにnグラムを用いることによって、単語でないような語が認識された場合であっても行方向を正確に判定することができるようになる。 The row direction determination method according to the first aspect of the present invention is based on the first number of recognized characters by the vertical character recognition process for the vertical or horizontal character group reading result and the horizontal character recognition process for the read result. The step of obtaining the second number of recognized characters and the n-gram data storage unit for storing the appearance probability of n (n is an integer of 2 or more) continuous characters, and n characters by vertical character recognition processing Calculating a first average appearance probability of the consecutively recognized characters and a second average appearance probability of the n consecutively recognized characters by the character recognition processing in the horizontal direction, the first number of recognized characters, and the second recognition When the number of characters satisfies a predetermined condition, a determination step of determining vertical writing or horizontal writing according to the magnitude of the first average appearance probability and the second average appearance probability is included. By using n-grams in this way, the row direction can be accurately determined even when a word that is not a word is recognized.
また、上で述べた所定の条件を、第1の認識文字数と第2の認識文字数との比が閾値未満としてもよい。一般的に間違った方向で文字認識をしても認識文字数は少なくなり、正しい方向で文字認識を行えば認識文字数は多くなる。このように、第1の認識文字数と第2の認識文字数との比が閾値未満である場合は、認識文字数だけで判断できない場合を示しており、上で述べたようにnグラムをベースに判断するものである。 Further, the predetermined condition described above may be such that the ratio of the first recognized character number and the second recognized character number is less than a threshold value. Generally, even if character recognition is performed in the wrong direction, the number of recognized characters decreases, and if character recognition is performed in the correct direction, the number of recognized characters increases. As described above, when the ratio between the first recognized character number and the second recognized character number is less than the threshold value, it indicates that the determination cannot be made only by the recognized character number. As described above, the determination is based on the n-gram. To do.
さらに、第1の認識文字数と第2の認識文字数とが所定の条件を満たさない場合には、第1の認識文字数と第2の認識文字数との大小に応じて縦書き又横書きを判定するステップをさらに含むようにしてもよい。 Furthermore, when the first number of recognized characters and the second number of recognized characters do not satisfy a predetermined condition, the step of determining vertical writing or horizontal writing according to the size of the first number of recognized characters and the number of second recognized characters May be further included.
本発明の第2の形態に係る行方向判定方法は、縦書き又は横書きの文字群の読み取り結果について文字又は文字の一部の外接矩形を特定し、隣接外接矩形間の縦方向の平均重複度と隣接外接矩形間の横方向の平均重複度とを算出するステップと、n(nは2以上の整数)個の連続文字の出現確率を格納するnグラムデータ格納部を参照して、読み取り結果に対する縦方向の文字認識処理によるn個の連続認識文字の第1の平均出現確率と、横方向の文字認識処理によるn個の連続認識文字の第2の平均出現確率とを算出するステップと、縦方向の平均重複度と横方向の平均重複度とが所定の条件を満たす場合、第1の平均出現確率と第2の平均出現確率との大小に応じて縦書き又は横書きを判定するステップとを含む。このようにnグラムを用いることによって、単語でないような語が認識された場合であっても行方向を正確に判定することができるようになる。 The row direction determination method according to the second aspect of the present invention specifies a circumscribed rectangle of a character or a part of a character from the reading result of a vertically or horizontally written character group, and averages the vertical overlap between adjacent circumscribed rectangles. And a horizontal average overlapping degree between adjacent circumscribed rectangles, and an n-gram data storage unit that stores the appearance probability of n (n is an integer of 2 or more) consecutive characters, and the reading result Calculating a first average appearance probability of n consecutively recognized characters by character recognition processing in the vertical direction and a second average appearance probability of n consecutively recognized characters by character recognition processing in the horizontal direction; A step of determining vertical writing or horizontal writing according to the magnitude of the first average appearance probability and the second average appearance probability when the vertical average overlapping degree and the horizontal average overlapping degree satisfy a predetermined condition; including. By using n-grams in this way, the row direction can be accurately determined even when a word that is not a word is recognized.
また、上で述べた所定の条件を、縦方向の平均重複度と横方向の平均重複度との比が閾値未満とするようにしてもよい。一般に間違った方向で重複度を算出すると重複度が低くなり、正しい方向で重複度を算出すると重複度は高くなる。このように、縦方向の平均重複度と横方向の平均重複度との比が閾値未満である場合は、重複度だけでは判断できない場合を示しており、上で述べたようにnグラムをベースに判断するものである。 Further, the predetermined condition described above may be such that the ratio of the average overlap in the vertical direction and the average overlap in the horizontal direction is less than the threshold. In general, when the degree of duplication is calculated in the wrong direction, the degree of duplication decreases, and when the degree of duplication is calculated in the correct direction, the degree of duplication increases. As described above, when the ratio of the average overlap in the vertical direction and the average overlap in the horizontal direction is less than the threshold value, it indicates that the determination cannot be made only with the overlap, and as described above, the n-gram base is used. Judgment.
さらに、縦方向の平均重複度と横方向の平均重複度とが所定の条件を満たさない場合には、縦方向の平均重複度と横方向の平均重複度との大小に応じて縦書き又横書きを判定するステップをさらに含むようにしてもよい。 Further, when the vertical average horizontal overlap and the horizontal average overlap do not satisfy the predetermined condition, vertical writing or horizontal writing is performed depending on the size of the vertical average horizontal overlapping and the horizontal average overlapping. The method may further include a step of determining.
本発明の第3の態様に係る行方向判定方法は、縦書き又は横書きの文字群の読み取り結果に対する縦方向の文字認識結果の第1の平均確信度と、横方向の文字認識結果の第2の平均確信度とを算出するステップと、第1の平均確信度と第2の平均確信度との大小に基づき縦書き又は横書きを判定するステップとを含む。このように間違った方向で文字認識を行えば確信度は低くなり、正しい方向で文字認識を行えば確信度は高くなるため、上で述べたような処理を行えば、正しい行方向を特定することができる。 The row direction determination method according to the third aspect of the present invention includes a first average certainty factor of a vertical character recognition result with respect to a reading result of a vertical or horizontal character group and a second character recognition result of a horizontal direction. And calculating a vertical writing or a horizontal writing based on the magnitude of the first average certainty and the second average certainty. If the character recognition is performed in the wrong direction as described above, the certainty level is lowered. If the character recognition is performed in the correct direction, the certainty level is increased. Therefore, if the processing described above is performed, the correct line direction is specified. be able to.
なお、本方法をコンピュータに実行させるためのプログラムを作成することができ、このプログラムは、例えばフレキシブルディスク、CD−ROM、光磁気ディスク、半導体メモリ、ハードディスク等の記憶媒体又は記憶装置に格納される。また、ネットワークなどを介してデジタル信号として配信される場合もある。尚、中間的な処理結果はメインメモリ等の記憶装置に一時保管される。 A program for causing a computer to execute this method can be created, and this program is stored in a storage medium or storage device such as a flexible disk, a CD-ROM, a magneto-optical disk, a semiconductor memory, or a hard disk. . Moreover, it may be distributed as a digital signal via a network or the like. The intermediate processing result is temporarily stored in a storage device such as a main memory.
本発明によれば、行方向の判定につき正解率を向上させることができる。 According to the present invention, it is possible to improve the accuracy rate for determination in the row direction.
[実施の形態1]
本発明の第1の実施の形態に係る行方向判定装置の機能ブロック図を図1に示す。第1の実施の形態に係る行方向判定装置は、例えば縦書き又は横書きの文章を含む書類を光学的に読み取るスキャナ1と、スキャナ1によって読み取られた文字群の画像データを格納する画像データ格納部3と、予め大量のテキストデータから生成され且つn(nは2以上の整数)個の連続文字の出現確率についてのデータ(n−gramデータ)を保持するnグラム(n−gram)データ格納部7と、画像データ格納部3に格納された画像データの少なくとも一部についてnグラムデータ格納部7に格納されたデータを用いて文字認識処理等を行う文字認識処理部5と、文字認識処理部5の処理結果を格納する文字認識結果データ格納部9と、画像データ格納部3に格納された画像データから黒画素のヒストグラムを生成して縦横のライン数を算出するライン数判定部13と、ライン数判定部13の算出結果を格納するライン数データ格納部15と、文字認識結果データ格納部9と場合によってはライン数データ格納部15とに格納されたデータを用いて行方向を判定する行方向判定部11とを有する。
[Embodiment 1]
FIG. 1 shows a functional block diagram of the row direction determination device according to the first embodiment of the present invention. The row direction determination apparatus according to the first embodiment includes, for example, a scanner 1 that optically reads a document that includes vertically or horizontally written text, and image data storage that stores image data of a character group read by the scanner 1. Part 3 and an n-gram data storage that holds data (n-gram data) about the appearance probability of n (n is an integer of 2 or more) consecutive characters generated in advance from a large amount of text data A character recognition processing unit 5 that performs character recognition processing or the like using data stored in the n-gram
本実施の形態ではnグラムとしてバイグラムについてのデータをnグラムデータ格納部7が保持しているものとする。なお、nグラムには、単語のみならず、単語でない語が連続する場合であっても、その出現確率が登録されている。従って、単語が含まれない部分についても処理を行うことができる。
In the present embodiment, it is assumed that the n-gram
なお、本実施の形態及び以下の実施の形態では、1つのテキスト領域では横書き又は縦書きのいずれかであって、縦横混在の領域は存在しないものとする。また、縦横混在領域は事前のレイアウト認識技術で縦の領域と横の領域に分割されてから、以下の処理が行われるものとする。 In the present embodiment and the following embodiments, it is assumed that one text area is either horizontal writing or vertical writing, and there is no mixed vertical and horizontal area. In addition, the following processing is performed after the vertical and horizontal mixed area is divided into a vertical area and a horizontal area by a prior layout recognition technique.
次に、第1の実施の形態に係る行方向判定装置の処理について図2乃至図4を用いて説明する。まず、スキャナ1によって処理対象の文章を含む書類を画像データとして読み取り、読み取った画像データを画像データ格納部3に格納しておく。そして、文字認識処理部5は、画像データ格納部3に格納されている画像データの少なくとも一部に対して縦方向の文字認識処理を実施し、認識文字数Nv、改行数Cv、nグラム平均出現確率Pvを取得し、文字認識結果データ格納部9に格納する(ステップS1)。 Next, processing of the row direction determination device according to the first embodiment will be described with reference to FIGS. First, a document including a text to be processed is read as image data by the scanner 1, and the read image data is stored in the image data storage unit 3. Then, the character recognition processing unit 5 performs vertical character recognition processing on at least a part of the image data stored in the image data storage unit 3, and recognizes the number of recognized characters Nv, the number of line feeds Cv, and the average appearance of n-grams. The probability Pv is acquired and stored in the character recognition result data storage unit 9 (step S1).
より具体的には、縦方向に文字認識処理を実施した結果認識することができた文字数を認識文字数Nvとして計数し、縦方向の文字認識処理時に改行を検出した場合には改行数Cvを検出回数だけインクリメントする。改行数であるから、2ラインの場合にCv=1、3ラインの場合にCv=2となる。また、認識することができた文字については、2文字(一般的にはn文字)ごとにnグラムデータ格納部7を検索し、対応する出現確率を取得し、取得した出現確率の平均値を算出する。なお、複数のラインが存在することが検出された場合においては、ラインをまたいだ2文字について出現確率を取得することはしない。また、複数のラインが存在することが検出された場合には、各ラインで認識文字数が異なることもあるが、その場合には例えば認識文字数の平均値などの統計値を算出するようにしても良い。
More specifically, the number of characters that can be recognized as a result of performing the character recognition process in the vertical direction is counted as the recognized character number Nv, and when a line break is detected during the character recognition process in the vertical direction, the number of line breaks Cv is detected. Increment by the number of times. Since it is the number of line breaks, Cv = 1 for 2 lines and Cv = 2 for 3 lines. For characters that could be recognized, the n-gram
同様に、文字認識処理部5は、画像データ格納部3に格納されている画像データの少なくとも一部に対して横方向の文字認識処理を実施し、認識文字数Nh、改行数Ch、nグラム平均出現確率Phを取得し、文字認識結果データ格納部9に格納する(ステップS3)。具体的な処理については、縦方向について述べたものと同様である。 Similarly, the character recognition processing unit 5 performs a horizontal character recognition process on at least a part of the image data stored in the image data storage unit 3, and recognizes the number of recognized characters Nh, the number of line breaks Ch, and the average of n grams. The appearance probability Ph is acquired and stored in the character recognition result data storage unit 9 (step S3). The specific processing is the same as that described for the vertical direction.
そして、行方向判定部11は、文字認識結果データ格納部9に格納されているデータを用いて、max(Nv,Nh)/min(Nv,Nh)を算出し、max(Nv,Nh)/min(Nv,Nh)>閾値(実験的に3.25が好ましいことが分かっている)を満たすかどうか判断する(ステップS5)。Nv>NhであればNv/Nhが算出され、Nv<NhであればNh/Nvが算出され、閾値と比較される。Nv=Nhであれば1となり、必ずステップS5の条件を満たさないと判断される。通常正しい方向で文字認識処理を実施すれば、より多く数の文字を認識することができ、間違った方向で文字認識処理を実施すれば、より少ない数の文字しか認識することができない。このように縦横で認識文字数が閾値倍(3.25倍)を超えて異なる場合は、正しい方向と間違った方向とが明らかな場合を示している。
Then, the line direction determination unit 11 calculates max (Nv, Nh) / min (Nv, Nh) using the data stored in the character recognition result
従って、ステップS5の条件を満たしていると判断された場合には、行方向判定部11は、Nv>Nhであるか確認し(ステップS7)、Nv>Nhであれば行方向は縦方向と判断する(ステップS9)。例えば、図3(a)に示すような画像を処理している場合、縦方向に文字認識を行うと例えば第1ラインに「一」「繼」「済」「肌」「究」「所」と第2ラインに「昏」「角」「田」「勝」「司」「社」という文字が認識され、それぞれ6文字であるからNv=6となる。一方、横方向に文字認識を行うと、ずれているので1文字として認識されNh=1となる。よって、ステップS5及びS7で条件を満たすと判断され、ステップS9で縦方向と判断される。 Therefore, if it is determined that the condition of step S5 is satisfied, the row direction determination unit 11 checks whether Nv> Nh (step S7), and if Nv> Nh, the row direction is the vertical direction. Judgment is made (step S9). For example, when an image as shown in FIG. 3A is processed, if character recognition is performed in the vertical direction, for example, “one”, “繼”, “finished”, “skin”, “study”, “place” are displayed on the first line. In the second line, the characters “角”, “horn”, “field”, “win”, “tsukasa”, and “sha” are recognized and each has 6 characters, so Nv = 6. On the other hand, when character recognition is performed in the horizontal direction, it is misaligned and recognized as one character, and Nh = 1. Therefore, it is determined that the condition is satisfied in steps S5 and S7, and the vertical direction is determined in step S9.
逆にNh>Nvであれば行方向は横方向と判断する(ステップS11)。例えば、図3(b)に示すような画像を処理している場合、縦方向に文字認識を行うと例えば第1ラインに「中」「基」「本」「戦」と第2ラインに「遜」「念」「表」「明」「口」という文字が認識され、平均するとNh=4.5となる。一方、縦方向に文字認識を行うと、ずれているので1文字として認識されNv=1となる。よって、ステップS5で条件を満たすが、ステップS7で条件を満たさないとしてステップS11で横方向と判断される。 Conversely, if Nh> Nv, the row direction is determined to be the horizontal direction (step S11). For example, in the case of processing an image as shown in FIG. 3B, if character recognition is performed in the vertical direction, for example, “middle”, “base”, “book”, “war” on the first line, and “ The characters “遜”, “mind”, “table”, “light” and “mouth” are recognized, and on average, Nh = 4.5. On the other hand, when character recognition is performed in the vertical direction, the character is misaligned and thus recognized as one character and Nv = 1. Accordingly, the condition is satisfied in step S5, but the condition is not satisfied in step S7, and the horizontal direction is determined in step S11.
そして処理を終了する。なお、通常であれば、行方向が特定されると、文字認識処理部5に画像データ格納部3に格納された画像データの全体に対し、特定された行方向に文字認識処理を実施させるようにする。 Then, the process ends. Normally, when the line direction is specified, the character recognition processing unit 5 performs character recognition processing in the specified line direction on the entire image data stored in the image data storage unit 3. To.
一方、ステップS5の条件を満たしていないと判断した場合には、行方向判定部11は、文字認識結果データ格納部9に格納された縦方向の改行数Cvを読み出し、Cv=0であるか判断する(ステップS13)。もし、Cv=0であれば縦方向が1ラインということを表しているので、行方向は縦方向であると判断する(ステップS19)。例えば図3(c)のような画像データを処理する場合には、改行数Cv=0となるので、行方向は縦方向と判断される。
On the other hand, if it is determined that the condition of step S5 is not satisfied, the line direction determination unit 11 reads the number of vertical line breaks Cv stored in the character recognition result
一方、Cv=0でなければ、文字認識結果データ格納部9に格納された横方向の改行数Chを読み出し、Ch=0であるか判断する(ステップS15)。もし、Ch=0であれば横方向が1ラインということを表しているので、行方向は横方向であると判断する(ステップS21)。例えば図3(d)のような画像データを処理する場合には、改行数Ch=0となるので、行方向は横方向と判断される。
On the other hand, if not Cv = 0, the horizontal line feed number Ch stored in the character recognition result
なお、ライン数については改行数で判断せず、ライン数判定部13による処理結果を用いる場合もある。具体的には、画像データにおいて処理すべき部分内の黒画素(文字用の画素)を縦方向に投影して投影位置毎に画素数をカウントすることによってヒストグラムを生成し、頻度によって文字の切れ目を検出する。同様に、画像データにおいて処理すべき部分内の黒画素を横方向に投影して投影位置毎に画素数をカウントすることによってヒストグラムを生成し、頻度によって文字の切れ目を検出する。例えば、図4(a)に示すように横書きの「大学」を縦方向に投影すれば、図4(b)に示すようなヒストグラムが生成され、頻度0の部分又は誤差程度の頻度が発生している部分で切れ目が生じていることが分かる。なお、切れ目か否かの判定には例えば最頻値の0.1倍した値を閾値として用いる。図3(c)の場合には横方向の投影によるヒストグラムでは切れ目が検出され、縦方向の投影によるヒストグラムでは切れ目が生じないので、縦方向が1行であると判断される。同様に、図3(d)の場合にも、縦方向の投影によるヒストグラムでは切れ目が検出され、横方向の投影によるヒストグラムでは切れ目が生じないので、横方向が1行であると判断される。
Note that the number of lines is not determined by the number of line breaks, and the processing result by the line
ライン数判定部13によるライン数判定結果(縦方向及び横方向の両方)をライン数データ格納部15に格納して、ライン数データ格納部15に格納されているライン数判定結果に基づき、行方向判定部11が、縦方向が1行か、又は横方向が1行かを判断するようにしても良い。
The line number determination result (both in the vertical direction and the horizontal direction) by the line
そして、縦横いずれも1行ではないと判断された場合、縦方向のnグラム平均出現確率Pvと横方向のnグラム平均出現確率Phとを比較して、Ph≧Pvが満たされるか判断する(ステップS17)。満たされるようであれば、横方向の方がより正確に文字認識ができていると推定されるので、行方向を横方向と判断する(ステップS21)。一方、ステップS17の条件が満たされないようであれば、縦方向の方がより正確に文字認識できていると推定されるので、行方向を縦方向と判断する(ステップS19)。 When it is determined that neither vertical nor horizontal is one line, the vertical n-gram average appearance probability Pv is compared with the horizontal n-gram average appearance probability Ph to determine whether Ph ≧ Pv is satisfied ( Step S17). If it is satisfied, it is presumed that the horizontal direction is more accurately recognized, so the line direction is determined to be the horizontal direction (step S21). On the other hand, if the condition of step S17 is not satisfied, it is presumed that the character in the vertical direction can be recognized more accurately, so the row direction is determined as the vertical direction (step S19).
例えば図3(e)に示されるような画像データが処理対象であれば、文字に縦横のずれがほとんどなく、全ての文字が正確に認識されると、横方向の方が意味ある語が連続しているためnグラムにおいて出現頻度が高くなる。従って、図3(e)のような例であれば、行方向は横方向と判断される。また、図3(f)に示されるような画像データが処理対象であれば、横方向に文字のずれが存在しているため横方向に1文字に認識される可能性があるが、縦方向についてはラインがはっきりしており全ての文字が正確に認識されると、縦方向の方が意味ある語が連続しているためnグラムにおいて出現頻度が高くなる。従って、図3(f)のような例であれば、行方向は縦方向と判断される。 For example, if image data as shown in FIG. 3 (e) is a processing target, there are almost no vertical and horizontal deviations in the characters, and if all characters are recognized correctly, words in the horizontal direction are more meaningful. Therefore, the appearance frequency increases in the n-gram. Therefore, in the example shown in FIG. 3E, the row direction is determined as the horizontal direction. If image data as shown in FIG. 3 (f) is a processing target, there is a possibility that the character is recognized as one character in the horizontal direction because there is a character shift in the horizontal direction. If the line is clear and all the characters are recognized correctly, the words that are more meaningful in the vertical direction are consecutive, and the frequency of occurrence is higher in the n-gram. Therefore, in the example shown in FIG. 3F, the row direction is determined to be the vertical direction.
以上のような処理を実施することによって、より正確に行方向を判定することができるようになる。発明者の実験によれば、正解率は97.3%となった。 By performing the processing as described above, the row direction can be determined more accurately. According to the inventor's experiment, the accuracy rate was 97.3%.
[実施の形態2]
次に、第2の実施の形態に係る行方向判定装置の機能ブロック図を図5を用いて説明する。なお、図1と同じ処理を行うものについては同じ符号を付している。第2の実施の形態に係る行方向判定装置は、スキャナ1と、スキャナ1が読み取った画像データを保管する画像データ格納部3と、予め大量のテキストデータから生成され且つn個の連続文字の出現確率についてのデータ(n−gramデータ)を保持するnグラムデータ格納部7と、画像データ格納部3に格納された画像データの少なくとも一部についてnグラムデータ格納部7に格納されたデータを用いて文字認識処理等を行う文字認識処理部25と、文字認識処理部25の処理結果を格納する文字認識結果データ格納部29と、画像データ格納部3に格納された画像データの少なくとも一部から黒画素のヒストグラムを生成して縦横のライン数を算出するライン数判定部13と、ライン数判定部13の算出結果を格納するライン数データ格納部15と、画像データ格納部3に格納された画像データの少なくとも一部から文字間の重複度を算出する重複度算出部33と、重複度算出部33によって算出された重複度のデータ格納する重複度データ格納部35と、文字認識結果データ格納部29とライン数データ格納部15と重複度データ格納部35とに格納されたデータを用いて縦書き又は横書きを判定する行方向判定部31とを有する。
[Embodiment 2]
Next, a functional block diagram of the row direction determination apparatus according to the second embodiment will be described with reference to FIG. In addition, the same code | symbol is attached | subjected about what performs the same process as FIG. The row direction determination apparatus according to the second embodiment includes a scanner 1, an image data storage unit 3 for storing image data read by the scanner 1, and a sequence of n consecutive characters generated in advance from a large amount of text data. Data stored in the n-gram
次に、図6及び図7を用いて図5に示した行方向判定装置の処理フローについて説明する。まず、スキャナ1によって処理対象の文章を含む書類を画像データとして読み取り、読み取った画像データを画像データ格納部3に格納しておく。そして、ライン数判定部13は、画像データ格納部3に格納された画像データの少なくとも一部について、縦横それぞれにつき、黒画素(文字用の画素)の投影によって黒画素ヒストグラム化処理を実施し、閾値(例えば最頻値の0.1倍した値)を超える範囲をカウントすることによってライン数を決定し、ライン数データ格納部15に格納する(ステップS31)。
Next, the processing flow of the row direction determination apparatus shown in FIG. 5 will be described with reference to FIGS. 6 and 7. First, a document including a text to be processed is read as image data by the scanner 1, and the read image data is stored in the image data storage unit 3. Then, the line
図4(a)及び(b)に関連して説明した処理を行って、閾値以下の頻度しか検出されなかった部分については文字の切れ目として判断して、閾値を超える範囲をカウントするか又は文字の切れ目数+1でライン数を決定する。 The processing described in relation to FIGS. 4 (a) and 4 (b) is performed, and a portion where only a frequency equal to or less than the threshold is detected is determined as a character break, and a range exceeding the threshold is counted or a character is counted. The number of lines is determined by the number of breaks + 1.
行方向判定部31は、ライン数データ格納部15に格納されている縦方向のライン数と横方向のライン数とを用いて、ライン数が1の方向が存在するか判断する(ステップS33)。縦又は横方向にライン数が1の方向が存在している場合には、当該ライン数が1の方向を行方向として特定する(ステップS37)。例えば図3(c)及び図3(d)の場合には、ライン数が1と判断されたその方向が行方向として特定される。そして処理を終了する。
The row
一方、ライン数が1の方向が存在していないと判断された場合には、重複度算出部33は、画像データ格納部3に格納された画像データの少なくとも一部に含まれる文字の外接矩形を特定し、当該文字の外接矩形に基づき、当該隣接する外接矩形間の縦方向についての重複度Ovと横方向についての重複度Ohを算出し、重複度データ格納部35に格納する(ステップS35)。具体的には、図7に示すように、矩形101乃至109のような文字の外接矩形を特定する。図7では、外接矩形を簡略化して1文字につき1矩形としているが、1文字につき複数の矩形が特定される場合もある。そして、横方向の隣接外接矩形について、それぞれ重複度(矩形間の境界に矩形を投影した時の重複する距離の長さ)を特定し、その平均を算出する。具体的には、矩形101と矩形102の重複(具体的には重複の和)201、矩形102と矩形103の重複202、矩形104と矩形105の重複203、矩形105と矩形106の重複204、矩形107と矩形108の重複205、及び矩形108と矩形109の重複206を特定し、その平均を算出する。また、縦方向の隣接外接矩形について、それぞれ重複度(矩形間の境界に矩形を投影した時の重複する距離の長さ)を特定し、その平均を算出する。具体的には、矩形101と矩形104の重複211、矩形104と矩形107の重複214、矩形102と矩形105の重複212、矩形105と矩形108の重複215、矩形103と矩形106の重複213、矩形106と矩形109の重複216を特定し、その平均を算出する。このような技術は例えば特開平10−63776号公報に開示されており、詳細についてはこれ以上述べない。
On the other hand, if it is determined that there is no direction having the number of lines 1, the
そして、行方向判定部31は、重複度データ格納部35に格納されたデータを用いてmax(Ov,Oh)/min(Ov,Oh)を算出し、max(Ov,Oh)/min(Ov,Oh)が閾値(実験的に1.4が好ましいことが分かっている)より大きいか判断する(ステップS39)。Ov>OhであればOv/Ohが算出され、Ov<OhであればOh/Ovが算出され、閾値と比較される。Ov=Ohであれば1となり、必ずステップS39の条件を満たさないと判断される。通常正しい方向で重複度を算出すると矩形が一方向に揃っているので重複度が高くなり、間違った方向で重複度を算出すると矩形にばらつきがあるので重複度が低くなる。このように縦横の重複度が閾値倍(1.4倍)を超えて異なっている場合には、正しい方向と間違った方向とが明らかな場合を示している。
Then, the row
従ってステップS39の条件を満たしている場合には、行方向判定部31は、Ov>Ohであるか判断し(ステップS41)、この条件を満たしている場合には行方向を縦方向と判断する(ステップS43)。一方、ステップS41の条件を満たしていない場合には、行方向を横方向と判断する(ステップS45)。例えば、図3(a)に示したような場合には、ステップS43で縦方向と判断され、図3(b)に示したような場合には、ステップS45で横方向と判断される。
Therefore, when the condition of step S39 is satisfied, the row
また、ステップS39の条件を満たしていない場合には、文字認識処理部25は、画像データ格納部3に格納された画像データの少なくとも一部について縦方向に文字認識を行い、認識された文字についてnグラムデータ格納部7を用いてnグラム平均出現確率Pvを取得し、文字認識結果データ格納部29に格納する(ステップS47)。
If the condition of step S39 is not satisfied, the character
より具体的には、縦方向に文字認識処理を実施して文字を認識すると共に、認識することができた文字については、2文字(一般的にはn文字)ごとにnグラムデータ格納部7を検索し、対応する出現確率を取得し、取得した出現確率の平均値を算出する。なお、複数のラインが存在することが検出された場合においては、ラインをまたいだ2文字について出現確率を取得することはしない。
More specifically, the character recognition process is performed in the vertical direction to recognize the characters, and for the characters that can be recognized, the n-gram
同様に、文字認識処理部25は、画像データ格納部3に格納されている画像データの少なくとも一部に対して横方向の文字認識処理を実施し、認識された文字についてnグラムデータ格納部7を用いてnグラム平均出現確率Phを取得し、文字認識結果データ格納部29に格納する(ステップS49)。
Similarly, the character
そして、行方向判定部31は、文字認識結果データ格納部29に格納された縦方向のnグラム平均出現確率Pvと横方向のnグラム平均出現確率Phとを比較して、Ph≧Pvが満たされるか判断する(ステップS51)。満たされるようであれば、横方向の方がより正確に文字認識ができていると推定されるので、行方向を横方向と判断する(ステップS55)。一方、ステップS51の条件が満たされないようであれば、縦方向の方がより正確に文字認識できていると推定されるので、行方向を縦方向と判断する(ステップS53)。図3(e)と図3(f)については、第1の実施の形態で説明したのと同様に、図3(e)のような例であれば、行方向は横方向と判断され、図3(f)のような例であれば、行方向は縦方向と判断される。
Then, the line
以上のような処理を実施することによって、より正確に行方向を判定することができるようになる。発明者の実験によれば、正解率は99.6%となった。 By performing the processing as described above, the row direction can be determined more accurately. According to the inventors' experiment, the accuracy rate was 99.6%.
[実施の形態3]
次に、第3の実施の形態に係る行方向判定装置の機能ブロック図を図8に示す。なお、第1の実施の形態と同じ処理を実施するものについては同じ符号が付されている。第3の実施の形態に係る行方向判定装置は、スキャナ1と、スキャナ1により読み取られた画像データを格納する画像データ格納部3と、画像データ格納部3に格納された画像データの少なくとも一部から画素のヒストグラムを生成して縦横のライン数を算出するライン数判定部13と、ライン数判定部13の算出結果を格納するライン数データ格納部15と、画像データ格納部3に格納された画像データの少なくとも一部について文字認識処理等を行う文字認識処理部41と、文字認識処理部41の処理結果を格納する文字認識結果データ格納部42と、文字認識結果データ格納部42とライン数データ格納部15とに格納されたデータを用いて縦書き又は横書きを判定する行方向判定部43とを有する。
[Embodiment 3]
Next, FIG. 8 shows a functional block diagram of the row direction determining apparatus according to the third embodiment. In addition, the same code | symbol is attached | subjected about what performs the same process as 1st Embodiment. The row direction determination apparatus according to the third embodiment includes a scanner 1, an image data storage unit 3 that stores image data read by the scanner 1, and at least one of image data stored in the image data storage unit 3. A line
次に、図9を用いて図8に示した行方向判定装置の処理フローについて説明する。まず、スキャナ1によって処理対象の文章を含む書類を画像データとして読み取り、読み取った画像データを画像データ格納部3に格納しておく。そして、ライン数判定部13は、画像データ格納部3に格納された画像データの少なくとも一部について、縦横それぞれにつき、黒画素(文字用の画素)の投影によって黒画素ヒストグラム化処理を実施し、閾値(例えば最頻値の0.1倍した値)を超える範囲をカウントすることによってライン数を決定し、ライン数データ格納部15に格納する(ステップS61)。
Next, the processing flow of the row direction determination apparatus shown in FIG. 8 will be described with reference to FIG. First, a document including a text to be processed is read as image data by the scanner 1, and the read image data is stored in the image data storage unit 3. Then, the line
図4(a)及び(b)に関連して説明した処理を行って、閾値以下の頻度しか検出されなかった部分については文字の切れ目として判断して、閾値を超える範囲をカウントするか又は文字の切れ目数+1でライン数を決定する。 The processing described in relation to FIGS. 4 (a) and 4 (b) is performed, and a portion where only a frequency equal to or less than the threshold is detected is determined as a character break, and a range exceeding the threshold is counted or a character is counted. The number of lines is determined by the number of breaks + 1.
行方向判定部43は、ライン数データ格納部15に格納されている縦方向のライン数と横方向のライン数とを用いて、ライン数が1の方向が存在するか判断する(ステップS63)。縦又は横方向にライン数が1の方向が存在している場合には、当該ライン数が1の方向を行方向として特定する(ステップS65)。例えば図3(c)及び図3(d)の場合には、ライン数が1と判断されたその方向が行方向として特定される。そして処理を終了する。
The row
一方、ライン数が1の方向が存在しないと判断された場合には、文字認識処理部41は、画像データ格納部3に格納された画像データの少なくとも一部について縦方向に文字認識処理を実施し、文字認識と同時に得られる確信度の平均値Rvを算出し、文字認識結果データ格納部42に格納する(ステップS67)。例えば、図3(a)に示された画像データの場合には、縦方向の文字認識の認識結果は、例えば「一」「繼」「済」「肌」「究」「所」と「昏」「角」「田」「勝」「司」「社」であって、例えば確信度の平均値Rvは706と算出される。なお、確信度については、例えば特開2000−306045号公報などに詳細に述べられているので、ここでは詳細についてはこれ以上述べない。
On the other hand, if it is determined that there is no direction with the number of lines 1, the character
また、文字認識処理部41は、画像データ格納部3に格納された画像データの少なくとも一部について横方向に文字認識処理を実施し、文字認識と同時に得られる確信度の平均値Rhを算出し、文字認識結果データ格納部42に格納する(ステップS69)。図3(a)の例の場合、横方向の文字認識の認識結果は、例えば「蕊」であって、例えば確信度の平均値Rhは625と算出される。
Further, the character
その後、行方向判定部43は、文字認識結果データ格納部42に格納された縦方向の確信度の平均値Rvと横方向の確信度の平均値Rhとを比較して、Rv≧Rhが成り立つか判断する(ステップS71)。もし、図3(a)の例のようにRv≧Rhが成り立つ場合には、行方向判定部43は、縦方向を行方向と判定する(ステップS73)。一方、図3(b)の場合のようにステップS71の関係が成り立たないと判断された場合には、横方向を行方向と判断する(ステップS73)。
Thereafter, the row
このようにすれば、文字認識処理の結果についてより確信度が高くなるような方向が特定されるようになる。 In this way, a direction in which the degree of certainty about the result of the character recognition process becomes higher is specified.
以上本発明の実施の形態を説明したが、本発明はこれに限定されるものではない。例えば、上では日本語の例を示したが、韓国語、中国語など、縦書きと横書きとの両方を用いる場合があるような言語に適用可能である。 Although the embodiment of the present invention has been described above, the present invention is not limited to this. For example, the example of Japanese is shown above, but the present invention can be applied to languages such as Korean and Chinese that may use both vertical writing and horizontal writing.
また、画像データの少なくとも一部について文字認識処理などを実施する例を示したが、必ずしも正方形など縦横の長さが同一でなくともよい。 Moreover, although the example which performs a character recognition process etc. about at least one part of image data was shown, the vertical and horizontal lengths, such as a square, do not necessarily need to be the same.
さらに、上で述べた処理について述べた閾値については、環境や言語によって調整する必要がある場合もある。 Furthermore, the threshold values described for the processing described above may need to be adjusted depending on the environment and language.
なお、上で述べた行方向判定装置(スキャナ1を除く)は、図10のようなコンピュータ装置であって、メモリ2501(記憶装置)とCPU2503(処理装置)とハードディスク・ドライブ(HDD)2505と表示装置2509に接続される表示制御部2507とリムーバブル・ディスク2511用のドライブ装置2513と入力装置2515とネットワークに接続するための通信制御部2517とがバス2519で接続されている。オペレーティング・システム(OS:Operating System)及び本実施の形態における処理を実施するためのアプリケーション・プログラムは、HDD2505に格納されており、CPU2503により実行される際にはHDD2505からメモリ2501に読み出される。必要に応じてCPU2503は、表示制御部2507、通信制御部2517、ドライブ装置2513を制御して、必要な動作を行わせる。また、処理途中のデータについては、メモリ2501に格納され、必要があればHDD2505に格納される。本発明の実施の形態では、上で述べた処理を実施するためのアプリケーション・プログラムはリムーバブル・ディスク2511に格納されて頒布され、ドライブ装置2513からHDD2505にインストールされる。インターネットなどのネットワーク及び通信制御部2517を経由して、HDD2505にインストールされる場合もある。このようなコンピュータ装置は、上で述べたCPU2503、メモリ2501などのハードウエアとOS及び必要なアプリケーション・プログラムとが有機的に協働することにより、上で述べたような各種機能を実現する。
The row direction determination device (except for the scanner 1) described above is a computer device as shown in FIG. 10, and includes a memory 2501 (storage device), a CPU 2503 (processing device), a hard disk drive (HDD) 2505, and the like. A
(付記1)
縦書き又は横書きの文字群の読み取り結果に対する縦方向の文字認識処理による第1の認識文字数と、前記読み取り結果に対する横方向の文字認識処理による第2の認識文字数とを取得するステップと、
n(nは2以上の整数)個の連続文字の出現確率を格納するnグラムデータ格納部を参照して、前記縦方向の文字認識処理によるn個の連続認識文字の第1の平均出現確率と、前記横方向の文字認識処理によるn個の連続認識文字の第2の平均出現確率とを算出するステップと、
前記第1の認識文字数と前記第2の認識文字数とが所定の条件を満たす場合には、前記第1の平均出現確率と前記第2の平均出現確率の大小に応じて縦書き又は横書きを判定する判定ステップと、
を含み、コンピュータにより実行される行方向判定方法。
(Appendix 1)
Obtaining a first number of recognized characters by a vertical character recognition process for a result of reading a vertical or horizontal character group, and a second number of recognized characters by a horizontal character recognition process for the read result;
Referring to an n-gram data storage section that stores the appearance probability of n (n is an integer of 2 or more) continuous characters, a first average appearance probability of n consecutive recognition characters by the vertical character recognition processing Calculating a second average appearance probability of n consecutively recognized characters by the horizontal character recognition process;
When the first number of recognized characters and the second number of recognized characters satisfy a predetermined condition, vertical writing or horizontal writing is determined according to the magnitude of the first average appearance probability and the second average appearance probability. A determination step to:
A row direction determination method executed by a computer.
(付記2)
前記所定の条件が、前記第1の認識文字数と前記第2の認識文字数との比が閾値未満であることを特徴とする付記1記載の行方向判定方法。
(Appendix 2)
The row direction determination method according to claim 1, wherein the predetermined condition is that a ratio of the first number of recognized characters to the second number of recognized characters is less than a threshold value.
(付記3)
前記第1の認識文字数と前記第2の認識文字数とが前記所定の条件を満たさない場合には、前記第1の認識文字数と前記第2の認識文字数との大小に応じて縦書き又横書きを判定するステップ
をさらに含む付記1記載の行方向判定方法。
(Appendix 3)
When the first number of recognized characters and the second number of recognized characters do not satisfy the predetermined condition, vertical writing or horizontal writing is performed according to the size of the first recognized character number and the second recognized character number. The row direction determination method according to appendix 1, further comprising a step of determining.
(付記4)
前記判定ステップが、
ライン数判定結果が特定の方向について1ラインを表している場合には、当該特定の方向に基づき縦書き又は横書きを判定するステップ
を含む付記1記載の行方向判定方法。
(Appendix 4)
The determination step includes
The line direction determination method according to appendix 1, including a step of determining vertical writing or horizontal writing based on the specific direction when the line number determination result represents one line in the specific direction.
(付記5)
前記ライン数判定が、前記縦方向の文字認識処理及び前記横方向の文字認識処理における改行数カウント、又は前記読み取り結果における文字用画素の縦方向への投影による縦方向画素ヒストグラム及び文字用画素の横方向への投影による横方向画素ヒストグラムによるライン数判定のいずれかであることを特徴とする付記4記載の方向判定方法。
(Appendix 5)
In the line number determination, the number of line breaks in the vertical character recognition process and the horizontal character recognition process, or the vertical pixel histogram and the character pixel by the vertical projection of the character pixels in the read result The direction determination method according to appendix 4, wherein the number of lines is determined by a horizontal pixel histogram by projection in the horizontal direction.
(付記6)
縦書き又は横書きの文字群の読み取り結果について文字又は文字の一部の外接矩形を特定し、隣接外接矩形間の縦方向の平均重複度と隣接外接矩形間の横方向の平均重複度とを算出するステップと、
n(nは2以上の整数)個の連続文字の出現確率を格納するnグラムデータ格納部を参照して、前記読み取り結果に対する縦方向の文字認識処理によるn個の連続認識文字の第1の平均出現確率と、横方向の文字認識処理によるn個の連続認識文字の第2の平均出現確率とを算出するステップと、
前記縦方向の平均重複度と前記横方向の平均重複度とが所定の条件を満たす場合、前記第1の平均出現確率と前記第2の平均出現確率との大小に応じて縦書き又は横書きを判定するステップと、
を含み、コンピュータにより実行される行方向判定方法。
(Appendix 6)
Identifies the circumscribed rectangle of a character or part of a character from the result of reading vertical or horizontal characters, and calculates the vertical average overlap between adjacent circumscribed rectangles and the average horizontal overlap between adjacent circumscribed rectangles And steps to
Referring to an n-gram data storage unit that stores the appearance probability of n (n is an integer of 2 or more) continuous characters, the first of n consecutively recognized characters by the character recognition processing in the vertical direction for the read result Calculating an average appearance probability and a second average appearance probability of n consecutively recognized characters by the horizontal character recognition process;
When the vertical average overlap and the horizontal average overlap satisfy a predetermined condition, vertical writing or horizontal writing is performed depending on the magnitude of the first average appearance probability and the second average appearance probability. A determining step;
A row direction determination method executed by a computer.
(付記7)
前記所定の条件が、前記縦方向の平均重複度と前記横方向の平均重複度との比が閾値未満であることを特徴とする付記6記載の行方向判定方法。
(Appendix 7)
The row direction determination method according to appendix 6, wherein the predetermined condition is that a ratio of the average overlap degree in the vertical direction and the average overlap degree in the horizontal direction is less than a threshold value.
(付記8)
前記縦方向の平均重複度と前記横方向の平均重複度とが所定の条件を満たさない場合には、前記縦方向の平均重複度と前記横方向の平均重複度との大小に応じて縦書き又横書きを判定するステップ
をさらに含む付記6記載の行方向判定方法。
(Appendix 8)
If the average vertical overlap and the horizontal average overlap do not satisfy a predetermined condition, vertical writing is performed according to the size of the vertical average overlap and the horizontal average overlap. The row direction determination method according to appendix 6, further comprising a step of determining horizontal writing.
(付記9)
前記読み取り結果における文字用画素の縦方向への投影による縦方向画素ヒストグラム及び文字用画素の横方向への投影による横方向画素ヒストグラムによって1行と判定された方向に基づき、縦書き又は横書きを判定するステップ
をさらに含む付記6記載の行方向判定方法。
(Appendix 9)
Whether vertical writing or horizontal writing is determined based on the direction determined as one row by the vertical pixel histogram by the vertical projection of the character pixels and the horizontal pixel histogram by the horizontal projection of the character pixels in the reading result. The line direction determination method according to appendix 6, further comprising:
(付記10)
縦書き又は横書きの文字群の読み取り結果に対する縦方向の文字認識結果の第1の平均確信度と、横方向の文字認識結果の第2の平均確信度とを算出するステップと、
前記第1の平均確信度と前記第2の平均確信度との大小に基づき縦書き又は横書きを判定するステップと、
を含み、コンピュータにより実行される行方向判定方法。
(Appendix 10)
Calculating a first average certainty of a vertical character recognition result and a second average certainty of a horizontal character recognition result with respect to a reading result of a vertically or horizontally written character group;
Determining vertical writing or horizontal writing based on the magnitude of the first average certainty factor and the second average certainty factor;
A row direction determination method executed by a computer.
(付記11)
前記読み取り結果における文字用画素の縦方向への投影による縦方向画素ヒストグラム及び文字用画素の横方向への投影による横方向画素ヒストグラムによって1行と判定された方向に基づき、縦書き又は横書きを判定するステップ
をさらに含む付記10記載の行方向判定方法。
(Appendix 11)
Whether vertical writing or horizontal writing is determined based on the direction determined as one row by the vertical pixel histogram by the vertical projection of the character pixels and the horizontal pixel histogram by the horizontal projection of the character pixels in the reading result. The line direction determination method according to appendix 10, further comprising:
(付記12)
付記1乃至11のいずれか1つ記載の行方向判定方法をコンピュータにより実行させるためのプログラム。
(Appendix 12)
A program for causing a computer to execute the row direction determination method according to any one of appendices 1 to 11.
(付記13)
縦書き又は横書きの文字群の読み取り結果に対する縦方向の文字認識処理による第1の認識文字数と、前記読み取り結果に対する横方向の文字認識処理による第2の認識文字数とを取得する手段と、
n(nは2以上の整数)個の連続文字の出現確率を格納するnグラムデータ格納部を参照して、前記縦方向の文字認識処理によるn個の連続認識文字の第1の平均出現確率と、前記横方向の文字認識処理によるn個の連続認識文字の第2の平均出現確率とを算出する手段と、
前記第1の認識文字数と前記第2の認識文字数とが所定の条件を満たす場合には、前記第1の平均出現確率と前記第2の平均出現確率の大小に応じて縦書き又は横書きを判定する判定手段と、
を有する行方向判定装置。
(Appendix 13)
Means for acquiring a first recognized number of characters by vertical character recognition processing for a reading result of a vertical or horizontal character group and a second number of recognized characters by horizontal character recognition processing for the reading result;
Referring to an n-gram data storage section that stores the appearance probability of n (n is an integer of 2 or more) continuous characters, a first average appearance probability of n consecutive recognition characters by the vertical character recognition processing And means for calculating a second average appearance probability of n consecutively recognized characters by the horizontal character recognition process;
When the first number of recognized characters and the second number of recognized characters satisfy a predetermined condition, vertical writing or horizontal writing is determined according to the magnitude of the first average appearance probability and the second average appearance probability. Determination means to perform,
A row direction determination device having:
(付記14)
縦書き又は横書きの文字群の読み取り結果について文字又は文字の一部の外接矩形を特定し、隣接外接矩形間の縦方向の平均重複度と隣接外接矩形間の横方向の平均重複度とを算出する手段と、
n(nは2以上の整数)個の連続文字の出現確率を格納するnグラムデータ格納部を参照して、前記読み取り結果に対する縦方向の文字認識処理によるn個の連続認識文字の第1の平均出現確率と、横方向の文字認識処理によるn個の連続認識文字の第2の平均出現確率とを算出する手段と、
前記縦方向の平均重複度と前記横方向の平均重複度とが所定の条件を満たす場合、前記第1の平均出現確率と前記第2の平均出現確率との大小に応じて縦書き又は横書きを判定する手段と、
を有する行方向判定装置。
(Appendix 14)
Identifies the circumscribed rectangle of a character or part of a character from the result of reading vertical or horizontal characters, and calculates the vertical average overlap between adjacent circumscribed rectangles and the average horizontal overlap between adjacent circumscribed rectangles Means to
Referring to an n-gram data storage unit that stores the appearance probability of n (n is an integer of 2 or more) continuous characters, the first of n consecutively recognized characters by the character recognition processing in the vertical direction for the read result Means for calculating an average appearance probability and a second average appearance probability of n consecutively recognized characters by the character recognition processing in the horizontal direction;
When the vertical average overlap and the horizontal average overlap satisfy a predetermined condition, vertical writing or horizontal writing is performed depending on the magnitude of the first average appearance probability and the second average appearance probability. Means for determining;
A row direction determination device having:
(付記15)
縦書き又は横書きの文字群の読み取り結果に対する縦方向の文字認識結果の第1の平均確信度と、横方向の文字認識結果の第2の平均確信度とを算出する手段と、
前記第1の平均確信度と前記第2の平均確信度との大小に基づき縦書き又は横書きを判定する手段と、
を有する行方向判定装置。
(Appendix 15)
Means for calculating a first average certainty of a vertical character recognition result and a second average certainty of a horizontal character recognition result with respect to a vertical or horizontal character group reading result;
Means for determining vertical writing or horizontal writing based on the magnitude of the first average certainty factor and the second average certainty factor;
A row direction determination device having:
1 スキャナ 3 画像データ格納部
5,25,41 文字認識処理部 7 nグラムデータ格納部
9,29,42 文字認識結果データ格納部
11,31,43 行方向判定部
13 ライン数判定部 15 ライン数データ格納部
33 重複度算出部 35 重複度データ格納部
DESCRIPTION OF SYMBOLS 1 Scanner 3 Image
Claims (9)
n(nは2以上の整数)個の連続文字の出現確率を格納するnグラムデータ格納部を参照して、前記縦方向の文字認識処理によるn個の連続認識文字の第1の平均出現確率と、前記横方向の文字認識処理によるn個の連続認識文字の第2の平均出現確率とを算出するステップと、
前記第1の認識文字数と前記第2の認識文字数とのうち小さい方の認識文字数に対する大きい方の認識文字数の比が閾値未満である場合には、前記第1の平均出現確率と前記第2の平均出現確率とを比較し、前記第1の平均出現確率が前記第2の平均出現確率よりも大きい場合は縦書きと判定し、前記第2の平均出現確率が前記第1の平均出現確率よりも大きい場合は横書きと判定するステップと、
をコンピュータに実行させるための行方向判定プログラム。 Obtaining a first number of recognized characters by a vertical character recognition process for a result of reading a vertical or horizontal character group, and a second number of recognized characters by a horizontal character recognition process for the read result;
Referring to an n-gram data storage section that stores the appearance probability of n (n is an integer of 2 or more) continuous characters, a first average appearance probability of n consecutive recognition characters by the vertical character recognition processing Calculating a second average appearance probability of n consecutively recognized characters by the horizontal character recognition process;
When the ratio of the larger number of recognized characters to the smaller number of recognized characters of the first number of recognized characters and the second number of recognized characters is less than a threshold , the first average appearance probability and the second An average appearance probability is compared, and when the first average appearance probability is greater than the second average appearance probability, it is determined as vertical writing, and the second average appearance probability is greater than the first average appearance probability. If it is also larger, the step of judging as horizontal writing ,
-Direction determination program for causing a computer to execute.
n(nは2以上の整数)個の連続文字の出現確率を格納するnグラムデータ格納部を参照して、前記読み取り結果に対する縦方向の文字認識処理によるn個の連続認識文字の第1の平均出現確率と、横方向の文字認識処理によるn個の連続認識文字の第2の平均出現確率とを算出するステップと、
前記縦方向の平均重複度と前記横方向の平均重複度とのうち小さい方の平均重複度に対する大きい方の平均重複度の比が閾値未満である場合、前記第1の平均出現確率と前記第2の平均出現確率とを比較し、前記第1の平均出現確率が前記第2の平均出現確率よりも大きい場合は縦書きと判定し、前記第2の平均出現確率が前記第1の平均出現確率よりも大きい場合は横書きと判定するステップと、
をコンピュータに実行させるための行方向判定プログラム。 Identifies the circumscribed rectangle of a character or part of a character from the result of reading vertical or horizontal characters, and calculates the vertical average overlap between adjacent circumscribed rectangles and the average horizontal overlap between adjacent circumscribed rectangles And steps to
Referring to an n-gram data storage unit that stores the appearance probability of n (n is an integer of 2 or more) continuous characters, the first of n consecutively recognized characters by the character recognition processing in the vertical direction for the read result Calculating an average appearance probability and a second average appearance probability of n consecutively recognized characters by the horizontal character recognition process;
When the ratio of the larger average overlap degree to the smaller one of the average overlap degree in the vertical direction and the average overlap degree in the horizontal direction is less than a threshold , the first average appearance probability and the first 2 if the first average appearance probability is greater than the second average appearance probability, it is determined as vertical writing, and the second average appearance probability is the first average appearance probability. A step of determining horizontal writing if greater than the probability ,
-Direction determination program for causing a computer to execute.
をさらにコンピュータに実行させるための請求項2記載の行方向判定プログラム。 When the ratio of the larger average overlap to the smaller one of the average overlap in the vertical direction and the average overlap in the horizontal direction is larger than a threshold , the average overlap in the vertical direction and the average overlap Compared with the average overlap in the horizontal direction, if the average overlap in the vertical direction is larger than the average overlap in the horizontal direction, it is determined as vertical writing, the average overlap in the horizontal direction is the average in the vertical direction The row direction determination program according to claim 2 , further causing the computer to execute a step of determining horizontal writing when the degree of overlap is greater .
n(nは2以上の整数)個の連続文字の出現確率を格納するnグラムデータ格納部を参照して、前記縦方向の文字認識処理によるn個の連続認識文字の第1の平均出現確率と、前記横方向の文字認識処理によるn個の連続認識文字の第2の平均出現確率とを算出する手段と、
前記第1の認識文字数と前記第2の認識文字数とのうち小さい方の認識文字数に対する大きい方の認識文字数の比が閾値未満である場合には、前記第1の平均出現確率と前記第2の平均出現確率とを比較し、前記第1の平均出現確率が前記第2の平均出現確率よりも大きい場合は縦書きと判定し、前記第2の平均出現確率が前記第1の平均出現確率よりも大きい場合は横書きと判定する手段と、
を有する行方向判定装置。 Means for acquiring a first recognized number of characters by vertical character recognition processing for a reading result of a vertical or horizontal character group and a second number of recognized characters by horizontal character recognition processing for the reading result;
Referring to an n-gram data storage section that stores the appearance probability of n (n is an integer of 2 or more) continuous characters, a first average appearance probability of n consecutive recognition characters by the vertical character recognition processing And means for calculating a second average appearance probability of n consecutively recognized characters by the horizontal character recognition process;
When the ratio of the larger number of recognized characters to the smaller number of recognized characters of the first number of recognized characters and the second number of recognized characters is less than a threshold , the first average appearance probability and the second An average appearance probability is compared, and when the first average appearance probability is greater than the second average appearance probability, it is determined as vertical writing, and the second average appearance probability is greater than the first average appearance probability. If it is too large, means to determine horizontal writing ,
A row direction determination device having:
n(nは2以上の整数)個の連続文字の出現確率を格納するnグラムデータ格納部を参照して、前記読み取り結果に対する縦方向の文字認識処理によるn個の連続認識文字の第1の平均出現確率と、横方向の文字認識処理によるn個の連続認識文字の第2の平均出現確率とを算出する手段と、
前記縦方向の平均重複度と前記横方向の平均重複度とのうち小さい方の平均重複度に対する大きい方の平均重複度の比が閾値未満である場合、前記第1の平均出現確率と前記第2の平均出現確率とを比較し、前記第1の平均出現確率が前記第2の平均出現確率よりも大きい場合は縦書きと判定し、前記第2の平均出現確率が前記第1の平均出現確率よりも大きい場合は横書きと判定する手段と、
を有する行方向判定装置。 A means for identifying a circumscribed rectangle of a character with respect to a reading result of a vertically or horizontally written character group, and calculating an average overlap in the vertical direction between adjacent circumscribed rectangles and an average overlap in the horizontal direction between adjacent circumscribed rectangles;
Referring to an n-gram data storage unit that stores the appearance probability of n (n is an integer of 2 or more) continuous characters, the first of n consecutively recognized characters by the character recognition processing in the vertical direction for the read result Means for calculating an average appearance probability and a second average appearance probability of n consecutively recognized characters by the character recognition processing in the horizontal direction;
When the ratio of the larger average overlap degree to the smaller one of the average overlap degree in the vertical direction and the average overlap degree in the horizontal direction is less than a threshold , the first average appearance probability and the first 2 if the first average appearance probability is greater than the second average appearance probability, it is determined as vertical writing, and the second average appearance probability is the first average appearance probability. If it is greater than the probability , means to determine horizontal writing ,
A row direction determination device having:
縦書き又は横書きの文字群の読み取り結果における文字用画素の縦方向への投影による縦方向画素ヒストグラム及び文字用画素の横方向への投影による横方向画素ヒストグラムに基づいて縦又は横方向にライン数が1の方向が存在するか判断し、縦又は横方向にライン数が1の方向が存在すると判断した場合は、当該ライン数が1の方向を行方向として特定し、縦又は横方向にライン数が1の方向が存在しないと判断した場合は、前記第1の平均確信度と前記第2の平均確信度とを比較し、前記第1の平均確信度が前記第2の平均確信度よりも大きい場合は縦書きと判定し、前記第2の平均確信度が前記第1の平均確信度よりも大きい場合は横書きと判定する手段と、
を有する行方向判定装置。 Means for calculating a first average certainty of a vertical character recognition result and a second average certainty of a horizontal character recognition result with respect to a vertical or horizontal character group reading result;
The number of lines in the vertical or horizontal direction based on the vertical pixel histogram based on the vertical projection of the character pixels and the horizontal pixel histogram based on the horizontal projection of the character pixels in the reading result of the vertical or horizontal character group If there is a direction with a line number of 1 in the vertical or horizontal direction, the direction with the line number of 1 is specified as the row direction, and the line is set in the vertical or horizontal direction. When it is determined that there is no direction having a number of 1, the first average certainty factor is compared with the second average certainty factor, and the first average certainty factor is greater than the second average certainty factor. Is determined to be vertical writing, and when the second average certainty is greater than the first average certainty , means for determining horizontal writing ;
A row direction determination device having:
n(nは2以上の整数)個の連続文字の出現確率を格納するnグラムデータ格納部を参照して、前記縦方向の文字認識処理によるn個の連続認識文字の第1の平均出現確率と、前記横方向の文字認識処理によるn個の連続認識文字の第2の平均出現確率とを算出するステップと、
前記第1の認識文字数と前記第2の認識文字数とのうち小さい方の認識文字数に対する大きい方の認識文字数の比が閾値未満である場合には、前記第1の平均出現確率と前記第2の平均出現確率とを比較し、前記第1の平均出現確率が前記第2の平均出現確率よりも大きい場合は縦書きと判定し、前記第2の平均出現確率が前記第1の平均出現確率よりも大きい場合は横書きと判定するステップと、
を含み、コンピュータにより実行される行方向判定方法。 Obtaining a first number of recognized characters by a vertical character recognition process for a result of reading a vertical or horizontal character group, and a second number of recognized characters by a horizontal character recognition process for the read result;
Referring to an n-gram data storage section that stores the appearance probability of n (n is an integer of 2 or more) continuous characters, a first average appearance probability of n consecutive recognition characters by the vertical character recognition processing Calculating a second average appearance probability of n consecutively recognized characters by the horizontal character recognition process;
When the ratio of the larger number of recognized characters to the smaller number of recognized characters of the first number of recognized characters and the second number of recognized characters is less than a threshold , the first average appearance probability and the second An average appearance probability is compared, and when the first average appearance probability is greater than the second average appearance probability, it is determined as vertical writing, and the second average appearance probability is greater than the first average appearance probability. If it is also larger, the step of judging as horizontal writing ,
A row direction determination method executed by a computer.
n(nは2以上の整数)個の連続文字の出現確率を格納するnグラムデータ格納部を参照して、前記読み取り結果に対する縦方向の文字認識処理によるn個の連続認識文字の第1の平均出現確率と、横方向の文字認識処理によるn個の連続認識文字の第2の平均出現確率とを算出するステップと、
前記縦方向の平均重複度と前記横方向の平均重複度とのうち小さい方の平均重複度に対する大きい方の平均重複度の比が閾値未満である場合、前記第1の平均出現確率と前記第2の平均出現確率とを比較し、前記第1の平均出現確率が前記第2の平均出現確率よりも大きい場合は縦書きと判定し、前記第2の平均出現確率が前記第1の平均出現確率よりも大きい場合は横書きと判定するステップと、
を含み、コンピュータにより実行される行方向判定方法。 Identifies the circumscribed rectangle of a character or part of a character from the result of reading vertical or horizontal characters, and calculates the vertical average overlap between adjacent circumscribed rectangles and the average horizontal overlap between adjacent circumscribed rectangles And steps to
Referring to an n-gram data storage unit that stores the appearance probability of n (n is an integer of 2 or more) continuous characters, the first of n consecutively recognized characters by the character recognition processing in the vertical direction for the read result Calculating an average appearance probability and a second average appearance probability of n consecutively recognized characters by the horizontal character recognition process;
When the ratio of the larger average overlap degree to the smaller one of the average overlap degree in the vertical direction and the average overlap degree in the horizontal direction is less than a threshold , the first average appearance probability and the first 2 if the first average appearance probability is greater than the second average appearance probability, it is determined as vertical writing, and the second average appearance probability is the first average appearance probability. A step of determining horizontal writing if greater than the probability ,
A row direction determination method executed by a computer.
をさらに含む請求項8記載の行方向判定方法。 When the ratio of the larger average overlap to the smaller one of the average overlap in the vertical direction and the average overlap in the horizontal direction is larger than a threshold , the average overlap in the vertical direction and the average overlap Compared with the average overlap in the horizontal direction, if the average overlap in the vertical direction is larger than the average overlap in the horizontal direction, it is determined as vertical writing, the average overlap in the horizontal direction is the average in the vertical direction The row direction determination method according to claim 8 , further comprising the step of determining horizontal writing when the degree of overlap is greater .
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005363842A JP4849883B2 (en) | 2005-12-16 | 2005-12-16 | Row direction determination program, method and apparatus |
| CNA2008101456139A CN101350067A (en) | 2005-12-16 | 2006-03-30 | Row direction determination method and device |
| CNB2006100669779A CN100456317C (en) | 2005-12-16 | 2006-03-30 | Line direction determination method and apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005363842A JP4849883B2 (en) | 2005-12-16 | 2005-12-16 | Row direction determination program, method and apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2007164719A JP2007164719A (en) | 2007-06-28 |
| JP4849883B2 true JP4849883B2 (en) | 2012-01-11 |
Family
ID=38247510
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2005363842A Expired - Fee Related JP4849883B2 (en) | 2005-12-16 | 2005-12-16 | Row direction determination program, method and apparatus |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP4849883B2 (en) |
| CN (2) | CN101350067A (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5405507B2 (en) * | 2011-02-17 | 2014-02-05 | 日本電信電話株式会社 | Apparatus, method and program for determining presence / absence of concrete subject |
| CN102982011B (en) * | 2011-09-07 | 2017-05-31 | 百度在线网络技术(北京)有限公司 | A kind of method and apparatus for recognizing out-of-sequence text |
| CN103870799A (en) * | 2012-12-17 | 2014-06-18 | 北京千橡网景科技发展有限公司 | Character direction judging method and device |
| CN110490198A (en) * | 2019-08-12 | 2019-11-22 | 上海眼控科技股份有限公司 | Text orientation bearing calibration, device, computer equipment and storage medium |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH06139277A (en) * | 1992-10-26 | 1994-05-20 | Seiko Epson Corp | Electronic dictionary device |
| JPH08194773A (en) * | 1995-01-13 | 1996-07-30 | Seiko Epson Corp | Image processing method and image processing apparatus |
| JP2000020638A (en) * | 1998-06-29 | 2000-01-21 | Oki Electric Ind Co Ltd | Character string direction discriminating method |
| JP3787440B2 (en) * | 1998-10-07 | 2006-06-21 | キヤノン株式会社 | Image processing apparatus and image processing method |
| JP4237864B2 (en) * | 1999-04-21 | 2009-03-11 | 富士通株式会社 | Word recognition device |
| JP3962891B2 (en) * | 2000-08-09 | 2007-08-22 | 富士ゼロックス株式会社 | Document image processing apparatus, document image processing method, and storage medium |
| JP2004272798A (en) * | 2003-03-11 | 2004-09-30 | Pfu Ltd | Image reading device |
-
2005
- 2005-12-16 JP JP2005363842A patent/JP4849883B2/en not_active Expired - Fee Related
-
2006
- 2006-03-30 CN CNA2008101456139A patent/CN101350067A/en active Pending
- 2006-03-30 CN CNB2006100669779A patent/CN100456317C/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| CN1983302A (en) | 2007-06-20 |
| CN100456317C (en) | 2009-01-28 |
| JP2007164719A (en) | 2007-06-28 |
| CN101350067A (en) | 2009-01-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR101122854B1 (en) | Method and apparatus for populating electronic forms from scanned documents | |
| US7392473B2 (en) | Method and apparatus for determining logical document structure | |
| CN102982330B (en) | Character identifying method and identification device in character image | |
| US7970213B1 (en) | Method and system for improving the recognition of text in an image | |
| JP3919617B2 (en) | Character recognition device, character recognition method, program, and storage medium | |
| CN110569830A (en) | Multi-language text recognition method and device, computer equipment and storage medium | |
| CN113806472A (en) | Method and equipment for realizing full-text retrieval of character, picture and image type scanning piece | |
| US12462589B2 (en) | Text line detection | |
| JP4849883B2 (en) | Row direction determination program, method and apparatus | |
| CN116311305B (en) | Method and apparatus for content recognition of PDF scanned documents | |
| CN113963342A (en) | Line merging method based on text box position and character information | |
| CN115100672B (en) | Text detection and recognition method, device, equipment and computer-readable storage medium | |
| JP2010020421A (en) | Character recognizing apparatus, character recognizing method, computer program, and storage medium | |
| JPH07282193A (en) | Form processing device including table | |
| US10878271B2 (en) | Systems and methods for separating ligature characters in digitized document images | |
| JPH04352295A (en) | System and device for identifing character string direction | |
| JP7127365B2 (en) | Character segmentation device, character segmentation method, and program | |
| Ball et al. | Writer verification of historical documents among cohort writers | |
| JPH09288714A (en) | Table recognition method and device | |
| JP3348224B2 (en) | Table frame line intersection correction device, table recognition device, and optical character reading device | |
| CN109409370B (en) | Remote desktop character recognition method and device | |
| CN121052243B (en) | Contract document analysis method and system based on multi-mode self-adaptive feature fusion | |
| CN113052179B (en) | Multi-tone word processing method and device, electronic equipment and storage medium | |
| JP2002157550A (en) | Character recognition device, character recognition method, and recording medium | |
| JP2002342711A (en) | IMAGE RECOGNITION DEVICE, IMAGE RECOGNITION METHOD, PROGRAM FOR IMPLEMENTING IMAGE RECOGNITION METHOD, AND RECORDING MEDIUM FOR THE PROGRAM |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080911 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110426 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110602 |
|
| 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: 20111018 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20111018 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4849883 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141028 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |