JPH0656615B2 - Binarization threshold decision method - Google Patents

Binarization threshold decision method

Info

Publication number
JPH0656615B2
JPH0656615B2 JP61293859A JP29385986A JPH0656615B2 JP H0656615 B2 JPH0656615 B2 JP H0656615B2 JP 61293859 A JP61293859 A JP 61293859A JP 29385986 A JP29385986 A JP 29385986A JP H0656615 B2 JPH0656615 B2 JP H0656615B2
Authority
JP
Japan
Prior art keywords
local
average density
value
threshold value
bimodal
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 - Lifetime
Application number
JP61293859A
Other languages
Japanese (ja)
Other versions
JPS63146173A (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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP61293859A priority Critical patent/JPH0656615B2/en
Publication of JPS63146173A publication Critical patent/JPS63146173A/en
Publication of JPH0656615B2 publication Critical patent/JPH0656615B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は文字等の2値図形を含む多値画像を2値画像に
変換する2値化しきい値決定方式に関し、特に局所的2
値化における2値化しきい値決定方式に関する。
Description: TECHNICAL FIELD The present invention relates to a binarization threshold value determination method for converting a multivalued image including a binary figure such as a character into a binary image, and particularly, a local threshold value determination method.
The present invention relates to a binarization threshold value determination method in binarization.

(従来の技術) 手書きや印字された文字を読取る文字認識装置の利用範
囲の一つとして、近年我々の身近かにある多くの文書や
郵便物等の文字を読取ることが必要となって来た。文字
認識装置等のように、2値図形を対象とする場合には処
理量等の観点からスキャナーなどの画像入力装置により
多値画像として取り込まれると、2値化回路などを用い
て2値画像に変換されるのが一般的である。2値化処理
では、入力画像の濃度値を白黒の2値に量子化するため
に、2値化のしきい値の決定が重要である。
(Prior Art) As one of the application areas of a character recognition device that reads handwritten or printed characters, it has become necessary to read characters of many documents and mails that are familiar to us in recent years. . In the case of targeting a binary figure such as a character recognition device, if it is captured as a multi-valued image by an image input device such as a scanner from the viewpoint of processing amount, a binary image is obtained using a binarization circuit. Is generally converted to. In the binarization process, it is important to determine the threshold value for binarization in order to quantize the density value of the input image into binary black and white.

2値化しきい値を決める方法として、予め経験的にしき
い値を固定的に決める方法は、最も簡単である。しか
し、入力対象や画像入力装置の性能等によって入力条件
が変化することが多いため、入力画像あるいは入力画像
の部分領域に応じてしきい値を決めることが必要とな
る。その方法として、2値化したい画素近傍内の平均濃
度をしきい値とするものなどがあるが、単純な平均濃度
値のみでは、文字等の対象物を含まない場合や対象物と
背景との画素の割合によって2値化しきい値が不安定と
なることがある。
As a method of determining the binarized threshold value, the method of empirically fixing the threshold value in advance is the simplest. However, since the input condition often changes depending on the input object, the performance of the image input apparatus, etc., it is necessary to determine the threshold value according to the input image or the partial area of the input image. As a method therefor, there is a method in which the average density in the vicinity of the pixel to be binarized is used as a threshold value. However, if a simple average density value alone does not include an object such as a character or the object and the background The binarization threshold may become unstable depending on the pixel ratio.

このほか対象物の面積が予め既知の場合に用いられるP
タイル法や、電子通信学会論文誌VOL.63−D,N
O.42,PP349〜356「判別および最小2乗規
準に基づく自動しきい値選定法」に示されているよう
に、濃度ヒストグラムが背景と文字等の対象物とによる
双峰性分布になるとして判別分析の規準を用いて2値化
しきい値を決める方式がある。しかしながら、郵便物や
一般文書にも画像内に存在する対象物の濃度が一様でな
い場合や種々の紙質の背景が利用される場合が存在する
ため、2値化しきい値を局所的に決める必要が生じる。
この場合、電子通信学会、(パターン認識と学習)研究
会資料PRL85−73「情景画像中からの文字抽出法
の検討」に示されているように、局所領域毎に既存の2
値化しきい決定法により得られた2値化しきい値を各局
所領域間で線形補間を行う方式が提案されているが、各
局所領域で得られた2値化しきい値は、例えば背景のみ
の局所領域では意味がなく不安定であるため、局所領域
の2値化しきい値を用いた線形補間では雑音が生じたり
して十分な精度が得られない。また、線形補間を用いる
と、例えば文字などのような対象物と背景との境界領域
がぼけることもある。
In addition, P used when the area of the object is known in advance
Tile method and IEICE Transactions VOL. 63-D, N
O. 42, PP 349 to 356 "Discriminant Analysis and Discriminant Analysis Based on Least Squares Criteria", assuming that the density histogram has a bimodal distribution between the background and an object such as a character. There is a method of deciding the binarization threshold value using the criterion of. However, it is necessary to locally determine the binarization threshold value because the density of the object existing in the image may not be uniform in the mail or general document, or the background of various paper quality may be used. Occurs.
In this case, as shown in the PTL85-73 “Study on Character Extraction Method from Scene Image” by the Institute of Electronics and Communication Engineers (Pattern Recognition and Learning) Study Group, existing 2
A method of linearly interpolating a binarization threshold value obtained by the binarization threshold determination method between each local region is proposed, but the binarization threshold value obtained in each local region is, for example, only for the background. Since it is meaningless and unstable in the local region, noise may occur in the linear interpolation using the binarization threshold value of the local region, and sufficient accuracy cannot be obtained. In addition, when linear interpolation is used, the boundary area between an object such as a character and the background may be blurred.

(発明が解決しようとする問題点) 本発明の目的は、局所的2値化方式を用いて従来の問題
点を解決すべく、局所領域毎に得られた2値化しきい値
によって分類された局所的な背景と対象との性質を表わ
す2つの平均濃度値等の1次モーメント特徴(統計)量
を基にして、各局所領域の性質を分類し、近傍局所領域
の性質や1次モーメント特徴量も含めて、適応的に2値
化しきい値を決定することによって、処理計算量を増や
すことなく、しかも安定に局所的2値化ができる2値化
方式を提供することにある。
(Problems to be Solved by the Invention) The object of the present invention is classified according to the binarization threshold value obtained for each local region in order to solve the conventional problems using the local binarization method. The properties of each local region are classified based on the first moment feature (statistical) quantities such as two average density values that represent the properties of the local background and the target, and the properties of neighboring local regions and the first moment features are classified. An object of the present invention is to provide a binarization method capable of performing stable local binarization without increasing the processing calculation amount by adaptively determining the binarization threshold including the amount.

(問題点を解決するための手段) 本発明の第1の発明は、多値入力画像上の局所領域内の
各画素の濃度値を背景及び対象を示す2つのクラスに分
類し、前記局所領域の平均濃度値と各クラス毎の平均濃
度値とその画素数とを前記局所領域の特徴値として抽出
する手段と、前記特徴値に従って前記局所領域を単峰性
または双峰性に分類する手段と、前記局所領域の近傍局
所領域を含む複数個の局所領域から双峰性局所領域群を
選択し、前記双峰性局所領域群の複数個の前記特徴値に
従って背景平均濃度値及び対象平均濃度値を算出し、前
記局所領域の2値化しきい値を決定する手段と、前記複
数個の局所領域が予め設定された個数以上の前記双峰性
局所領域を含まないとき既に決定された前記1つないし
複数個の局所領域の2値化しきい値あるいは予め設定さ
れたしきい値を前記局所領域の2値化しきい値とする手
段とを備えて構成される。
(Means for Solving Problems) The first invention of the present invention is to classify the density value of each pixel in a local area on a multivalued input image into two classes indicating a background and an object, Means for extracting the average density value of, the average density value for each class, and the number of pixels thereof as the feature value of the local region, and means for classifying the local region into monomodal or bimodal according to the feature value. , A bimodal local region group is selected from a plurality of local regions including local regions in the vicinity of the local region, and the background average density value and the target average density value are selected according to the plurality of characteristic values of the bimodal local region group. And means for determining a binarization threshold of the local region, and the one previously determined when the plurality of local regions do not include a preset number or more of the bimodal local regions. There is a binarization threshold for multiple local regions Or means for setting a preset threshold value as a binarization threshold value of the local area.

本発明の第2の発明は、多値入力画像上の局所領域内の
各画素の濃度値を背景及び対象を示す2つのクラスに分
類し、前記局所領域の平均濃度値と各クラス毎の平均濃
度値と画素数とを前記局所領域の特徴値として抽出する
手段と、前記特徴値に従って前記局所領域を単峰性また
は双峰性に分類する手段と、前記局所領域の近傍局所領
域を含む複数個の局所領域から双峰性局所領域群を選択
し、前記双峰性局所領域群の複数個の前記特徴値に従っ
て算出した背景平均濃度値及び対象平均濃度値を基にし
てしきい値を算出する手段と、前記複数個の局所領域か
ら単峰性局所領域群を選択し、前記単峰性局所領域の平
均濃度値を前記しきい値に従って背景又は対象に属する
か否かを判定し、複数個の前記単峰性局所領域の平均濃
度値を含めて、前記背景平均濃度値及び対象平均濃度値
を修正する手段と、前記背景平均濃度値及び対象平均濃
度値から前記局所領域の2値化しきい値を決定する手段
と、前記複数個の局所領域が予め設定された個数以上の
前記双峰性局所領域を含まないとき既に決定された前記
1つないし複数個の2値化しきい値あるいは予め設定さ
れたしきい値を前記局所領域の2値化しきい値とする手
段とを備えて構成される。
A second aspect of the present invention is to classify the density value of each pixel in a local area on a multi-valued input image into two classes indicating a background and an object, and to calculate the average density value of the local area and the average for each class. Means for extracting the density value and the number of pixels as the characteristic value of the local area, means for classifying the local area into unimodal or bimodal according to the characteristic value, and a plurality of local areas in the vicinity of the local area A bimodal local region group is selected from the individual local regions, and a threshold value is calculated based on the background average density value and the target average density value calculated according to the plurality of feature values of the bimodal local area group. Means for selecting a unimodal local region group from the plurality of local regions, determine whether the average density value of the unimodal local region belongs to the background or the object according to the threshold value, Including the average density value of the unimodal local region A means for correcting the background average density value and the target average density value, a means for determining the binarization threshold value of the local area from the background average density value and the target average density value, and the plurality of local areas are preset. When the number of the bimodal local regions is not equal to or more than a predetermined number, the one or more binarization thresholds already determined or a preset threshold is set as the binarization threshold of the local region. And means for doing so.

(作用) 本発明において、局所領域毎に得られた背景と対象との
性質を表わす2つの平均濃度値等の1次モーメント特徴
量に従って局所領域の性質を調べる。次に、近傍局所領
域も含めた領域の性質を各局所領域の性質を用いて調
べ、近傍局所領域も含めた領域の性質に従って、各局所
領域等の一次モーメント特徴量から適応的に局所領域毎
の2値化しきい値を決定することによって、簡単にしか
も精度良く安定に多値画像を2値画像に変換することが
できる。
(Operation) In the present invention, the property of the local region is examined according to the first moment feature amount such as two average density values representing the property of the background and the target obtained for each local region. Next, the properties of the regions including the neighboring local regions are examined by using the properties of the respective local regions, and according to the properties of the regions including the neighboring local regions, each local region is adaptively adaptive to each local region from the first-order moment feature amount. By determining the binarization threshold value of, the multivalued image can be easily and accurately converted into a binary image.

(実施例) 以下、本発明における具体的実施例について図面を参照
しつつ説明する。第1図は、多値画像イメージに対する
局所領域を2値化した場合の特徴の一例を示した図表で
ある。
(Examples) Hereinafter, specific examples of the present invention will be described with reference to the drawings. FIG. 1 is a table showing an example of features when a local area for a multi-valued image image is binarized.

第1図(a)において、図中3つの矩形で示した局所領域
X・Y・Zは、それぞれ対象と背景が混在する領域(例
えば文字部など)・対象領域・背景領域を示す。第1図
(b)は第1図(a)に示した局所領域Xの濃度分布(横軸は
濃度値、縦軸は画素数で表わした頻度を示す)である。
同様に第1図(c)は第1図(a)に示した局所領域Yの濃度
分布、第1図(d)は第1図(a)に示した局所領域Zの濃度
分布を示している。第1図(b)〜(d)で示した局所領域の
濃度分布を図中斜線で示した対象と斜線のない背景とに
分類する方法は、従来の2値化方式を用いてしきい値S
Lを決めることができる。
In FIG. 1 (a), local areas X, Y, and Z indicated by three rectangles in the drawing represent an area (for example, a character portion) in which an object and a background are mixed, an object area, and a background area. Fig. 1
(b) is the density distribution of the local region X shown in FIG. 1 (a) (the horizontal axis represents the density value and the vertical axis represents the frequency expressed in the number of pixels).
Similarly, FIG. 1 (c) shows the concentration distribution of the local region Y shown in FIG. 1 (a), and FIG. 1 (d) shows the concentration distribution of the local region Z shown in FIG. 1 (a). There is. The method of classifying the density distribution in the local area shown in FIGS. 1 (b) to (d) into the shaded objects and the background without shaded lines is the threshold value using the conventional binarization method. S
You can decide L.

その結果、局所領域の特徴量として局所領域の全平均濃
度値μTと全画素数N,及び対象を示す領域(以下対
象クラスと呼ぶ)の平均濃度値μとその画素数N
及び背景を示す領域(以下背景クラスと呼ぶ)の平均濃
度値μとその画素数Nが抽出される。ここで、全画
素数Nは対象クラス画素数Nと背景クラスNの和
として表現できる。なお、前述した局所領域の特徴量
は、一次モーメントまでの計算で済むため、容易に計算
できる。
As a result, the total average density value μT and the total number of pixels N T of the local area as the feature amount of the local area, and the average density value μ 1 of the area indicating the target (hereinafter referred to as the target class) and the number of pixels N 1 ,
Also, the average density value μ 0 of the area indicating the background (hereinafter referred to as the background class) and the number of pixels N 0 thereof are extracted. Here, the total number of pixels N T can be expressed as the sum of the number of target class pixels N 1 and the background class N 0 . Note that the above-described feature amount of the local area can be easily calculated because the calculation up to the first moment is sufficient.

局所領域毎にしきい値を決めて多値画像を2値画像に変
換する場合、例えば、第1図(a)で示したように、背景
のみからなる局所領域Zや対象のみからなる局所領域Y
がしきい値SLによって2つに分けられ、背景に雑音が
生じたり対象かかすれたりすることになる。また、局所
領域間でしきい値が極端に異なると、疑似的な境界線が
生じることにもあり、局所領域間で何らかの平滑化処理
も必要となる。
When a multi-valued image is converted into a binary image by setting a threshold value for each local area, for example, as shown in FIG. 1 (a), a local area Z consisting only of the background or a local area Y consisting of only the target.
Is divided into two by the threshold value SL, which causes noise in the background or makes the target faint. Further, if the thresholds are extremely different between the local regions, a pseudo boundary line may occur, and some smoothing processing is required between the local regions.

そこで本発明における局所2値化方法では、局所領域毎
に抽出された2値化しきい値の代わりに、局所領域毎に
得られる対象クラス及び背景クラスの平均濃度値を基に
処理を行い、局所領域毎に単峰性(第1図(c)及び第1
図(d)のような場合)か双峰性(第1図(b)のような場
合)に分類し、局所領域毎の2値化しきい値の決定は近
傍局所領域の特徴も含めて決定することにより前述した
問題点の解決をはかるようにしている。また、局所領域
の近傍領域も含めても2値化しきい値決定が困難な場合
には、既に抽出された2値化しきい値や予め設定された
しきい値を利用することができる。
Therefore, in the local binarization method of the present invention, instead of the binarization threshold value extracted for each local region, processing is performed based on the average density value of the target class and background class obtained for each local region, Unimodality for each region (Fig. 1 (c) and 1
(Fig. (D)) or bimodal (Fig. 1 (b)), and the binarization threshold value for each local region is determined by including the features of neighboring local regions. By doing so, the above-mentioned problems are solved. Further, when it is difficult to determine the binarization threshold value including the neighborhood area of the local area, the already extracted binarization threshold value or a preset threshold value can be used.

第2図は本発明における局所的2値化しきい値決定方式
の原理を説明した図表である。第2図(a)において、局
所領域Eの2値化しきい値を決めるために3×3の近傍
局所領域A〜Iの特徴量を用いる。各局所領域iの特徴
量として、全平均濃度値μ(i)(但し、iは局所領域
名A〜Iを示す)・対象クラス平均濃度μ(i)・背景
クラス平均濃度μ(i),及びそれぞれの画素数NT(i)
(=N0(i)+N1(i))・N1(i)・N0(i)が従来技術により得られ
る。なお、以下の説明では、3×3の近傍領域を考える
が特にこれに固定するものではない。
FIG. 2 is a chart for explaining the principle of the local binarization threshold value determination method in the present invention. In FIG. 2 (a), in order to determine the binarization threshold value of the local area E, the feature quantities of 3 × 3 neighboring local areas A to I are used. As the feature amount of each local area i, the total average density value μ T (i) (where i indicates the local area names A to I), the target class average density μ 1 (i), and the background class average density μ 0 ( i), and the number of pixels N T (i)
(= N 0 (i) + N 1 (i)) · N 1 (i) · N 0 (i) is obtained by the conventional technique. In the following description, a 3 × 3 neighborhood area will be considered, but the area is not limited to this.

最初に、各局所領域iは、単峰性(記号sで示す)か双
峰性(記号bで示す)であるかを分類する。分類する簡
単な一方法として、例えば各局所領域iの対象クラス平
均濃度μ(i)と背景クラス平均濃度μ(i)との差μ
(i)−μ(i)を求め、予め定めたしきい値より大きいか
否かによって単峰性又は双峰性に分類することができ
る。また、分散値を用いて評価することもできる。この
結果、各局所領域A〜Iが第2図(a)に示すように単峰
性s及び双峰性bの如く分類される。次に、第2図(b)
に示す如く双峰性bとなる局所領域A・D・G・Hが選
択され、4個の対象クラス平均濃度値とその画素数及び
4個の背景クラス平均濃度値とその画素数から2値化し
きい値を決定する。
First, each local region i is classified as unimodal (denoted by symbol s) or bimodal (denoted by symbol b). As a simple method of classifying, for example, the difference μ 1 between the target class average concentration μ 1 (i) and the background class average concentration μ 0 (i) of each local region i
(i) −μ 0 (i) can be obtained and classified as unimodal or bimodal depending on whether it is larger than a predetermined threshold value. It is also possible to evaluate using the variance value. As a result, the local regions A to I are classified as a single-peaked s and a double-peaked b as shown in FIG. Next, FIG. 2 (b)
The local areas A, D, G, H having bimodal b are selected as shown in FIG. 3, and the four target class average density values and the number of pixels thereof and the four background class average density values and the number of pixels thereof are binary. Determine the activation threshold.

即ち、第2図(c)で示すように、双峰性bとなる4個の
局所領域の背景クラス平均濃度値 は次式で表わされる。
That is, as shown in FIG. 2 (c), the background class average density value of four local regions having the bimodal b Is expressed by the following equation.

ただし 上述の平均濃度値 と4個の局所領域の対象クラス平均濃度値 とを算出し、それらの平均をもって2値化しきい値SL
は次式のように決定される。
However Average density value above And the average density value of the target class of four local regions And are calculated, and the average of them is used as the binarization threshold value SL.
Is determined by the following equation.

そこで第1の発明の一実施例では上述した2値化しきい
値SLを局所領域Eの2値化しきい値として用いること
により実現される。ここで第1図(a)において、局所領
域Eの近傍局所領域を含めて双峰性局所領域が存在しな
い場合には、既に決定された局所領域の2値化しきい値
を利用する。簡単な方法として、予め設定されたしきい
値や2値化しきい値が決定したら、以前に決まった2値
化しきい値を更新し、それ以降の局所領域のしきい値決
定に利用する。また、既に抽出された2値化しきい値を
すべて残して置き、2値化しきい値を決めるべき領域に
近い1個ないし複数個の2値化しきい値を用いることも
できる。
Therefore, the embodiment of the first invention is realized by using the above-mentioned binarization threshold value SL as the binarization threshold value of the local area E. Here, in FIG. 1 (a), when there is no bimodal local region including the local region in the vicinity of the local region E, the binarized threshold value of the already determined local region is used. As a simple method, when a preset threshold value or a binarization threshold value is determined, the previously determined binarization threshold value is updated and used for subsequent threshold value determination of the local region. It is also possible to leave all the already extracted binarization thresholds and use one or a plurality of binarization thresholds close to the region where the binarization threshold should be determined.

なお、局所領域Eの近傍局所領域を含めてすべて単峰性
局所領域の場合だけでなく、双峰性領域が1個以下の場
合に対しても既に抽出された2値化しきい値を用いるこ
ともできる。
It should be noted that the binarized threshold value already extracted is used not only in the case of all the unimodal local areas including the local areas in the vicinity of the local area E but also in the case of one or less bimodal areas. You can also

次に、第2の発明における一実施例について、第2図
(d)・第2図(c)を用いて説明する。前述した第2図(c)
における第1の発明の一実施例で説明した2値化しきい
値SLを第2図(a)で示した単峰性局所領域B・C・E
・F・Iを用いて2値化しきい値SLを修正し、更新さ
れた局所領域Eの2値化しきい値SLが第2の発明の
一実施例によって決めることができる。
Next, FIG. 2 shows an embodiment of the second invention.
Explanation will be given using (d) and FIG. 2 (c). Figure 2 (c) above
In FIG. 2 (a), the binarized threshold value SL described in the embodiment of the first invention is shown in FIG. 2 (a).
The binarization threshold SL * of the updated local region E can be determined by modifying the binarization threshold SL using F · I according to an embodiment of the second invention.

即ち、第2図(d)で示す如く2値化しきい値SLと5個
の単峰性局所領域の全平均濃度値μ(B)・μ(C)・μ
(E)・μ(F)・μ(I)とをそれぞれ比較し、2値化
しきい値SLよりも大きければその単峰性局所領域は対
象クラス(図中記号1)に分類され、2値化しきい値S
Lよりも小さければその単峰性局所領域を背景クラス
(図中記号0)に分類される。次に、背景クラスと判断
された複数個の局所領域全平均濃度と画素数に対する積
和(第2図(d)に対して は、NT・μ(B)+NT(C)・μ(C)+NT(E)・μ(E)+N
T(F)・μ(F)であり、 はNT(B)+NT(C)+NT(E)+NT(F)である。)計算を行い、第
2図(c)で説明した双峰性局所領域のみに対する背景ク
ラスに対する積和値に加算することによって、背景クラ
ス平均濃度値 を算出する。同様にして、対象クラス平均濃度値 を算出する。この2つの平均濃度値 から局所領域Eにおける2値化しきい値 が決められる。
That is, as shown in FIG. 2 (d), the binarization threshold value SL and the total average density values of five unimodal local regions μ T (B) · μ T (C) · μ
T (E) · μ T (F) · μ T (I) are compared with each other, and if they are larger than the binarization threshold SL, the unimodal local region is classified into the target class (symbol 1 in the figure). Binarization threshold S
If it is smaller than L, the unimodal local area is classified into the background class (symbol 0 in the figure). Next, the sum of products for the total average densities of a plurality of local regions and the number of pixels determined as the background class (for FIG. 2 (d), Is N T・ μ T (B) + N T (C) ・ μ T (C) + N T (E) ・ μ T (E) + N
T (F) · μ T (F), Is N T (B) + N T (C) + N T (E) + N T (F). ) A background class average density value is calculated by performing calculation and adding it to the sum of products for the background class for only the bimodal local region described in FIG. 2 (c). To calculate. Similarly, average density value of the target class To calculate. These two average density values To the binarization threshold in local region E Can be decided.

なお、局所領域E及びその近傍局所領域がすべて単峰性
もしくはそれぞれに準ずる場合には、第1の発明の一実
施例を利用することができる。
When the local area E and the local areas in the vicinity thereof are all unimodal or each of them, one embodiment of the first invention can be used.

第3図は第1の発明の一実施例の構成を示す論理ブロッ
ク図である。
FIG. 3 is a logical block diagram showing the configuration of an embodiment of the first invention.

局所2値化特徴抽出部1は、多値入力画像から局所領域
の濃度分布を求め、濃度分布上でしきい値を決めること
によって、第1図で説明したように、各局所領域毎に全
平均濃度値・背景クラス平均濃度値・対象クラス平均濃
度値及びそれらの画素数(以下、総称して特徴値と呼
ぶ)が抽出されて出力され、局所領域判定部2に順次転
送される。なお、局所2値化特徴抽出部1は公知の技術
を用いることができる。局所領域判定部2は、局所領域
の対象クラス平均濃度値と背景クラス平均濃度値の差を
しきい値により、その局所領域を単峰性かあるいは双峰
性かに分類し、その分類の判定結果を特徴値と共に局所
特徴記憶部3に順次記憶する。双峰性選択部4は、局所
特徴記憶部3から2値化すべき局所領域及び複数個の近
傍局所領域を読み出し、複数個の局所領域のうち、双峰
性に分類された局所領域のみ、双峰性クラス特徴算出部
7へ転送すると共に、双峰性に分類された局所領域の個
数をレジスタ5に記憶する。
The local binarization feature extraction unit 1 obtains the density distribution of the local area from the multi-valued input image, and determines the threshold value on the density distribution, so that as described in FIG. The average density value / background class average density value / target class average density value and the number of pixels thereof (hereinafter collectively referred to as a feature value) are extracted and output, and sequentially transferred to the local area determination unit 2. The local binarization feature extraction unit 1 can use a known technique. The local area determination unit 2 classifies the local area as unimodal or bimodal by using a threshold value as a difference between the target class average density value and the background class average density value of the local area, and determines the classification. The result is sequentially stored in the local feature storage unit 3 together with the feature value. The bimodal selection unit 4 reads the local region to be binarized and a plurality of neighboring local regions from the local feature storage unit 3, and only the local regions classified as bimodal out of the plurality of local regions are bilocalized. The number of local regions classified as bimodal is stored in the register 5 while being transferred to the peak characteristic class calculating unit 7.

双峰性クラス特徴算出部7は、図2(c)で示したように
入力された複数個の双峰性局所領域の背景クラス平均濃
度値μ(b)・対象クラス平均濃度値μ(b)及びそれら
の画素数N(b)とN(b)を用いて、第2図中(c)で示
す双峰性局所領域の背景クラスの積和値 (但し は入力された複数個の双峰性局所領域に対する合計和)
双峰性局所領域の対象クラスの積和値 をそれぞれ算出し、双峰性背景特徴記憶部9及び双峰性
対象特徴記憶部8に格納する。しきい値算出部10は第
2図(c)で示したように、双峰性背景特徴記憶部9と双
峰性対象特徴記憶部8とからそれぞれの積和値を読み出
し、2値化しきい値SLを算出すると次のようになる。
The bimodal class feature calculation unit 7 calculates the background class average density value μ 0 (b) and the target class average density value μ 1 of the plurality of bimodal local regions input as shown in FIG. Using (b) and the number of pixels N 0 (b) and N 1 (b), the sum of products value of the background class of the bimodal local region shown in (c) in FIG. (However, Is the sum of the input bimodal local regions)
Sum of products value of target class of bimodal local region Are calculated and stored in the bimodal background feature storage unit 9 and the bimodal target feature storage unit 8. As shown in FIG. 2 (c), the threshold value calculation unit 10 reads out the respective product sum values from the bimodal background feature storage unit 9 and the bimodal target feature storage unit 8 and binarizes them. The value SL is calculated as follows.

ただし ここで算出された2値化しきい値SLは、2値化しきい
値記憶部11に転送される。以上述べた内容が局所領域
の2値化しきい値を決定する手段となる。なお、ここで
局所2値化特徴抽出部1に入力した多値入力画像を2値
化しきい値記憶部11に転送された2値化しきい値によ
って2値画像に変換している。
However The binarized threshold value SL calculated here is transferred to the binarized threshold value storage unit 11. The contents described above serve as means for determining the binarization threshold value of the local area. The multi-valued input image input to the local binarization feature extraction unit 1 is converted into a binary image by the binarization threshold value transferred to the binarization threshold value storage unit 11.

一方、レジスタ5に記憶された双峰性領域数が2値化し
きい値選択部6に転送されると、2値化しきい値選択部
6は双峰性領域数が予め定められた値以下であれば、前
述したようにして算出した2値化しきい値を用いず、2
値化しきい値記憶部11から既に抽出された局所領域に
より決定された2値化しきい値を選択し、現在、2値化
すべき局所領域の2値化しきい値として決定し、所定の
2値化記憶部11に格納する。
On the other hand, when the number of bimodal regions stored in the register 5 is transferred to the binarization threshold selection unit 6, the binarization threshold selection unit 6 determines that the number of bimodal regions is equal to or less than a predetermined value. If there is, 2 is used without using the binarization threshold value calculated as described above.
The binarization threshold value determined by the local region already extracted from the binarization threshold value storage unit 11 is selected and is determined as the binarization threshold value of the local region to be binarized at present, and predetermined binarization is performed. It is stored in the storage unit 11.

また、2値化しきい値選択部6では、既に抽出された2
値化しきい値を選択する代わりに、あらかじめ設定され
た2値化しきい値を選択することも可能である。
In the binarization threshold selection unit 6, the already extracted 2
Instead of selecting the binarization threshold value, it is also possible to select a preset binarization threshold value.

第4図は、第2の発明の一実施例の構成を示すブロック
図である。
FIG. 4 is a block diagram showing the configuration of an embodiment of the second invention.

第1の発明の一の実施例が、双峰性を示す局所領域のみ
から2値化しきい値を決定するのに対し、第2の発明の
一実施例では第2図(d)・(c)で示したように双峰性を示
す局所領域をベースにして、更に単峰性領域の特徴量も
利用して2値化しきい値を決める点が異なる。すなわ
ち、第4図において、局所2値化特徴抽出部1,局所領
域判定部2,局所特徴記憶部3,双峰性選択部4,レジ
スタ5,2値化しきい値選択部6,双峰性クラス特徴算
出部7,双峰性対象特徴記憶部8,双峰性背景特徴記憶
部9,しきい値算出部10,2値化しきい値記憶部11
の各機能は、第3図で示した第1の発明の一実施例と同
様である。
While the one embodiment of the first invention determines the binarization threshold value only from the local region exhibiting the bimodal characteristic, the one embodiment of the second invention is shown in FIG. The difference is that the binarization threshold value is determined based on the local region exhibiting bimodal characteristics as shown in FIG. That is, in FIG. 4, the local binarization feature extraction unit 1, the local region determination unit 2, the local feature storage unit 3, the bimodality selection unit 4, the register 5, the binarization threshold selection unit 6, the bimodality Class feature calculation unit 7, bimodal target feature storage unit 8, bimodal background feature storage unit 9, threshold value calculation unit 10, binarized threshold value storage unit 11
The respective functions of are similar to those of the first embodiment of the first invention shown in FIG.

そこで、しきい値算出部10によって、第3図に説明し
たように、双峰性局所領域のみから得られた2値化しき
い値は、しきい値記憶部22に格納される。
Therefore, as described with reference to FIG. 3, the threshold value calculation unit 10 stores the binarized threshold value obtained from only the bimodal local region in the threshold value storage unit 22.

次に、単峰性選択部21は第2図(d)で示したように、
2値化すべき局所領域の近傍局所領域のうち単峰性を示
す局所領域を選択し、背景対象判定部23へ単峰性を示
す局所領域の全平均濃度値及び画素数を転送する。背景
対象判定部23は、しきい値記憶部22に格納されたし
きい値と前記局所領域の全平均濃度値と比較し、単峰性
となった局所領域が背景を示すかあるいは対象を示すか
を分類し、背景であれば、単峰性特徴算出部24へ,対
象であれば単峰性対象特徴算出部25へ,全平均濃度値
及び画素数を転送する。単峰性背景特徴算出部24及び
単峰性対象特徴算出部25は、同一な機能を有してお
り、共に入力された全平均濃度値の積和値(例えば、第
2図(e)に示した であり、S0は単峰性で背景を示す局所領域を示す)を
それぞれ背景平均濃度算出部26及び対象平均濃度算出
部27へ転送する。
Next, as shown in FIG. 2 (d), the unimodal selection unit 21
A local region showing unimodality is selected from the local regions near the local region to be binarized, and the total average density value and the number of pixels of the unimodal local region are transferred to the background target determining unit 23. The background target determination unit 23 compares the threshold value stored in the threshold value storage unit 22 with the total average density value of the local region, and the unimodal local region indicates the background or indicates the target. If it is a background, the total average density value and the number of pixels are transferred to the unimodal characteristic calculating unit 24 if it is a background, and to the unimodal target characteristic calculating unit 25 if it is a target. The unimodal background feature calculation unit 24 and the unimodal target feature calculation unit 25 have the same function, and the sum of product values of all the average density values input together (for example, in FIG. Indicated S0 is a monomodal local area indicating the background), and is transferred to the background average density calculation unit 26 and the target average density calculation unit 27, respectively.

また、背景平均濃度算出部26は、第3図で示した双峰
性背景特徴記憶部26及び単峰性背景算出部24の出力
値を用いて、第2図(e)で示した背景平均濃度値 を算出する。同様に、対象平均濃度算出部27は、双峰
性対象特徴記憶部26及び単峰性対象算出部25の出力
値を用いて、第2図(e)で示した背景平均濃度値 を算出する。以上のような方法で背景平均濃度値および
対象平均濃度値を修正する。
Further, the background average density calculation unit 26 uses the output values of the bimodal background feature storage unit 26 and the unimodal background calculation unit 24 shown in FIG. 3 to calculate the background average shown in FIG. 2 (e). Concentration value To calculate. Similarly, the target average density calculation unit 27 uses the output values of the bimodal target feature storage unit 26 and the unimodal target calculation unit 25 to calculate the background average density value shown in FIG. 2 (e). To calculate. The background average density value and the target average density value are corrected by the above method.

最後に、第4図で示した2値化しきい値算出部28はし
きい値算出部10と同一構造であって、2値化しきい値
算出部28へ背景平均濃度算出部26及び対象平均濃度
算出部27の出力値が転送され、ここで局所領域の2値
化しきい値が決定される。
Finally, the binarization threshold value calculation unit 28 shown in FIG. 4 has the same structure as the threshold value calculation unit 10, and the binarization threshold value calculation unit 28 is connected to the background average density calculation unit 26 and the target average density. The output value of the calculation unit 27 is transferred, and the binarization threshold value of the local area is determined here.

(発明の効果) 以上説明したように、本発明で示した局所的2値化しき
い値決定方式を適用することによって、画像内の対象物
の濃度が一様でない場合も局所領域の一次モーメントの
みを使うために、積和計算のみの回路のみを使用すれば
よいので処理量か減少し、しかも安定に2値化しきい値
を決定することができる。
(Effects of the Invention) As described above, by applying the local binarization threshold value determination method shown in the present invention, even when the density of the object in the image is not uniform, only the first-order moment of the local region is obtained. Since it is necessary to use only the circuit for calculating the sum of products, the processing amount is reduced and the binarization threshold value can be stably determined.

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

第1図は多値画像に対する局所領域を2値化した場合の
特徴の一例を示した図表、第2図は本発明における局所
的2値化しきい値決定方式の原理を説明した図表、第3
図は本発明の第1の実施例の構成を示すブロック図、第
4図は本発明の第2の実施例の構成を示すブロック図。 1は局所2値化特徴抽出部、2は局所領域判定部、3は
局所特徴記憶部、4は双峰性選択部、5はレジスタ、6
は2値化しきい値選択部、7は双峰性クラス特徴算出
部、8は双峰性対象特徴記憶部、9は双峰性背景特徴記
憶部、10はしきい値算出部、11は2値化しきい値記
憶部、21は単峰性選択部、22はしきい値記憶部、2
3は背景対象判定部、24は単峰性背景特徴算出部、2
5は単峰性対象算出部、26は背景平均濃度算出部、2
7は対象平均濃度算出部、28は2値化しきい値算出
部。
FIG. 1 is a chart showing an example of features when a local region for a multi-valued image is binarized, and FIG. 2 is a chart explaining the principle of a local binarization threshold value determination method in the present invention.
FIG. 4 is a block diagram showing the configuration of the first embodiment of the present invention, and FIG. 4 is a block diagram showing the configuration of the second embodiment of the present invention. 1 is a local binarization feature extraction unit, 2 is a local region determination unit, 3 is a local feature storage unit, 4 is a bimodal selection unit, 5 is a register, 6
Is a binarization threshold value selection unit, 7 is a bimodal class feature calculation unit, 8 is a bimodal target feature storage unit, 9 is a bimodal background feature storage unit, 10 is a threshold value calculation unit, and 11 is 2 Quantization threshold storage unit, 21 is a single peak selection unit, 22 is a threshold storage unit, 2
3 is a background target determination unit, 24 is a unimodal background feature calculation unit, 2
5 is a unimodal target calculation unit, 26 is a background average density calculation unit, 2
Reference numeral 7 is a target average density calculation unit, and 28 is a binarization threshold value calculation unit.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】多値入力画像上の局所領域内の各画素の濃
度値を背景及び対象を示す2つのクラスに分類し、前記
局所領域の平均濃度値と各クラス毎の平均濃度値とその
画素数とを前記局所領域の特徴値として抽出する手段
と、前記特徴値に従って前記局所領域を単峰性または双
峰性に分類する手段と、前記局所領域の近傍局所領域を
含む複数個の局所領域から双峰性局所領域群を選択し、
前記双峰性局所領域群の複数個の前記特徴値に従って背
景平均濃度値及び対象平均濃度値を算出し、前記局所領
域の2値化しきい値を決定する手段と、前記複数個の局
所領域が予め設定された個数以上の前記双峰性局所領域
を含まないとき既に決定された前記1つないし複数個の
局所領域の2値化しきい値あるいは予め設定されたしき
い値を前記局所領域の2値化しきい値とする手段とを有
することを特徴とする2値化しきい値決定方式。
1. A density value of each pixel in a local area on a multi-valued input image is classified into two classes indicating a background and an object, and the average density value of the local area and the average density value of each class and its A unit for extracting the number of pixels as a feature value of the local region; a unit for classifying the local region into monomodal or bimodal according to the feature value; and a plurality of local regions including local regions in the vicinity of the local region. Select a bimodal local region group from the region,
Means for calculating a background average density value and a target average density value according to the plurality of feature values of the bimodal local area group to determine a binarization threshold value of the local area; When the predetermined number or more of the bimodal local regions are not included, a binarization threshold value of the one or more local regions which has already been determined or a preset threshold value is set to 2 of the local regions. A method for determining a binarized threshold value, comprising means for setting a binarized threshold value.
【請求項2】多値入力画像上の局所領域内の各画素の濃
度値を背景及び対象を示す2つのクラスに分類し、前記
局所領域の平均濃度値と各クラス毎の平均濃度値と画素
数とを前記局所領域の特徴値として抽出する手段と、前
記特徴値に従って前記局所領域を単峰性または双峰性に
分類する手段と、前記局所領域の近傍局所領域を含む複
数個の局所領域から双峰性局所領域群を選択し、前記双
峰性局所領域群の複数個の前記特徴値に従って算出した
背景平均濃度値及び対象平均濃度値を基にしてしきい値
を算出する手段と、前記複数個の局所領域から単峰性局
所領域群を選択し、前記単峰性局所領域の平均濃度値を
前記しきい値に従って背景又は対象に属するか否かを判
定し、複数個の前記単峰性局所領域の平均濃度値も含め
て、前記背景平均濃度値及び対象平均濃度値を修正する
手段と、前記背景平均濃度値及び対象平均濃度値から前
記局所領域の2値化しきい値を決定する手段と、前記複
数個の局所領域が予め設定された個数以上の前記双峰性
局所領域を含まないとき既に決定された前記1つないし
複数個の2値化しきい値あるいは予め設定されたしきい
値を前記局所領域の2値化しきい値とする手段とを有す
ることを特徴とする2値化しきい値決定方式。
2. A density value of each pixel in a local area on a multi-valued input image is classified into two classes indicating a background and an object, and an average density value of the local area and an average density value and pixel for each class. Means for extracting a number as a feature value of the local area, a means for classifying the local area into monomodal or bimodal according to the characteristic value, and a plurality of local areas including local areas in the vicinity of the local area Selecting a bimodal local region group from, means for calculating a threshold value based on the background average density value and the target average density value calculated according to a plurality of the feature values of the bimodal local region group, A group of unimodal local areas is selected from the plurality of local areas, and it is determined whether the average density value of the unimodal local areas belongs to a background or an object according to the threshold value. The background average including the average density value of the peak local area A means for correcting the frequency value and the target average density value, a means for determining a binarization threshold value of the local area from the background average density value and the target average density value, and the plurality of local areas are preset. Means for setting the one or more binarization thresholds already determined when a number of bimodal local regions is not included or a preset threshold as the binarization threshold of the local region A binarization threshold value determination method characterized by having:
JP61293859A 1986-12-09 1986-12-09 Binarization threshold decision method Expired - Lifetime JPH0656615B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61293859A JPH0656615B2 (en) 1986-12-09 1986-12-09 Binarization threshold decision method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61293859A JPH0656615B2 (en) 1986-12-09 1986-12-09 Binarization threshold decision method

Publications (2)

Publication Number Publication Date
JPS63146173A JPS63146173A (en) 1988-06-18
JPH0656615B2 true JPH0656615B2 (en) 1994-07-27

Family

ID=17800078

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61293859A Expired - Lifetime JPH0656615B2 (en) 1986-12-09 1986-12-09 Binarization threshold decision method

Country Status (1)

Country Link
JP (1) JPH0656615B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8300929B2 (en) 2009-10-07 2012-10-30 Seiko Epson Corporation Automatic red-eye object classification in digital photographic images

Also Published As

Publication number Publication date
JPS63146173A (en) 1988-06-18

Similar Documents

Publication Publication Date Title
JP3686439B2 (en) Digital image photo area detection system and method
US6556711B2 (en) Image processing apparatus and method
US7991224B2 (en) Segmenting digital image and producing compact representation
JP4242532B2 (en) Digital image data classification method
JP4498422B2 (en) Pixel classification method and image processing apparatus
EP1173003B1 (en) Image processing method and image processing apparatus
US7298900B2 (en) Image processing method, image processing apparatus and image processing program
US20020031268A1 (en) Picture/graphics classification system and method
US20080056573A1 (en) Methods and Systems for Identifying Text in Digital Images
KR100703284B1 (en) Device and method for binarization of image using quadratic filter and improved quadratic filter
JP2004173276A (en) Decision surface preparation method, image data pixel classifying method, and collar document classifying method
US20030063803A1 (en) Soft picture/graphics classification system and method
US20090245640A1 (en) Image determination apparatus, image search apparatus and a recording medium on which an image search program is recorded
JP4391704B2 (en) Image processing apparatus and method for generating binary image from multi-valued image
EP0676891A2 (en) Method of thresholding document images
US6269186B1 (en) Image processing apparatus and method
JPH0656615B2 (en) Binarization threshold decision method
EP1006717A2 (en) Method and apparatus for segmenting data
JP4409713B2 (en) Document image recognition apparatus and recording medium
JPH06195511A (en) Binarization threshold value determining device
O'Gorman Experimental comparisons of binarization and multi-thresholding methods on document images
Belkasim et al. Edge enhanced optimum automatic thresholding
JPH08221515A (en) Image processor
JPS63157288A (en) Binarization threshold determination system
JPH06103399A (en) Image processor

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term