JP2960468B2 - Method and apparatus for binarizing grayscale image - Google Patents

Method and apparatus for binarizing grayscale image

Info

Publication number
JP2960468B2
JP2960468B2 JP2067114A JP6711490A JP2960468B2 JP 2960468 B2 JP2960468 B2 JP 2960468B2 JP 2067114 A JP2067114 A JP 2067114A JP 6711490 A JP6711490 A JP 6711490A JP 2960468 B2 JP2960468 B2 JP 2960468B2
Authority
JP
Japan
Prior art keywords
image
brightness
threshold
gray
difference
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
Application number
JP2067114A
Other languages
Japanese (ja)
Other versions
JPH03268086A (en
Inventor
忠明 北村
政雄 高藤
紀夫 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2067114A priority Critical patent/JP2960468B2/en
Priority to TW079110679A priority patent/TW197509B/zh
Priority to US07/646,388 priority patent/US5243668A/en
Priority to DE4102587A priority patent/DE4102587C2/en
Publication of JPH03268086A publication Critical patent/JPH03268086A/en
Application granted granted Critical
Publication of JP2960468B2 publication Critical patent/JP2960468B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Image Input (AREA)
  • Image Processing (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、濃淡画像処理に係り、特に複雑な背景や明
るさむらなどを有する画像に対しても適用可能な濃淡画
像の処理方法及び装置に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to grayscale image processing, and more particularly to a grayscale image processing method and apparatus applicable to an image having a complicated background or uneven brightness. About.

〔従来の技術〕[Conventional technology]

画像処理装置を用いて文字などを認識する場合、一般
には、テレビカメラなどで撮影した画像データをあるし
きい値レベルで‘0'と‘1'の2値データに圧縮して処理
することが多い。たとえば、文字を‘1'、背景を‘0'の
レベルに2値化し、その‘1'のデータについて認識処理
を行う。
In the case of recognizing characters and the like using an image processing device, generally, image data taken by a television camera or the like is compressed at a certain threshold level into binary data of '0' and '1' for processing. Many. For example, the character is binarized to a level of “1” and the background is binarized to a level of “0”, and recognition processing is performed on the data of the “1”.

ところで、白紙に黒く書かれた文字を認識する場合の
ように、かなり鮮明な画像を対象とするときは、上述の
しきい値レベルは予め簡単に決定することが可能(たと
えば、平均濃度をしきい値とする)である。しかし、更
に難しいアプリケーシヨンに対応するためには、上述の
ように単純な2値化処理では良好な結果が得られないこ
とが多い。このアプリケーシヨンの例を示すと、次のよ
うなものが揚げられる。
By the way, when a fairly clear image is to be processed, such as when recognizing a character written in black on white paper, the above-described threshold level can be easily determined in advance (for example, by determining the average density). Threshold). However, in order to cope with more difficult applications, good results are often not obtained by simple binarization processing as described above. As an example of this application, the following are fried.

(1)柄のあるダンボールの箱から文字を抽出する。(1) Characters are extracted from a patterned cardboard box.

(2)屋外の看板等から文字を抽出する。(2) Characters are extracted from an outdoor signboard or the like.

(3)プリント基板上から文字を抽出する。(3) Characters are extracted from the printed circuit board.

このような対象は、文字の背景が複雑かつ、明るさの
変動が激しいため単純な2値化処理では文字の抽出はで
きない。そこで、これらの対象でも良好に文字等を抽出
する2値化の手法を考案する必要があるが、その従来例
として、たとえば、「情景画像中からの文字抽出法の検
討」(情報処理学会全国大会講演論文集;'86.3;大谷
著)に記載の方法が提案されている。
Such a target cannot extract a character by simple binarization processing because the background of the character is complicated and the brightness varies greatly. Therefore, it is necessary to devise a binarization method for extracting characters and the like well in these objects. As a conventional example, for example, "Examination of a character extraction method from a scene image" (Information Processing Society of Japan (86.3; by Otani)).

これは、第2図のように、テレビカメラなどから入力
した濃淡画像140の1画面を複数のサブブロツク141に分
割し、このブロツク内で最適な2値化のしきい値レベル
θijを決める(第2図(2))。このときのしきい値θ
ijは、サブブロツク141内で白黒2つのクラスに分離す
る2クラス問題としてとらえ、最もクラス間分散が最大
となる値としている。更に、サブブロツク141間の連続
性を保つために、第2図(3)に示すようにθijを用い
て画素ごとの補間を行い、この結果のしきい値θx,y
すなわち各画素ごとのしきい値θx,yを決定し、入力画
像を2値化する方法である。
As shown in FIG. 2, one screen of a gray-scale image 140 input from a television camera or the like is divided into a plurality of sub-blocks 141, and an optimum binarization threshold level θ ij is determined within the blocks (see FIG. 2). FIG. 2 (2)). The threshold θ at this time
ij is regarded as a two-class problem in which the black and white are separated into two classes in the subblock 141, and is set to a value that maximizes the inter-class variance. Further, in order to maintain continuity between the sub-blocks 141, interpolation is performed for each pixel using θ ij as shown in FIG. 2 (3), and the resulting threshold values θ x, y ,
That is, the threshold value θ x, y for each pixel is determined, and the input image is binarized.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

上記従来技術の問題点は、前者では、サブブロツク内
のしきい値θijの決定のために濃度ヒストグラム(各濃
度レベルの頻度をサブブロツク内で求める)を用いて、
2次元の画像データを1次元のデータに変換しているた
め、明るさの位置情報を考慮できず、最適なしきい値が
決定できない。
The problem with the prior art described above is that the former uses a density histogram (determining the frequency of each density level within the sub-block) to determine the threshold θ ij within the sub-block.
Since the two-dimensional image data is converted to one-dimensional data, the position information of the brightness cannot be considered, and the optimum threshold cannot be determined.

又、θx,yを求めるための処理時間が膨大であり、リ
アルタイムでの文字抽出ができないなどがあげられる。
Another problem is that the processing time for obtaining θ x, y is enormous, and character extraction cannot be performed in real time.

ところで、入力画像に対し微分処理したような場合
は、エツジでないところはほぼ‘0'、エツジの部分はエ
ツジの強さに見合つた値の濃淡画像となるが、このよう
な画像を2値化する場合にも上記手法では最適なエツジ
抽出ができない。
By the way, in the case where the input image is differentiated, a portion which is not an edge is almost '0', and a portion of the edge is a grayscale image having a value corresponding to the edge strength. In this case, the above-described method does not allow optimum edge extraction.

本発明は、このような従来の欠点に鑑み、複雑あるい
は明るさのむらなどを有する画像に対してでも、高速か
つ鮮明な2値画像を作成することにある。
The present invention has been made in view of such conventional drawbacks, and has an object to create a high-speed and clear binary image even for an image having complexity or uneven brightness.

〔課題を解決するための手段〕[Means for solving the problem]

本発明の基本的処理は、前述した微分画像のような目
的以外の領域は濃度が‘0'となる画像の2値化手法であ
るため、この対象について説明し、通常の濃淡画像の2
値化手法については後述する。
The basic processing of the present invention is a binarization method of an image in which the density is “0” in an area other than the object, such as the above-described differential image.
The value conversion method will be described later.

第1図(1)に入力画像説明を簡単にするためにA−
A′を結ぶ一次元の画像を(2)に示す。この画像を微
分(微分値の絶対値を求めている)処理したときの画像
を(3)に示す。
FIG. 1 (1) shows A- in order to simplify the explanation of the input image.
A one-dimensional image connecting A 'is shown in (2). An image obtained by differentiating this image (obtaining the absolute value of the differential value) is shown in (3).

エツジでないところはほぼ‘0'の値を示し、エツジの
部分にのみエツジの強さに見合つたある濃度値を示して
いる。このとき、明るさにむらなどがあると、エツジの
強さが部分部分で異なつてくるためある固定のしきい値
を設定しても全てのエツジを良好に抽出できない。たと
えばしきい値を上げすぎるとエツジ強度が小さい部分を
抽出できないし、逆に高すぎるとエツジ強度が強い部分
がかなり太く抽出されてしまう。
A non-edge portion shows a value of almost '0', and only a portion of the edge shows a certain density value corresponding to the edge strength. At this time, if the brightness is uneven or the like, the edge strength varies in the partial portion, so that even if a certain fixed threshold value is set, all edges cannot be satisfactorily extracted. For example, if the threshold value is too high, a portion having a small edge strength cannot be extracted. Conversely, if the threshold value is too high, a portion having a high edge intensity will be extracted to be considerably thick.

このため、本発明は抽出したい領域(画素)の中間濃
度を通る曲面を理想的なしきい値と考え、この面を作成
する手段を設け、このしきい値面より大きな濃度値をと
る領域を抽出することで良好な2値画像を得るようにし
たものである。
For this reason, the present invention considers a curved surface passing through the intermediate density of a region (pixel) to be extracted as an ideal threshold value, and provides means for creating this surface, and extracts a region having a density value larger than the threshold value surface. By doing so, a good binary image is obtained.

〔作用〕[Action]

前記しきい値面は、抽出したい領域(画素)の濃度の
中間値を通る面であるが、これは2次元平面であるため
高速にしかも正確に求めることは困難である。
The threshold plane is a plane that passes through the intermediate value of the density of the region (pixel) to be extracted. However, since this is a two-dimensional plane, it is difficult to quickly and accurately find it.

そこで、上記しきい値面を模擬的に高速に求める手段
をとつている。すなわち、抽出したいエツジの画素の濃
度の中間値を通る面を作成するために、2値化対象の画
像、ここでは微分画像の濃度を1/n(通常nは2をと
る)にした画像Hを作成する。この画像のピーク濃度値
は各エツジの濃度の中間値(nが2のとき)を示すの
で、このH画像を更に濃度の膨張処理を数回実行し、こ
れを更に平滑化処理することで理想的なしきい値面に類
似した画像を作成できる。そして、元の微分画像としき
い値画像を比較し、濃度値がしきい値画像より大きな部
分を取り出せば良好な2値画像を作成できる。
Therefore, means for simulating the threshold plane at high speed is adopted. That is, in order to create a surface passing through the intermediate value of the density of the pixel of the edge to be extracted, an image H in which the density of the binarization target, here, the density of the differential image is 1 / n (normally n is 2). Create Since the peak density value of this image indicates the intermediate value of the density of each edge (when n is 2), this H image is further subjected to density expansion processing several times and further smoothed. An image similar to a typical threshold plane can be created. Then, a good binary image can be created by comparing the original differential image and the threshold image and extracting a portion where the density value is larger than the threshold image.

〔実施例〕〔Example〕

以下、本発明の実施例を図を用いて詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

第1図は処理の流れを示すもので、(1)は入力画像
Fであり、このうちA−A′の1ラインの情報を横軸に
位置、縦軸に明るさ(濃度)として示したのが(2)の
FAである。この入力画像に対し微分処理(出力は絶対
値)すると、(3)のG画像が作成される。この画像は
エツジ以外はほぼ‘0'の値、エツジ位置ではエツジの強
度に見合つた値を示す。この画像に対する2値化しきい
値を作成するわけであるが、理想的には、各エツジの強
度(コントラスト)の中間濃度を通る曲線TCを作成すれ
ば良い。しかしながら、実際には入力画像は2次元平面
であるため、曲線TCでなく曲面を作成する必要がある。
これはかなり困難であるため、一次元で言えば曲線TC
類似したしきい値曲線を作成する。
FIG. 1 shows the flow of processing, in which (1) shows an input image F, in which information of one line AA 'is shown as a position on the horizontal axis and brightness (density) on the vertical axis. Of the (2)
F A. When the input image is differentiated (the output is an absolute value), the G image of (3) is created. This image shows a value of almost '0' other than the edge, and a value corresponding to the edge intensity at the edge position. But not to create a binary threshold value for the image, ideally, you may be creating a curve T C through an intermediate concentration of the intensity of the edge (contrast). However, in practice since the input image is a two-dimensional plane, it is necessary to create a curved surface rather than a curve T C.
This is because it is rather difficult to create a threshold curve similar to curve T C In terms of one dimension.

具体的には、微分画像Gの各画素の濃度を1/2にした
画像GHを(4)のように作成する。この画像GHのコント
ラストのピーク値は元の微分画像のコントラストの中間
値を示しているが、これを更に濃度の膨張処理を数回行
うと(5)のGHX画像となる。これに対し、更に平滑化
処理を実施すると(6)のように理想的なしきい値に類
似した画像Cを作成できる。そして、元の微分画像Gと
作成したしきい値画像Cとで比較し、微分画像の濃度が
しきい値画像よりも大きい画素のみを抽出する2値化を
行うことで鮮明な2値画像を作成できる。
Specifically, an image GH in which the density of each pixel of the differential image G is halved is created as shown in (4). The peak value of the contrast of the image GH indicates an intermediate value of the contrast of the original differential image. If the density is further expanded several times, the GHX image of (5) is obtained. On the other hand, if the smoothing process is further performed, an image C similar to an ideal threshold can be created as shown in (6). Then, a comparison is made between the original differential image G and the created threshold image C, and binarization is performed to extract only pixels whose density of the differential image is larger than the threshold image, thereby forming a clear binary image. Can be created.

ここで、濃淡の膨張処理はいわゆる局所最大値フイル
タと称されるもので2次元平面では第3図のように入力
画像fの3×3画素の濃度f1,f2…f9の中から最大値を
とり、その値をFとして出力する処理で下記で示され
る。
Here, the density expansion processing is what is called a local maximum value filter. On a two-dimensional plane, the density f 1 , f 2, ... F 9 of 3 × 3 pixels of the input image f as shown in FIG. The process of taking the maximum value and outputting that value as F is shown below.

F(i,j)=max〔f(i+u,j+v)〕 (u,v)=−1,0,+1 また、平滑化処理には、たとえば3×3画素の濃度の
平均値を出力するものがある。
F (i, j) = max [f (i + u, j + v)] (u, v) = − 1,0, + 1 In the smoothing processing, for example, an average value of the density of 3 × 3 pixels is output. There is.

第4図に本発明の一構成を示す。テレビカメラ10,A/D
変換器11,画像メモリ12,微分回路13,画像スケーリング
回路14,局所最大値フイルタ回路15,平滑化回路16,画像
間演算回路17,2値化回路18,CPU19,D/A変換器20,モニタ2
1からなつている。
FIG. 4 shows one configuration of the present invention. TV camera 10, A / D
Converter 11, image memory 12, differentiation circuit 13, image scaling circuit 14, local maximum value filter circuit 15, smoothing circuit 16, inter-image operation circuit 17, binarization circuit 18, CPU 19, D / A converter 20, Monitor 2
It's from one.

このような構成において、テレビカメラ10などによつ
て撮影された画像信号はA/D変換器11によつて例えば128
階級の濃度データに変換されて画像メモリ12に記憶され
る。ここで、画像メモリ12は、たとえば256×256画素の
濃淡メモリがk枚G1〜Gk備つており、必要に応じて2値
画像メモリがl枚B1〜Bl備つている。
In such a configuration, an image signal photographed by the television camera 10 or the like is, for example, 128
The image data is converted into class density data and stored in the image memory 12. Here, the image memory 12 has, for example, k gray-scale memories G 1 to G k of 256 × 256 pixels, and one binary image memory B 1 to B 1 as needed.

入力した画像をG1の画像メモリに格納したとして、以
下処理手順にしたがい詳述する。
The input image as stored in the image memory of the G 1, described in detail in accordance with the following procedure.

まず、G1の画像に対し微分回路13で微分処理し、G2
像メモリに格納する。この画像が2値化処理の対象画像
である。この画像G2に対し、画像スケーリング回路14で
明るさを1/nした画像を作成しG3に格納する。通常この
nは2をとるが、対象画像の性質に合せ3や4をとる場
合もある(もちろん、実数値たとえば1.5などの場合も
ある)。このG3画像に対し、局所最大値フイルタ回路15
で濃淡の膨張処理を行いG4に格納する。この局所最大値
フイルタ回路は通常3×3画素の濃度の最大値をとるた
め、1回の処理では膨張の量が少ないため、G4の画像に
対し数回膨張処理を繰り返しG4に再び格納する。この繰
り返し回数は、エツジの幅分が広がる程度(5回程度)
にする。更に、膨張した画像G4に対し、平滑化回路16で
平滑化し、なめらかな曲面を作成する。これも数回実行
し、G5に格納する。
First, differential processing by the differential circuit 13 the image of G 1, and stores the G 2 image memory. This image is the target image for the binarization processing. For this image G 2, to create an image where the brightness in the image scaling circuit 14 by 1 / n to store the G 3. Normally, this n is 2, but it may be 3 or 4 depending on the properties of the target image (of course, it may be a real value such as 1.5). For this G 3 image, the local maximum value filter circuit 15
In stores to G 4 performs expansion processing of gray. Since the maximum value of the local maximum filter circuit usually 3 × 3 pixel density which is less the amount of expansion in a single process, again stored in the G 4 repeated several times expansion processing on the image of the G 4 I do. The number of repetitions is such that the width of the edge is widened (about 5 times).
To Furthermore, the image G 4 inflated, smoothed by the smoothing circuit 16, to create a smooth surface. It also performs a number of times, and stores the G 5.

このG5の画像がしきい値画像であり、この画像と元の
微分画像Gの画素毎の濃度を比較して2値化する。具体
的処理としては、第1図(7)のように微分画像Gから
しきい値画像G5の濃度を減算する処理を画像間演算回路
17で実行する。ここで得られる画像はしきい値画像より
も大きな濃度をもつ微分画像の情報となるので、これに
対しノイズを除く効果を持たせるためにあるしきい値th
を設定(2〜3階調程度)して2値化回路18で2値化す
る。以上の処理で明るさの中間値をしきい値とした2値
画像が得られる。
The image G 5 is a threshold image, binarization by comparing the concentration of each pixel of the image and the original image derivatives G. Specific processing, inter-image calculation circuit from differential image G the process of subtracting the concentration of the threshold image G 5 as FIG. 1 (7)
Run at 17. The image obtained here is information of a differential image having a density higher than that of the threshold image.
Is set (about two or three gradations) and binarized by the binarization circuit 18. By the above processing, a binary image with the intermediate brightness value as a threshold value is obtained.

ところで、第5図(1)のような微分画像にノイズ的
に明るい部分があると上記一連の処理だけでは不具合が
生じる。すなわち、第5図(2)のように明るさの1/2
の画像を作り、局所最大値フイルタで膨張するとノイズ
の影響で前記しきい値画像は第5図(3)のように高い
レベルになつてしまい、結果的にノイズ周辺の部分を抽
出できなくなつてしまう。そこで、明るさの1/2(1/nで
もよい)の画像を作成した後に、ノイズを減らす平滑化
処理を数回行つた後、局所最大値フイルタで膨張し、以
下同様な処理を行うようにする。このようにすることで
ノイズによるしきい値の変動を防止することができる。
By the way, if there is a bright portion in the differential image as shown in FIG. That is, as shown in FIG.
When the image is expanded by the local maximum value filter, the threshold image becomes a high level as shown in FIG. 5 (3) due to the influence of noise. As a result, it becomes impossible to extract a portion around the noise. Would. Therefore, after creating an image with a brightness of 1/2 (or 1 / n), a smoothing process for reducing noise is performed several times, and then the image is expanded with a local maximum value filter. To By doing so, it is possible to prevent the threshold from fluctuating due to noise.

ノイズが少ないときは前述したように平滑化処理を施
さなくても良好に抽出できるため、処理時間を考慮して
平滑化の有無を決定すればよい。なお、このノイズ対策
は、2値化対象画像(ここでは微分画像)を数回平滑化
処理してこれに対して1/nのスケーリング処理をしても
同様な効果がある。
When the noise is small, the extraction can be performed well without performing the smoothing processing as described above. Therefore, the presence or absence of the smoothing may be determined in consideration of the processing time. Note that this noise countermeasure has the same effect even if the binarization target image (here, the differential image) is smoothed several times and the 1 / n scaling process is applied thereto.

以上述べた手法は、nをどの値にするか、上記のよう
に明るさの1/nの画像を作成して平滑化するか、あるい
は、平滑化してから1/nの画像を作成するかなど、色々
な方法がある。
The method described above determines which value of n, whether to create an image of 1 / n of brightness and smooth it as described above, or whether to create an image of 1 / n after smoothing There are various methods.

このうち、ある対象に最も適した方法を決定するため
に 全ての前処理の結果を表示し、使用者が最も最適と
思う前処理を採用する。
Of these, the results of all pre-processing are displayed in order to determine the method most suitable for a certain object, and the pre-processing that the user considers most optimal is adopted.

文字認識などにおいては、前処理の結果を認識さ
せ、最も認識率の高い前処理を採用する。
In character recognition or the like, the result of preprocessing is recognized, and the preprocessing with the highest recognition rate is adopted.

使用者があらかじめ抽出したい領域を指定してお
き、この情報と最も類似する前処理結果となる前処理を
採用する。
The user specifies a region to be extracted in advance, and adopts a pre-processing that results in a pre-processing result most similar to this information.

などの方法がある。And so on.

以上、本実施例は、抽出したい画素はある濃度値を有
し、それ以外はほぼ‘0'の値である対象のときに良好に
2値化しきい値を決めることができる手法である(以下
ハーフコントラスト2値化法と称する)。したがつて、
通常の濃淡画像のように抽出したい領域以外もある濃度
値を有している対象には適用できない。そこで、これら
にも適用できる手法を以下に本発明の他の実施例とし
て、説明する。第6図(1)(2)に通常の濃淡画像と
して文字を含む対象を示す。
As described above, the present embodiment is a technique capable of favorably determining a binarization threshold value for a target having a certain density value for a pixel to be extracted and a value of approximately '0' for the other pixels. Half-contrast binarization method). Therefore,
It cannot be applied to a target having a certain density value other than the region to be extracted, such as a normal grayscale image. Therefore, a method applicable to these will be described below as another embodiment of the present invention. FIGS. 6 (1) and (2) show a target including a character as a normal gray-scale image.

通常の濃淡画像を前述の実施例における手法で2値化
するためには文字の背景の濃度を‘0'レベルに変換して
やれば、文字のコントラストのみが残るため前述のハー
フコントラスト手法が適用できる。このため、特開昭63
−153682号の手法を用いて変換する。この手法は入力画
像から背景画像を作成し、これを入力画像から差し引く
ことで抽出したい濃度情報(例えば文字画像なら文字の
コントラスト画像)だけの画像を作成するものである。
この結果、文字部はそのコントラストに見合つた濃度
に、それ以外の背景はほぼ‘0'になる画像を作成でき、
前述までに述べてきた微分画像と同様な画像を作成でき
るため、本発明の2値化法が有効となる。この背景除去
処理について簡単に説明しておく。第6図(1)は入力
画像を示し、このうちの一ラインA−A′の濃度情報を
第6図(2)に示す。図は黒い文字を抽出することにつ
いて示している。背景画像を作成するために前述した局
所最大値フイルタを用いて明るさの膨張処理を数回行う
と、第6図(3)のように文字部の凹部が周囲の明るさ
で埋まる。この画像に対し局所最小値フイルタで更に膨
張処理と同様に数回収縮処理すると第6図(4)のよう
に背景画像が作成できる。ここで局所最小値フイルタ処
理は局所最大値フイルタの逆の処理で局所領域の濃度f
(x,y)の最小値を出力F(x,y)とするもので以下の式
で表わされる。
In order to binarize a normal grayscale image by the method in the above-described embodiment, if the density of the background of the character is converted to the '0' level, only the contrast of the character remains, so that the above-described half-contrast method can be applied. For this reason,
Convert using the method of -153682. This method creates a background image from an input image and subtracts the background image from the input image to create an image containing only density information to be extracted (for example, a character image for a character image).
As a result, it is possible to create an image in which the character part has a density corresponding to the contrast and the other background is almost '0',
Since an image similar to the differential image described above can be created, the binarization method of the present invention is effective. This background removal processing will be briefly described. FIG. 6A shows an input image, and FIG. 6B shows the density information of one line AA '. The figure shows extracting black characters. When the brightness expansion processing is performed several times using the above-described local maximum value filter to create a background image, the concave portion of the character portion is filled with the surrounding brightness as shown in FIG. 6 (3). If this image is further contracted several times by a local minimum value filter in the same manner as the dilation process, a background image can be created as shown in FIG. 6 (4). Here, the local minimum value filter processing is the inverse processing of the local maximum value filter, and the density f of the local area is
The minimum value of (x, y) is defined as the output F (x, y) and is represented by the following equation.

F(i,j)=min〔f(i+u,j+v)〕 (u,v)=−1,0,+1 背景画像を作成したら、元の入力画像と該背景画像と
の明るさの差を求めると第6図(5)のように背景濃度
を‘0'にしたコントラスト画像が作成できる。この手法
を背景差分法と称す。
F (i, j) = min [f (i + u, j + v)] (u, v) = − 1,0, + 1 After the background image is created, the difference in brightness between the original input image and the background image is obtained. As shown in FIG. 6 (5), a contrast image in which the background density is set to '0' can be created. This method is called a background subtraction method.

この画像は背景の明るさむらを除去できるが文字のコ
ントラストの違いまでは補正できないため、固定のしき
い値では2値化できない。したがつて、この画像につい
て前述のハーフコントラスト2値化法を適用すれば良好
な2値画像を作成できる。
This image can remove the uneven brightness of the background, but cannot correct the difference in the contrast of characters, so that it cannot be binarized with a fixed threshold. Therefore, by applying the half-contrast binarization method to this image, a good binary image can be created.

上記処理は黒色文字について説明したが、白色の場合
は入力画像の反転処理を行つてから上記背景差分法を適
用するとか、局所最小値フイルタ,局所最大値フイルタ
の順に文字部の凸部を削る処理を行えば同様な効果があ
る。
Although the above processing has been described for black characters, in the case of white, the inversion processing of the input image is performed and then the above-described background difference method is applied, or the convex part of the character part is cut in the order of the local minimum value filter and the local maximum value filter. The same effect can be obtained by performing the processing.

なお、背景差分法を実行するためには第4図の構成に
局所最小値フイルタ回路を追加すれば容易に実現でき
る。
Note that the background difference method can be easily realized by adding a local minimum value filter circuit to the configuration of FIG.

〔発明の効果〕〔The invention's effect〕

本発明のように、抽出したい領域の濃度がある値を有
し、それ以外はほぼ‘0'の濃度となる画像に対し、明る
さを1/nにした画像からしきい値画像を作成することで
各画素毎に最適な2値化しきい値を設定できるため鮮明
な2値画像を作成できる。
As in the present invention, a threshold image is created from an image in which the brightness is reduced to 1 / n for an image in which the density of an area to be extracted has a certain value and the density of the other area is almost '0' This makes it possible to set an optimal binarization threshold value for each pixel, so that a clear binary image can be created.

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

第1図は本発明の実施例の流れを示す図、第2図は従来
例の説明図、第3図は局所最大値フイルタを説明する
図、第4図は本発明の一構成例を示す図、第5図はノイ
ズが発生した場合の不具合を示す図、第6図は入力画像
からコントラスト画像を作成する流れを示す図である。 13……微分回路、14……画像スケーリング回路、15……
局所最大値フイルタ回路、16……平滑化回路、17……画
像間演算回路、18……2値化回路、19……CPU。
FIG. 1 is a diagram showing a flow of an embodiment of the present invention, FIG. 2 is an explanatory diagram of a conventional example, FIG. 3 is a diagram for explaining a local maximum value filter, and FIG. FIG. 5 is a diagram showing a problem when noise occurs, and FIG. 6 is a diagram showing a flow of creating a contrast image from an input image. 13 …… Differentiation circuit, 14 …… Image scaling circuit, 15 ……
Local maximum value filter circuit, 16: smoothing circuit, 17: inter-image calculation circuit, 18: binarization circuit, 19: CPU.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭62−198966(JP,A) 特開 昭61−214078(JP,A) 特開 昭63−292284(JP,A) 特開 平1−244587(JP,A) 特開 平1−287783(JP,A) (58)調査した分野(Int.Cl.6,DB名) G06K 9/00 - 9/82 G06T 1/00 G06T 5/00 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-62-119896 (JP, A) JP-A-61-214078 (JP, A) JP-A-63-292284 (JP, A) JP-A-1- 244587 (JP, A) JP-A 1-287783 (JP, A) (58) Fields investigated (Int. Cl. 6 , DB name) G06K 9/00-9/82 G06T 1/00 G06T 5/00

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】2次元画像を走査することによって得られ
る濃淡画像の2値化方法において、 前記2値化の対象である濃淡画像を1/n(nは2以上の
整数)の明るさにし、 前記1/n(nは2以上の整数)の明るさとした画像を膨
張処理し、 前記膨張処理された画像に対し平滑化処理を施して、し
きい値画像を作成し、 前記2値化の対象である濃淡画像と前記しきい値画像と
の画素毎の明るさの差を求め、 前記求めた差分画像を所定のしきい値で2値化すること
を特徴とする濃淡画像の2値化方法。
1. A method for binarizing a grayscale image obtained by scanning a two-dimensional image, wherein the grayscale image to be binarized has a brightness of 1 / n (n is an integer of 2 or more). And performing an expansion process on the image having the brightness of 1 / n (n is an integer of 2 or more), performing a smoothing process on the image subjected to the expansion process, creating a threshold image, and performing the binarization. Calculating a difference in brightness of each pixel between the gray image and the threshold image, which are the object of the above, and binarizing the obtained difference image with a predetermined threshold value Method.
【請求項2】2次元画像を走査することによって得られ
る濃淡画像の2値化方法において、 前記2値化の対象である濃淡画像に対して平滑化処理を
施し、 前記平滑化処理された画像を1/n(nは2以上の整数)
の明るさにし、 前記1/n(nは2以上の整数)の明るさとした画像を膨
張処理し、 前記膨張処理された画像に対し平滑化処理を施してしき
い値画像を作成し、 前記2値化の対象である濃淡画像と前記しきい値画像と
の画素毎の明るさの差を求め、 当該求めた差分画像を所定のしきい値で2値化すること
を特徴とする濃淡画像の2値化方法。
2. A method for binarizing a grayscale image obtained by scanning a two-dimensional image, wherein the grayscale image to be binarized is subjected to a smoothing process, and the smoothed image is processed. Is 1 / n (n is an integer of 2 or more)
An image having a brightness of 1 / n (n is an integer of 2 or more) is subjected to dilation processing, a smoothing process is performed on the dilated image to generate a threshold image, A gray-scale image obtained by calculating a difference in brightness of each pixel between a gray-scale image to be binarized and the threshold image, and binarizing the obtained difference image with a predetermined threshold value; Binarization method.
【請求項3】2次元画像を走査することによって得られ
る濃淡画像の2値化方法において、 前記2値化の対象である濃淡画像を1/n(nは2以上の
整数)の明るさにし、 前記1/n(nは2以上の整数)の明るさとした画像に対
して平滑化処理を施し、 前記平滑化処理された画像を膨張処理し、 前記膨張処理された画像に対し平滑化処理を施して、し
きい値画像を作成し、 前記2値化の対象である濃淡画像と前記しきい値画像と
の画素毎の明るさの差を求め、 前記求めた差分画像を所定のしきい値で2値化すること
を特徴とする濃淡画像の2値化方法。
3. A method for binarizing a grayscale image obtained by scanning a two-dimensional image, wherein the grayscale image to be binarized has a brightness of 1 / n (n is an integer of 2 or more). Performing a smoothing process on the image having a brightness of 1 / n (n is an integer of 2 or more), performing an expansion process on the smoothed image, and performing a smoothing process on the expanded image. To generate a threshold image, determine a difference in brightness between each pixel between the grayscale image to be binarized and the threshold image, and determine the determined difference image by a predetermined threshold. A binarization method for a gray-scale image, wherein the binarization is performed using values.
【請求項4】特許請求の範囲第1項において、 前記2値化の対象である濃淡画像は、当該濃淡画像と背
景画像との画素毎の差分を求めた背景差分画像であるこ
とを特徴とする濃淡画像の2値化方法。
4. The method according to claim 1, wherein the grayscale image to be binarized is a background difference image obtained by calculating a pixel-by-pixel difference between the grayscale image and the background image. Binarization method of the gray image to be processed.
【請求項5】TVカメラ等から入力される濃淡画像を保持
する濃淡画像メモリと、 前記濃淡画像メモリに保持された濃淡画像に対してその
明るさを1/n(nは2以上の整数)にする画像スケーリ
ング回路と、 前記スケーリング回路によって得られた画像に対して膨
張処理を行う膨張回路と、 前記膨張回路によって膨張された画像の平滑化処理を行
う平滑化回路と、 前記平滑化回路によって得られた画像と前記濃淡画像と
の差分演算を行う画像間演算回路と、 前記画像間演算回路によって得られた差分画像を所定の
しきい値で2値に変換する2値化回路とからなることを
特徴とする濃淡画像の2値化装置。
5. A gray-scale image memory for storing a gray-scale image input from a TV camera or the like, and a brightness of the gray-scale image stored in the gray-scale image memory is 1 / n (n is an integer of 2 or more). An image scaling circuit that performs an expansion process on an image obtained by the scaling circuit; a smoothing circuit that performs a smoothing process on an image expanded by the expansion circuit; An inter-image operation circuit for performing a difference operation between the obtained image and the grayscale image, and a binarization circuit for converting the difference image obtained by the inter-image operation circuit into a binary value with a predetermined threshold value An apparatus for binarizing a grayscale image.
JP2067114A 1990-01-31 1990-03-19 Method and apparatus for binarizing grayscale image Expired - Fee Related JP2960468B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2067114A JP2960468B2 (en) 1990-03-19 1990-03-19 Method and apparatus for binarizing grayscale image
TW079110679A TW197509B (en) 1990-01-31 1990-12-19
US07/646,388 US5243668A (en) 1990-01-31 1991-01-28 Method and unit for binary processing in image processing unit and method and unit for recognizing characters
DE4102587A DE4102587C2 (en) 1990-01-31 1991-01-29 Method and device for binary image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2067114A JP2960468B2 (en) 1990-03-19 1990-03-19 Method and apparatus for binarizing grayscale image

Publications (2)

Publication Number Publication Date
JPH03268086A JPH03268086A (en) 1991-11-28
JP2960468B2 true JP2960468B2 (en) 1999-10-06

Family

ID=13335550

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2067114A Expired - Fee Related JP2960468B2 (en) 1990-01-31 1990-03-19 Method and apparatus for binarizing grayscale image

Country Status (1)

Country Link
JP (1) JP2960468B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6295371B1 (en) * 1998-10-22 2001-09-25 Xerox Corporation Method and apparatus for image processing employing image segmentation using tokenization
US8306336B2 (en) * 2006-05-17 2012-11-06 Qualcomm Incorporated Line or text-based image processing tools

Also Published As

Publication number Publication date
JPH03268086A (en) 1991-11-28

Similar Documents

Publication Publication Date Title
Raghunandan et al. Riesz fractional based model for enhancing license plate detection and recognition
Gatos et al. Automatic table detection in document images
Parker et al. An approach to license plate recognition
Alginahi Preprocessing techniques in character recognition
US9042649B2 (en) Color document image segmentation and binarization using automatic inpainting
US8422783B2 (en) Methods and systems for region-based up-scaling
CN111401372A (en) Method for extracting and identifying image-text information of scanned document
US6671395B1 (en) Document image processing with stroke preservation and background suppression
Kumar et al. NESP: Nonlinear enhancement and selection of plane for optimal segmentation and recognition of scene word images
US7130085B2 (en) Half-tone dot elimination method and system thereof
JP2960468B2 (en) Method and apparatus for binarizing grayscale image
JP3636936B2 (en) Grayscale image binarization method and recording medium recording grayscale image binarization program
JPH0565911B2 (en)
Nomura et al. A new method for degraded color image binarization based on adaptive lightning on grayscale versions
JP6377214B2 (en) Text detection method and apparatus
Boiangiu et al. Methods of bitonal image conversion for modern and classic documents
Koshy et al. Preprocessing Techniques for High Quality Text Extraction from Text Images
Dinh et al. Korean text detection and binarization in color signboards
Cherala et al. Palm leaf manuscript/color document image enhancement by using improved adaptive binarization method
JP3462727B2 (en) Character string binarization device
Konya et al. Adaptive methods for robust document image understanding
Zhang et al. Using Gaussian Kernels to Remove Uneven Shading from a Document Image
Kim et al. Detection of moving edges based on the concept of entropy and cross-entropy
Boiangiu et al. Bitonal image creation for automatic content conversion
JP2001291056A (en) Document picture recognizing device and recording medium

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070730

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080730

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080730

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090730

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees