JPH10285399A - Binarization method for image - Google Patents

Binarization method for image

Info

Publication number
JPH10285399A
JPH10285399A JP9099664A JP9966497A JPH10285399A JP H10285399 A JPH10285399 A JP H10285399A JP 9099664 A JP9099664 A JP 9099664A JP 9966497 A JP9966497 A JP 9966497A JP H10285399 A JPH10285399 A JP H10285399A
Authority
JP
Japan
Prior art keywords
partial area
partial
density distribution
distribution histogram
binarization
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
JP9099664A
Other languages
Japanese (ja)
Inventor
Takashi Naito
貴志 内藤
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.)
Toyota Central R&D Labs Inc
Original Assignee
Toyota Central R&D Labs Inc
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 Toyota Central R&D Labs Inc filed Critical Toyota Central R&D Labs Inc
Priority to JP9099664A priority Critical patent/JPH10285399A/en
Publication of JPH10285399A publication Critical patent/JPH10285399A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Character Input (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve the identification performance of a character part by preventing a background part close to the character part from being binarized. SOLUTION: A CPU 24 divides received image data into a plurality of partial areas and generates a density distribution histogram for each partial area. Then a weight is provided to a partial area around a noted partial area, and a weight is multiplied with each density distribution histogram of the partial areas and the products are summed to obtain a weighted density distribution histogram of the noted partial area. Next, based on the weighted density distribution histogram, a binarization threshold level of the noted partial area is set, and the density is binarized with respect to each pixel in the noted partial area.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は画像の二値化方法に
関し、特に、屋外等で撮像された画像中から、目的とす
る文字部等のみを良好に抽出できる画像の二値化方法に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for binarizing an image, and more particularly to a method for binarizing an image in which only a desired character portion or the like can be satisfactorily extracted from an image taken outdoors or the like.

【0002】[0002]

【従来の技術】白い紙に書かれた文字を認識するのに比
して、屋外でカメラ等により撮像された画像中の文字を
識別するのは、画像全体の明るさが天候や時間によって
変化するのに加えて背景の明度も一様ではないことから
困難性を伴う。このような文字認識の前処理として、画
像濃度を二値化する必要があり、その一方法として、画
像毎に閾値を設定するいわゆる動的二値化法が知られて
いる。しかし、画像全体に一意の閾値を設定するだけで
は、影や背景等の影響で一つの画像中の各部分で明るさ
が変動する場合には対応できない。そこで、さらに、明
るさの変動や背景の影響を除去するために、画像をいく
つかの部分領域に分割し、各部分領域毎に適当な二値化
閾値を設定する方法が知られており、この各部分領域の
閾値を決定する動的二値化方法としては判別分析法
(「判別および最小2乗基準に基づく自動しきい値選定
法」電子通信学会論文誌、J63−D(4)、p349
〜p356、1980)が知られている。
2. Description of the Related Art Compared with recognizing characters written on white paper, recognizing characters in an image captured by a camera or the like outdoors is based on the fact that the brightness of the entire image changes depending on weather and time. In addition to this, the brightness of the background is not uniform, which is difficult. As such preprocessing for character recognition, it is necessary to binarize the image density. As one of the methods, a so-called dynamic binarization method for setting a threshold value for each image is known. However, simply setting a unique threshold value for the entire image cannot cope with a case where the brightness varies in each part of one image due to the influence of a shadow, a background, or the like. Therefore, in order to further remove the fluctuation of brightness and the influence of the background, a method of dividing an image into several partial regions and setting an appropriate binarization threshold for each partial region is known. As a dynamic binarization method for determining a threshold value of each partial area, a discriminant analysis method (“automatic threshold value selection method based on discrimination and least square criterion”, IEICE Transactions, J63-D (4), p349
To p356, 1980).

【0003】しかし、上記判別分析法において、例えば
図8(A)に示すように部分領域Eを大きく確保した状
態で、非常に明るい背景部B1が「7」を表す文字部L
の近くに存在すると、この背景部B1を含む部分領域E
の二値化閾値が上がるため、図8(B)に示すように、
上記背景部B1より暗い文字部Lの一部が二値化の際に
欠けてしまうことがある。そこで、図9(A)に示すよ
うに部分領域Eを小さくすれば、非常に明るい背景部B
1の影響で文字部Lの一部が欠けてしまうという不具合
は防止できるが、今度は例えば文字部Lに近接してこれ
よりもやや暗い中間濃度の背景部B2が存在すると、こ
の背景部B2を含む部分領域Eでは二値化閾値が低くな
るため、図9(B)に示すように背景部B2が文字部L
と連続する形状に二値化(以下、二値形状化という)さ
れて文字部Lの形状が変形し、その識別が困難になると
いう問題を生じる。
However, in the above discriminant analysis method, for example, as shown in FIG. 8A, with a large partial area E, a very bright background portion B1 has a character portion L representing "7".
, The partial area E including the background portion B1
Since the binarization threshold of is increased, as shown in FIG.
A part of the character portion L darker than the background portion B1 may be missing during binarization. Therefore, if the partial area E is reduced as shown in FIG.
1 can be prevented, but this time, for example, if there is a background portion B2 having a slightly darker intermediate density near the character portion L, the background portion B2 Since the binarization threshold value is low in the partial region E including the character portion L, as shown in FIG.
(Hereinafter, referred to as a binary shape), the shape of the character portion L is deformed, and the identification becomes difficult.

【0004】そこで、例えば特開昭61−194580
号では、注目する部分領域の二値化閾値を、これの周囲
の部分領域における二値化閾値の加重平均として決定し
て、文字部を含むコントラストの高い部分領域の二値化
閾値を周囲に伝播させることにより、文字部に近接する
背景部が、文字部と連続する形状に二値化されることを
防止した二値化方法が提案されている。
Accordingly, for example, Japanese Patent Application Laid-Open No. 61-194580.
In (2), the binarization threshold of the partial area of interest is determined as a weighted average of the binarization thresholds of the surrounding partial areas, and the binarization threshold of the high-contrast partial area including the character portion is set around the threshold. A binarization method has been proposed in which a background portion adjacent to a character portion is prevented from being binarized into a shape continuous with the character portion by propagating the character portion.

【0005】[0005]

【発明が解決しようとする課題】しかし、上記提案の二
値化方法では、文字部に近接する背景部の二値形状化を
未だ十分には阻止できず、文字部近くに生じるノイズ的
な背景部をより確実に除去できる方法が望まれていた。
However, with the above-described binarization method, it is not possible to sufficiently prevent the background portion close to the character portion from being formed into a binary shape, and the noise-like background generated near the character portion has not yet been achieved. There has been a demand for a method capable of removing the part more reliably.

【0006】そこで、本発明はこのような課題を解決す
るもので、文字部等に近接する背景部が二値形状化され
るのを、より確実に阻止して、文字部等の識別性を向上
させることが可能な画像の二値化方法を提供することを
目的とする。
Therefore, the present invention solves such a problem, and more reliably prevents a background portion close to a character portion or the like from being formed into a binary shape, thereby improving the distinguishability of the character portion or the like. It is an object of the present invention to provide an image binarization method that can be improved.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するた
め、本発明の画像の二値化方法は、(1)得られた画像
を複数の部分領域に分割するステップと、(2)各部分
領域毎に濃度分布ヒストグラムを作成するステップと、
(3)注目する部分領域と少なくともこれの前後の所定
数の部分領域に重み値を付与するステップと、(4)各
部分領域の濃度分布ヒストグラムに重み値を乗じて加算
して上記注目する部分領域の加重濃度分布ヒストグラム
を得るステップと、(5)加重濃度分布ヒストグラムに
基づいて上記注目する部分領域の二値化閾値を設定する
ステップと、(6)二値化閾値を基準にして上記注目す
る部分領域内の各画素について濃度の二値化を行うステ
ップとを具備し、画像内の全ての部分領域について
(3)から(6)の各ステップを繰り返すものである。
In order to achieve the above object, an image binarization method according to the present invention comprises the steps of: (1) dividing an obtained image into a plurality of partial areas; Creating a density distribution histogram for each region;
(3) assigning a weight value to the partial area of interest and at least a predetermined number of partial areas before and after the partial area; and (4) multiplying the density distribution histogram of each partial area by a weight value and adding the weighted histogram. Obtaining a weighted density distribution histogram of the area; (5) setting a binarization threshold value of the partial area of interest based on the weighted density distribution histogram; and (6) setting the binarization threshold value based on the binarization threshold value. Performing a binarization of the density for each pixel in the partial area to be performed, and repeating the steps (3) to (6) for all the partial areas in the image.

【0008】本発明の方法によれば、注目する部分領域
について、重み値を乗じた加重濃度分布ヒストグラムを
得て、当該加重濃度分布ヒストグラムに基づいて二値化
閾値を設定している。したがって、文字部等が存在し双
峰性の高い濃度分布ヒストグラムを呈する部分領域に近
接して、注目する部分領域があると、当該注目する部分
領域の加重濃度分布ヒストグラムも双峰性の高いものに
なるとともに、この加重濃度分布ヒストグラムに基づい
て設定される二値化閾値は高濃度側へ移行する。これに
より、上記注目する部分領域に中間濃度の背景部があっ
ても、二値化の過程で除去され、この結果、文字部等に
近接する背景部の二値形状化が阻止されて、文字部等の
確実な識別が可能となる。
According to the method of the present invention, a weighted density distribution histogram multiplied by a weight value is obtained for a partial area of interest, and a binarization threshold is set based on the weighted density distribution histogram. Therefore, if there is a partial area of interest in the vicinity of a partial area where a character portion or the like exists and presents a density distribution histogram with high bimodality, the weighted density distribution histogram of the partial area of interest also has high bimodal density. And the binarization threshold value set based on the weighted density distribution histogram shifts to the higher density side. As a result, even if the partial area of interest has an intermediate density background portion, it is removed in the binarization process, and as a result, the background portion close to the character portion or the like is prevented from being binarized, and Reliable identification of parts and the like becomes possible.

【0009】なお、背景部の二値形状化をさらに確実に
阻止するために、上記注目する部分領域に、評価値の高
い他の部分領域における二値化閾値を伝播させるような
ステップをさらに設けることができる。また、各部分領
域の境界で二値化閾値が急変するのを防止するために、
内挿補間等で各画素毎に二値化閾値を設定するステップ
をさらに設けることもできる。
In order to more reliably prevent the background portion from being binarized, a step is further provided to propagate the binarization threshold value in another partial region having a high evaluation value to the partial region of interest. be able to. Also, in order to prevent the binarization threshold from suddenly changing at the boundary of each partial area,
A step of setting a binarization threshold for each pixel by interpolation or the like may be further provided.

【0010】[0010]

【発明の実施の形態】図1には本発明の方法を実施する
ための装置の構成を示す。図において、テレビカメラ1
で撮像された画像は、画像二値化部を含む文字識別装置
2のA/Dコンバータ21に入力してデジタルデータ化
され、続くフレームメモリ22に記憶される。フレーム
メモリ22に記憶された画像データは、入力インターフ
ェース23を介してCPU24に取り込まれ、ソフト的
に実現される画像二値化部で、後述する処理によって二
値化される。そして、同じくソフト的に実現される文字
識別部によって識別されて、出力インターフェース25
を経て表示装置3上に表示される。
FIG. 1 shows the configuration of an apparatus for carrying out the method of the present invention. In the figure, a TV camera 1
The image captured by is input to the A / D converter 21 of the character identification device 2 including the image binarization unit, converted into digital data, and stored in the subsequent frame memory 22. The image data stored in the frame memory 22 is taken in by the CPU 24 via the input interface 23, and is binarized by an image binarization unit realized as software by a process described later. The output interface 25 is identified by a character identification unit also realized by software.
Is displayed on the display device 3 through

【0011】上記フレームメモリ22に記憶される画像
は例えば従来技術で既に説明した図9(A)に示すよう
なもので、「7」の文字部L以外に、非常に明るい背景
部B1や、上記文字部Lに近接してこれよりもやや暗い
中間濃度の背景部B2が存在している。文字部Lを確実
に識別するためには、これに近接する上記背景部B2の
二値形状化を阻止する必要がある。
The image stored in the frame memory 22 is, for example, as shown in FIG. 9 (A) which has already been described in the prior art, and in addition to the character portion L of "7", a very bright background portion B1 and the like. An intermediate density background portion B2 slightly darker than the character portion L exists near the character portion L. In order to reliably identify the character portion L, it is necessary to prevent the background portion B2 adjacent to the character portion L from being formed into a binary shape.

【0012】そこで、画像二値化部は図2のフロチャー
トで示す手順により画像データの二値化処理を行う。す
なわち、ステップ101では、図9(A)に示すよう
に、画像を、複数の画素を含む複数の四角形の部分領域
Eに分割する。そして、続くステップ102で、各部分
領域E毎に濃度分布ヒストグラムを作成する。例えば図
9(A)の部分領域m,m+1,m−1の各濃度分布ヒ
ストグラムはそれぞれ図3(A),(B),(C)に示
すようなものとなる。このままの状態で、部分領域mの
濃度分布ヒストグラムに対して後述する判別分析法によ
り二値化閾値th1 を求めると、図示斜線の中間濃度部
分が二値化閾値th1 よりも大きくなるため、従来技術
で説明した図9(B)のように、背景部B2が「H」レ
ベルとなって二値形状化されてしまう。なお、部分領域
Eとしては、上述の四角形以外に、例えば、ハニカム形
状(六角形)とすることもできる。
Therefore, the image binarization unit performs the binarization processing of the image data according to the procedure shown in the flowchart of FIG. That is, in step 101, as shown in FIG. 9A, the image is divided into a plurality of rectangular partial regions E including a plurality of pixels. Then, in a subsequent step 102, a density distribution histogram is created for each partial area E. For example, the density distribution histograms of the partial areas m, m + 1, and m-1 in FIG. 9A are as shown in FIGS. 3A, 3B, and 3C, respectively. In this state, when the binarization threshold th1 is obtained from the density distribution histogram of the partial region m by a discriminant analysis method described later, the intermediate density portion indicated by oblique lines in the drawing becomes larger than the binarization threshold th1. As shown in FIG. 9B described above, the background portion B2 becomes the “H” level and is formed into a binary shape. The partial region E may have, for example, a honeycomb shape (hexagonal shape) other than the above-described square shape.

【0013】そこで、本実施形態では、図2のステップ
103において、注目する部分領域mと、これの前後の
部分領域m+1,m−1を含む所定数の部分領域に重み
値を付与し、続くステップ104で、各部分領域の濃度
分布ヒストグラムに重み値を乗じ、これらを加算して、
図4に示すような部分領域mの加重濃度分布ヒストグラ
ムを得る。そして、ステップ105で、判別分析法によ
り上記加重濃度分布ヒストグラムの閾値th2 を算出し
て、これを部分領域mの二値化閾値として採用する。上
記ステップ102〜ステップ105の処理は画像内の各
部分領域について順次全て行う。図5には、ステップ1
03における重み値付与の一例を示す。図では、注目す
る部分領域(m,n)について、二次元的に広がるその
周囲の24個の部分領域に0.05〜0.8の重み値を
付与している。なお、これら重み値および周囲の部分領
域の数は実験的に決定される。
Therefore, in the present embodiment, in step 103 of FIG. 2, a weight value is assigned to the partial area m of interest and the predetermined number of partial areas including the partial areas m + 1 and m-1 before and after this. In step 104, the density distribution histogram of each partial area is multiplied by a weight value, and these are added.
A weighted density distribution histogram of the partial area m as shown in FIG. 4 is obtained. Then, in step 105, the threshold value th2 of the weighted density distribution histogram is calculated by the discriminant analysis method, and this is adopted as the binarization threshold value of the partial region m. The processes in steps 102 to 105 are all sequentially performed on each partial region in the image. FIG. 5 shows step 1
An example of weighting in 03 is shown. In the figure, with respect to the focused partial area (m, n), a weight value of 0.05 to 0.8 is assigned to the surrounding 24 partial areas that spread two-dimensionally. Note that these weight values and the number of surrounding partial regions are experimentally determined.

【0014】上記ステップ104における加重濃度分布
ヒストグラムを得る処理と、ステップ105における二
値化閾値th2 を得る処理とを、理解の容易のために、
注目する部分領域mとこれの前後の部分領域m+1,m
−1について一次元的に行った場合の例を以下に説明す
る。この例では、部分領域mに重み値1を付与し、部分
領域m+1,m−1にそれぞれ重み値0.5を付与して
いる。この場合の加重濃度分布ヒストグラムは、図3
(A)の濃度分布ヒストグラムに、図3(B),(C)
の破線で示す濃度分布ヒストグラムが加算されて、図4
の実線で示すようなものになる。二値化閾値th2 を得
る判別分析法とは、図4に示す双峰性ヒストグラムを、
ある閾値thで二つのクラス(th以下とth+1以
上)に分けたときに、クラス間分散が最大になるような
閾値thを求めるもので、この方法によると双峰性ヒス
トグラムの谷の部分が上記閾値th2 となる。図4より
明らかなように、高濃度の文字部が背景に対して大きな
コントラストを示す部分領域m+1の濃度分布ヒストグ
ラムが加重されることによって、二値化閾値th2 は、
部分領域mのみの濃度分布ヒストグラムから得られた二
値化閾値th1 に対して高濃度側へ大きく移動する。
The processing for obtaining the weighted density distribution histogram in step 104 and the processing for obtaining the binarization threshold th2 in step 105 are described in order to facilitate understanding.
Partial area m of interest and partial areas m + 1 and m before and after this
An example in the case of performing one-dimensionally with respect to −1 will be described below. In this example, a weight value of 1 is assigned to the partial area m, and a weight value of 0.5 is assigned to the partial areas m + 1 and m−1. The weighted density distribution histogram in this case is shown in FIG.
FIGS. 3B and 3C show the density distribution histogram of FIG.
The density distribution histogram shown by the broken line in FIG.
As shown by the solid line. The discriminant analysis method for obtaining the binarization threshold th2 is based on the bimodal histogram shown in FIG.
When a class is divided into two classes (threshold or less and th + 1 or more) at a certain threshold th, a threshold th that maximizes the inter-class variance is obtained. The threshold value is th2. As is apparent from FIG. 4, the binarization threshold th2 is obtained by weighting the density distribution histogram of the partial region m + 1 in which the high density character portion shows a large contrast with respect to the background.
The binarization threshold value th1 obtained from the density distribution histogram of only the partial area m is largely shifted to the high density side.

【0015】したがって、図3(A)に示すように、閾
値th1 に代えて閾値th2 を基準にして部分領域m内
の各画素の二値化を行えば、図示斜線の中間濃度部分は
二値化閾値th2 よりも小さくなって「L」レベルとな
るため、図6に示すように、部分領域mにおいて背景部
B2は二値形状化されることなく除去される。同様のこ
とは、文字部分を含んだコントラストの大きい各部分領
域に接する部分領域p,q,rにおいても生じ、これら
部分領域p,q,rにおいて、背景部B2は二値形状化
されることなく除去される。このようにして、文字部L
の近傍にある中間濃度の背景部B2が除去されて、両者
が分離されるから、従来のように二値化された文字部L
が変形して識別不能になるという不具合は生じない。
Therefore, as shown in FIG. 3A, if each pixel in the partial area m is binarized with reference to the threshold value th2 instead of the threshold value th1, the intermediate density portion of the hatched portion in the drawing is binarized. Since it is smaller than the threshold value th2 and becomes the "L" level, as shown in FIG. 6, the background portion B2 in the partial region m is removed without being formed into a binary shape. The same occurs in the partial areas p, q, and r that are in contact with each of the high-contrast partial areas including the character part. In these partial areas p, q, and r, the background portion B2 is formed into a binary shape. Removed without. Thus, the character portion L
Is removed, and the background portion B2 of intermediate density is removed and the two portions are separated from each other.
There is no problem that the image is deformed and cannot be identified.

【0016】本実施形態では図2のステップ106,1
07を設けることにより、さらに文字部Lを確実に識別
できるようにしている。すなわち、ステップ106で
は、各部分領域(m,n)で判別分析法を使用して算出
された二値化閾値thm,n について、その確からしさの
評価値ηm,n を求め、続くステップ107では、評価値
ηm,n の大きい適正な二値化閾値thm,n (すなわち文
字部Lを含みコントラストの大きい部分領域の二値化閾
値)を、評価値の小さい二値化閾値を有する周辺の部分
領域(すなわち中間濃度の背景部B2を含む部分領域)
に伝播させる。この伝播は具体的には以下のように行
う。まず、前提となる判別分析法について説明する。部
分領域内の全画素数をN、濃度レベルをL、濃度iの頻
度(画素数)をh(i)とすると、全体の濃度平均μ、
および閾値th以下とth+1以上の各クラスの平均濃
度μ1 ,μ2 は下式(1)〜(3)で算出される。
In this embodiment, steps 106 and 1 in FIG.
By providing 07, the character portion L can be further reliably identified. That is, in step 106, an evaluation value ηm, n of the likelihood of the binarization threshold thm, n calculated by using the discriminant analysis method in each partial area (m, n) is obtained. , An appropriate binarization threshold thm, n having a large evaluation value ηm, n (that is, a binarization threshold of a partial region including a character portion L and having a high contrast) is replaced with a peripheral portion having a binarization threshold having a small evaluation value. Region (that is, a partial region including the middle density background portion B2)
To be propagated. This propagation is performed specifically as follows. First, a discriminant analysis method as a premise will be described. Assuming that the total number of pixels in the partial region is N, the density level is L, and the frequency (number of pixels) of the density i is h (i),
The average concentrations μ1 and μ2 of each class equal to or smaller than the threshold th and equal to or larger than th + 1 are calculated by the following equations (1) to (3).

【0017】[0017]

【数1】 (Equation 1)

【0018】また、各クラスの分布割合ω1 , ω2 を下
式(4)、(5)で表せば、クラス間分散は下式(6)
で求められ、このクラス間分散を最大にする閾値thを
二値化閾値thm,n とする。
If the distribution ratios ω1 and ω2 of each class are expressed by the following equations (4) and (5), the inter-class variance is expressed by the following equation (6).
The threshold th that maximizes this inter-class variance is defined as a binarization threshold thm, n.

【0019】[0019]

【数2】 (Equation 2)

【0020】ステップ106における、二値化閾値th
m,n の評価値ηm,n は下式(7)で算出される。この評
価値ηm,n は0から1の間の値をとり、1に近いほど分
離度が高いことを示す。
In step 106, the binarization threshold th
The evaluation value ηm, n of m, n is calculated by the following equation (7). The evaluation value ηm, n takes a value between 0 and 1, indicating that the closer to 1, the higher the degree of separation.

【0021】 [0021]

【数3】 (Equation 3)

【0022】ここで、σ2 は濃度の分散で、下式(8)
で表される。
Here, σ 2 is the variance of the density, and the following equation (8)
It is represented by

【0023】[0023]

【数4】 (Equation 4)

【0024】ステップ107における二値化閾値thm,
n の伝播は以下のように行う。すなわち、最初に各部分
領域の重み値Wを下式(9)で決定しておく。
In step 107, the binarization threshold thm,
Propagation of n is performed as follows. That is, first, the weight value W of each partial region is determined by the following equation (9).

【0025】[0025]

【数5】 (Equation 5)

【0026】ここで、thηは定数で、例えば0.7で
ある。
Here, thη is a constant, for example, 0.7.

【0027】次に、注目する部分領域(m,n)の重み
値W(m,n)が定数thW (例えば0.95)以下で
ある場合には、周囲の各部分領域の二値化閾値とその重
み値をもとに、下式(10),(11)で当該部分領域
(m,n)の新たな二値化閾値th´m,n と重み値W´
(m,n)を算出する。なお、部分領域(m,n)の重
み値W(m,n)が定数thW より大きい場合には、二
値化閾値thm,n はそのままとする。
Next, when the weight value W (m, n) of the focused partial area (m, n) is equal to or smaller than a constant thW (for example, 0.95), the binarization threshold of each surrounding partial area is set. And a new threshold value th'm, n and a weight value W 'of the partial area (m, n) based on the following equations (10) and (11).
(M, n) is calculated. If the weight value W (m, n) of the partial area (m, n) is larger than the constant thW, the binarization threshold thm, n is left as it is.

【0028】[0028]

【数6】 (Equation 6)

【0029】以上の処理を全ての部分領域についてP回
繰り返すことにより、重み値W(m,n)が1以下の領
域の重み値W´(m,n)は次第に1に近づいて行き、
評価値ηm,n の大きい、すなわちコントラストの高い、
文字部Lを含む部分領域の二値化閾値が周辺に伝播し
て、これら周辺の部分領域の二値化閾値が上昇させられ
る。この結果、文字部L近傍において、中間濃度の背景
部B2がさらに確実に除去される。なお、定数thη,
thW は1に近い1以下の値を実験的に定める。また、
二値化閾値の伝播のための繰り返し回数Pも1以上の値
を実験的に定める。なお、Pの値の実例は例えば40回
程度である。
By repeating the above processing P times for all the partial areas, the weight value W '(m, n) of the area where the weight value W (m, n) is 1 or less gradually approaches 1,
The evaluation value ηm, n is large, that is, the contrast is high,
The binarization thresholds of the partial areas including the character portion L propagate to the periphery, and the binary thresholds of these peripheral partial areas are raised. As a result, in the vicinity of the character portion L, the background portion B2 having the intermediate density is more reliably removed. Note that the constant thη,
thW is experimentally set to a value of 1 or less close to 1. Also,
The number of repetitions P for propagation of the binarization threshold is also experimentally set to a value of 1 or more. The actual value of P is, for example, about 40 times.

【0030】さて、部分領域内の全ての画素に同一の二
値化閾値thm,n を適用すると、各部分領域の境界で二
値化閾値が急激に変化するおそれがある。そこで、これ
を防止するため、図2のステップ108では、各部分領
域内の各画素毎の二値化閾値を内挿補間によって決定す
る。これは、図7に示すように、部分領域(m,n)の
中心画素をp(m,n)として、ここに二値化閾値th
m,n を付与し、p(m,n),p(m+1,n),p
(m,n+1),p(m+1,n+1)を頂点とする四
角形の内部にある注目画素pの二値化閾値thp を、下
式(12)で求めるものである。
If the same binarization threshold thm, n is applied to all pixels in the partial region, the binary threshold may suddenly change at the boundary of each partial region. Therefore, in order to prevent this, in step 108 of FIG. 2, the binarization threshold for each pixel in each partial region is determined by interpolation. This is, as shown in FIG. 7, where the center pixel of the partial area (m, n) is p (m, n), and the binarization threshold th
m, n, p (m, n), p (m + 1, n), p
The binarization threshold thp of the target pixel p inside the rectangle having the vertices of (m, n + 1) and p (m + 1, n + 1) is obtained by the following equation (12).

【0031】[0031]

【数7】 (Equation 7)

【0032】ここで、a,bは、注目画素pのx,y座
標値が上記四角形の辺を内分した時の比である(図
7)。
Here, a and b are ratios when the x and y coordinate values of the target pixel p internally divide the sides of the rectangle (FIG. 7).

【0033】図2のステップ109では、ステップ10
8で決定された二値化閾値thp に基づいて、部分領域
内の各画素pについて濃度の二値化を行う。このよう
に、本実施形態の二値化方法においては、加重濃度分布
ヒストグラムに基づいて各部分領域の二値化閾値を決定
するとともに、評価値の高い二値化閾値をその周囲の部
分領域へ伝播させ、さらに部分領域内の各画素について
その二値化閾値が滑らかに変化するように内挿補間した
ことにより、特に文字部Lの近傍に存在する中間濃度の
背景部B2の二値形状化が確実に阻止されて、その後の
文字識別を良好に行うことができる。
In step 109 of FIG.
Based on the binarization threshold thp determined in step 8, the binarization of the density is performed for each pixel p in the partial area. As described above, in the binarization method of the present embodiment, the binarization threshold of each partial region is determined based on the weighted density distribution histogram, and the binarization threshold having a high evaluation value is transferred to the surrounding partial regions. Propagation and interpolation of each pixel in the partial region so that the binarization threshold value changes smoothly, thereby forming a binary shape of the intermediate density background portion B2 especially near the character portion L. Is reliably prevented, and subsequent character identification can be performed satisfactorily.

【0034】なお、上記実施形態において、ステップ1
06〜ステップ108を省略しても、中間濃度背景部の
二値形状化を阻止する効果は十分得ることができる。ま
た、上記実施形態における文字部Lとしては、本来の文
字のみならず、絵や記号等が含まれる。さらに、部分領
域には必ずしも複数の画素を含む必要はなく、部分領域
を各画素(つまり含まれる画素は1画素)とすることも
できる。この場合、ヒストグラムは次のような方法で求
められる。例えば、注目領域(=画素)の明度が10
0、重み値が1ならば、そのヒストグラムで明度100
の頻度が1だけ増やされる。この時、周辺領域(=画
素)の明度が80、重み値が0.5ならば、上記ヒスト
グラムで明度80の頻度が0.5だけ増やされる。
In the above embodiment, step 1
Even if steps 06 to 108 are omitted, the effect of preventing the intermediate density background portion from being binarized can be sufficiently obtained. Further, the character portion L in the above embodiment includes not only original characters but also pictures and symbols. Further, the partial region does not necessarily need to include a plurality of pixels, and the partial region may be each pixel (that is, one pixel is included). In this case, the histogram is obtained by the following method. For example, if the brightness of the attention area (= pixel) is 10
If the weight is 0 and the weight is 1, the brightness is 100 in the histogram.
Is increased by one. At this time, if the brightness of the peripheral area (= pixel) is 80 and the weight value is 0.5, the frequency of the brightness 80 in the histogram is increased by 0.5.

【0035】以上の処理をCPUで実現するプログラム
は媒体に記録された状態で提供することができる。この
プログラムを記憶した媒体としては、例えばフレキシブ
ルディスク、CD−ROM、メモリカード等がある。媒
体に記録されたプログラムは、文字識別装置に備えられ
ているメモリにインストールされることにより、このプ
ログラムが実行されて、画像二値化部や文字識別部が実
現される。
A program for realizing the above processing by the CPU can be provided in a state recorded on a medium. Examples of a medium storing the program include a flexible disk, a CD-ROM, and a memory card. The program recorded on the medium is installed in a memory provided in the character identification device, whereby the program is executed to realize an image binarization unit and a character identification unit.

【0036】[0036]

【発明の効果】以上のように、本発明の画像の二値化方
法によれば、文字部等に近接した背景部が二値形状化さ
れるのを、より確実に阻止して、文字部等の識別性を格
段に向上させることができる。
As described above, according to the image binarization method of the present invention, it is possible to more reliably prevent a background portion close to a character portion or the like from being formed into a binary shape. And the like can be significantly improved.

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

【図1】本発明の方法を実施する装置のブロック構成図
である。
FIG. 1 is a block diagram of an apparatus for implementing a method of the present invention.

【図2】CPUにおける二値化の手順を示すフローチャ
ートである。
FIG. 2 is a flowchart showing a procedure of binarization in a CPU.

【図3】各部分領域の濃度分布ヒストグラムである。FIG. 3 is a density distribution histogram of each partial region.

【図4】注目する部分領域の加重濃度分布ヒストグラム
である。
FIG. 4 is a weighted density distribution histogram of a partial area of interest.

【図5】各部分領域に対する重み値付与の一例を示す図
である。
FIG. 5 is a diagram illustrating an example of assigning a weight value to each partial region.

【図6】本発明の効果を示す二値化画像の概念的正面図
である。
FIG. 6 is a conceptual front view of a binarized image showing the effect of the present invention.

【図7】二値化閾値の内挿補間を説明する画像面の概念
的正面図である。
FIG. 7 is a conceptual front view of an image plane for explaining interpolation of a binarization threshold.

【図8】画像面の概念的正面図である。FIG. 8 is a conceptual front view of an image plane.

【図9】画像面の概念的正面図である。FIG. 9 is a conceptual front view of an image plane.

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

1…テレビカメラ、2…文字識別装置、24…CPU、
3…表示装置。
1 ... TV camera, 2 ... character identification device, 24 ... CPU,
3. Display device.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 (1)得られた画像を複数の部分領域に
分割するステップと、(2)前記各部分領域毎に濃度分
布ヒストグラムを作成するステップと、(3)注目する
部分領域と少なくともこれの前後の所定数の部分領域に
重み値を付与するステップと、(4)前記各部分領域の
濃度分布ヒストグラムに前記重み値を乗じて加算して前
記注目する部分領域の加重濃度分布ヒストグラムを得る
ステップと、(5)前記加重濃度分布ヒストグラムに基
づいて前記注目する部分領域の二値化閾値を設定するス
テップと、(6)前記二値化閾値を基準にして前記注目
する部分領域内の各画素について濃度の二値化を行うス
テップと、 を具備し、画像内の全ての部分領域について(3)から
(6)の各ステップを繰り返すことを特徴とする画像の
二値化方法。
1. A step of dividing an obtained image into a plurality of partial areas; a step of creating a density distribution histogram for each of the partial areas; Assigning a weight value to a predetermined number of partial areas before and after this; and (4) multiplying the density distribution histogram of each partial area by the weight value and adding the result to obtain a weighted density distribution histogram of the focused partial area. Obtaining; (5) setting a binarization threshold value of the partial area of interest based on the weighted density distribution histogram; and (6) setting a binarization threshold value of the partial area of interest based on the binary threshold value. Binarizing the density of each pixel, and repeating the steps (3) to (6) for all partial regions in the image. Law.
JP9099664A 1997-03-31 1997-03-31 Binarization method for image Pending JPH10285399A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9099664A JPH10285399A (en) 1997-03-31 1997-03-31 Binarization method for image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9099664A JPH10285399A (en) 1997-03-31 1997-03-31 Binarization method for image

Publications (1)

Publication Number Publication Date
JPH10285399A true JPH10285399A (en) 1998-10-23

Family

ID=14253316

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9099664A Pending JPH10285399A (en) 1997-03-31 1997-03-31 Binarization method for image

Country Status (1)

Country Link
JP (1) JPH10285399A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001209751A (en) * 2000-01-28 2001-08-03 Olympus Optical Co Ltd Adaptive binarization system
JP2007334876A (en) * 2006-06-19 2007-12-27 Reallusion Inc System and method for processing document image
CN100446538C (en) * 2005-11-02 2008-12-24 致伸科技股份有限公司 Monochrome image processing system and method for removing background of image based on dynamic data
JP2009094905A (en) * 2007-10-10 2009-04-30 Canon Inc Information processing apparatus and information processing method
JP2010186401A (en) * 2009-02-13 2010-08-26 Nippon Telegr & Teleph Corp <Ntt> Apparatus, method, and program for processing image and recording medium
JP2013065277A (en) * 2011-09-01 2013-04-11 Ricoh Co Ltd Image projection device, image processing device, image projection method, image projection method program and recording medium with recorded program
JP2013171469A (en) * 2012-02-21 2013-09-02 Fujitsu Ltd Image processing apparatus, binarization threshold calculation method, and computer program
JP2017111129A (en) * 2015-12-11 2017-06-22 国立大学法人旭川医科大学 Contour extraction device, contour extraction method and program

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001209751A (en) * 2000-01-28 2001-08-03 Olympus Optical Co Ltd Adaptive binarization system
CN100446538C (en) * 2005-11-02 2008-12-24 致伸科技股份有限公司 Monochrome image processing system and method for removing background of image based on dynamic data
JP2007334876A (en) * 2006-06-19 2007-12-27 Reallusion Inc System and method for processing document image
JP2009094905A (en) * 2007-10-10 2009-04-30 Canon Inc Information processing apparatus and information processing method
JP2010186401A (en) * 2009-02-13 2010-08-26 Nippon Telegr & Teleph Corp <Ntt> Apparatus, method, and program for processing image and recording medium
JP2013065277A (en) * 2011-09-01 2013-04-11 Ricoh Co Ltd Image projection device, image processing device, image projection method, image projection method program and recording medium with recorded program
JP2013171469A (en) * 2012-02-21 2013-09-02 Fujitsu Ltd Image processing apparatus, binarization threshold calculation method, and computer program
JP2017111129A (en) * 2015-12-11 2017-06-22 国立大学法人旭川医科大学 Contour extraction device, contour extraction method and program

Similar Documents

Publication Publication Date Title
CN108229526B (en) Network training method, network training device, image processing method, image processing device, storage medium and electronic equipment
JP3348167B2 (en) Image binarization device
JP2010525486A (en) Image segmentation and image enhancement
JP2008148298A (en) Method and apparatus for identifying regions of different content in image, and computer readable medium for embodying computer program for identifying regions of different content in image
JP2001118062A (en) Automatic dynamic range compressing method
JPH10285399A (en) Binarization method for image
JPS61141087A (en) Method and device for processing picture
JP3636936B2 (en) Grayscale image binarization method and recording medium recording grayscale image binarization program
JP2004199622A (en) Apparatus and method for image processing, recording media, and program
CN114418848B (en) Video processing method and device, storage medium and electronic equipment
JP2002135623A (en) Device/method for removing noise and computer-readable recording medium
JP4409713B2 (en) Document image recognition apparatus and recording medium
JP4116377B2 (en) Image processing method and image processing apparatus
JPH10269352A (en) Image processor and method
JPH0624014B2 (en) Gray image processing method
JPH06301775A (en) Picture processing method, picture identification method and picture processor
JP2732608B2 (en) Background image erasing and binarization processing method for linear figure image and apparatus therefor
JP2511068B2 (en) Character string detector
JP2008283724A (en) Method, apparatus and program for image processing
JP3989647B2 (en) Image processing method, apparatus, and recording medium
JPH1189823A (en) Method and device for discriminating image and storage medium
JPH10124665A (en) Method for processing picture and device therefor
CN116309664A (en) Automatic image clipping method and device, electronic equipment and storage medium
JP2000331118A (en) Image processor and recording medium
JPH1139479A (en) Method for evaluating definition