JPH0676110A - Character/character line segmenting method - Google Patents

Character/character line segmenting method

Info

Publication number
JPH0676110A
JPH0676110A JP4230032A JP23003292A JPH0676110A JP H0676110 A JPH0676110 A JP H0676110A JP 4230032 A JP4230032 A JP 4230032A JP 23003292 A JP23003292 A JP 23003292A JP H0676110 A JPH0676110 A JP H0676110A
Authority
JP
Japan
Prior art keywords
character
edge
characters
vertical
image
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.)
Pending
Application number
JP4230032A
Other languages
Japanese (ja)
Inventor
Satoshi Maruyama
智 丸山
Junichi Tateno
純一 舘野
Kazuya Asano
一哉 浅野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JFE Steel Corp
Original Assignee
Kawasaki Steel Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kawasaki Steel Corp filed Critical Kawasaki Steel Corp
Priority to JP4230032A priority Critical patent/JPH0676110A/en
Publication of JPH0676110A publication Critical patent/JPH0676110A/en
Pending legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)

Abstract

PURPOSE:To surely segment the characters or the character strings even if the shading or the noises are included in the digital images obtained by photographing one or >2 characters and character strings. CONSTITUTION:The characters or the character strings are segmented based on a digital image that includes one or more characters of character strings. Then the character or character string segmenting direction is decided for the digital image, and the edge of each character is extracted in the direction vertical to the segmenting direction. Then the statistic value is calculated in regard of the picture element of the edge-extracted image within a range in the direction parallel to the segmenting direction. The calculated statistic value is projected on the one-dimensional projection value and the segmenting positions of the characters or the character strings are decided based on the width of the projection value in the direction vertical to the segmenting position.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、文字や文字行からなる
文書又は工業製品等に付された番号等の文字を読み取る
際に適用して好適な、文字・文字行切出方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character / character line cutout method suitable for reading characters such as numbers attached to documents or industrial products made of characters or character lines.

【0002】[0002]

【従来の技術】事務の能率化や工場における生産ライン
の自動化等に伴い、従来視覚で行っていた文書や工業製
品番号等の文字を機械的に読み取ることが行われるよう
になっている。このように文字を機械的に読み取る場合
に問題となるのは、背景に濃度のむらやノイズなどがあ
るために、画面に表示された複数の文字からなる文字行
を切り出したり、あるいは文字行に含まれる各文字を切
り出したりする、いわゆるセグメンテーションが難しい
ということである。
2. Description of the Related Art With the streamlining of office work and the automation of production lines in factories, it has become possible to mechanically read characters such as documents and industrial product numbers, which were conventionally performed visually. The problem with mechanical reading of characters is that, due to uneven density or noise in the background, a character line consisting of multiple characters displayed on the screen is cut out or included in the character line. This means that it is difficult to perform so-called segmentation by cutting out each character that is displayed.

【0003】上記セグメンテーションとしては、従来2
つの方法が知られている。その1つは、連結されている
画素同士に同じラベルを割り当てる、いわゆるラベリン
グを行うことにより、1つの文字を切り出す方法であ
り、他の1つは、文字が描かれている画像について濃度
投影を求めることにより文字の行を切り出し、更に切り
出された文字の行について同じく濃度投影を求めること
により各文字を切り出す方法である。
As the above-mentioned segmentation, there is a conventional method 2.
Two methods are known. One is a method of cutting out one character by assigning the same label to connected pixels, that is, so-called labeling, and the other is a method of performing density projection on an image in which the character is drawn. This is a method in which a line of characters is cut out by obtaining, and the density projection is similarly obtained in the line of cut out characters, and each character is cut out.

【0004】前記ラベリングを採用する方法は、そのラ
ベリングが正確に行われることが前提となっているが、
このラベリングは2値化された画像に対して有効な処理
なので、該ラベリングを正確に行うために2値化が良好
に行われることが必須となる。このラベリングを採用し
た方式を改良した技術が、例えば特開平4−585に開
示されており、この技術は、ラベリングを行った後、ラ
ベリングされた文字毎に外接する長方形を求め、複数の
水平線とこの長方形が交わる個数から文字行を判定する
ものである。
The labeling method is premised on that the labeling is performed accurately.
Since this labeling is an effective process for a binarized image, it is essential that the binarization is performed well in order to perform the labeling accurately. For example, Japanese Patent Application Laid-Open No. 4-585 discloses a technique that improves the system that employs this labeling. After performing labeling, this technique obtains a circumscribed rectangle for each labeled character and determines a plurality of horizontal lines. The character line is determined from the number of intersecting rectangles.

【0005】又、前記濃度投影を求める方法を採用した
技術としては、例えば特開平3−211691に、濃度
特徴量を算出した後、判定演算と切出演算を繰り返すこ
とにより文字を切り出す技術が開示されている。
Further, as a technique adopting the method for obtaining the density projection, for example, Japanese Patent Laid-Open No. 3-211691 discloses a technique for cutting out a character by repeating a judgment calculation and a cutout calculation after calculating a density feature amount. Has been done.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、前記特
開平4−585に開示されている技術を初めとする、ラ
ベリングを採用する方法は、特に生産プロセスの監視ラ
インなどで製品の表面に付される文字を撮影する場合の
ように、得られる画質が悪い場合にはシェーディングや
ノイズによる影響を受け易いため、正確に文字や文字行
(列)を切り出すことができない場合がある。
However, the method of adopting labeling, including the technique disclosed in Japanese Patent Laid-Open No. 4-585, is applied to the surface of the product, especially in the monitoring line of the production process. If the obtained image quality is poor, such as when shooting a character, the character or character line (column) may not be cut out accurately because it is easily affected by shading and noise.

【0007】又、前記特開平3−211691に開示さ
れている濃度特徴量を算出した後、判定演算と切出演算
を繰り返して文字を切り出す技術も、上記のようにシェ
ーディングやノイズが存在するために濃度特徴量が正確
に得られない場合には、同様に文字を正確に切り出すこ
とができないという問題がある。
Further, in the technique disclosed in the above-mentioned Japanese Patent Application Laid-Open No. 3-211691, the character is cut out by repeating the judgment operation and the cutout operation after the density feature amount is calculated, because the shading and noise exist as described above. Similarly, when the density feature amount cannot be accurately obtained, similarly, there is a problem that the character cannot be accurately cut out.

【0008】本発明は、前記従来の問題点を解決するべ
く成されたもので、1又は2以上の文字や文字行を撮影
して得られたデジタル画像にシェーディングやノイズが
存在する場合でも、又、大きさの異なる文字が画像上に
混在する場合でも、文字又は文字行を確実に切り出すこ
とができる文字・文字行切出方法を提供することを課題
とする。
The present invention has been made to solve the above-mentioned conventional problems, and even when shading or noise is present in a digital image obtained by photographing one or more characters or character lines, It is another object of the present invention to provide a character / character line cutout method capable of surely cutting out a character or a character line even when characters having different sizes are mixed in an image.

【0009】[0009]

【課題を解決するための手段】本発明は、文字及び文字
行の少なくとも一方を1以上含むデジタル画像に基づい
て文字又は文字行を切り出す文字・文字行切出方法であ
って、上記デジタル画像に対して文字又は文字行を切り
出す切出方向を決定し、上記切出方向に対して垂直な方
向の各文字のエッジを抽出してエッジ強調画像を作成
し、上記エッジ強調画像を上記切出方向に対して平行な
方向の範囲内にある画素に関する統計量を求めて1次元
射影値に射影し、上記切出方向に対して垂直な方向の射
影値の幅に基づいて文字又は文字行の切出位置を決定す
ることにより、同様に前記課題を達成したものである。
SUMMARY OF THE INVENTION The present invention is a character / character line cutout method for cutting out a character or a character line based on a digital image containing at least one of a character and a character line. On the other hand, a cutting direction for cutting out a character or a character line is determined, an edge of each character in a direction perpendicular to the cutting direction is extracted to create an edge emphasized image, and the edge emphasized image is extracted in the cutting direction. Then, a statistic about pixels within a range parallel to is obtained and projected to a one-dimensional projection value, and a character or character line is cut based on the width of the projection value in the direction perpendicular to the cutout direction. By determining the exit position, the above-mentioned problems are similarly achieved.

【0010】本発明は、又、前記文字・文字行切出方法
において、エッジ強調画像を1次元射影値に射影する
際、エッジ強度が所定の閾値以上の画素を計数して圧縮
射影値とすることにより、同様に前記課題を達成したも
のである。
According to the present invention, in the character / character line cutout method, when an edge-emphasized image is projected to a one-dimensional projection value, pixels having an edge strength of a predetermined threshold value or more are counted as a compression projection value. As a result, the above-mentioned problems are similarly achieved.

【0011】[0011]

【作用】本発明においては、図1に示すように、文字及
び文字行の少なくとも一方を1以上含むデジタル画像に
対して文字又は文字行の切出方向を決定し(ステップ1
10)、上記切出方向に垂直な方向の各文字のエッジを
抽出してエッジ強調画像を作成し(ステップ112)、
そのエッジ強調画像を上記切出方向と平行な方向に1次
元データとして射影して射影値を作成し(ステップ11
4)、次いで、作成した上記射影値の幅に基づいて文字
又は文字行の切出位置を決定し(ステップ116)、そ
の後、上記切出位置に基づいて文字又は文字行を切り出
すようにしている(ステップ118)。
In the present invention, as shown in FIG. 1, a cutting direction of a character or a character line is determined for a digital image containing at least one of a character and a character line (step 1
10), extracting the edge of each character in the direction perpendicular to the cutout direction to create an edge-enhanced image (step 112),
The edge-enhanced image is projected as one-dimensional data in a direction parallel to the cutting direction to create a projection value (step 11).
4) Then, the cutout position of the character or character line is determined based on the width of the created projection value (step 116), and then the character or character line is cut out based on the cutout position. (Step 118).

【0012】即ち、文字行が水平方向に並んでいる場合
であれば、その切出方向を水平方向と決定し、各文字の
垂直方向のエッジを抽出すると共に、その抽出の結果作
成されたエッジ強調画像を水平方向に射影し、垂直方向
を基線とする射影値を作成するようにしたので、認識対
象を撮影して得られたデジタル画像上にシェーディング
やノイズが存在する場合であっても、そのシェーディン
グやノイズをキャンセルすることが可能となるため、上
記射影値の垂直方向の幅に基づいて正確にその文字又は
文字行の切出位置を決定することが可能となる。
That is, when the character lines are arranged in the horizontal direction, the cutting direction is determined to be the horizontal direction, the vertical edges of each character are extracted, and the edges created as a result of the extraction are extracted. Since the enhanced image is projected in the horizontal direction and the projection value with the vertical direction as the baseline is created, even if shading or noise exists on the digital image obtained by shooting the recognition target, Since it is possible to cancel the shading and noise, it is possible to accurately determine the cutout position of the character or character line based on the vertical width of the projection value.

【0013】又、上述の如く切り出した文字行につい
て、水平方向のエッジを各文字について抽出してエッジ
強調画像を作成し、その強調画像を垂直方向に1次元デ
ータとして射影し、水平方向を基線とする射影値を作成
することにより、該射影値の幅に基づいて各文字行に含
まれる文字又は単独文字を正確に切り出すことが可能と
なる。
Further, with respect to the character line cut out as described above, the edge in the horizontal direction is extracted for each character to create an edge emphasized image, and the emphasized image is projected in the vertical direction as one-dimensional data, and the horizontal direction is the baseline. It is possible to accurately cut out a character included in each character line or a single character based on the width of the projection value.

【0014】[0014]

【実施例】以下、図面を参照して本発明の実施例を詳細
に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0015】図1は、本発明に係る一実施例に適用され
る文字・文字行切出装置の概略構成を示すブロック図で
ある。
FIG. 1 is a block diagram showing a schematic configuration of a character / character line cutting device applied to an embodiment according to the present invention.

【0016】上記装置は、テレビカメラ、イメージスキ
ャナ等からなる画像入力部10と、該画像入力部10で
撮影した原画像を格納する原画像メモリ12と、該原画
像メモリ12に格納されているデジタル原画像について
切出方向を文字行と平行な水平方向と決定すると共に、
該原画像に対して各文字の垂直方向のエッジを抽出し、
垂直エッジ強調画像を作成する垂直エッジ強調部14
と、該垂直エッジ強調部14で作成された垂直エッジ強
調画像について水平方向(文字行切出方向)に画像デー
タを射影し、1次元データの射影値を作成する水平方向
射影部16と、該水平方向射影部16で作成した射影値
の垂直方向の幅から文字行の切出位置を決定する文字行
切出部18とを備えている。
The apparatus is stored in the image input section 10 including a television camera, an image scanner, etc., an original image memory 12 for storing an original image photographed by the image input section 10, and the original image memory 12. For the digital original image, the cutting direction is determined to be the horizontal direction parallel to the character line,
Extract the vertical edge of each character from the original image,
Vertical edge emphasis unit 14 for creating a vertical edge emphasis image
And a horizontal projection unit 16 for projecting image data in the horizontal direction (character line cutout direction) on the vertical edge-enhanced image created by the vertical edge emphasis unit 14 to create a projection value of one-dimensional data, The character line cutout unit 18 determines the cutout position of the character line from the vertical width of the projection value created by the horizontal projection unit 16.

【0017】又、上記装置は、前記原画像メモリ12か
ら原画像を取り込み、各文字の水平方向のエッジを抽出
し、水平エッジ強調画像を作成する水平エッジ強調部2
0と、該水平エッジ強調部20で作成された強調画像の
うち、上記文字行切出部18で位置が決定された任意の
行の画像について垂直方向(文字切出方向)に画像デー
タを射影し、該データの射影値を作成する垂直方向射影
部22と、該垂直方向射影部22で作成された射影値の
水平方向の幅から文字の切出位置を決定する文字切出部
24とを備え、更に、前記文字行切出部18で決定した
文字行切出位置と、上記文字切出部24で決定した文字
切出位置とをそれぞれ格納する行位置・文字位置メモリ
26とを備えている。
Further, the above apparatus takes in the original image from the original image memory 12, extracts the horizontal edge of each character, and creates a horizontal edge emphasized image.
0 and the image data of an arbitrary line of which position is determined by the character line cutout unit 18 among the emphasized images created by the horizontal edge emphasis unit 20 is projected in the vertical direction (character cutout direction). The vertical projection unit 22 that creates the projection value of the data, and the character cutout unit 24 that determines the cutout position of the character from the horizontal width of the projection value created by the vertical projection unit 22. And a line position / character position memory 26 for storing the character line cutout position determined by the character line cutout unit 18 and the character cutout position determined by the character cutout unit 24, respectively. There is.

【0018】次に、本実施例の作用を説明する。Next, the operation of this embodiment will be described.

【0019】まず、鋼材等の製品の切断面にペイントで
記されている文字を画像入力部10で撮影し、そのデジ
タル原画像を原画像メモリ12に格納した。図3は、こ
の原画像を画面上に表示した状態を示したものである。
First, a character written in paint on a cut surface of a product such as a steel material was photographed by the image input section 10 and the digital original image was stored in the original image memory 12. FIG. 3 shows a state in which this original image is displayed on the screen.

【0020】上記図3の原画像に対して、垂直エッジ強
調部14で垂直方向のエッジを抽出し、図4に示す垂直
エッジ強調画像を作成すると共に、水平エッジ強調部2
0で水平方向のエッジを抽出し、図5に示す水平エッジ
強調画像を作成し、それぞれ記憶する。
From the original image shown in FIG. 3, the vertical edge enhancing unit 14 extracts the edges in the vertical direction to create the vertical edge enhancing image shown in FIG.
At 0, the edges in the horizontal direction are extracted, and the horizontal edge-enhanced image shown in FIG. 5 is created and stored.

【0021】次いで、水平方向射影部16では、上記垂
直エッジ強調部14で作成した垂直エッジ強調画像につ
いて、そのデータを水平方向に1次元の配列として射影
し、図6に示すような、垂直方向を基軸とし、水平方向
に分布を持つ水平方向射影値を作成する。
Next, the horizontal projection unit 16 projects the data of the vertical edge-enhanced image created by the vertical edge enhancement unit 14 in the horizontal direction as a one-dimensional array, and the vertical direction as shown in FIG. Create a horizontal projection value that has a distribution in the horizontal direction, using as the base axis.

【0022】次いで、文字行切出部18で、図6の射影
値の幅Wに基づいて文字行の切出位置(垂直方向位置)
を決定し、その結果を行位置・文字位置メモリ26に格
納すると共に、垂直方向射影部22に出力する。
Next, the character line cutout unit 18 cuts out the character line (vertical position) based on the width W of the projection value in FIG.
Is determined, and the result is stored in the line position / character position memory 26 and is output to the vertical projection unit 22.

【0023】上記垂直方向射影部22では、前記水平エ
ッジ強調部20から図5の水平エッジ強調画像を入力す
ると共に、上記文字行切出部18で決定された各文字行
について、その水平エッジ強調画像をそれぞれ垂直方向
に1次元の配列として射影し、各行毎に垂直方向射影値
を作成する。図7は、一例として最下行の8、9、0に
ついて求めた垂直方向射影値を示したものである。
The vertical projection unit 22 inputs the horizontal edge-enhanced image of FIG. 5 from the horizontal edge enhancement unit 20 and enhances the horizontal edge of each character line determined by the character line cutout unit 18. Images are projected in the vertical direction as a one-dimensional array, and vertical projection values are created for each row. FIG. 7 shows, as an example, the vertical projection values obtained for 8, 9 and 0 in the bottom row.

【0024】次いで、文字切出部24では、上記垂直方
向射影部22で作成された、例えば図7の射影値の幅
W′から各文字の切出位置を決定し、その位置を前記行
位置・文字位置メモリ26に格納する。
Next, in the character cutout unit 24, the cutout position of each character is determined from the width W'of the projection value created in the vertical projection unit 22, for example, in FIG. 7, and the position is determined as the line position. Store in the character position memory 26.

【0025】その後、上記メモリ26に格納してある文
字行と文字の切出位置を用いて、各行に含まれる各文字
の切り出しを行い、これら各文字について、例えば文字
の自動読取を実行させる。
Thereafter, using the character lines and the character cut-out positions stored in the memory 26, each character included in each line is cut out, and, for example, automatic reading of the characters is executed for each of these characters.

【0026】上述した本実施例によれば、図6の水平方
向射影値の幅Wから3つの行を切り出すことができ、
又、図7の垂直方向射影値の幅W′から行に含まれる各
文字を切り出すことができる。
According to this embodiment described above, three lines can be cut out from the width W of the horizontal projection value in FIG.
Further, each character included in a line can be cut out from the width W'of the vertical projection value in FIG.

【0027】又、上記文字、文字行をそれぞれその幅に
基づいて切出位置を決定するので、文字の大きさが異な
る場合でも、正確にその切り出しを高速で行うことがで
きる。
Further, since the cut-out positions of the characters and the character lines are determined based on the widths thereof, respectively, even if the sizes of the characters are different, the cutting-out can be accurately performed at high speed.

【0028】更に、本実施例では、エッジ強調画像を用
いているので、原画像の背景にシェーディングやノイズ
が存在する場合でも、これらを排除することができるた
め、正確に文字、文字行の切り出しを行うことができ
る。
Further, in this embodiment, since the edge-enhanced image is used, even if there is shading or noise in the background of the original image, these can be eliminated, so that characters and character lines are accurately cut out. It can be performed.

【0029】本実施例について更に詳述すると、前述の
垂直方向及び水平方向のエッジ抽出、即ちエッジ強調に
は方向性のあるエッジを強調するキルシュ(Kirsch )
フィルタを用いて行った。以下、このフィルタについ
て、垂直方向のエッジを強調する場合を例に説明する。
The present embodiment will be described in more detail. The vertical and horizontal edge extractions described above, that is, the edge enhancement, are performed by enhancing a directional edge by Kirsch.
This was done using a filter. Hereinafter, this filter will be described by taking an example of emphasizing a vertical edge.

【0030】上記キルシュフィルタによるエッジ抽出に
は、水平方向、垂直方向の変位をそれぞれi 、j で表わ
し、各画素の濃度をa (i ,j )で表わした場合、次の
(1)式及び(2)式で与えられるオペレータを使用す
る。なお、式中||は絶対値を表わしている。
In the edge extraction by the Kirsch filter, when the horizontal and vertical displacements are represented by i and j, and the density of each pixel is represented by a (i, j), the following equation (1) and The operator given by equation (2) is used. In the formula, || represents an absolute value.

【0031】 l (i ,j )=|5×(a (i +1,j +1)+a (i +1,j ) +a (i +1,j −1))−3×(a (i ,j +1) +a (i ,j −1)+a (i −1,j +1) +a (i −1,j )+a (i −1,j −1))| …(1) r (i ,j )=|5×(a (i −1,j +1)+a (i −1,j ) +a (i −1,j −1))−3×(a (i ,j +1) +a (i ,j −1)+a (i +1,j +1) +a (i +1,j )+a (i +1,j −1))| …(2)L (i, j) = | 5 × (a (i + 1, j + 1) + a (i + 1, j) + a (i + 1, j-1))-3 × (a (i, j + 1) + A (i, j-1) + a (i-1, j + 1) + a (i-1, j) + a (i-1, j-1)) | ... (1) r (i, j) = | 5 X (a (i-1, j + 1) + a (i-1, j) + a (i-1, j-1))-3 * (a (i, j + 1) + a (i, j-1) + a (I + 1, j + 1) + a (i + 1, j) + a (i + 1, j-1)) | ... (2)

【0032】各画素について、上記(1)式で得られる
l (i ,j )と、(2)式で得られるr (i ,j )の2
つの値を求め、そのうち値の大きい方を画素の値a (i
,j)と置き換え、エッジ強度とする。
For each pixel, it is obtained by the above equation (1).
l (i, j) and 2 of r (i, j) obtained by the equation (2)
Value of the pixel, and the larger one is the pixel value a (i
, J) to obtain the edge strength.

【0033】上記エッジ強調方法は、ある特定の方向だ
けを抽出するのに適した処理であり、画像射影で前記射
影値を作成する際にバックグラウンドに対する信号強度
の比を高めることができる。その結果、より正確な文字
及び文字位置の切り出しが可能となる。なお、水平方向
のエッジ抽出は、上記(1)式、(2)式で表わされる
オペレータをそれぞれ90°回転させた配置を有するオ
ペレータを用いることにより同様に実行できる。
The edge enhancement method is a process suitable for extracting only a specific direction, and it is possible to increase the ratio of the signal intensity to the background when the projection value is created by image projection. As a result, it is possible to more accurately cut out characters and character positions. The edge extraction in the horizontal direction can be similarly performed by using an operator having an arrangement obtained by rotating the operators represented by the equations (1) and (2) by 90 °.

【0034】又、前述のエッジ強調画像を1次元の配列
に射影する処理としては、射影方向の直線上にある画素
の中で、予め定めた閾値以上の強度を有する画素の数
を、その射影方向位置における代表値とする方法を採用
した。この方法を、垂直エッジ強調画像に適用する場合
を例に、以下に具体的に説明する。
Further, as the processing for projecting the above-mentioned edge-enhanced image into a one-dimensional array, among the pixels on the straight line in the projection direction, the number of pixels having an intensity equal to or higher than a predetermined threshold value is calculated. The method of using the representative value at the directional position was adopted. This method will be specifically described below by taking the case of applying it to a vertical edge-enhanced image as an example.

【0035】図8は、前記キルシュフィルタの原理を説
明するために使用する、撮影画面に表示された数字4を
模式的に示した図であり、ここでは垂直方向画素(0〜
10)×水平方向画素(A〜K)の領域に表わされた数
字4を構成する画素強度の分布が表わしてある。なお、
図8の下段に示した0、10、20は画素強度の値であ
る。
FIG. 8 is a diagram schematically showing the numeral 4 displayed on the photographing screen, which is used for explaining the principle of the Kirsch filter. Here, the vertical pixels (0 to 0) are shown.
10) × the distribution of pixel intensities constituting the numeral 4 shown in the horizontal pixel (A to K) region is shown. In addition,
0, 10 and 20 shown in the lower part of FIG. 8 are pixel intensity values.

【0036】図9は、前述した縦方向強調キルシュフィ
ルタを上記図8の数字4に適用した結果である各画素毎
のエッジ強度を表わしたもので、各数値は前記(1)
式、(2)式のオペレータによる演算結果を10で割っ
た値の概算である。なお、図8の端部画素にはフィルタ
をかけることができないので、図9の結果から除外して
ある。
FIG. 9 shows the edge strength of each pixel which is the result of applying the above-mentioned vertical emphasis Kirsch filter to the numeral 4 in FIG.
It is an approximation of a value obtained by dividing the calculation result by the operator of the formula (2) by 10. Note that the edge pixels in FIG. 8 cannot be filtered, so they are excluded from the results in FIG.

【0037】上記キルシュフィルタを図8の数字4に適
用する場合について更に詳述すると、エッジとは強度の
強い画素と弱い画素の境界であることから、ある画素に
着目すれば、その周辺の画素の強度を調べることによ
り、最も画素の強度の差が大きくなるような向きをみつ
けることができる。このとき、エッジの強度は、画素の
強度の差と定義するのが自然である。前記エッジ強調の
(1)、(2)式は、着目しているエッジの向きを、垂
直方向に限ったときの式である。
The case where the Kirsch filter is applied to the numeral 4 in FIG. 8 will be described in more detail. Since an edge is a boundary between a pixel having a strong intensity and a pixel having a weak intensity, if one pixel is focused on, the pixels around the pixel will be considered. By examining the intensities of the, it is possible to find the direction in which the difference in the intensities of the pixels is the largest. At this time, it is natural to define the edge strength as a difference in pixel strength. The expressions (1) and (2) for edge enhancement are expressions when the direction of the edge of interest is limited to the vertical direction.

【0038】図10は、上記図9の垂直方向位置1〜9
のそれぞれについて、水平方向にエッジ強度が150以
上の画素の個数を計数し、その結果をグラフ化したもの
である。
FIG. 10 shows vertical positions 1 to 9 in FIG.
For each of the above, the number of pixels having an edge strength of 150 or more is counted in the horizontal direction, and the result is graphed.

【0039】本実施例では、上記図8〜10を用いて説
明した方法を、垂直方向エッジ強調画像の各文字に適用
したので、射影方向の直線上にある全ての画素について
単純にその強度を積算する方法に比較して、鮮明な射影
値を得ることが可能となる。
In this embodiment, since the method described with reference to FIGS. 8 to 10 is applied to each character of the vertical edge-enhanced image, the intensity of all the pixels on the straight line in the projection direction is simply calculated. It is possible to obtain a clear projection value as compared with the method of integrating.

【0040】以上詳述した本実施例方法を、前記図3に
相当する30種類の画像に適用すると共に、同画像に従
来法を適用し、その結果を表1に示した。
The method of this embodiment described in detail above was applied to the 30 types of images corresponding to FIG. 3 and the conventional method was applied to the images, and the results are shown in Table 1.

【0041】この表1で、正答数は、水平方向の行の切
出と、垂直方向の文字の切出が共に目視結果と一致した
画像の数、水平切出ミス(水平ミスと表示)の数は、水
平方向の切出結果が目視結果と一部分でも一致しない画
像の数、垂直方向切出ミス(垂直ミスと表示)の数は、
垂直方向の切出結果が一部分でも目視結果と一致しない
画像の数である。水平方向の切出をミスした画像には、
垂直方向の切り出しは行っていない。又、ラベリングミ
ス(ラベルミスと表示)の数は、切り出すべき文字を切
り出せない場合や、切り出してはならないノイズを誤っ
て切り出してしまった画像の数である。
In Table 1, the number of correct answers is the number of images in which the horizontal line cutout and the vertical character cutout both match the visual result, and the horizontal cutout error (displayed as horizontal miss). The number is the number of images in which the horizontal cutting result does not match the visual result even in part, and the number of vertical cutting errors (displayed as vertical errors) is
This is the number of images in which the cutout result in the vertical direction does not match the visual observation result even in part. For images that have missed the horizontal cutout,
No vertical cutting is done. The number of labeling mistakes (displayed as a label mistake) is the number of images in which a character to be cut out cannot be cut out or noise which should not be cut out is cut out by mistake.

【0042】[0042]

【表1】 [Table 1]

【0043】上記表1から明らかなように、本発明方法
は従来法に比べて、極めて正確に文字や文字行の切り出
しを行うことができる。
As is clear from Table 1 above, the method of the present invention can cut out characters and character lines more accurately than the conventional method.

【0044】以上の如く、本実施例によれば、シェーデ
ィングやノイズの影響を受けることなく、文字行又は文
字の切り出しを正確に行うことができるので、工業分野
等で文字の自動認識を行う際、その認識率を大幅に向上
することができ、極めて有用である。
As described above, according to this embodiment, a character line or a character can be accurately cut out without being affected by shading or noise. Therefore, when the character is automatically recognized in the industrial field or the like. , Its recognition rate can be greatly improved, which is extremely useful.

【0045】以上、本発明について具体的に説明した
が、本発明は、前記実施例に示したものに限られるもの
でなく、その要旨を逸脱しない範囲で種々変更可能であ
る。
Although the present invention has been specifically described above, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the invention.

【0046】例えば、前記図4又は図5に示したよう
に、文字行又は文字に相当する射影値の幅方向両端近傍
にそれぞれピークが現われているが、文字の特徴やエッ
ジ抽出方法等に起因してこのように2つのピークが現わ
れている場合には、このピークを用いて、例えばそのピ
ーク間距離から文字行又は文字の妥当な間隔であるか否
かを判断し、文字行又は文字の切り出しを行うようにし
てもよい。
For example, as shown in FIG. 4 or FIG. 5, peaks appear in the vicinity of both ends in the width direction of a character line or a projection value corresponding to a character. When two peaks appear in this way, it is judged from the distances between the peaks whether or not there is an appropriate spacing between character lines or characters using the peaks. You may make it cut out.

【0047】又、前記実施例では、文字行が水平方向に
配列されている場合を示したが、これに限定されず、例
えば垂直方向に配列されてもよい。
Further, in the above embodiment, the case where the character lines are arranged in the horizontal direction has been shown, but the present invention is not limited to this, and may be arranged in the vertical direction, for example.

【0048】又、前記エッジ抽出にはキルシュフィルタ
を用いた場合を示したが、これに限られるものでなく、
他の差分形オペレータや垂直・水平エッジ抽出が可能な
他の任意のオペレータを採用するフィルタであってもよ
い。
Although the case where the Kirsch filter is used for the edge extraction is shown, the present invention is not limited to this.
It may be a filter that employs another differential operator or any other operator capable of extracting vertical / horizontal edges.

【0049】[0049]

【発明の効果】以上説明した通り、本発明によれば、1
又は2以上の文字や文字行を撮影して得られるデジタル
画像にシェーディングやノイズが存在する場合でも、
又、大きさの異なる文字が画像上に混在する場合でも、
文字又は文字行を確実に切り出すことができる。
As described above, according to the present invention, 1
Or even if there is shading or noise in the digital image obtained by shooting two or more characters or character lines,
Also, even when characters of different sizes are mixed in the image,
It is possible to reliably cut out a character or character line.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の要旨を示すフローチャートFIG. 1 is a flowchart showing the gist of the present invention.

【図2】本発明に係る一実施例に適用される文字・文字
行切出装置を示すブロック図
FIG. 2 is a block diagram showing a character / character line cutting device applied to one embodiment according to the present invention.

【図3】切出対象が描かれている原画像を示す説明図FIG. 3 is an explanatory diagram showing an original image in which a clipping target is drawn.

【図4】垂直方向エッジ強調画像を示す説明図FIG. 4 is an explanatory diagram showing a vertical edge-enhanced image.

【図5】水平方向エッジ強調画像を示す説明図FIG. 5 is an explanatory diagram showing a horizontal edge-enhanced image.

【図6】垂直方向エッジ強調画像の水平方向射影値FIG. 6 is a horizontal projection value of a vertical edge-enhanced image

【図7】水平方向エッジ強調画像の垂直方向射影値FIG. 7: Vertical projection value of horizontal edge-enhanced image

【図8】キルシュフィルタの原理を説明するための説明
FIG. 8 is an explanatory diagram for explaining the principle of a Kirsch filter.

【図9】キルシュフィルタで算出したエッジ強度を示す
図表
FIG. 9 is a chart showing edge strength calculated by a Kirsch filter.

【図10】閾値以上のエッジ強度を水平方向に積算した
グラフ
FIG. 10 is a graph in which edge strengths equal to or greater than a threshold are integrated in the horizontal direction.

【符号の説明】[Explanation of symbols]

10…画像入力部 12…原画像メモリ 14…垂直エッジ強調部 16…水平方向射影部 18…文字行切出部 20…水平エッジ強調部 22…垂直方向射影部 24…文字切出部 26…行位置・文字位置メモリ 10 ... Image input section 12 ... Original image memory 14 ... Vertical edge emphasis section 16 ... Horizontal projection section 18 ... Character line cutting section 20 ... Horizontal edge emphasis section 22 ... Vertical projection section 24 ... Character cutting section 26 ... Row Position / character position memory

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】文字及び文字行の少なくとも一方を1以上
含むデジタル画像に基づいて文字又は文字行を切り出す
文字・文字行切出方法であって、 上記デジタル画像に対して文字又は文字行を切り出す切
出方向を決定し、 上記切出方向に対して垂直な方向の各文字のエッジを抽
出してエッジ強調画像を作成し、 上記エッジ強調画像を上記切出方向に対して平行な方向
の範囲内にある画素に関する統計量を求めて1次元射影
値に射影し、 上記切出方向に対して垂直な方向の射影値の幅に基づい
て文字又は文字行の切出位置を決定することを特徴とす
る文字・文字行切出方法。
1. A character / character line cutout method for cutting out a character or a character line based on a digital image containing at least one of a character and a character line, wherein the character or the character line is cut out from the digital image. The cutting direction is determined, the edge of each character in the direction perpendicular to the cutting direction is extracted to create an edge-enhanced image, and the edge-enhanced image is a range in a direction parallel to the cutting direction. It is characterized in that a statistic amount regarding pixels inside is obtained and projected to a one-dimensional projection value, and the cutout position of a character or a character line is determined based on the width of the projection value in the direction perpendicular to the cutout direction. How to cut out characters and character lines.
【請求項2】請求項1において、 エッジ強調画像を1次元射影値に射影する際、エッジ強
度が所定の閾値以上の画素を計数して圧縮射影値とする
ことを特徴とする文字・文字行切出方法。
2. The character / character line according to claim 1, wherein when the edge-enhanced image is projected onto a one-dimensional projected value, pixels having an edge strength equal to or greater than a predetermined threshold value are counted as a compressed projected value. Cutting method.
JP4230032A 1992-08-28 1992-08-28 Character/character line segmenting method Pending JPH0676110A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4230032A JPH0676110A (en) 1992-08-28 1992-08-28 Character/character line segmenting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4230032A JPH0676110A (en) 1992-08-28 1992-08-28 Character/character line segmenting method

Publications (1)

Publication Number Publication Date
JPH0676110A true JPH0676110A (en) 1994-03-18

Family

ID=16901503

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4230032A Pending JPH0676110A (en) 1992-08-28 1992-08-28 Character/character line segmenting method

Country Status (1)

Country Link
JP (1) JPH0676110A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001013324A1 (en) * 1999-08-11 2001-02-22 Japan Science And Technology Corporation Document processing method, recording medium recording document processing program and document processing device
JP2009122813A (en) * 2007-11-13 2009-06-04 Seiko Epson Corp Character size determination device and character size determination method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001013324A1 (en) * 1999-08-11 2001-02-22 Japan Science And Technology Corporation Document processing method, recording medium recording document processing program and document processing device
US7142733B1 (en) 1999-08-11 2006-11-28 Japan Science And Technology Agency Document processing method, recording medium recording document processing program and document processing device
JP2009122813A (en) * 2007-11-13 2009-06-04 Seiko Epson Corp Character size determination device and character size determination method

Similar Documents

Publication Publication Date Title
US6266054B1 (en) Automated removal of narrow, elongated distortions from a digital image
DE69734694T2 (en) Automatic image cropping
DE69107267T2 (en) METHOD AND DEVICE FOR MODIFYING A ZONE SUCCESSIVE IMAGES.
DE19842572A1 (en) Automatic removal method for effect of scratches in digital image data, involves using masking process
WO2003019473A1 (en) Method and apparatus for detection and removal of scanned image scratches and dust
DE3312050A1 (en) METHOD FOR PRODUCING A PHOTOGRAPHIC MASK
EP0235902B1 (en) Digital image processing
CN114355467A (en) Detection model establishment and multi-image-based track foreign matter detection method
JPH0320882A (en) Method for displaying, extracting, and segmenting interested area
JPH0676110A (en) Character/character line segmenting method
JP3636936B2 (en) Grayscale image binarization method and recording medium recording grayscale image binarization program
MXPA02008494A (en) Correction of distortions in form processing.
JPH1125222A (en) Method and device for segmenting character
CN115862044A (en) Method, apparatus, and medium for extracting target document part from image
DE19700318A1 (en) Method for determining the geometry data of scanning templates
JPS58201182A (en) Character and graph demarcating method
DE19858968A1 (en) Identification of document angle on scanner bed
JP2800192B2 (en) High-speed character / graphic separation device
JPH06301775A (en) Picture processing method, picture identification method and picture processor
JPH0623983B2 (en) Distortion correction device
CN114549499A (en) Standard reaching detection method, system and medium for high-speed shooting instrument of terminal equipment
JP3030814B2 (en) Noise component removal method and recording medium recording noise component removal program
CN116704517A (en) Character recognition method in therapy control system display, electronic equipment and storage medium
JPH0522598A (en) Picture input device
CN112529804A (en) Image denoising method, device and equipment and computer readable storage medium