JPH02191086A - Optimum binarizing method - Google Patents
Optimum binarizing methodInfo
- Publication number
- JPH02191086A JPH02191086A JP1011480A JP1148089A JPH02191086A JP H02191086 A JPH02191086 A JP H02191086A JP 1011480 A JP1011480 A JP 1011480A JP 1148089 A JP1148089 A JP 1148089A JP H02191086 A JPH02191086 A JP H02191086A
- Authority
- JP
- Japan
- Prior art keywords
- threshold value
- image
- value
- parameter
- black
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims description 39
- 230000015654 memory Effects 0.000 claims abstract description 74
- 238000003909 pattern recognition Methods 0.000 claims description 7
- 230000000717 retained effect Effects 0.000 claims description 4
- 238000004364 calculation method Methods 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 7
- 230000003321 amplification Effects 0.000 description 4
- 238000003199 nucleic acid amplification method Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
Landscapes
- Character Input (AREA)
- Image Processing (AREA)
Abstract
Description
【発明の詳細な説明】
産業上の利用分野
本発明は、文字認識などのパターン認識装置における最
適2値化方法に関する。DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to an optimal binarization method in a pattern recognition device such as character recognition.
従来の技術
一般に、文字認識などのパターン認識装置において処理
される画像は、スキャナのCCDセンサ出力などの値を
閾値(スレッシュレベル)によって白黒2値化したもの
である。この際、印字状態の良くない原稿であっても最
適なる2値化を可能とするためには、原稿の濃度の相違
に対応して各々最適な2値画像を生成する必要がある。2. Description of the Related Art In general, images processed in pattern recognition devices such as character recognition are obtained by converting values such as the output of a CCD sensor of a scanner into black and white binary values using a threshold value (threshold level). At this time, in order to enable optimal binarization even for originals with poor printing conditions, it is necessary to generate optimal binary images corresponding to the differences in density of the originals.
ここに、このような2値化方法に関しては、種々の方法
が提案されている。例えば、「田利秀行著、総研出版、
1985[i’コンピュータ画像処理入門」中、第67
頁」なる文献に示されるモード法や微分ヒストグラム法
がある。モード法は、与えられた画像の濃度値のヒスト
グラムを求め、2つのピークを持つ分布となる場合に、
2つのピークの間の谷のところに閾値を決めるものであ
る。Here, various methods have been proposed regarding such a binarization method. For example, “Written by Hideyuki Tari, published by Souken Publishing,
1985 [i' Introduction to Computer Image Processing], No. 67
There are the modal method and the differential histogram method, which are shown in the literature "P. The mode method calculates the histogram of the density values of a given image, and when the distribution has two peaks,
The threshold value is determined at the valley between two peaks.
微分ヒストグラム法は、画像中の対象物と背景の境界は
、濃度値が急に変化する部分に位置すると考えられるた
め、画像の濃度値を直接利用するのではなく、微分値(
濃度の変化率)を利用して閾値を決めるというものであ
る。The differential histogram method uses differential values (
The threshold value is determined using the rate of change in concentration.
また、[昭和52年度電子通信学会情報部門全国大会、
大津展之、「濃度分布からの閾値決定法J中、145]
なる文献に示される濃度分布からの閾値決定法がある。In addition, [1972 National Conference of the Institute of Electronics and Communication Engineers, Information Section,
Nobuyuki Otsu, “Threshold Determination Method from Concentration Distribution J, 145”
There is a method for determining the threshold value from the concentration distribution, which is shown in the literature.
これは、濃度分布の0次、1次モーメントのみを利用し
、積分に基づいて最適なる閾値を決定するものである。This method uses only the 0th and 1st moments of the concentration distribution and determines the optimal threshold based on integration.
さらに、特公昭60−37952号公報に示される「最
適二値化方式」がある。これは、多値ビデオ信号をビデ
オ・バッファに格納し、ビデオ・バッファから読出され
たビデオ信号を可変スライスレベルのスライス回路によ
り2値化し、多値ビデオ情報を異なるスライスレベルで
スライスして2値化ビデオ信号に変換し、異なるスライ
スレベルでスライスして作成した複数の2値化ビデオ信
号の各々について(黒点数)/(周囲数)なる線幅増幅
率を求め、複数の線幅増幅率と基準の線幅増幅率とに基
づきスライス回路のスライスレベルを設定するものであ
る。Furthermore, there is an "optimal binarization method" disclosed in Japanese Patent Publication No. 60-37952. This involves storing a multilevel video signal in a video buffer, converting the video signal read from the video buffer into a binary signal using a slicing circuit with variable slice levels, and slicing the multilevel video information at different slice levels to create a binary signal. The line width amplification factor (number of black points)/(number of surroundings) for each of the plurality of binarized video signals created by converting it to a digital video signal and slicing it at different slice levels is calculated, and the line width amplification factor and the number of line width amplification factors are calculated. The slice level of the slice circuit is set based on the reference line width amplification factor.
発明が解決しようとする課題
ところが、モード法にあっては、印字状態の悪い原稿で
は、ヒストグラムに明確な谷を生じないので、適用でき
ない方法である。However, the problem to be solved by the present invention is that the mode method cannot be applied to documents with poor printing conditions because the histogram does not have clear valleys.
また、微分ヒストグラム法にあっては、対象物と背景の
境界付近の濃度値が複雑に変化するものに対しては、有
効に働かない方法である。Further, the differential histogram method does not work effectively when the density value near the boundary between the object and the background changes in a complex manner.
また、濃度分布からの閾値決定法による場合、文字認識
などのパターン認識において扱われる画像としてのr線
」のつぶれやかすれに対する処理としては、効果的な方
法ではない。Furthermore, the method of determining a threshold value from the density distribution is not an effective method for processing blurring or blurring of "r-line" as an image used in pattern recognition such as character recognition.
さらに、上記公報の最適二値化法では、実験の結果、原
稿の濃淡によっては適正な閾値決定が不安定なる結果が
得られたものである。Furthermore, in the optimal binarization method disclosed in the above-mentioned publication, as a result of experiments, it was found that appropriate threshold value determination was unstable depending on the shading of the document.
課題を解決するための手段
請求項1記載の発明では、多値量子化された画像に対し
て白黒2値の画像に変換するパターン認識装置における
最適2値化方法において、複数の閾値で画像を2値化し
、各閾値での2値画像を常にメモリに保有し、各閾値で
の黒画素数と粗視化した時の黒画素数とを計数し、これ
らの黒画素数に基づき画像のフラクタル次元なるパラメ
ータを計算し、当該パラメータ値が極小となる閾値から
最適閾値を求め、この最適閾値による2値画像を出力さ
せるようにした。Means for Solving the Problems The invention according to claim 1 provides an optimal binarization method for a pattern recognition device that converts a multi-level quantized image into a black and white binary image. Binarize the image, keep the binary image at each threshold in memory, count the number of black pixels at each threshold and the number of black pixels when coarse-grained, and calculate the fractal image of the image based on these numbers of black pixels. A parameter called a dimension is calculated, an optimal threshold value is determined from the threshold value at which the parameter value becomes minimum, and a binary image based on this optimal threshold value is output.
請求項2記載の発明では、複数の閾値で画像を2値化し
た後、各閾値での黒画素数と粗視化した時の黒画素数と
を計数する時のみ各閾値での2値画像をメモリに保有し
て、各閾値での黒画素数と粗視化した時の黒画素数との
引数値に基づき画像のフラクタル次元なるパラメータを
計算し、当該パラメータ値が極小となる閾値から最適閾
値を求め、当該最適閾値で画像を再び2値化して2値画
像を出力させるようにした。In the invention according to claim 2, after an image is binarized using a plurality of threshold values, only when counting the number of black pixels at each threshold value and the number of black pixels when coarse-grained, a binary image is generated at each threshold value. is stored in memory, and a parameter called the fractal dimension of the image is calculated based on the argument value of the number of black pixels at each threshold value and the number of black pixels when coarse-grained, and the optimal value is calculated from the threshold value at which the parameter value becomes the minimum. A threshold value is determined, and the image is binarized again using the optimum threshold value to output a binary image.
さらに、請求項3記載の発明では、請求項2記載の発明
と同じく、複数の閾値で画像を2値化し、各閾値での黒
画素数と粗視化した時の黒画素数とを計数する時のみ各
閾値での2値画像をメモリに保有した後、閾値を中心値
から変化させてその閾値での黒画素数と粗視化した時の
黒画素数との計数値に基づき画像のフラクタル次元なる
パラメータを計算し、当該パラメータ値が常に小さい方
の閾値とそのパラメータ値とを保有し、パラメータ値が
極小となる閾値を最適閾値として、画像を再び2値化し
て2値画像を出ノJさせるようにした。Furthermore, in the invention described in claim 3, as in the invention described in claim 2, the image is binarized using a plurality of threshold values, and the number of black pixels at each threshold value and the number of black pixels when coarse-grained are counted. After storing the binary image at each threshold value in memory, the fractal image of the image is calculated based on the count value of the number of black pixels at that threshold value and the number of black pixels when coarse-grained by changing the threshold value from the center value. Calculate the parameter called dimension, always keep the threshold value with the smaller parameter value and the parameter value, and use the threshold value where the parameter value is the minimum as the optimal threshold value, and binarize the image again to output a binary image. I made it J.
作用
請求項1記載の発明によれば多値量子化された画像は複
数の閾値で2値化され、メモリに保有される。そして、
各閾値での黒画素数を計数するとともに粗視化した時の
黒画素数も計数し、計数結果に基づき、画像のフラクタ
ル次元なるパラメータを計算する。このパラメータ値が
極小となる閾値に基づき最適な閾値を求めて、2値画像
を出力させるため、原稿の濃度に応じた最適なる2値化
の閾値が自動的に設定され、認識率が安定する。According to the invention described in claim 1, a multi-level quantized image is binarized using a plurality of threshold values and stored in a memory. and,
The number of black pixels at each threshold value is counted, and the number of black pixels when coarse-grained is also counted, and based on the counting results, a parameter called the fractal dimension of the image is calculated. The optimal threshold value is determined based on the threshold value at which this parameter value becomes minimum, and a binary image is output. Therefore, the optimal threshold value for binary conversion according to the density of the document is automatically set, and the recognition rate is stabilized. .
この時、請求項2記載の発明のように、2値画像を保有
するメモリを1つに節約しても、黒画素数及び粗視化し
た時の黒画素数を計数する時のみ利用すれば、何んら支
障ないものとなる。In this case, even if the memory storing the binary image is saved to one as in the invention described in claim 2, it is only used when counting the number of black pixels and the number of black pixels when coarse-grained. , there will be no problem.
一方、フラクタル次元なるパラメータ値が最大となる閾
値は複数の閾値中の中心値伺近となる性質を持つ。そこ
で、請求項3記載の発明のように、閾値を中心値から変
化させて画像のフラクタル次元なるパラメータを計算し
、当該パラメータ値か常に小さい方の閾値とそのパラメ
ータ値とを保有し、パラメータ値が最小となる当該閾値
に注目することにより、最適閾値を求める処理の高速化
が図られる。On the other hand, the threshold value at which the parameter value of the fractal dimension is maximum has the property of being close to the center value among the plurality of threshold values. Therefore, according to the invention as claimed in claim 3, a parameter called the fractal dimension of the image is calculated by changing the threshold value from the central value, and the parameter value and the threshold value, whichever is smaller, are always stored, and the parameter value is By focusing on the threshold value with the minimum value, it is possible to speed up the process of determining the optimal threshold value.
実施例
請求項1記載の発明の一実施例を第1図ないし第3図を
参照して説明する。第1図に本実施例を実施するブロッ
ク構成図を示す。本実施例は、多値画像読取り部1から
2値画像出力部2までに関するものである。多値画像読
取り部1にてスキャナ3から多値画像を読取り、例えば
16値に量子化し、多値イメージメモリ4に保有する。Embodiment An embodiment of the invention set forth in claim 1 will be described with reference to FIGS. 1 to 3. FIG. 1 shows a block diagram for implementing this embodiment. This embodiment relates to a multivalued image reading section 1 to a binary image outputting section 2. A multi-value image reading section 1 reads a multi-value image from a scanner 3, quantizes it into, for example, 16 values, and stores it in a multi-value image memory 4.
次に、多値イメージメモリ4から16階調の多値画像(
濃度レベルOから15)を2値化部5により読込み、閾
値t=15以上を黒、それ以外を白とする白黒2値画像
を生成し、15個の2値イメージメモリ6中のNo、
(1)で示すものに保有する。このNo、 (1)なる
2値イメージメモリ6に保有された画像全体に対し、黒
画素数カウント部7においてその2値画像の黒画素の総
数(黒画素数)及び粗視化した時の黒画素数を計数し、
その計数結果を黒画素数メモリ8に保有する。Next, a 16-gradation multi-value image (
The density levels 0 to 15) are read by the binarization unit 5, and a black and white binary image in which the threshold value t=15 or more is black and the rest is white is generated, and the numbers in the 15 binary image memories 6,
It is held in the items shown in (1). For the entire image stored in the binary image memory 6, which is No. Count the number of pixels,
The counting result is stored in the black pixel number memory 8.
但し、粗視化された時の黒画素数とは、第3図(a)に
示すような通常の画素に対し、隣接する4画素(同図(
b)の場合)又は166画素同図(c)の場合)を1つ
の画素とみなしく粗視化された画素)、その粗視化され
た画素を粗視化された際の黒画素とみなし、粗視化され
た際の黒画素数を計数したものである。However, the number of black pixels when coarse-grained refers to the number of adjacent pixels (see Figure 3(a)) for a normal pixel as shown in Figure 3(a).
b)) or 166 pixels (in the case of (c) in the same figure) is treated as one pixel and the coarse-grained pixel is treated as a black pixel when coarse-grained. , the number of black pixels when coarse-grained.
次に、パラメータ計算部9において、これらの黒画素数
メモリ8から各々黒画素数と粗視化された際の黒画素数
とを読込み、画像のフラクタル次元なるパラメータを計
算し、パラメータメモリIO中の対応するNo、 (1
)なるメモリに保有する。Next, the parameter calculation unit 9 reads the number of black pixels and the number of coarse-grained black pixels from the black pixel number memory 8, calculates a parameter called the fractal dimension of the image, and stores it in the parameter memory IO. The corresponding No. of (1
) is stored in memory.
これが、閾値t−15に対する処理であり、次に、閾値
t−14とし、2値化部5によりこの閾値t=14によ
る2個画像を生成し、その結果を2値イメージメモリ6
中のNo、 (2)のものに保有する。このNo、 (
2)なるイメージメモリ6に保有された2個画像に対し
ても、上記と同様に、黒画素数と粗視化された際の黒画
素数との計数、フラクタル次元なるパラメータの計算を
し、パラメータメモリ10中の対応するNo、 (2)
なるメモリに保有する。他の閾値t=13,12.〜,
2,1についても各々同様の処理を繰返す。This is the processing for the threshold value t-15.Next, the threshold value t-14 is set, two images are generated by the threshold value t=14 by the binarization unit 5, and the results are stored in the binary image memory 6.
No. (2) is retained. This No, (
2) Similarly to the above, for the two images stored in the image memory 6, count the number of black pixels and the number of black pixels when coarse-grained, calculate the parameter called fractal dimension, Corresponding No. in parameter memory 10, (2)
stored in memory. Other threshold values t=13, 12. ~,
The same process is repeated for 2 and 1 as well.
これらの15種類の閾値tの各々について処理が終了し
たら、パラメータ比較部11において、パラメータメモ
リ10のNo、 (1)〜No、(15)の各々より各
閾値毎のパラメータ値を取出して比較し、その内、パラ
メータ値(フラクタル次元)が最大となる閾値T ma
xを求める。このようにパラメータ値が最大となる閾値
から、順に閾値を減らしていき、パラメータ値(フラグ
タル次元)が極小となる閾値T infを求める。この
ようにして最適閾値決定部12にて最適なる閾値T =
T infを決定する。この最適閾値下による2個画
像を2値イメージメモリ6中から選択し、2値画像出力
部2に出力し、さらに文字認識部13などに送出して認
識処理等に供される。When the processing for each of these 15 types of thresholds t is completed, the parameter comparison unit 11 extracts the parameter values for each threshold from each of No. (1) to No. (15) in the parameter memory 10 and compares them. , among which the parameter value (fractal dimension) is the maximum threshold T ma
Find x. In this way, the threshold value is decreased in order from the threshold value at which the parameter value becomes the maximum, and the threshold value T inf at which the parameter value (fragmental dimension) becomes the minimum value is determined. In this way, the optimal threshold value determination unit 12 determines the optimal threshold value T =
Determine T inf. Two images under this optimal threshold are selected from the binary image memory 6, outputted to the binary image output section 2, and further sent to the character recognition section 13 etc. for recognition processing.
ここに、本実施例における特徴の一つであるフラクタル
次元の計算方法について第3図を参照して説明する。ま
ず、図に示すように、r=l、r=2.r=4の各々の
場合の黒画素数N11.を計数する。そして、r=1の
時の黒画素数をN。Here, a method of calculating the fractal dimension, which is one of the features of this embodiment, will be explained with reference to FIG. First, as shown in the figure, r=l, r=2. Number of black pixels N11 for each case of r=4. Count. Then, the number of black pixels when r=1 is N.
r=2 (4画素単位)に粗視化された時の黒画素数を
N(21、r=4 (16画素単位)に粗視化された時
の黒画素数をN141 とする。そして、フラクタル
次元をDとすると、
QOgNtr+ =−DQog r 十C(Cは定
数)なる関係が成り立つので、r=1.2.4の3点を
用いた最小2乗法により、フラクタル次元りが求められ
る。The number of black pixels when coarse-grained to r=2 (in units of 4 pixels) is N(21, and the number of black pixels when coarse-grained to r=4 (in units of 16 pixels) is N141.And, If the fractal dimension is D, then the relationship QOgNtr+ = -DQog r 10C (C is a constant) holds, so the fractal dimension is determined by the least squares method using the three points of r=1.2.4.
つづいて、請求項2記載の発明の実施例を第4図及び第
5図により説明する。前記実施例で示した部分と同一部
分は同一符号を用いて示す。本実施例は、前記実施例中
の15個の2値イメージメモリ6を制約し、1個のみの
2値イメージメモリ14とし、黒画素数及び粗視化され
た際の黒画素数を計数する場合のみ、この1個の2値イ
メージメモリ14を用いるようにしたものである。よっ
て、最適閾値T = T infが決定された後、その
閾値を用いて再び2値化処理することにはなる。Next, an embodiment of the invention according to claim 2 will be described with reference to FIGS. 4 and 5. The same parts as those shown in the previous embodiment are indicated using the same reference numerals. In this example, the 15 binary image memories 6 in the previous example are limited to only one binary image memory 14, and the number of black pixels and the number of black pixels when coarse-grained are counted. In this case, this one binary image memory 14 is used. Therefore, after the optimal threshold value T = T inf is determined, the binarization process is performed again using that threshold value.
まず、前記実施例と同様に、多値画像読取り部1にてス
キャナ3から多値画像を読取り、例えば16値に量子化
し、多値イメージメモリ4に保有する。次に、多値イメ
ージメモリ4から16階調の多値画像を2値化部5によ
り読込み、閾値し15以上を黒、それ以外を白とする白
黒2値画像を生成し、2値イメージメモリ14に保有す
る。First, similarly to the embodiment described above, a multi-value image reading section 1 reads a multi-value image from a scanner 3, quantizes it into, for example, 16 values, and stores it in a multi-value image memory 4. Next, the 16-gradation multivalued image is read from the multivalued image memory 4 by the binarization unit 5, thresholded, and a black and white binary image in which 15 or more is black and the rest is white is generated, and the binary image memory 14 held.
この2値イメージメモリ14に保有された画像全体に対
し、黒画素数カウント部7においてその2個画像の黒画
素の総数(黒画素数)及び粗視化された際の黒画素数を
計数し、その計数結果を黒画素数メモリ8に保有する。For the entire image held in the binary image memory 14, the black pixel number counting unit 7 counts the total number of black pixels (black pixel number) of the two images and the number of black pixels when coarse-grained. , the counting results are held in the black pixel number memory 8.
次に、パラメータ計算部9において、この黒画素数メモ
リ8から、各々黒画素数と粗視化された際の黒画素数と
を読込み、フラクタル次元なるパラメータを計算し、パ
ラメータメモリ10中のNo、 (1)なるメモリに保
有する。Next, the parameter calculation unit 9 reads the number of black pixels and the number of coarse-grained black pixels from the black pixel number memory 8, calculates a parameter called fractal dimension, and calculates the number of black pixels in the parameter memory 10. , (1) Retained in memory.
これが、閾値し−15に対する処理であり、次に、閾値
t=14とし、2値化部5によりこの閾値t−14によ
る2個画像を生成し、その結果を2値イメージメモリ1
4に保有する。このイメージメモリ14に保有された2
個画像に対しても、上記と同様に、黒画素数と粗視化さ
れた際の黒画素数との計数、フラクタル次元なるパラメ
ータの計算をし、パラメータメモリ10中のNo、 (
2)なるメモリに保有する。他の閾値t=13,12.
〜2,1についても各々同様の処理を繰返す。This is the process for the threshold value t-15.Next, the threshold value t=14 is set, two images are generated by the threshold value t-14 by the binarization unit 5, and the results are stored in the binary image memory 1.
4. 2 held in this image memory 14
Similarly to the above, for individual images, the number of black pixels and the number of coarse-grained black pixels are counted, the parameter called fractal dimension is calculated, and the No. in the parameter memory 10, (
2) Retained in memory. Other threshold values t=13, 12.
The same process is repeated for ~2 and 1 as well.
これらの15種類の閾値しの各々について処理が終了し
たら、パラメータ比較部11において、パラメータメモ
リ10のNα(1)〜No、(15)の各々より各閾値
毎のパラメータ値を取出して比較し、その内、パラメー
タ値(フラクタル次元)が最大となる閾値T maxを
求める。このように求められたパラメータ値が最大なる
閾値T maxから、順に閾値を減らしていき、パラメ
ータ値(フラクタル次元)が極小となる閾値Tinfを
求める。このようにして最適閾値決定部12にて最適な
る閾値TT infを決定する。この最適閾値Tを用い
て、多値イメージメモリ4から読込んだ画像を2値化部
5により2値化して2値イメージメモリ14に保有する
。この2値イメージメモリ14に保有させた2値画像を
2値画像出力部2に出力し、さらに文字認識部13など
に送出して認識処理等に供される。When the processing for each of these 15 types of thresholds is completed, the parameter comparison unit 11 extracts the parameter value for each threshold from each of Nα (1) to No. (15) in the parameter memory 10 and compares it. Among them, a threshold value T max at which the parameter value (fractal dimension) becomes maximum is determined. Starting from the threshold value T max where the parameter value obtained in this way is the maximum, the threshold value is decreased in order, and the threshold value Tinf where the parameter value (fractal dimension) is the minimum value is determined. In this way, the optimal threshold value determining section 12 determines the optimal threshold value TT inf. Using this optimum threshold T, the image read from the multi-valued image memory 4 is binarized by the binarization section 5 and stored in the binary image memory 14. The binary image held in the binary image memory 14 is output to the binary image output section 2, and further sent to the character recognition section 13 etc. for recognition processing.
さらに、請求項3記載の発明の実施例を第6図ないし第
8図により説明する。本実施例は、閾値(1〜15=1
+−f++)に対するフラクタル次元の変化が第6図に
示すような特性を示し、フラクタル次元が最大となる閾
値Tとしては、中心値付近になるという性質を持つ点を
利用し、最適閾値Tを求める際の高速化を図るようにし
たものである。このため、構成的には、前記実施例の第
4図に比し、15個のパラメータメモリ10がNo、(
1)(2)のみのパラメータメモリ15に置き換えられ
ている。Further, an embodiment of the invention according to claim 3 will be explained with reference to FIGS. 6 to 8. In this example, the threshold value (1 to 15=1
The change in fractal dimension with respect to This is intended to speed up the calculation. Therefore, in terms of configuration, compared to FIG. 4 of the above embodiment, 15 parameter memories 10 are
1) It is replaced with the parameter memory 15 only for (2).
まず、前述の場合と同様にスキャナ3から多値画像を読
取り、多値イメージメモリ4に保有する。First, a multivalued image is read from the scanner 3 and stored in the multivalued image memory 4 as in the case described above.
そして、2値化部5により多値イメージメモリ4から1
6階調の多値画像を読込み、閾値t=8(中心値)とし
、第8図(b)に示すように、この閾値t=8以上を黒
、それ以外を白とする2値画像を生成し、2値イメージ
メモリ14に保有する。Then, the binarization unit 5 converts the multivalued image memory 4 into 1
A 6-gradation multivalued image is read in, the threshold value t = 8 (center value), and a binary image is created in which the threshold value t = 8 or higher is black and the rest is white, as shown in Figure 8 (b). The image data is generated and stored in the binary image memory 14.
そして、この2値イメージメモリ14に保有された画像
全体に対し、黒画素数カウント部7において黒画素数及
び粗視化された際の黒画素数を計数し、それらの計数結
果を黒画素数メモリ8に保有する。次に、パラメータ計
算部9において、閾値t=8の時のフラクタル次元なる
パラメータptP、を計算する。このパラメータpt=
p、 をパラメータメモリ15中のNo、 (1)の方
に保有する。Then, for the entire image held in the binary image memory 14, the black pixel number and the coarse-grained black pixel number are counted in the black pixel number counting section 7, and the counting results are used as the black pixel number. It is held in memory 8. Next, the parameter calculation unit 9 calculates a parameter ptP, which is a fractal dimension when the threshold value t=8. This parameter pt=
p, is held in No. (1) in the parameter memory 15.
次に、今度は閾値t=7とし、同様の処理を繰返し、閾
値し=7に対するパラメータpt=p。Next, this time, set the threshold value t=7, repeat the same process, and set the parameter pt=p for the threshold value 7.
を計算し、このパラメータPt=P、 をパラメータ
メモリ15中の他方のNα(2)の方に保有する。This parameter Pt=P, is stored in the other Nα(2) in the parameter memory 15.
そして、パラメータメモリ15中のNo、 (1)のも
のとNo、 (2)のものとの大小を比較し、小さい方
の閾値を求める。もし、新しい閾値の方が小さければ、
その閾値でのパラメータ値ptを保存し、閾値tを1つ
減らして、前述の場合と同様に、閾値対応のパラメータ
値ptを求め、前の閾値の方が小さくなるまで(Pt(
Pminでなくなるまで)、これを繰返す。また、前の
閾値tの方が小さければ、閾値tを9にし、同様の処理
を繰返す。この場合も、パラメータ値Ptを保存するの
は、常に小さい方とする。このような9以上の閾値しに
対しては、もし、新しい閾値の方が小さければ、閾値り
を1つ増やし、同様に閾値対応のパラメータ値Ptを求
める処理を行い、前の閾値の方が小さくなるまで、これ
を繰返す。Then, the magnitude of No. (1) and No. (2) in the parameter memory 15 is compared, and the smaller threshold value is determined. If the new threshold is smaller,
Save the parameter value pt at that threshold, reduce the threshold t by one, and calculate the parameter value pt corresponding to the threshold in the same way as in the previous case until the previous threshold becomes smaller (Pt(
Repeat this until Pmin is no longer present. Furthermore, if the previous threshold t is smaller, the threshold t is set to 9 and the same process is repeated. In this case as well, the smaller parameter value Pt is always saved. For such a threshold value of 9 or more, if the new threshold value is smaller, the threshold value is increased by 1, and the process of calculating the parameter value Pt corresponding to the threshold value is performed in the same way, and the previous threshold value is Repeat this until it becomes smaller.
このような処理後、最後に残った閾値tがパラメータ値
Ptの最小となるもの(P+++in )であるので、
これを閾値T minとし、この閾値T minより最
適閾値Tを求める。最適閾値Tが決定されたら、この閾
値Tを用いて、多値イメージメモリ4から読込んだ画像
を2値化し、2値イメージメモリ14に保有し、2値画
像出力部2に出力し、さらに文字認識部13などに送出
する。After such processing, the last remaining threshold t is the minimum value (P+++in) of the parameter value Pt, so
This is set as a threshold value T min, and an optimal threshold value T is determined from this threshold value T min. Once the optimal threshold value T is determined, the image read from the multivalued image memory 4 is binarized using this threshold value T, stored in the binary image memory 14, outputted to the binary image output unit 2, and further It is sent to the character recognition unit 13 or the like.
また、本発明の他の実施例を第9図により説明する。本
実施例は、前記実施例をさらに改良したものである。即
ち、最適閾値を決定した後で再び多値画像を2値化する
という手間を省き、がっ、メモリを最小限とするため、
(])(2)で示す2個のメモリ構成による2値イメー
ジメモリ■6を′用い、かつ、前記実施例のようにフラ
クタル次元が最大となる閾値は中央値付近になるという
性質を用いるようにしたものである。即ち、前記実施例
のように閾値を変化させ、小さい方のパラメータ値とそ
の閾値での2値画像とを常に保存しておくものである。Further, another embodiment of the present invention will be explained with reference to FIG. This example is a further improvement of the previous example. That is, in order to avoid the trouble of binarizing the multivalued image again after determining the optimal threshold value, and to minimize the memory,
(]) The binary image memory ■6 with the two memory configuration shown in (2) is used, and the property that the threshold value at which the fractal dimension is maximum is near the median value as in the above embodiment is used. This is what I did. That is, as in the embodiment described above, the threshold value is changed and the smaller parameter value and the binary image at that threshold value are always saved.
まず、前述の場合と同様にスキャナ3がら多値画像を読
取り、多値イメージメモリ4に保有する。First, as in the case described above, a multivalued image is read using the scanner 3 and stored in the multivalued image memory 4.
そして、2値化部5により多値イメージメモリ4から1
6階調の多値画像を読込み、閾値t=8(中心値)とし
、この閾値し一8以上を黒、それ以外を白とする2値画
像を生成し、2値イメージメモリ16中の(1)の方に
保有する。そして、この2値イメージメモリ16中の(
1)に保有された画像全体に対し、黒画素数カウント部
7において黒画素数及び粗視化された際の黒画素数を計
数し、それらの計数結果を黒画素数メモリ8に保有する
。Then, the binarization unit 5 converts the multivalued image memory 4 into 1
A 6-gradation multivalued image is read in, the threshold value t is set to 8 (center value), a binary image is generated in which the threshold value 18 or above is black, and the rest is white, and ( 1). Then, in this binary image memory 16 (
For the entire image held in step 1), the black pixel number counting unit 7 counts the number of black pixels and the number of coarse-grained black pixels, and the counting results are stored in the black pixel number memory 8.
次に、パラメータ計算部9において、閾値1.−8の時
のフラクタル次元なるパラメータPt=P。Next, in the parameter calculation section 9, the threshold value 1. The fractal dimension parameter Pt=P when -8.
を計算する。このパラメータPt=P、 をパラメー
タメモリ15中のNo、(1)の方に保有する。Calculate. This parameter Pt=P, is held in No. (1) in the parameter memory 15.
次に、今度は閾値t=7とし、同様の処理を繰返しく但
し、2値イメージメモリ16中の(2)の方が用いられ
る)、閾値t=7に対するパラメータPt=P、を計算
し、このパラメータPt=P。Next, this time, the threshold value t=7 is set, and the same process is repeated (however, (2) in the binary image memory 16 is used), and the parameter Pt=P for the threshold value t=7 is calculated, This parameter Pt=P.
をパラメータメモリ15中の他方のNo、 (2)の方
に保有する。そして、パラメータメモリ】5中のNo、
(1)のものとNo、 (2)のものとの大小を比較
し、小さい方の閾値を求める。もし、新しい閾値の方が
小さければ、その閾値でのパラメータ値PLを保存し、
閾値しを1つ減らして、前述の場合と同様に、閾値対応
のパラメータ値PLを求め、前の閾値の方が小さくなる
まで(Pt(Pminでなくなるまで)、これを繰返す
。この時、2値画像はパラメータ値の大きかった方の閾
値による2値イメージメモリ16中の(1)又は(2)
に上書きされる。また、前の閾値tの方が小さければ、
閾値しを9にし、同様の処理を繰返す。この場合も、パ
ラメータ値Ptを保存するのは、常に小さい方とする。is held in the other No. (2) in the parameter memory 15. And parameter memory] No. of 5,
Compare the size of (1) with No. (2) and find the smaller threshold. If the new threshold is smaller, save the parameter value PL at that threshold,
Decrease the threshold value by one, find the parameter value PL corresponding to the threshold value in the same way as in the previous case, and repeat this until the previous threshold value becomes smaller (Pt (until it is no longer Pmin). At this time, 2 The value image is (1) or (2) in the binary image memory 16 according to the threshold value of the larger parameter value.
will be overwritten. Also, if the previous threshold t is smaller,
Set the threshold value to 9 and repeat the same process. In this case as well, the smaller parameter value Pt is always saved.
こ′のような9以上の閾値しに対しては、もし、新しい
閾値の方か小さければ、閾値しを1つ増やし、同様に閾
値対応のパラメータ値Ptを求める処理を行い、前の閾
値の方が小さくなるまで、これを繰返す。For a threshold value of 9 or more like this, if the new threshold value is smaller, increase the threshold value by one, perform the same process to obtain the parameter value Pt corresponding to the threshold value, and calculate the value of the previous threshold value. Repeat this until it becomes smaller.
このような処理後、最後に残った閾値tがパラメータ値
Ptの最小となるもの(Pmin )でるので、これを
閾値T minとし、この閾値Tm1nを最適閾値Tと
する。この時、この最適閾値Tによる2値画像は2つの
2値イメージメモリ16中の(1)又は(2)の何れか
に保存されている筈であるので、この2値画像を2値画
像出ツク部2に出力し、さらに文字認識部13などに送
出する。After such processing, the last remaining threshold t is the minimum value (Pmin) of the parameter value Pt, so this is set as the threshold T min, and this threshold Tm1n is set as the optimal threshold T. At this time, since the binary image based on this optimal threshold value T should be stored in either (1) or (2) of the two binary image memories 16, this binary image is output as a binary image. The data is output to the checking section 2, and further sent to the character recognition section 13, etc.
発明の効果
本発明は、上述したように構成したので、印字状態の良
くない原稿に対してもその原稿の濃度に応じた最適な2
値化の閾値を自動的に設定することができ、認識率を向
上・安定させることができ、特に、請求項2又は3記載
の発明によれば、黒画素数や粗視化された際の黒画素数
の計数時にのみ2値画像をメモリに保有させることによ
り、2値画像用のメモリを節約することができ、また、
フラクタル次元なるパラメータが閾値変化特性において
、パラメータ値が最大となる閾値は中心値付近となる性
質を持つ点に着目した、請求項3記載の発明によれば、
閾値を中心値から変化させてフラクタル次元なるパラメ
ータを計算し、当該パラメータ値が常に小さい方の閾値
とそのパラメータ値とを保有し、パラメータ値が最小と
なる当該閾値に注目するようにしたので、最適閾値を求
める処理の高速化を図ることもできる。Effects of the Invention Since the present invention is configured as described above, even for a document with poor printing condition, the optimum two-dimensional image can be printed according to the density of the document.
It is possible to automatically set the threshold value for conversion, and it is possible to improve and stabilize the recognition rate. In particular, according to the invention described in claim 2 or 3, the number of black pixels and the By storing the binary image in the memory only when counting the number of black pixels, the memory for the binary image can be saved, and
According to the invention according to claim 3, which focuses on the fact that the parameter called fractal dimension has a property that the threshold value at which the parameter value is maximum is near the center value in the threshold value change characteristic.
We calculated a parameter called fractal dimension by changing the threshold value from the center value, always kept the threshold value with the smaller parameter value, and focused on the threshold value where the parameter value was the minimum. It is also possible to speed up the process of determining the optimal threshold value.
第1図ないし第3図は請求項l記載の発明の実施例を示
すもので、第1図はブロック図、第2図はフローチャー
ト、第3図は粗視化についての説明図、第4図及び第5
図は請求項2記載の発明の一実施例を示すもので、第4
図はブロック図、第5図はフローチャート、第6図ない
し第8図は請求項3記載の発明の一実施例を示すもので
、第6図は閾値に対するフラクタル次元変化の特性図、
第7図はブロック図、第8図はフローチャート、第9図
は本発明の他の実施例を示すブロック図である。1 to 3 show an embodiment of the invention as claimed in claim 1, in which FIG. 1 is a block diagram, FIG. 2 is a flowchart, FIG. 3 is an explanatory diagram of coarse-graining, and FIG. and fifth
The figure shows one embodiment of the invention according to claim 2, and
FIG. 5 is a block diagram, FIG. 5 is a flowchart, FIGS. 6 to 8 show an embodiment of the invention according to claim 3, and FIG. 6 is a characteristic diagram of fractal dimension change with respect to a threshold value.
FIG. 7 is a block diagram, FIG. 8 is a flow chart, and FIG. 9 is a block diagram showing another embodiment of the present invention.
Claims (1)
換するパターン認識装置における最適2値化方法におい
て、複数の閾値で画像を2値化し、各閾値での2値画像
を常にメモリに保有し、各閾値での黒画素数と粗視化し
た時の黒画素数とを計数し、これらの黒画素数に基づき
画像のフラクタル次元なるパラメータを計算し、当該パ
ラメータ値が極小となる閾値から最適閾値を求め、この
最適閾値による2値画像を出力させるようにしたことを
特徴とする最適2値化方法。 2、多値量子化された画像に対して白黒2値の画像に変
換するパターン認識装置における最適2値化方法におい
て、複数の閾値で画像を2値化し、各閾値での黒画素数
と粗視化した時の黒画素数とを計数する時のみ各閾値で
の2値画像をメモリに保有して、各閾値での黒画素数と
粗視化した時の黒画素数との計数値に基づき画像のフラ
クタル次元なるパラメータを計算し、当該パラメータ値
が極小となる閾値から最適閾値を求め、当該最適閾値で
画像を再び2値化して2値画像を出力させるようにした
ことを特徴とする最適2値化方法。 3、多値量子化された画像に対して白黒2値の画像に変
換するパターン認識装置における最適2値化方法におい
て、複数の閾値で画像を2値化し、各閾値での黒画素数
と粗視化した時の黒画素数とを計数する時のみ各閾値で
の2値画像をメモリに保有し、閾値を中心値から変化さ
せてその閾値での黒画素数と粗視化した時の黒画素数と
の計数値に基づき画像のフラクタル次元なるパラメータ
を計算し、当該パラメータ値が常に小さい方の閾値とそ
のパラメータ値とを保有し、パラメータ値が極小となる
閾値を最適閾値として、画像を再び2値化して2値画像
を出力させるようにしたことを特徴とする最適2値化方
法。[Claims] 1. In an optimal binarization method in a pattern recognition device that converts a multilevel quantized image into a black and white binary image, the image is binarized using a plurality of threshold values, and each threshold value The binary image of is always held in memory, the number of black pixels at each threshold value and the number of black pixels when coarse-grained are counted, and a parameter called the fractal dimension of the image is calculated based on these numbers of black pixels. An optimal binarization method characterized in that an optimal threshold value is determined from threshold values at which the parameter value becomes minimum, and a binary image based on this optimal threshold value is output. 2. In the optimal binarization method in a pattern recognition device that converts a multilevel quantized image into a black and white binary image, the image is binarized using multiple thresholds, and the number of black pixels and roughness at each threshold are calculated. Only when counting the number of black pixels when visualized, the binary image at each threshold is stored in memory, and the count value of the number of black pixels at each threshold and the number of black pixels when coarse-grained is calculated. The method is characterized in that a parameter called a fractal dimension of the image is calculated based on the image, an optimal threshold value is determined from the threshold value at which the parameter value becomes minimum, and the image is binarized again using the optimal threshold value to output a binary image. Optimal binarization method. 3. In the optimal binarization method in a pattern recognition device that converts a multilevel quantized image into a black and white binary image, the image is binarized using multiple thresholds, and the number of black pixels and roughness at each threshold are calculated. Only when counting the number of black pixels when visualized, store the binary image at each threshold value in memory, change the threshold from the center value, and calculate the number of black pixels at that threshold and the black when coarse-grained. A parameter called the fractal dimension of the image is calculated based on the count value with the number of pixels, the threshold value with the smaller parameter value and the parameter value are always retained, and the threshold value with the minimum parameter value is set as the optimal threshold value. An optimal binarization method characterized by binarizing again and outputting a binary image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1011480A JP2910926B2 (en) | 1989-01-20 | 1989-01-20 | Optimal binarization method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1011480A JP2910926B2 (en) | 1989-01-20 | 1989-01-20 | Optimal binarization method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH02191086A true JPH02191086A (en) | 1990-07-26 |
JP2910926B2 JP2910926B2 (en) | 1999-06-23 |
Family
ID=11779223
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP1011480A Expired - Fee Related JP2910926B2 (en) | 1989-01-20 | 1989-01-20 | Optimal binarization method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2910926B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111222511A (en) * | 2020-04-13 | 2020-06-02 | 中山大学 | Infrared unmanned aerial vehicle target detection method and system |
-
1989
- 1989-01-20 JP JP1011480A patent/JP2910926B2/en not_active Expired - Fee Related
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111222511A (en) * | 2020-04-13 | 2020-06-02 | 中山大学 | Infrared unmanned aerial vehicle target detection method and system |
CN111222511B (en) * | 2020-04-13 | 2020-07-24 | 中山大学 | A kind of infrared unmanned aerial vehicle target detection method and system |
Also Published As
Publication number | Publication date |
---|---|
JP2910926B2 (en) | 1999-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2702928B2 (en) | Image input device | |
US5313533A (en) | System and method for bidirectional adaptive thresholding | |
JPH1084475A (en) | Image area discrimination method and image-processing unit | |
US5701364A (en) | Image processing apparatus | |
US6192153B1 (en) | Image processing device | |
US20040052428A1 (en) | Image processing system | |
EP0870276B1 (en) | A method for transforming a gray-level image into a black-and-white image | |
US6181437B1 (en) | Image processing apparatus capable of producing images without jaggies at edges | |
JPH02191086A (en) | Optimum binarizing method | |
JPH0224787A (en) | Optimum binarizing method | |
JPH08223409A (en) | Image processing unit and its method | |
CA2215555C (en) | Image processing device | |
JP3062224B2 (en) | Image coding method | |
JPH06284281A (en) | Picture processor | |
JP2937603B2 (en) | Binary discrimination method of image data in image data reading device | |
JP3792402B2 (en) | Image processing apparatus, binarization method, and machine-readable recording medium recording a program for causing a computer to execute the binarization method | |
JP3466655B2 (en) | Image processing device | |
JP3036244B2 (en) | Image signal processing device | |
JP3216165B2 (en) | Image region identification device and image region identification method | |
JPH06103399A (en) | Image processing device | |
JPH08221515A (en) | Image processor | |
JP2859603B2 (en) | Method and apparatus for binarizing image data | |
JPH03172843A (en) | Image binarization method and image input device and image processing device using the same | |
JP2757868B2 (en) | Image information binarization processing circuit | |
JPH03218590A (en) | Optimal binarization method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |