JP6863753B2 - Devices, methods and computer-readable storage media that determine the angle of rotation of text - Google Patents
Devices, methods and computer-readable storage media that determine the angle of rotation of text Download PDFInfo
- Publication number
- JP6863753B2 JP6863753B2 JP2017008782A JP2017008782A JP6863753B2 JP 6863753 B2 JP6863753 B2 JP 6863753B2 JP 2017008782 A JP2017008782 A JP 2017008782A JP 2017008782 A JP2017008782 A JP 2017008782A JP 6863753 B2 JP6863753 B2 JP 6863753B2
- Authority
- JP
- Japan
- Prior art keywords
- text
- distance
- calculating
- closest
- determining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 48
- 238000012015 optical character recognition Methods 0.000 claims description 20
- 230000004044 response Effects 0.000 claims description 7
- 238000004891 communication Methods 0.000 description 16
- 230000003287 optical effect Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 238000013515 script Methods 0.000 description 2
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 101100521334 Mus musculus Prom1 gene Proteins 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Landscapes
- Character Input (AREA)
Description
本開示は、一般的にテキストの向きの分野に関する。 The present disclosure generally relates to areas of text orientation.
典型的には、文字が描かれている角度の推定は、光学文字認識(OCR)プロセスを用いて行われる。このプロセスは、低速であり、リアルタイムOCRアプリケーションに適さない。既存の解決は、そのような解決を無視すること又はユーザに対して角度を手動で指定するのを要求することであり、角度を手動で指定することは、特に、処理する必要があるテキストの量が多いときにはユーザにとって厄介である。 Typically, the estimation of the angle at which the character is drawn is made using an optical character recognition (OCR) process. This process is slow and unsuitable for real-time OCR applications. The existing solution is to ignore such a solution or require the user to manually specify the angle, and manually specifying the angle is especially of the text that needs to be processed. It is troublesome for the user when the amount is large.
テキストの回転角を決定する装置、方法及びコンピュータ可読記憶媒体。方法は、画像内のテキストに含まれる複数のオブジェクトの各オブジェクトに対して、最も近接するオブジェクトとの距離を計算することと、最も近接するオブジェクトとの距離の平均距離を計算することと、平均距離と、複数のオブジェクトの各々のフォント線幅の平均である平均フォント線幅との間の比を決定することと、比と閾値とを比較することによってテキストの回転角を決定することと、を備える。 Devices, methods and computer-readable storage media that determine the angle of rotation of text. The method is to calculate the distance to the closest object, to calculate the average distance to the closest object, and to average for each object of multiple objects contained in the text in the image. Determining the ratio between the distance and the average font line width, which is the average of the font line widths of each of multiple objects, and determining the angle of rotation of the text by comparing the ratio with the threshold. To be equipped with.
開示は、以下の記載を読むとともに添付図面を見ることによって更に良く理解されるであろう。これらの図面は、実施の形態の限定されない例としてのみ提供される。 The disclosure will be better understood by reading the description below and looking at the accompanying drawings. These drawings are provided only as an unlimited example of embodiments.
一実施の形態は、画像内のテキストの回転角を決定する装置であって、回路を備え、回路は、テキストに含まれる複数のオブジェクトの各オブジェクトに対して、最も近接するオブジェクトとの距離を計算し、最も近接するオブジェクトとの距離の平均距離を計算し、平均距離と、複数のオブジェクトの各々のフォント線幅の平均である平均フォント線幅との間の比を決定し、比と閾値とを比較することによってテキストの回転角を決定するように構成されている装置に注目する。 One embodiment is a device that determines the angle of rotation of text in an image, comprising a circuit, the circuit providing, for each object of a plurality of objects contained in the text, the distance to the closest object. Calculate, calculate the average distance to the closest object, determine the ratio between the average distance and the average font line width, which is the average of the font line widths of each of multiple objects, and the ratio and threshold. Note the device configured to determine the angle of rotation of the text by comparing with.
一実施の形態において、回路は、各オブジェクトの外接矩形を決定するように更に構成され、外接矩形は、各オブジェクトを包囲するとともに各オブジェクトの最外部に接し、回路は、各外接矩形と最も近接する外接矩形との距離を計算することによって最も近接するオブジェクトとの距離を計算する。 In one embodiment, the circuit is further configured to determine the circumscribed rectangle of each object, the circumscribed rectangle surrounds each object and touches the outermost of each object, and the circuit is closest to each circumscribed rectangle. Calculate the distance to the closest object by calculating the distance to the circumscribed rectangle.
一実施の形態において、回路は、各オブジェクトに対して、画像内の各オブジェクトの印刷領域全体に対応するオブジェクト領域を決定し、各オブジェクトに対して、各オブジェクトの外周に対応するオブジェクト外周を決定し、かつ、オブジェクト領域をオブジェクト外周によって除算するとともに2を乗算することによって各オブジェクトのフォント線幅を計算するように更に構成されている。 In one embodiment, the circuit determines, for each object, an object area that corresponds to the entire print area of each object in the image, and for each object, determines an object outer circumference that corresponds to the outer circumference of each object. It is further configured to calculate the font line width of each object by dividing the object area by the outer circumference of the object and multiplying by 2.
一実施の形態において、回路は、複数のオブジェクトのフォント線幅の和を複数のオブジェクトの総数によって除算することによって平均フォント線幅を計算するように構成されている。 In one embodiment, the circuit is configured to calculate the average font line width by dividing the sum of the font line widths of the plurality of objects by the total number of the plurality of objects.
一実施の形態において、回路は、各オブジェクトに対して最も近接するオブジェクトとの距離を計算する前に、画像内のテキストの一つ以上のテキストブロックを決定し、各テキストブロックは、複数のオブジェクトを含み、各テキストブロックに対して、テキストブロックが縦向きと横向きのいずれであるかを決定し、かつ、テキストブロックが縦向きであるという決定に応答して、テキストブロックの各オブジェクトに対して最も近接するオブジェクトとの距離を計算するように構成されている。 In one embodiment, the circuit determines one or more text blocks of text in an image before calculating the distance to the closest object to each object, where each text block is a plurality of objects. For each text block, determine whether the text block is portrait or landscape, and in response to the determination that the text block is portrait, for each object in the text block. It is configured to calculate the distance to the closest object.
一実施の形態は、画像内のテキストに含まれる複数のオブジェクトの各オブジェクトに対して、最も近接するオブジェクトとの距離を計算することと、最も近接するオブジェクトとの距離の平均距離を計算することと、平均距離と、複数のオブジェクトの各々のフォント線幅の平均である平均フォント線幅との間の比を決定することと、比と閾値とを比較することによって前記テキストの回転角を決定することと、を備える方法に注目する。 One embodiment is to calculate the distance to the closest object and the average distance to the closest object for each object of a plurality of objects contained in the text in the image. The angle of rotation of the text is determined by determining the ratio between the average distance and the average font line width, which is the average of the font line widths of each of a plurality of objects, and by comparing the ratio and the threshold value. Pay attention to what to do and how to prepare for it.
一実施の形態において、方法は、各オブジェクトの外接矩形を決定することであって、外接矩形は、各オブジェクトを包囲するとともに各オブジェクトの最外部に接することを更に備え、最も近接するオブジェクトとの距離を計算することは、各外接矩形と最も近接するオブジェクトとの距離を計算することによって行われる。 In one embodiment, the method is to determine the circumscribing rectangle of each object, which further comprises surrounding each object and contacting the outermost of each object, with respect to the closest object. The calculation of the distance is done by calculating the distance between each circumscribing rectangle and the closest object.
一実施の形態において、方法は、各オブジェクトに対して、画像内の各オブジェクトの印刷領域全体に対応するオブジェクト領域を決定することと、各オブジェクトに対して、各オブジェクトの外周に対応するオブジェクト外周を決定することと、オブジェクト領域をオブジェクト外周によって除算するとともに2を乗算することによって各オブジェクトのフォント線幅を計算することと、を更に備える。 In one embodiment, the method is to determine, for each object, an object area that corresponds to the entire print area of each object in the image, and for each object, an object outer circumference that corresponds to the outer circumference of each object. And to calculate the font line width of each object by dividing the object area by the outer circumference of the object and multiplying by 2.
一実施の形態において、方法は、複数のオブジェクトのフォント線幅の和を複数のオブジェクトの総数によって除算することによって平均フォント線幅を計算することを更に備える。 In one embodiment, the method further comprises calculating the average font line width by dividing the sum of the font line widths of the plurality of objects by the total number of the plurality of objects.
一実施の形態において、方法は、各オブジェクトに対して最も近接するオブジェクトとの距離を計算する前に、画像内のテキストの一つ以上のテキストブロックを決定することであって、各テキストブロックは、複数のオブジェクトを含むことと、各テキストブロックに対して、テキストブロックが縦向きと横向きのいずれであるかを決定することと、テキストブロックが縦向きであるという決定に応答して、テキストブロックの各オブジェクトに対して最も近接するオブジェクトとの距離を計算することと、を更に備える。 In one embodiment, the method is to determine one or more text blocks of text in an image before calculating the distance to the closest object to each object, where each text block is , In response to the decision to contain multiple objects, to determine for each text block whether the text block is portrait or landscape, and to determine that the text block is portrait, the text block It further comprises calculating the distance to the closest object for each object in.
一実施の形態において、方法は、テキストの回転角を決定した後に光学文字認識(OCR)を行うことを更に備える。 In one embodiment, the method further comprises performing optical character recognition (OCR) after determining the angle of rotation of the text.
一実施の形態は、コンピュータで実行されるときに、画像内のテキストに含まれる複数のオブジェクトの各オブジェクトに対して、最も近接するオブジェクトとの距離を計算することと、最も近接するオブジェクトとの距離の平均距離を計算することと、平均距離と、複数のオブジェクトの各々のフォント線幅の平均である平均フォント線幅との間の比を決定することと、比と閾値とを比較することによってテキストの回転角を決定することと、を備える方法をコンピュータに実行させるコンピュータ実行可能命令を有する非一時的コンピュータ可読記憶媒体に注目する。 One embodiment is to calculate the distance to the closest object for each object of a plurality of objects contained in the text in the image when executed on a computer, and to the closest object. Calculating the average distance of distances, determining the ratio between the average distance and the average font line width, which is the average of the font line widths of each of multiple objects, and comparing the ratio with the threshold. Focus on a non-temporary computer-readable storage medium that has computer-executable instructions that cause a computer to perform a method of determining the rotation angle of a text by means of.
一実施の形態において、非一時的コンピュータ可読記憶媒体は、各オブジェクトの外接矩形を決定することであって、外接矩形は、各オブジェクトを包囲するとともに各オブジェクトの最外部に接することを更に備え、最も近接するオブジェクトとの距離を計算することは、各外接矩形と最も近接するオブジェクトとの距離を計算することによって行われる。 In one embodiment, the non-temporary computer-readable storage medium is to determine the circumscribing rectangle of each object, which further comprises surrounding each object and contacting the outermost of each object. Calculating the distance to the closest object is done by calculating the distance between each circumscribing rectangle and the closest object.
一実施の形態において、非一時的コンピュータ可読記憶媒体は、各オブジェクトに対して、前記画像内の各オブジェクトの印刷領域全体に対応するオブジェクト領域を決定することと、各オブジェクトに対して、各オブジェクトの外周に対応するオブジェクト外周を決定することと、オブジェクト領域をオブジェクト外周によって除算するとともに2を乗算することによって各オブジェクトのフォント線幅を計算することと、を更に備える。 In one embodiment, the non-temporary computer-readable storage medium determines, for each object, an object area that corresponds to the entire print area of each object in the image, and for each object, each object. It further comprises determining the outer circumference of the object corresponding to the outer circumference of the object, and calculating the font line width of each object by dividing the object area by the outer circumference of the object and multiplying by 2.
一実施の形態において、非一時的コンピュータ可読記憶媒体は、複数のオブジェクトのフォント線幅の和を複数のオブジェクトの総数によって除算することによって平均フォント線幅を計算することを更に備える。 In one embodiment, the non-temporary computer-readable storage medium further comprises calculating the average font line width by dividing the sum of the font line widths of the plurality of objects by the total number of the plurality of objects.
一実施の形態において、非一時的コンピュータ可読記憶媒体は、各オブジェクトに対して最も近接するオブジェクトとの距離を計算する前に、画像内のテキストの一つ以上のテキストブロックを決定することであって、各テキストブロックは、複数のオブジェクトを含むことと、各テキストブロックに対して、テキストブロックが縦向きと横向きのいずれであるかを決定することと、テキストブロックが縦向きであるという決定に応答して、テキストブロックの各オブジェクトに対して最も近接するオブジェクトとの距離を計算することと、を更に備える。 In one embodiment, the non-temporary computer-readable storage medium is to determine one or more text blocks of text in an image before calculating the distance to the closest object to each object. Each text block contains multiple objects, determines for each text block whether the text block is portrait or landscape, and determines that the text block is portrait. In response, it further comprises calculating the distance to the closest object for each object in the text block.
一実施の形態において、非一時的コンピュータ可読記憶媒体は、テキストの回転角を決定した後に光学文字認識(OCR)を行うことを更に備える。 In one embodiment, the non-temporary computer-readable storage medium further comprises performing optical character recognition (OCR) after determining the angle of rotation of the text.
本開示は、縦方向に流れるテキストブロックの画像内に文字(例えば、表意文字)が書かれた角度を迅速に推定又は決定する方法に注目する。このように書かれる角度を回転角と称する。回転及び向きを本開示全体に亘って区別しないで用いることがあることに留意されたい。 The present disclosure focuses on a method of rapidly estimating or determining the angle at which a character (eg, an ideographic character) is written in an image of a vertically flowing text block. The angle written in this way is called the angle of rotation. It should be noted that rotation and orientation may be used interchangeably throughout this disclosure.
図1に示すように、一実施の形態において、四つの異なる回転角が存在する。図1Aは、0°の回転角の文字を示す。図1Bは、90°の回転角の文字を示す。図1Cは、180°の回転角の文字を示す。図1Dは、270°の回転角の文字を示す。 As shown in FIG. 1, in one embodiment, there are four different angles of rotation. FIG. 1A shows characters with a rotation angle of 0 °. FIG. 1B shows characters with a rotation angle of 90 °. FIG. 1C shows characters with a rotation angle of 180 °. FIG. 1D shows characters with a rotation angle of 270 °.
横方向ではなく縦方向に流れるテキストを縦向きテキストと称する。図2は、縦向きテキストの四つの例を示す。図2Aは、ラテン語から派生した言語のテキストが90°回転している例を示す。図2Bは、ラテン語から派生した言語のテキストが270°回転している例を示す。図2Cは、文字を回転させずに(0°の回転)縦向きに書かれたラテン語から派生した言語のテキストの例を示し、図2Dは、文字を回転させずに縦向きに書かれた日本語テキストの例を示す。 Text that flows vertically instead of horizontally is called portrait text. FIG. 2 shows four examples of portrait text. FIG. 2A shows an example in which the text of a language derived from Latin is rotated by 90 °. FIG. 2B shows an example in which the text of a language derived from Latin is rotated by 270 °. FIG. 2C shows an example of text in a language derived from Latin written vertically without rotating the letters (rotated by 0 °), and FIG. 2D is written vertically without rotating the letters. An example of Japanese text is shown.
テキストが(画像の左から右までの)画像の横軸に関連して横向きであると見なすともにテキストが(画像の上から下までの)画像の縦軸に関連して縦向きであると見なしていることに留意されたい。横向きテキストの向き及び縦向きテキストの向きを図1及び図2に示す。縦向きテキストは、画像の縦軸に平行な画像の(上から下までの)列において分類され、それに対し、横向きテキストは、画像の横軸に平行な画像の(左から右までの)行において分類される。 Consider the text to be landscape in relation to the horizontal axis of the image (from left to right in the image) and the text to be vertical in relation to the vertical axis of the image (from top to bottom of the image) Please note that The orientation of the landscape text and the orientation of the portrait text are shown in FIGS. 1 and 2. Vertical text is categorized in columns (top to bottom) of the image parallel to the vertical axis of the image, whereas landscape text is rows (left to right) of the image parallel to the horizontal axis of the image. It is classified in.
本開示は、文字の間隔の寸法及び書かれた文字の特性に基づく決定を行うことに注目する。 It is noted that the present disclosure makes decisions based on the size of the spacing between letters and the characteristics of the letters written.
回転を決定するために一つの文字ごとにOCRを行うのに所定の不都合がある。例えば、このプロセスは、低速であり、リアルタイムOCRアプリケーションに適さない。上述したように、既存の解決は、そのようなテキストの回転角を無視すること又はユーザに対して回転角を手動で指定するのを要求することである。 There is a certain inconvenience in performing OCR for each character to determine rotation. For example, this process is slow and unsuitable for real-time OCR applications. As mentioned above, the existing solution is to ignore the angle of rotation of such text or require the user to manually specify the angle of rotation.
上述したように、本実施の形態は、縦向きのテキストの回転角を迅速かつ自動的に推定する方法を説明する。本開示の実施の形態を、OCRプロセスを促進するために用いることができ、他のアプリケーションは、その精度をリアルタイムで向上させる。例えば、最初に、ここで説明する実施の形態を用い、その後、OCRは、(一つ以上の)文字を適切に認識するために結果を適用してもよい。換言すれば、最初に、テキストの回転角を、図3及び図4を参照しながら後に説明するようにして決定し、その後、OCRをテキストに適用してもよい。 As described above, this embodiment describes a method of quickly and automatically estimating the rotation angle of portrait text. The embodiments of the present disclosure can be used to facilitate the OCR process, and other applications improve their accuracy in real time. For example, first the embodiments described herein may be used, after which the OCR may apply the results to properly recognize (one or more) characters. In other words, the angle of rotation of the text may first be determined as described later with reference to FIGS. 3 and 4, and then OCR may be applied to the text.
図3は、一実施の形態によるテキストブロックが縦向きであるか横向きであるかを決定するプロセスを示す。所定の画像(例えば、走査した文書の画像)が、例えば、縦向きに描かれた(書かれた)テキスト及び横向きに描かれた(書かれた)テキストを有することに留意されたい。そのような画像は、広告面、新聞面、チラシ面等又は他のタイプの面(page)/文書を表してもよい。 FIG. 3 shows a process of determining whether a text block according to one embodiment is portrait or landscape. Note that a given image (eg, an image of a scanned document) has, for example, vertically drawn (written) text and horizontally drawn (written) text. Such images may represent advertising surfaces, newspaper surfaces, leaflet surfaces, etc. or other types of pages / documents.
したがって、一実施の形態において、先ず、ステップ100において、画像内のオブジェクト(例えば、文字(character or letter))を検出する。本開示において、オブジェクト及び文字を区別しないで用いてもよいことに留意されたい。次に、ステップ110において、オブジェクトをブロックに分割する。ブロックを、例えば、文字の任意のグループ(例えば、文、段落等)としてもよい。ブロックを、ブロック間の距離が予め決定された距離より大きいか否かに基づいて他のブロックと区別してもよい。例えば、二つの段落の間の距離は、一語の二つの文字の間の距離より著しく大きくなる。したがって、そのような距離を、ブロックのサイズを決定する際に用いる。一実施の形態において、各ブロックが異なるサイズとなってもよいことに留意されたい。一実施の形態において、(一つ以上の)一部のブロックを同一サイズにしながら(一つ以上の)他のブロックを(一つ以上の)異なるサイズにしてもよいことに留意されたい。
Therefore, in one embodiment, first, in
一実施の形態において、ブロック間の最小距離を文字のサイズの2倍にするとともに文字の間の距離を文字のサイズの0.2倍以下にしてもよいことに留意されたい。これらの距離が画素であることに留意されたい。 Note that in one embodiment, the minimum distance between blocks may be twice the size of the characters and the distance between the characters may be 0.2 times or less the size of the characters. Note that these distances are pixels.
次に、ステップ120において、各ブロックに対して、角度(orientation angle)(すなわち、0°、90°、180°又は270°)を決定する。一実施の形態において、角度を、シュプリンガー(Springer−Verlag)の2010年1月16日に刊行されたBeusekom等による“Combined orientation and skew detection using geometric text−line modeling”で議論された方法を用いて決定してもよく、その全内容を参照によりここに組み込む。一実施の形態において、角度を、IEEEの2010年1月に刊行された2010 International Conference onPattern RecognitionからのIuliu Konya等による“Fast seamless skew and orientation detection in document images”で議論された方法を用いて決定してもよく、その全内容を参照によりここに組み込む。一実施の形態において、角度を、当業者に知られている(一つ以上の)他の方法によって決定してもよい。例えば、角度及び画像のスキュー角(skew angle)を検出することができる任意の方法を用いてもよい。
Next, in
簡潔に要約するために、Beusekom等で議論した方法(以下、Beusekom)は、走査した文書からテキスト行を抽出するために幾何学的整合(geometric matching)を用いる。一定のポイントに対するテキスト行モデルの整合の品質を与える品質関数が規定される。目的は、モデルに整合する境界ボックスの数を最大にするとともに最小二乗法のロバスト推定(robust least square sense)において基準値からの各基準点の距離を最小にする文書画像の各テキスト行のパラメータの集合を見つけることである。Beusekomの方法の極めて重要な考えは、モデリングディセンサー(modeling descenders)と同じようにアセンダーモデリング(ascender modeling)を用いることである。 For the sake of brevity, the method discussed in Beusekom et al. (Hereinafter referred to as Beusekom) uses geometric matching to extract lines of text from a scanned document. A quality function is specified that gives the quality of alignment of the text line model for a given point. The purpose is to maximize the number of bounding boxes that match the model and to minimize the distance of each reference point from the reference value in the robust least squares squares parameter of each text line of the document image. Is to find a set of. A very important idea of Beusekom's method is to use ascender modeling as well as modeling descenders.
xライン(x,a,c等のようなアセンダーでない小文字(non−ascending lower case character)の上を通過するライン)を直線としてモデル化し、アセンダーラインを、xラインより上で所定の距離を置きながらxラインと平行となるラインとしてモデル化する。文書画像の連結部の境界ボックスの一番上のラインの真ん中をとることによって取得した基準点{y1、y2、...,yn}を考察する。テキスト行の検出の目的は、最大のセット幅を見つけることである。ラテン語から派生した言語において、スクリプトアセンダーはディセンダーより生じやすいので、構成要素は、ディセンダーラインよりアセンダーラインに整合しやすい。ディセンダー/アセンダーに整合する構成要素は、基準線/xラインに整合する構成要素に比べて少ないスコアを受け取る。したがって、一般的には、ディセンダーラインの総合的品質は、アセンダーラインの総合的品質より高くなる。この情報は、ページの上下方向を見つけるのに用いられる。 Model the x-line (a line that passes over non-ascender lowercase letters such as x, a, c, etc.) as a straight line, and place the ascender line at a predetermined distance above the x-line. However, it is modeled as a line parallel to the x line. Reference points {y1, y2 ,., Obtained by taking the middle of the top line of the boundary box of the connection part of the document image. .. .. , Yn}. The purpose of detecting lines of text is to find the maximum set width. In Latin-derived languages, script ascenders are more likely to occur than descenders, so components are more likely to align with ascender lines than descender lines. Descender / Ascender-consistent components receive fewer scores than reference / x-line-consistent components. Therefore, in general, the overall quality of the descender line is higher than the overall quality of the ascender line. This information is used to find the vertical direction of the page.
Beusekomの方法において、ディセンダーモデルを用いてn個のベストライン(best line)の総合的品質を計算し、その後、アセンダーモデルを用いてn個のベストラインの総合的品質を計算する。アセンダーモデルの品質がディセンダーモデルの品質より高い場合、ページは、上下逆(180°回転)と報告される。正確な向きの所定のページ画像のアセンダーモデルを計算することは、180°回転したページのディセンダーモデルを計算することに相当する。したがって、任意の画像に対して、元の画像のディセンダーモデル及び180°回転した画像のディセンダーモデルのみを計算する。更に良いディセンダー品質となる画像は、正確な向きの画像として報告される。 In the Beusekom method, the descender model is used to calculate the overall quality of n best lines, and then the ascender model is used to calculate the overall quality of n best lines. If the quality of the ascender model is higher than the quality of the descender model, the page is reported upside down (180 ° rotation). Calculating the ascender model for a given page image in the correct orientation is equivalent to calculating the descender model for a page rotated 180 °. Therefore, for any image, only the descender model of the original image and the descender model of the 180 ° rotated image are calculated. Images with even better descender quality are reported as images with the correct orientation.
この概念は、検出される90°の向きのページ及び270°の向きのページに容易に拡張される。横向きテキストラインモデルは、縦向きテキストラインに十分に適合せず、したがって、上下関係の正しい縦長書式(right side up portrait page)に対して、縦向きのn個の最適ラインの総合的品質は、横向きのn個の最適ラインの総合的品質より著しく低くなる。したがって、ページを四つの全ての向きに回転させることによりディセンダー品質を計算することによって、ページの正確な向きを決定することができる。 This concept is easily extended to detected 90 ° orientation pages and 270 ° orientation pages. The landscape textline model does not fit well into portrait textlines, so the overall quality of the n optimal lines in portrait orientation for the correct portrait format (right side up portrait page) is It is significantly lower than the overall quality of n horizontal optimum lines. Therefore, the exact orientation of the page can be determined by calculating the descender quality by rotating the page in all four orientations.
図3に戻ると、ステップ130において、角度の結果に基づいて、各ブロックを、縦向きと横向きの何れかに分類する。特に、ブロックの向きが90°又は270°のとき、ブロックは、縦向きであるものとして分類する。そうでない場合(すなわち、ブロックの向きが0°又は180°であるとき)、ブロックは、横向きであるものとして分類される。ブロックが横向きである場合、回転角が上述した角度(すなわち、例えば、Beusekomで議論した方法を用いて決定した角度)であるので、更なる処理を必要としない。
Returning to FIG. 3, in
ステップ140において、全てのブロックが分類されたか否かを決定する。まだ分類されていないブロックが存在する場合、処理は、ステップ120に戻り、全てのブロックが分類されるまで繰り返される。
In
ブロックが縦向きであるものとして分類された場合、次に、(図2Cに示すような)回転角度0°、(図2Aに示すような)回転角度90°又は(図2Bに示すような)回転角度270°を、図4を参照しながら決定する。したがって、ステップ200において、テキストブロック内の各文字に対して、フォント線幅を、以下の式1を用いて計算する。
If the block is classified as vertical, then the rotation angle is 0 ° (as shown in FIG. 2C), the rotation angle is 90 ° (as shown in FIG. 2A), or (as shown in FIG. 2B). The rotation angle of 270 ° is determined with reference to FIG. Therefore, in
図5は、一実施の形態による文字“L”(オブジェクト320)のオブジェクト領域300及びオブジェクト外周310を示す。オブジェクト領域300は文字320の印刷領域(すなわち、文字が黒色で描かれる場合には文字の黒色部分)を意味することに留意されたい。オブジェクト外周310は、文字320の外周(すなわち、文字/印刷領域の輪郭)を意味する。換言すれば、オブジェクト領域300は、フォアグラウンド画素の数に対応し、オブジェクト外周310は、外周輪郭に対応する。一例として、Calibiri 11のフォントサイズに対して、最大フォント線幅は、7画素である。
FIG. 5 shows an
次に、ステップ210において、ブロックの全ての文字320の平均フォント線幅を、以下の式2を用いて計算する。
Next, in
その後、ステップ220において、各オブジェクト320に対して、外接矩形330(すなわち、文字320を包囲するとともに文字の最外部に接するボックス)を計算する。オブジェクト“L”320の外接矩形330を図5に示す。一実施の形態において、外接矩形330は文字320に接しないが文字320を包囲するとともに文字320から所定の距離(例えば、1画素)にあってもよいことに留意されたい。
Then, in
さらに、ステップ230において、各オブジェクト320に対して、最も近いオブジェクト320に対する間隔340の寸法を計算する(図6参照)。一実施の形態において、この寸法を一つのオブジェクト320の外接矩形330から他の(隣接する)オブジェクト320の外接矩形330まで計算することに留意されたい。図6に示すように、上述した間隔340は、最も近い隣接するオブジェクト320までのオブジェクト320の距離を表す。図6がオブジェクト320(すなわち、“L”,“E”,“A”及び“D”の各々)が間隔340を有するテキストのブロックの一実施の形態を示すことに留意されたい。
Further, in
次に、ステップ240において、全てのオブジェクト間隔340の寸法の平均を計算する。ステップ250において、平均間隔寸法と平均フォント線幅との間の比を、以下の式3を用いて決定する。
Next, in
次に、ステップ260において、回転角を決定するために比を閾値Tと比較する。一実施の形態において、閾値Tを、特定の言語のほとんどの文字のフォントの太さに対応する予め決定された値としてもよい。例えば、一実施の形態において、Tを、ラテン語から派生した言語に対して3の値に設定してもよい。その理由は、(英語のような)ラテン語から派生した言語の文字が太いフォントで描かれるからである。値3がフォントの太さを構成する画素数を表すことに留意されたい。一実施の形態において、Tを、アジアの言語に対して5の値に設定してもよい。その理由は、(日本語のような)アジアの言語が(更に詳細に書くために)細いフォントで描かれるからである。
Next, in
上述した閾値Tを(太字及び/又はイタリック体のテキストを含む)全てのスタイルのテキストに適用可能である。さらに、一実施の形態において、閾値を、適用される特定のアプリケーションに基づいて変更してもよい。例えば、ベイジアンのような学習フレームワーク(training framework)を、特定のアプリケーションに適合する閾値の値を推定するのに用いてもよい。そのような推定を、図8に示すシステムのようなシステムによって実行してもよい。 The threshold T described above is applicable to all styles of text (including bold and / or italicized text). Further, in one embodiment, the threshold may be changed based on the particular application applied. For example, a training framework such as Bayesian may be used to estimate threshold values that are suitable for a particular application. Such estimation may be performed by a system such as the system shown in FIG.
したがって、決定された比がT以上(すなわち、比≧T)である場合、テキストブロックは、0°又は180度の回転角を有する文字を含む縦向きであると決定される。そうでない場合(すなわち、決定された比がT未満である(比<T)である場合)、テキストブロックは、図3のステップ120で決定されるように、推定された回転角に等しい回転角を有する縦向きであると考えられる。
Therefore, if the determined ratio is T or greater (ie, ratio ≥ T), the text block is determined to be portrait orientation containing characters with a rotation angle of 0 ° or 180 degrees. Otherwise (ie, if the determined ratio is less than T (ratio <T)), the text block has an angle of rotation equal to the estimated angle of rotation, as determined in
本開示による一実施の形態を簡潔に要約するために、図7に示す文字を含むシート/ページをスキャナ又は同様な装置を用いて走査すると仮定する。一実施の形態において、先ず、走査した画像内のオブジェクト(例えば、一つ以上の文字)を検出する。一旦これらの文字を検出すると、これらのオブジェクトをブロックに分割する。例えば、処理は、図7の5個のブロック400〜440を決定する。 In order to briefly summarize one embodiment according to the present disclosure, it is assumed that a sheet / page containing the characters shown in FIG. 7 is scanned using a scanner or a similar device. In one embodiment, first, an object (eg, one or more characters) in the scanned image is detected. Once these characters are detected, they are split into blocks. For example, the process determines the five blocks 400-440 of FIG.
次に、各ブロック400〜440が横向きであるか縦向きであるかを決定する。この決定が各ブロックに対して行われるが各ブロック内の各オブジェクト(文字)に対して行われないことに留意されたい。図3に示す処理を実行する際に、ブロック400及び410が画像(走査したページ)に対して横向きである(すなわち、横向きテキストである)と決定され、ブロック420,430及び440が画像(走査したページ)に対して縦向きである(すなわち、縦向きテキストである)と決定される。
Next, it is determined whether each
次に、縦向きであると決定されたブロックに対して、図4に示す処理が適用される。この処理において、上述したように、ブロック420,430及び440の各オブジェクト(文字)を分析する。図4で述べた処理を行うことによって、ブロック420が90°の回転角を有すること、ブロック430が0°の回転角を有する(すなわち、テキストが縦向きに描かれているがブロック内の文字が回転していない)こと及びブロック440が270°の回転角を有することが決定される。
Next, the process shown in FIG. 4 is applied to the block determined to be vertically oriented. In this process, as described above, each object (character) of
次に、(一つ以上の)回転角を、精度を向上させるとともに認識する文字の計算時間を短縮するためにOCRプロセスによって用いてもよい。テキストの特定のブロックの回転角の知識を有することによって、OCRプロセスは、テキストの特定のレイアウト(例えば、図2に示すレイアウトの一つ)を知り、文字が実際に回転したときに回転がないと仮定する文字の認識を試みる際に計算時間及び電力を浪費しない。これによって、計算時間の短縮及び節電が行われるとともに精度が向上するので上述した処理を実行する装置/マシンの性能を向上させる。 The angle of rotation (one or more) may then be used by the OCR process to improve accuracy and reduce the calculation time of the characters to be recognized. By having knowledge of the angle of rotation of a particular block of text, the OCR process knows a particular layout of the text (eg, one of the layouts shown in Figure 2) and there is no rotation when the character actually rotates. Do not waste calculation time and power when trying to recognize the assumed characters. As a result, the calculation time is shortened, power is saved, and the accuracy is improved, so that the performance of the device / machine that executes the above-described processing is improved.
さらに、文字を適切に認識する際にOCRを支援する及び/又は、例えば、テキストを含むシートが不適切に走査されたときに文字を回転させるために本開示の実施の形態を用いてもよいことに留意されたい。 In addition, embodiments of the present disclosure may be used to assist OCR in properly recognizing characters and / or to rotate the characters, for example, when a sheet containing text is improperly scanned. Please note that.
本開示の実施の形態は、従来技術との違いを多く提供する。例えば、文字認識(例えば、OCR)は、回転角を見つけるために用いられない。さらに、回転角を、テキストブロックごとに決定し、走査した画像全体に対して決定しない。換言すれば、一実施の形態によれば、処理は、図7のブロック400が横向きであるので画像全体も横向きであると簡単に決定しない。それどころか、各ブロックの向きを正確に決定するために各ブロックを個別に調べる。テキストを回転すべき場合、テキストの各ブロックを、向きに基づいて個別に回転する。したがって、一実施の形態において、走査した画像全体を、検出したブロックの向きに基づいて回転させない。
The embodiments of the present disclosure provide many differences from the prior art. For example, character recognition (eg, OCR) is not used to find the angle of rotation. Further, the angle of rotation is determined for each text block and not for the entire scanned image. In other words, according to one embodiment, the process does not easily determine that the entire image is also landscape because the
また、本開示の実施の形態をラテン語から派生した言語、アジアの言語等に適用してもよい。さらに、本開示の実施の形態を、任意のフォント及びサイズのテキストに適用してもよい。 In addition, the embodiments of the present disclosure may be applied to languages derived from Latin, Asian languages, and the like. Further, the embodiments of the present disclosure may be applied to text of any font and size.
実施の形態で説明した機能/方法/処理の各々を、一つ以上の処理回路(又は回路)によって実現してもよい。例えば、図3及び図4に示す処理を、一つ以上の処理回路(又は回路)によって実現してもよい。処理回路は、回路を含むプロセッサのようなプログラムされたプロセッサ(例えば、図8のプロセッサ1203)を含む。処理回路は、特定用途向け集積回路(ASIC)及び列挙した機能を実行するように配置された従来の回路部品のような装置も含む。
Each of the functions / methods / processes described in the embodiments may be realized by one or more processing circuits (or circuits). For example, the processes shown in FIGS. 3 and 4 may be realized by one or more processing circuits (or circuits). The processing circuit includes a programmed processor (eg,
図8は、本開示の(一つ以上の)実施の形態を実現することができるコンピュータシステム1201を示す。コンピュータシステム1201を、汎用コンピュータ又は特定の専用マシンとしてもよい。一実施の形態において、コンピュータシステム1201は、オブジェクト/テキストの回転角を決定するためにプロセッサ1203をプログラムするときに特定の専用マシンとなる。コンピュータシステム1201を、多機能周辺装置(MFP)、一体型のプリンタ、スキャナ等として(又はその一部として)実施してもよい。
FIG. 8 shows a
コンピュータシステム1201は、磁気ハードディスク1207及びリムーバブルメディアドライブ1208(例えば、フロッピーディスク(登録商標)ドライブ、読出し専用コンパクトディスクドライブ、読出し/書込みコンパクトディスクドライブ、コンパクトディスクジュークボックス、テープドライブ及びリムーバブル光磁気ドライブ)のような情報及び命令を格納する一つ以上の記憶装置を制御するためにバス1202に結合されたディスクコントローラ1206を含む。記憶装置を、適切なデバイスインタフェース(例えば、スモールコンピュータインタフェースシステム(SCSI)、集積電子機器(integrated device electronics)(IDE)、エンハンストIDE(E−IDE)、ダイレクトメモリアクセス(DMA)又はウルトラDMA)を用いてコンピュータシステム1201に追加してもよい。
The
コンピュータシステム1201は、専用論理装置(例えば、ASIC)又はコンフィギュラブルロジックデバイス(例えば、シンプルプログラマブルロジックデバイス(SPLD)、コンプレックスプログラマブルロジックデバイス(CPLD)及びフィールドプログラマブルゲートアレイ(FPGA))も含んでもよい。
The
コンピュータシステム1201は、コンピュータユーザに情報を表示する液晶ディスプレイ(LCD)とすることができるディスプレイ1210を制御するためにバス1202に結合されているディスプレイコントローラ1209も含んでもよい。ディスプレイ1210をタッチパネルディスプレイとしてもよいことに留意されたい。コンピュータシステムは、コンピュータユーザと情報をやりとりするとともに情報をプロセッサ1203に提供するキーボード1211及びポインティングデバイス1212のような入力装置を含む。ポインティングデバイス1212を、例えば、マウス、トラックボール、タッチスクリーンセンサに対する指、又は、指示情報及びコマンド選択をプロセッサ1203に送信するとともにディスプレイ1210の上のカーソル移動を制御するポインティングスティックとしてもよい。
The
コンピュータシステム1201は、主記憶1204のようなメモリに含まれる一つ以上の命令の一つ以上の列を実行するプロセッサ1203に応答して本開示の処理ステップの一部又は全てを実行する。そのような命令を、ハードディスク1207又はリムーバブルメディアドライブ1208のような他のコンピュータ可読媒体から主記憶1204に読み出してもよい。多重処理配置(multi−processing arrangement)の一つ以上のプロセッサを、主記憶1204に含まれる命令列を実行するために用いてもよい。代替的な実施の形態において、配線回路を、ソフトウェア命令の代わりに又はソフトウェア命令と組み合わせて用いてもよい。したがって、実施の形態は、ハードウェア回路及びソフトウェアの任意の特定の組合せに限定されない。
上述したように、コンピュータシステム1201は、本開示の教示に従ってプログラムされた命令を保持するとともにデータ構造、テーブル、記録又はここで説明した他のデータを含む少なくとも一つのコンピュータ可読媒体又はメモリを含む。コンピュータ可読媒体の例は、コンパクトディスク、ハードディスク、フロッピーディスク(登録商標)、テープ、光磁気ディスク、PROM(EPROM、EEPROM、フラッシュEPROM)、DRAM、SRAM、SDRAM、他の任意の磁気媒体若しくはコンパクトディスク(例えば、CD−ROM)、他の任意の光媒体、パンチカード、紙テープ、又は、孔のパターンを有する他の物理的な媒体である。
As mentioned above, the
本開示は、コンピュータシステム1201を制御し、発明を実現するために一つ以上の装置を駆動し、かつ、コンピュータシステム1201がユーザと情報をやりとりするのを可能にするソフトウェアを含み、ソフトウェアは、コンピュータ可読媒体のいずれか一つ又はその組合せに格納される。そのようなソフトウェアは、デバイスドライバ、オペレーティングシステム及びアプリケーションソフトウェアを含むがそれに限定されない。そのようなコンピュータ可読媒体は、発明を実現する際に実行される処理の全て又は(処理が分散される場合には)一部を実行するための本開示のコンピュータプログラム製品を更に有する。
The present disclosure includes software that controls a
コンピュータコードデバイス(computer code device)を、スクリプト、解釈可能プログラム、ダイナミックリンクライブラリ(DLL)、Java(登録商標)のクラス及び完全な実行可能プログラムを含むがそれに限定されない任意の解釈可能又は実行可能コード機構としてもよい。さらに、本実施の形態の処理の一部を、更によい実行、信頼性及び/又はコストのために分散させてもよい。 Computer code devices, any interpretable or executable code that includes, but is not limited to, scripts, interpretable programs, dynamic link libraries (DLLs), Java® classes and full executable programs. It may be a mechanism. In addition, some of the processing of this embodiment may be distributed for better execution, reliability and / or cost.
ここで用いる用語「コンピュータ可読媒体」は、実行のためのプロセッサ1203への命令の提供に関与する任意の非一時的媒体を意味する。コンピュータ可読媒体は、不揮発性媒体又は揮発性媒体を含むがそれに限定されない多数の形態をとってもよい。不揮発媒体は、例えば、ハードディスク1207又はリムーバブルメディアドライブ1208のような光ディスク、磁気ディスク及び光磁気ディスクを含む。揮発性媒体は、主記憶1204のようなダイナミックメモリを含む。それに対し、伝送媒体は、バス1202を構成するワイヤを含み、同軸ケーブル、銅線及び光ファイバを含む。伝送媒体は、電波通信及び赤外線データ通信中に生じるような音波又は光波の形態をとってもよい。
As used herein, the term "computer-readable medium" means any non-transitory medium involved in providing instructions to
コンピュータ可読媒体の種々の形態は、実行のためのプロセッサ1203への一つ以上の命令の一つ以上の列の実行に関してもよい。例えば、命令を、最初にリモートコンピュータの磁気ディスクで実行してもよい。リモートコンピュータは、本開示の全て又は一部をダイナミックメモリにおいて遠隔的に実現するための命令をロードするとともに命令をモデムにより電話線を通じて送信することができる。コンピュータシステム1210の近くのモデムは、電話線のデータを受信するとともにデータをバス1202に配置してもよい。バス1202は、主記憶1204にデータを送信し、プロセッサ1203は、主記憶1204から命令を読み出して実行する。主記憶1204によって受信した命令を、プロセッサ1203による実行前又は実行後に記憶装置1207に任意に格納してもよい。
Various forms of computer-readable media may also relate to the execution of one or more sequences of one or more instructions to
コンピュータシステム1201は、バス1202に結合されている通信インタフェース1203も含む。通信インタフェース1213は、例えば、ローカルエリアネットワーク(LAN)1215又はインターネットのような他の通信ネットワーク1216に接続されたネットワークリンク1214に結合する双方向データ通信を提供する。例えば、通信インタフェース1213を、任意のパケット交換LANに取り付けるネットワークインタフェースとしてもよい。他の例として、通信インタフェース1213を、サービス総合デジタル網(ISDN)カードとしてもよい。無線リンクを実現してもよい。そのような実現において、通信インタフェース1213は、種々のタイプの情報を表すデジタルデータストリームを送信する電気信号、電磁信号又は光信号を送受信する。
ネットワークリンク1214は、典型的には、一つ以上のネットワークを通じた他のデータ装置へのデータ通信を提供する。例えば、ネットワークリンク1214は、ローカルネットワーク1215(例えば、LAN)を通じた又は通信ネットワーク1216を通じて通信サービスを提供するサービスプロバイダによって操作される装置を通じた他のコンピュータとの接続を提供してもよい。ローカルネットワーク1214及び通信ネットワーク1216は、例えば、デジタルデータストリームを送信する電気信号、電磁信号又は光信号と、関連の物理層(例えば、CAT5ケーブル、同軸ケーブル、光ファイバ等)と、を用いる。デジタルデータをコンピュータシステム1201に送信する及びデジタルデータをコンピュータシステム1201から送信する種々のネットワークを通じた信号及び通信インタフェース1213を通じるネットワークリンク1214の信号を、ベースバンド信号又は搬送波ベース信号(carrier wave based signal)で実現してもよい。ベースバンド信号は、デジタルデータビットのストリームを記述している非変調電気パルスのようなデジタルデータを搬送し、この場合、用語「ビット」を、シンボルを意味するものと広く解釈すべきであり、各シンボルは、少なくとも一つ又はそれ以上の情報ビットを搬送する。デジタルデータを、例えば、導電媒体を通じて伝播される又は電磁波として伝搬媒体を通じて送信される振幅、パルス及び/又は周波数シフトキード信号によって搬送波を変調するのに用いてもよい。したがって、デジタルデータを、非変調ベースバンドデータとして「配線」通信チャネルを通じて送信してもよい、及び/又は、搬送波を変調することによりベースバンドと異なる予め決定された周波数帯域内で送信してもよい。コンピュータシステム1201は、(一つ以上の)ネットワーク1215,1216、ネットワークリンク1214及び通信インタフェース1213を通じて、プログラムコードを含むデータを送受信することができる。さらに、ネットワークリンク1214は、LAN1215を通じた電子装置(例えば、モバイルデバイス)1217との接続を提供してもよい。
ここで説明する種々の素子、形態及び処理を互いに独立して又は種々の方法で組み合わせて用いてもよい。全てのあり得る組合せ及び部分的組合せが本開示の範囲内にあることを意図する。さらに、本開示において、(別段の指示がない限り)任意の特定の形態、素子、構成要素、特性、ステップ、モジュール、方法、処理、タスク又はブロックが必須である又は不可欠であることを意味することを意図しない。ここで説明するシステム及び構成要素の例を、説明したのと異なるように構成してもよい。例えば、素子又は構成要素を、開示した例に追加、開示した例から除去又は再配置してもよい。 The various elements, forms and processes described herein may be used independently of each other or in combination in various ways. It is intended that all possible and partial combinations are within the scope of this disclosure. Further, in the present disclosure, it means that any particular form, element, component, characteristic, step, module, method, process, task or block is essential or essential (unless otherwise indicated). Not intended to be. Examples of the system and components described herein may be configured differently from those described. For example, the element or component may be added to the disclosed example, removed or rearranged from the disclosed example.
ここで用いられるように、「一実施の形態」、「一部の実施の形態」又は「実施の形態」の言及は、実施の形態に関連して説明した特定の素子、形態、構造又は特性が少なくとも一つの実施の形態に含まれることを意味する。明細書の種々の場所での語句「一実施の形態の」の出現は、必ずしも全てが同一の実施の形態を言及するものではない。実施の形態の全てのあり得る組合せ及び部分的組合せが本開示の範囲内にあることを意味する。特に、「できる」、「してもよい」、「例えば」等のようなここで用いる条件付きの言葉は、特段の指示がない限り又は用いられる文脈内で理解されない限り、一般的には所定の実施の形態が所定の形態、素子及び/又はステップを含むのに対して他の実施の形態が所定の形態、素子及び/又はステップを含まないことを伝えることを意図する。さらに、本願及び添付した特許請求の範囲で用いられる「一つ」(articles “a” and “an”)を、特段の指示がない限り「一つ以上」又は「少なくとも一つ」を意味するものと解釈すべきである。 As used herein, reference to "one embodiment," "some embodiments," or "embodiments" is a particular element, form, structure, or characteristic described in connection with an embodiment. Means included in at least one embodiment. The appearance of the phrase "one embodiment" in various places in the specification does not necessarily refer to all the same embodiments. It is meant that all possible and partial combinations of embodiments are within the scope of the present disclosure. In particular, conditional terms used herein, such as "can," "may," "for example," etc., are generally defined unless otherwise specified or understood within the context in which they are used. It is intended to convey that one embodiment includes a predetermined form, element and / or step, whereas another embodiment does not include a predetermined form, element and / or step. Furthermore, "one" (articles "a" and "an") used in the present application and the appended claims means "one or more" or "at least one" unless otherwise specified. Should be interpreted as.
Claims (17)
前記回路は、
前記テキストに含まれる複数のオブジェクトの各オブジェクトに対して、最も近接するオブジェクトとの距離を計算し、
前記最も近接するオブジェクトとの距離の平均距離を計算し、
前記平均距離と、前記複数のオブジェクトの各々のフォント線幅の平均である平均フォント線幅との間の比を決定し、
前記比と閾値とを比較することによって前記テキストの回転角を決定するように構成されている装置。 A device that determines the angle of rotation of text in an image, with a circuit
The circuit
For each object of the plurality of objects contained in the text, the distance to the closest object is calculated.
Calculate the average distance to the closest object and calculate
The ratio between the average distance and the average font line width, which is the average of the font line widths of each of the plurality of objects, is determined.
A device configured to determine the angle of rotation of the text by comparing the ratio with a threshold.
前記回路は、各外接矩形と最も近接する外接矩形との距離を計算することによって前記最も近接するオブジェクトとの距離を計算する請求項1に記載の装置。 The circuit is further configured to determine the circumscribed rectangle of each object, which surrounds each object and touches the outermost part of each object.
The apparatus according to claim 1, wherein the circuit calculates the distance to the closest object by calculating the distance between each circumscribing rectangle and the closest circumscribing rectangle.
各オブジェクトに対して、前記画像内の各オブジェクトの印刷領域全体に対応するオブジェクト領域を決定し、
各オブジェクトに対して、各オブジェクトの外周に対応するオブジェクト外周を決定し、かつ、
前記オブジェクト領域を前記オブジェクト外周によって除算するとともに2を乗算することによって各オブジェクトのフォント線幅を計算するように更に構成されている請求項1に記載の装置。 The circuit
For each object, an object area corresponding to the entire print area of each object in the image is determined.
For each object, determine the object perimeter corresponding to the perimeter of each object, and
The apparatus according to claim 1, further configured to calculate the font line width of each object by dividing the object area by the outer circumference of the object and multiplying by 2.
前記画像内のテキストの一つ以上のテキストブロックを決定し、各テキストブロックは、複数のオブジェクトを含み、
各テキストブロックに対して、前記テキストブロックが縦向きと横向きのいずれであるかを決定し、かつ、
前記テキストブロックが縦向きであるという決定に応答して、テキストブロックの各オブジェクトに対して最も近接するオブジェクトとの距離を計算するように構成されている請求項1に記載の装置。 The circuit is before calculating the distance to the closest object for each object.
Determine one or more text blocks of text in the image, each text block containing multiple objects.
For each text block, determine whether the text block is portrait or landscape, and
The device of claim 1, wherein the device of claim 1 is configured to calculate the distance to the closest object to each object of the text block in response to the determination that the text block is portrait orientation.
前記最も近接するオブジェクトとの距離の平均距離を計算することと、
前記平均距離と、前記複数のオブジェクトの各々のフォント線幅の平均である平均フォント線幅との間の比を決定することと、
前記比と閾値とを比較することによって前記テキストの回転角を決定することと、
を備える方法。 For each object of multiple objects contained in the text in the image, calculating the distance to the closest object and
Calculating the average distance to the closest object and
Determining the ratio between the average distance and the average font line width, which is the average of the font line widths of each of the plurality of objects.
Determining the angle of rotation of the text by comparing the ratio with the threshold
How to prepare.
前記最も近接するオブジェクトとの距離を計算することは、各外接矩形と最も近接するオブジェクトとの距離を計算することによって行われる請求項6に記載の方法。 Determining the circumscribed rectangle of each object, said circumscribed rectangle further comprising enclosing each object and contacting the outermost part of each object.
The method of claim 6, wherein calculating the distance to the closest object is performed by calculating the distance between each circumscribing rectangle and the closest object.
各オブジェクトに対して、各オブジェクトの外周に対応するオブジェクト外周を決定することと、
前記オブジェクト領域を前記オブジェクト外周によって除算するとともに2を乗算することによって各オブジェクトのフォント線幅を計算することと、
を更に備える請求項6に記載の方法。 For each object, determining an object area that corresponds to the entire print area of each object in the image.
For each object, determining the object perimeter corresponding to the perimeter of each object,
To calculate the font line width of each object by dividing the object area by the outer circumference of the object and multiplying by 2.
The method according to claim 6, further comprising.
前記画像内のテキストの一つ以上のテキストブロックを決定することであって、各テキストブロックは、複数のオブジェクトを含むことと、
各テキストブロックに対して、前記テキストブロックが縦向きと横向きのいずれであるかを決定することと、
前記テキストブロックが縦向きであるという決定に応答して、テキストブロックの各オブジェクトに対して最も近接するオブジェクトとの距離を計算することと、
を更に備える請求項6に記載の方法。 Before calculating the distance to the closest object for each object,
Determining one or more text blocks of text in the image, each text block containing a plurality of objects.
For each text block, determining whether the text block is portrait or landscape
In response to the determination that the text block is portrait orientation, calculating the distance to the closest object to each object in the text block, and
The method according to claim 6, further comprising.
画像内のテキストに含まれる複数のオブジェクトの各オブジェクトに対して、最も近接するオブジェクトとの距離を計算することと、
前記最も近接するオブジェクトとの距離の平均距離を計算することと、
前記平均距離と、前記複数のオブジェクトの各々のフォント線幅の平均である平均フォント線幅との間の比を決定することと、
前記比と閾値とを比較することによって前記テキストの回転角を決定することと、
を備える方法をコンピュータに実行させるコンピュータ実行可能命令を有する非一時的コンピュータ可読記憶媒体。 When running on a computer
For each object of multiple objects contained in the text in the image, calculating the distance to the closest object and
Calculating the average distance to the closest object and
Determining the ratio between the average distance and the average font line width, which is the average of the font line widths of each of the plurality of objects.
Determining the angle of rotation of the text by comparing the ratio with the threshold
A non-temporary computer-readable storage medium having computer-executable instructions that cause a computer to perform a method comprising.
前記最も近接するオブジェクトとの距離を計算することは、各外接矩形と最も近接するオブジェクトとの距離を計算することによって行われる請求項12に記載の非一時的コンピュータ可読記憶媒体。 Determining the circumscribed rectangle of each object, said circumscribed rectangle further comprising enclosing each object and contacting the outermost part of each object.
The non-temporary computer-readable storage medium according to claim 12, wherein calculating the distance to the closest object is performed by calculating the distance between each circumscribing rectangle and the closest object.
各オブジェクトに対して、各オブジェクトの境界に対応するオブジェクト境界を決定することと、
前記オブジェクト領域を前記オブジェクト境界によって除算するとともに2を乗算することによって各オブジェクトのフォント線幅を計算することと、
を更に備える請求項12に記載の非一時的コンピュータ可読記憶媒体。 For each object, determining an object area that corresponds to the entire print area of each object in the image.
For each object, determining the object boundaries that correspond to the boundaries of each object,
To calculate the font line width of each object by dividing the object area by the object boundaries and multiplying by 2.
12. The non-temporary computer-readable storage medium according to claim 12.
前記画像内のテキストの一つ以上のテキストブロックを決定することであって、各テキストブロックは、複数のオブジェクトを含むことと、
各テキストブロックに対して、前記テキストブロックが縦向きと横向きのいずれであるかを決定することと、
前記テキストブロックが縦向きであるという決定に応答して、テキストブロックの各オブジェクトに対して最も近接するオブジェクトとの距離を計算することと、
を更に備える請求項12に記載の非一時的コンピュータ可読記憶媒体。 Before calculating the distance to the closest object for each object,
Determining one or more text blocks of text in the image, each text block containing a plurality of objects.
For each text block, determining whether the text block is portrait or landscape
In response to the determination that the text block is portrait orientation, calculating the distance to the closest object to each object in the text block, and
12. The non-temporary computer-readable storage medium according to claim 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017008782A JP6863753B2 (en) | 2017-01-20 | 2017-01-20 | Devices, methods and computer-readable storage media that determine the angle of rotation of text |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017008782A JP6863753B2 (en) | 2017-01-20 | 2017-01-20 | Devices, methods and computer-readable storage media that determine the angle of rotation of text |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018116647A JP2018116647A (en) | 2018-07-26 |
JP6863753B2 true JP6863753B2 (en) | 2021-04-21 |
Family
ID=62985597
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017008782A Active JP6863753B2 (en) | 2017-01-20 | 2017-01-20 | Devices, methods and computer-readable storage media that determine the angle of rotation of text |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6863753B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108345883B (en) * | 2017-01-23 | 2023-11-28 | 利得技术公司 | Apparatus, method, and computer-readable storage medium for determining rotation angle of text |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5663674A (en) * | 1979-10-29 | 1981-05-30 | Nippon Telegr & Teleph Corp <Ntt> | Character stroke width detection system |
JPH0797390B2 (en) * | 1985-08-20 | 1995-10-18 | 松下電器産業株式会社 | Character recognition device |
JPH03246779A (en) * | 1990-02-26 | 1991-11-05 | Oki Electric Ind Co Ltd | Character recognizing device |
JPH0433082A (en) * | 1990-05-24 | 1992-02-04 | Oki Electric Ind Co Ltd | Document recognizing device |
JP3090342B2 (en) * | 1991-05-30 | 2000-09-18 | 株式会社東芝 | Character string direction discriminator |
JP2004272798A (en) * | 2003-03-11 | 2004-09-30 | Pfu Ltd | Image reading device |
CN102375988B (en) * | 2010-08-17 | 2013-12-25 | 富士通株式会社 | File image processing method and equipment |
-
2017
- 2017-01-20 JP JP2017008782A patent/JP6863753B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2018116647A (en) | 2018-07-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12073542B2 (en) | Image processing method, image processing apparatus, and non-transitory storage medium | |
CN110069767B (en) | Typesetting method based on electronic book, electronic equipment and computer storage medium | |
WO2018010657A1 (en) | Structured text detection method and system, and computing device | |
JP6317772B2 (en) | System and method for real-time display of foreign language character sets and their translations on resource-constrained mobile devices | |
US20190304066A1 (en) | Synthesis method of chinese printed character images and device thereof | |
US9552527B1 (en) | Apparatus, method, and computer-readable storage medium for determining a rotation angle of text | |
RU2631765C1 (en) | Method and system of correcting perspective distortions in images occupying double-page spread | |
CN109697414B (en) | Text positioning method and device | |
CN109598185B (en) | Image recognition translation method, device and equipment and readable storage medium | |
JP5832656B2 (en) | Method and apparatus for facilitating detection of text in an image | |
US10049268B2 (en) | Selective, user-mediated content recognition using mobile devices | |
CN114648756B (en) | Book character recognition and reading method and system based on pointing vector | |
US20160125253A1 (en) | Method and apparatus for image matching | |
CN111738252A (en) | Method and device for detecting text lines in image and computer system | |
CN110827301B (en) | Method and apparatus for processing image | |
CN111832551A (en) | Text image processing method and device, electronic scanning equipment and storage medium | |
WO2024140094A1 (en) | Paragraph determination method and apparatus for digital document, and electronic device and storage medium | |
JP6863753B2 (en) | Devices, methods and computer-readable storage media that determine the angle of rotation of text | |
US20190188466A1 (en) | Method, system and apparatus for processing a page of a document | |
CN113177542A (en) | Method, device and equipment for identifying characters of seal and computer readable medium | |
CN108345883B (en) | Apparatus, method, and computer-readable storage medium for determining rotation angle of text | |
JP5794154B2 (en) | Image processing program, image processing method, and image processing apparatus | |
KR20180085914A (en) | Apparatus, method, and computer-readable storage medium for determining a rotation angle of text | |
CN115100663A (en) | Method and device for estimating distribution situation of character height in document image | |
US10185885B2 (en) | Tex line detection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200114 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210218 |
|
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: 20210302 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210401 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6863753 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |