JP2004104318A - Image processing method, image processing unit, and program - Google Patents

Image processing method, image processing unit, and program Download PDF

Info

Publication number
JP2004104318A
JP2004104318A JP2002261254A JP2002261254A JP2004104318A JP 2004104318 A JP2004104318 A JP 2004104318A JP 2002261254 A JP2002261254 A JP 2002261254A JP 2002261254 A JP2002261254 A JP 2002261254A JP 2004104318 A JP2004104318 A JP 2004104318A
Authority
JP
Japan
Prior art keywords
value
binarization
density
normalized
evaluation value
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
JP2002261254A
Other languages
Japanese (ja)
Inventor
Taiichi Saito
斉藤 泰一
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
National Institute of Advanced Industrial Science and Technology AIST
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 National Institute of Advanced Industrial Science and Technology AIST filed Critical National Institute of Advanced Industrial Science and Technology AIST
Priority to JP2002261254A priority Critical patent/JP2004104318A/en
Publication of JP2004104318A publication Critical patent/JP2004104318A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To find a binary threshold for obtaining a satisfactory binary image from a grey level image. <P>SOLUTION: A likelihood reference value and total dispersion are found from a gray level histogram obtained from the density value of each pixel in the grey level image and a gradation conversion density value where a real density value in which the density value of each pixel in the grey level image is converted is converted for processing further. A normalization separation degree normalized to 0 to 1 is found from the likelihood reference value and the total dispersion. A normalization binary evaluation value is found from the normalization separation degree and the total dispersion, where the normalization binary evaluation value is a binary evaluation value for judging an appropriate binary threshold. It is judged that the normalization binary evaluation value found to each value of a gradation conversion parameter is appropriate. The binary threshold value as the normalization binary evaluation value in the optimum value of the gradation conversion parameter is set to be an optimum binary threshold. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、文字認識を行う場合の前処理として、あるいは、画像圧縮処理として、画素値が多値の濃淡画像をニ値化するためのニ値化しきい値を選定する画像処理方法及び装置並びに画像処理プログラムに関する。
【0002】
【従来の技術】
濃淡画像として観測された文字をニ値化してから文字認識を行う場合や、大量の濃淡画像を圧縮するためにニ値化を行う場合は、高速なニ値化アルゴリズムが要求される。ニ値化を高速に行う方法としては、濃度ヒストグラムを使った手法が有力である。これは、画像の全画素について、濃度値別に画素数をカウントした濃度ヒストグラムを求め、各濃度値でニ値化する場合のニ値化評価値をその濃度ヒストグラムを基にして計算し、最適なニ値化評価値を与える濃度値をニ値化しきい値とするものである。従って、このニ値化評価値計算処理は、濃度レベル数に比例するため、画像の画素数より大幅に少ない計算量になる。
【0003】
濃度ヒストグラムを使用する方法の中でも、ニ値化評価値としてゆう度規準を使用した、最ゆう法という方法が有効であることが知られている。最ゆう法は古くから使われているもので、ゆう度規準値が最適なところを見つける数学的な手法である。この手法は、どのような対象に対して適用させるかによって、いろいろな状況に応用できる。ここでは、最ゆう法をニ値化しきい値選定という問題に応用している。ゆう度規準も、統計学で古くから使われている、数学的な関数であり、ヒストグラムに関する仮定条件の違いにより、複数のゆう度規準を定式化することができる。
【0004】
ニ値化しきい値選定を行う場合のゆう度規準の例として、濃淡画像の濃度ヒストグラムが、2つの正規分布が重畳していると仮定する。更に、それぞれの正規分布を表現するパラメータとして生起確率と分散があり、2つの正規分布の生起確率と分散の関係から、次の4種類の仮定に分けることができる。 (1) 生起確率は異なり、分散は等しいと仮定する場合。 (2) 生起確率も分散も等しいと仮定する場合。(これは、大津氏が考案したため、大津の手法と呼ぶ。) (3) 生起確率も分散も異なると仮定する場合。 (4) 生起確率は等しく、分散は異なると仮定する場合。(これは、栗田氏が考案したため、栗田の手法と呼ぶ。)
【0005】
従来技術として、2つの正規分布の生起確率と分散の関係が、生起確率は等しく、分散は異なると仮定した栗田の手法で定式化したゆう度規準に基づいた、ニ値化しきい値を選定する1手法(非特許文献1,2参照)がある。
この手法について、使用する記号の定義を図5、図6、図7で行いながら、図2のブロック図に沿って説明する。
まず、図2の画像入力処理101により、画像6を入力し濃淡画像データ102を得る。
【0006】
図5において、濃淡画像データの濃度レベル数を、最小整数濃度値imin(図5)から、最大整数濃度値imax(図5)までの数Lg=imax−imin+1(図5式(501))とし、これにiminより1小さい濃度値とimaxより1大きい濃度値を加え、処理濃度レベル数を図5式(502)のL=Lg+2とする。実数濃度値u(j)は、整数濃度値のimin−1からimax+1までが0〜1の値になるよう濃度値をaffine変換したものである。濃度値を0〜1に実数化するのは、後に行う階調変換をし易くするためであり、濃度値をaffine変換しても、affine変換前後の最適ニ値化しきい値の相対位置は変わらない、という性質を利用している。濃度ヒストグラムp(j)は、図5式(505)で示すように、整数濃度値がiである画素の度数h(i)を全画素数Nで割ったものであり、図5式(506)のように、p(j)の総和は1になる。図2において、濃度ヒストグラム作成処理103により、濃淡画像データ102から、濃度ヒストグラム104と実数濃度値105を得る。これが、図5の濃度ヒストグラムp(j)(式(505))と実数濃度値u(j)(式(503))に対応する。
【0007】
次に、階調変換パラメータをgとし、図5式(508)により、実数濃度値u(j)から階調変換濃度値v(g;j)に変換する。これは、図2の実数濃度値105から、濃度階調変換処理106により、階調変換濃度値107を得ることに対応する。図5式(508)は、j = 0のときv(g;0) = u(0) = 0に、j = L−1のときv(g;L−1) = u(L−1) = 1に対応しており、途中のj = 1 〜 L−2の濃度値はパラメータgによって変化する。gは、正の実数で、ゼロ(0)付近から無限大(∞)までの値を取り得るが、実際上は、0.45 〜 2.23程度の範囲を0.01刻みで取れば充分である。g=1のとき、階調変換は行われず、uとvは全てのjで同じ値になる。通常の階調変換関数としては、式(509)のガンマ変換が使われるが、式(509)を使うと、濃淡画像データの濃度値の大小を反転した画像と、反転しない画像とで、ニ値化結果が異なってしまう。単に反転しただけにもかかわらず、ニ値化結果が異なるのは不自然であることから、階調変換を行う関数は、画素値を反転しても、ニ値化結果が同じになるような、対称性を保持した関数がよい。対称性を保持した関数ならばどのような関数でも構わないが、ここでは、その1例である図5式(508)を使用している。
【0008】
次に、仮のしきい値をk番目としたときの統計量を定義する。ここでは、k番目の濃度値v(g;k)をしきい値としてニ値化するということは、v(g;k)以下の濃度値をクラス0に、v(g;k)を超える濃度値をクラス1にすることを意味する。仮のしきい値をk番目として、濃度値を2クラスに分けたときの、クラス0、クラス1のそれぞれの、生起確率、濃度平均値、全濃度平均値、分散と、級内分散、級間分散、全分散の統計量を定義したものが図6である。図6の各統計量はパラメータgとkで変化するが、全濃度平均値と全分散だけはパラメータgでのみ変化し、kでは変化しない。
【0009】
次に、図6の統計量を使用して、ニ値化評価値のもとになるゆう度規準を図7で定義する。ゆう度規準の1つである、2つの正規分布の生起確率は等しく、分散は異なると仮定して定式化した栗田のゆう度規準は式(701)になる。これを、濃度のaffine変換に不変な関数になるよう図6式(611)の全分散を入れて変形したものが、図7式(702)であり、これを栗田の分離度と呼ぶ。この式(702)の上限値は1であるが、下限値は不明であり、0以下になりうる。比較のため、2つの正規分布の生起確率と分散のどちらも等しいと仮定して定式化した大津のゆう度規準を式(703)に、大津の分離度を式(704)に示しておく。大津の分離度は上限値が1、下限値が0であり、0〜1に正規化された尺度である。これらのゆう度規準、分離度、及び、後述のニ値化評価値は全て、評価値が大きいほど、ニ値化しきい値としての評価が高いものとして定義している。定義の仕方によっては、ニ値化評価値が小さいほど評価が高い、とすることもできる。以上の処理は、図2において、濃度ヒストグラム104と階調変換濃度値107から、ゆう度規準計算処理108により、ゆう度規準値109と全分散110を求めることに対応する。
【0010】
以上で定義した分離度は、濃淡画像データの濃度ヒストグラムの形によって、階調変換パラメータgが0または∞のどちらか、あるいは、両方に近づくにつれ、大きな値になり1に近づいて行く、という性質がある。このことは、パラメータgを0または∞の極端な値にすることが最適という結果になってしまう。つまり、濃淡画像データがどのようなデータであっても、パラメータgの極端で異常な状態が採用されてしまい、パラメータgを導入する意味がなくなるだけでなく、これは、よいニ値化しきい値が得られないことを意味する。
【0011】
そこで、全分散(図6式(611))を使い、分離度の補正を行う。ただし、比較のための大津の分離度(図7式(704))については、階調変換パラメータgはg=1に固定し階調変換は行わず、分離度の補正も行わずに使用する。これは、大津の分離度が生起確率、分散とも等しいと仮定して定式化していることから、階調変換や分離度の補正を行っても、ニ値化評価値としての性能が向上しないためである。
【0012】
処理濃度レベル数Lは、濃淡画像データに存在する最小から最大までの濃度レベル数Lgでなく、最大、最小、それぞれに余分の濃度値を加えた数にしている。こうすることにより、階調変換を行う両端の濃度値の度数は必ず0になるため、階調変換パラメータgを0または∞に近づけるにつれ、濃度ヒストグラムの度数が1以上の部分が片側に押しやられて行く。図5式(508)の計算式を使用することにより、gが1より小さくなるにつれ濃度ヒストグラムが濃度値1側へ、gが1より大きくなるにつれ濃度ヒストグラムが濃度値0側へ押しやられ、どちらも、全分散(図6式(611))が0に近づいて行くことになる。
【0013】
例えば、処理濃度レベル数をL=11、実数濃度値(図5式(503))を0.0、0.1、0.2、0.3、0.4、0.5、0.6、0.7、0.8、0.9、1.0とし、その濃度値をとる画素の度数(図5式(504))が0、2、5、1、2、4、5、4、3、1、0の場合を考える。階調変換パラメータをg=1としたときの濃度ヒストグラムの形は図3になる。これに対し、g=0.5にしたときの濃度ヒストグラムの形は図4になり、gを1より小さい値にすることにより、図3に比べ、全体が右(濃度値1の方向)に押しやられている。
全分散が0に近づくというこの性質を利用し、分離度と全分散を合成した関数を作ることにより、階調変換パラメータgが0あるいは∞の極端な値になる前に、ニ値化評価値の極大値が見つかるよう、分離度を補正することができる。
【0014】
全分散の関数を図7式(705)とし、栗田の分離度(図7式(702))と図7式(705)とを合成した、栗田の補正分離度を図7式(708)とする。これがニ値化評価値となる。全分散の関数(式(705))は、全分散の大小関係を保持していればどのようなものでもよく、ここでは、全分散の関数として全分散そのもの(図7式(706))と、全分散の平方根(図7式(707))を使っている。栗田の補正分離度も、栗田の分離度及び、全分散の大小関係を保持していれば、どのような計算式でも構わない。ここでは、栗田の分離度と全分散の関数である式(706)、または、式(707)との乗算を、栗田の補正分離度としている。この栗田の補正分離度(式(709)、式(710))が、従来技術としての、ニ値化評価値である。
【0015】
元来アナログ値である画像の濃度値は、画像入力処理を通すことにより、量子化され整数値として取り込まれ、量子化することによる、量子化誤差が生じている。処理濃度レベル数Lが多いときは、量子化誤差の影響は小さいが、画像データが文字のときなどは、処理濃度レベル数Lが少ない場合があり、このとき、量子化誤差の影響が大きく現れてしまう。従って、この量子化誤差を考慮しておく必要がある。量子化誤差を考慮すると、図7式(712)に示される分散の増加分が生じる。
【0016】
この分散の増加分を使い、量子化誤差を考慮したときの、栗田のゆう度規準は図7式(713)に、栗田の分離度は式(714)になり、栗田の補正分離度は式(715)となる。この量子化誤差を考慮した栗田の補正分離度(式(715))、実際は、式(716)と式(717)も従来技術の1つである。大津のゆう度規準(式(703))と大津の分離度(式(704))は、分散の増加分(図7式(712))が定数として付加されるだけであるため、量子化誤差を考慮してもしなくても、評価に影響しない。
【0017】
以上より、比較のための大津の分離度(図7式(704))、及び、式(709)、式(710)、式(716)、式(717)の5つが、従来技術としてのニ値化評価値(図7式(718))である。図2においては、ゆう度規準値109と全分散110から、前記ニ値化評価値の内の1つを使い、ニ値化評価値計算処理121により、ニ値化評価値122を得ることに対応する。
【0018】
仮のしきい値番号kについては、各gの値に対して、k=0からL−2に対するニ値化評価値122を計算し、このニ値化評価値(図7式(718))の最大値とそのときのkを見つけておく。パラメータgについては、1から始め、0.01刻みで、1より大きいgと、1より小さいgについて、交互にニ値化評価値(式(718))を計算していき、ニ値化評価値の極大値を見つけたら、その時点で処理を終了する。その極大値をとる時点でのk番目の濃度値が最適ニ値化しきい値となる。これは、図2において、極大値判定処理113により、ニ値化評価値122から、最適ニ値化しきい値114を求めることに対応する。
【0019】
ここでは、最大値でなく極大値を見つける方法を示しているが、極大値を見つける方法は、処理を途中で終了させるため、最大値を見つける方法より、処理速度が速いからであり、最大値を見つける方法でも、ほぼ同様の結果が得られる。最大値を見つける方法の場合は、gを0.45から0.01刻みで2.23まで変化させ、ニ値化評価値の最大値を見つけ、そのときのk番目の濃度値が最適ニ値化しきい値となる。
【0020】
以上で、図5、図6、図7の定義を使用し、図2のブロック図に沿って、従来技術のニ値化しきい値選定方法の説明を行った。
次に、この方法の性能調査を行うことにする。ウェブページ(http://www.etl.go.jp/ ̄etlcdb/gtbin/)に、文字データベースETL1という文字画像データについて、各濃度値がしきい値としてどの程度よいかを示した、ニ値化アルゴリズムの性能を評価するためのデータがある。これは、画像の各濃度値を、ニ値化しきい値としての良さに応じて区分し、文字データベースETL1の141,217サンプル全てについて、優、良、可、限界、不可の5つに分類したデータを与えたものである。ここでは、このウェブページのデータを使用して、従来技術のニ値化しきい値選定方法の性能を評価してみる。
【0021】
従来技術のニ値化しきい値選定方法によって求められたしきい値は、このウェブページのデータにより、優、良、可、限界、不可のいずれかに分類され、各分類の個数を求めることができる。実験で求められた個数を図8に示す。各分類に対し1.00(優)、1.00(良)、0.90(可)、0.50(限界)、0.00(不可)の重みを与え、個数の加重平均を計算することにより、ニ値化しきい値選定方法の性能を数値として表示することができる。従来技術の各手法に対して、この加重平均を計算したものが図8の評価値である。値が大きいほど、ニ値化性能がよいことを示している。
【0022】
図8では、従来技術の中でも、比較のために調査した大津の分離度(式(704))に関する評価値は0.991714で、ニ値化アルゴリズムとしての性能が一番よいという結果であり、栗田の4手法(式(709)、式(710)、式(716)、式(717))はどれも、大津の手法より低い評価値となっている。
【0023】
【非特許文献1】
斉藤泰一: ”濃度階調補正を施したゆう度規準による2値化しきい値選定法”, 「電子情報通信学会論文誌(D−II)」, Vol.J80−D−II, No.6, pp.1343−−1351 (1997−06).
【非特許文献2】
斉藤泰一,山田博三: ”2値化用しきい値情報の作成とこれを使ったゆう度規準の性能比較”, 「電子技術総合研究所彙報」, Vol.62, No.4, pp.187−−199 (1998−04).
【0024】
【発明が解決しようとする課題】
以上のように、従来技術として、画像濃度の階調変換を行い、分離度と全分散の関数を合成したニ値化評価値の極大値を見つけることにより、最適ニ値化しきい値を求める方法を示したが、比較のための大津の分離度を使った手法よりニ値化性能が低いことが示されてしまった。この低性能の原因としては、大津の分離度が0から1の値になるよう正規化されているのに対し、栗田の分離度が正規化されていないことが考えられる。パラメータgの値を変えて濃度階調変換を行い、変換された濃度値を使って、ゆう度規準、分離度、ニ値化評価値を計算し、その最適値を見つける方法では、求められるニ値化評価値が厳密に定義されていなければならない。前記の栗田の分離度が0から1に正規化されていないことは、その厳密さに欠けていることを意味し、これが、ニ値化性能を低くしていると考えられる。
【0025】
そこで、本発明は、ニ値化アルゴリズムを高性能化することにより、ニ値化される画像を高品質にし、ニ値画像の認識処理、あるいは、圧縮処理に悪影響を及ぼさないようにすることを目的としている。
【0026】
【課題を解決するための手段】
上記課題を達成するため、栗田の分離度を、0から1になるような関数に正規化する必要がある。栗田の分離度について理論的考察を行い、結果として単純な追加により、0から1に正規化する方法が発見された。
図9で、栗田の分離度を0から1に正規化した正規化分離度を式(901)に示す。栗田の補正分離度(式(708))の分離度を正規化分離度に変えた、補正正規化分離度を式(902)に、量子化誤差を考慮した栗田の補正分離度(式(704))の分離度を正規化分離度に変えた、量子化誤差を考慮した補正正規化分離度を式(906)に示す。これより、図9の式(903)、式(904)、式(907)、式(908)が、新しいニ値化評価値である。
【0027】
新しいニ値化評価値の性能評価を、ウェブページ(http://www.etl.go.jp/ ̄etlcdb/gtbin/)のデータを使い、従来技術に対して行ったと同様の方法で評価してみる。その結果が、図10であり、比較のため、大津の分離度(式(704))による結果も示している(図8と同じ値である)。新しいニ値化評価値の中でも、全分散の関数を全分散の平方根とした、量子化誤差を考慮した補正正規化分離度(式(908))の評価値が0.991839であり、大津の分離度の評価値0.991714を超えており、栗田の分離度を0〜1に正規化した正規化分離度を使用することにより、ニ値化性能が向上していることが示されている。
【0028】
本発明の画像処理方法は、濃淡画像の各画素の濃度値から濃度ヒストグラムを求め、前記濃淡画像の各画素の濃度値を整数から実数にした実数濃度値に変換し、前記実数濃度値を階調変換パラメータで変化する階調変換関数により階調変換濃度値に変換する。前記濃度ヒストグラム及び前記階調変換濃度値から、2つの正規分布の生起確率が等しく、分散が異なると仮定した場合において定式化したゆう度規準値及び全分散を求める。前記ゆう度規準値及び前記全分散から0〜1に正規化した正規化分離度を求め、前記正規化分離度及び前記全分散から最適ニ値化しきい値を判定するためのニ値化評価値である正規化ニ値化評価値を求める。前記階調変換パラメータの各値に対して求められた前記正規化ニ値化評価値が最適なところを判定し、最適とされた前記階調変換パラメータの値における前記正規化ニ値化評価値をとるニ値化しきい値を最適ニ値化しきい値とする。
【0029】
本発明の画像処理装置は、画素値が多値の濃淡画像をニ値化するためのニ値化しきい値を選定するために、濃淡画像の各画素の濃度値から求めた濃度ヒストグラムと、前記濃淡画像の各画素の濃度値を整数から実数に変換した実数濃度値を階調変換パラメータで変化する階調変換関数によりさらに変換処理した階調変換濃度値とから、ゆう度規準値及び全分散を求め、このゆう度規準値及び全分散からニ値化評価値を求め、このニ値化評価値を判定処理して最適ニ値化しきい値を求める。そして、前記ゆう度規準値及び前記全分散から0〜1に正規化した正規化分離度を求める手段と、前記正規化分離度及び前記全分散から最適ニ値化しきい値を判定するためのニ値化評価値である正規化ニ値化評価値を求める手段と、前記階調変換パラメータの各値に対して求められた前記正規化ニ値化評価値が最適なところを判定する最適値判定手段とを備える。前記最適値判定手段において最適とされた前記階調変換パラメータの値における前記正規化ニ値化評価値をとるニ値化しきい値を最適ニ値化しきい値とする。
【0030】
【発明の実施の形態】
以下、本発明による処理を図1のブロック図で説明する。画像入力処理101により、画像6を入力して濃淡画像データ102を得る。濃度ヒストグラム作成処理103により、濃淡画像データ102から、濃度ヒストグラム104(図5の式(505))と実数濃度値105(図5の式(508))を得る。濃度階調変換処理106により、実数濃度値105から階調変換濃度値107(図5の式(509))を得る。図1のゆう度規準計算処理108により、図6の統計量を計算し、ゆう度規準値109と全分散110を計算する。図1の正規化ニ値化評価値計算処理111により、正規化ニ値化評価値112を図6の一部の式及び図9の式を使って計算する。この正規化ニ値化評価値とは、2つの正規分布の生起確率は等しく、分散は異なると仮定して定式化した栗田の分離度を0〜1の値になるように正規化した、正規化分離度を使用したものである。求められた正規化ニ値化評価値112から、図1の極大値判定処理113により、最適ニ値化しきい値114を選定する。
【0031】
図1は図2とほぼ同じ処理であるが、図1の図2との違いは、図2のニ値化評価値計算処理に対して、図1では、正規化分離度を使った、正規化ニ値化評価値計算処理を行っているところである。
【0032】
【実施例】
図11に、新しいニ値化しきい値選定処理を行う装置の構成を示す。装置の各部は、バス1に接続され、全体の制御は制御部2により制御される。処理方法を記述したプログラムは、ハードディスク3からメモリ40に格納され、制御部2がメモリ40内のプログラムに従って処理を制御する。プログラムの処理には、加減乗除、関数計算等があり、これらは演算部5で実行される。
【0033】
まず、最初の処理では、画像6を入力機器7により入力し、濃淡画像データ102(図1)をメモリ41に格納する。ハードディスク3にすでにある濃淡画像データをメモリ41に格納する場合もある。メモリ41の濃淡画像データから、濃度ヒストグラム(図5式(505))、実数濃度値(図5式(503))を作成し、演算部5で、濃度階調変換処理を行い、実数濃度値から階調変換濃度値(図5式(508))を計算し、メモリ42に格納する。メモリ42の濃度ヒストグラムと階調変換濃度値から、ゆう度規準、全分散、正規化ニ値化評価値(図9式(909))を計算し、メモリ43に格納する。メモリ43の正規化ニ値化評価値から、極大値検出処理により、ニ値化しきい値を求める。このニ値化しきい値をメモリ44、あるいは、ハードディスク3に格納、あるいは、出力機器8に出力する。または、このニ値化しきい値を使い、メモリ41にある濃淡画像データをニ値化し、ニ値画像データをメモリ45、あるいは、ハードディスク3に格納、あるいは、出力機器8に出力する。
【0034】
【発明の効果】
本発明によるニ値化しきい値選定法は、ウェブページ(http://www.etl.go.jp/ ̄etlcdb/gtbin/)のデータを使ってニ値化アルゴリズムの性能評価を行い、従来技術より、高性能であることが示された。ニ値化アルゴリズムの性能が低いと、ニ値化された画像が低品質になることがあり、ニ値画像の認識処理、あるいは、圧縮処理に悪影響を及ぼす。使用するニ値化アルゴリズムが高性能なほど、この悪影響を減じることができる。
【図面の簡単な説明】
【図1】本発明である、0〜1に正規化した分離度を導入した、正規化ニ値化評価値を使って、ニ値化しきい値を選定する方法を示したブロック図。
【図2】従来技術である、正規化していない分離度による、ニ値化評価値を使って、ニ値化しきい値を選定する方法を示したブロック図。
【図3】実数濃度値を0、0.1、0.2、0.3、0.4、0.5、0.6、0.7、0.8、0.9、1.0とし、その濃度値をとる画素の度数が0、2、5、1、2、4、5、4、3、1、0の場合における、濃度ヒストグラムの形を示した図(階調変換パラメータをg=1として階調変換した場合と同様)。
【図4】図3に対し、階調変換パラメータをg=0.5としたときの濃度ヒストグラムの形を示した図。
【図5】ニ値化の対象となる濃淡画像データに関する情報の定義式。
【図6】仮のしきい値でニ値化する場合の各種統計量を示した定義式。
【図7】図6の統計量から求められる、従来技術に関する、ニ値化評価値の定義式。
【図8】性能評価のために、多量の濃淡画像データについて、従来技術のニ値化しきい値選定法で求められたニ値化しきい値を、ニ値化の良さで分類した個数とそのニ値化評価値を表示した表。
【図9】図6の統計量から求められる、本発明に関する、正規化ニ値化評価値の定義式。
【図10】性能評価のために、多量の濃淡画像データについて、本発明のニ値化しきい値選定法で求められたニ値化しきい値を、ニ値化の良さで分類した個数とそのニ値化評価値を表示した表。
【図11】本発明である、正規化ニ値化評価値を使った、ニ値化しきい値選定を行う装置の構成を示すブロック図。
【符号の説明】
1: バス
2: 制御部
3: ハードディスク
4、40、41、42、43、44、45: メモリ
5: 演算部
6: 画像
7: 入力機器
8: 出力機器
101: 画像入力処理
102: 濃淡画像データ
103: 濃度ヒストグラム作成処理
104: 濃度ヒストグラム
105: 実数濃度値
106: 濃度階調変換処理
107: 階調変換濃度値
108: ゆう度規準計算処理
109: ゆう度規準値
110: 全分散
111: 正規化ニ値化評価値計算処理
112: 正規化ニ値化評価値
113: 極大値判定処理
114: 最適ニ値化しきい値
121: ニ値化評価値計算処理
122: ニ値化評価値
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention provides an image processing method and apparatus for selecting a binarization threshold for binarizing a multi-valued gray-scale image as a pre-processing when performing character recognition, or as an image compression processing, and It relates to an image processing program.
[0002]
[Prior art]
When character recognition is performed after binarizing a character observed as a grayscale image, or when binarization is performed to compress a large number of grayscale images, a high-speed binarization algorithm is required. As a method of performing the binarization at high speed, a method using a density histogram is effective. That is, for all pixels of the image, a density histogram is obtained by counting the number of pixels for each density value, and a binarization evaluation value when binarizing each density value is calculated on the basis of the density histogram, and the optimal histogram is calculated. The density value giving the binarization evaluation value is used as the binarization threshold. Accordingly, the binarized evaluation value calculation processing is proportional to the number of density levels, and therefore requires a calculation amount significantly smaller than the number of pixels of the image.
[0003]
Among methods using a density histogram, a method called a maximum likelihood method using a likelihood criterion as a binary evaluation value is known to be effective. The maximum likelihood method has been used for a long time and is a mathematical method for finding the optimum value of the likelihood criterion. This method can be applied to various situations, depending on the target. Here, the maximum likelihood method is applied to the problem of selecting a binary threshold. The likelihood criterion is also a mathematical function that has been used in statistics for a long time, and a plurality of likelihood criterion can be formulated by different assumptions regarding the histogram.
[0004]
As an example of the likelihood criterion for selecting a binarization threshold, it is assumed that two normal distributions are superimposed on a density histogram of a grayscale image. Furthermore, there are an occurrence probability and a variance as parameters expressing each normal distribution, and the following four types of assumptions can be divided from the relationship between the occurrence probability and the variance of two normal distributions. (1) Assuming that occurrence probabilities are different and variances are equal. (2) When the probability of occurrence and the variance are assumed to be equal. (This is called Otsu's method because he devised it.) (3) When it is assumed that the occurrence probability and variance are different. (4) When it is assumed that occurrence probabilities are equal and variances are different. (This is called Kurita's method because he devised it.)
[0005]
As a conventional technique, a binarization threshold is selected based on the likelihood criterion formulated by Kurita's method assuming that the relationship between the occurrence probability and the variance of two normal distributions is equal and the variances are different. There is one method (see Non-Patent Documents 1 and 2).
This method will be described with reference to the block diagram of FIG. 2 while defining symbols to be used in FIGS. 5, 6, and 7.
First, the image 6 is input and the gray image data 102 is obtained by the image input processing 101 of FIG.
[0006]
In FIG. 5, the number of density levels of the grayscale image data is a number Lg = imax−imin + 1 (Equation (501) in FIG. 5) from the minimum integer density value imin (FIG. 5) to the maximum integer density value imax (FIG. 5). A density value smaller than imin and a density value larger than imax by 1 are added to this, and the number of processing density levels is set to L = Lg + 2 in equation (502) in FIG. The real number density value u (j) is obtained by subjecting the density value to affine conversion so that the integer density values imin-1 to imax + 1 become 0 to 1. The reason why the density value is converted to a real number from 0 to 1 is to facilitate the gradation conversion performed later. Even if the density value is subjected to the affine conversion, the relative position of the optimum binarization threshold value before and after the affine conversion does not change. It uses the property that there is no. The density histogram p (j) is obtained by dividing the frequency h (i) of a pixel having an integer density value i by the total number of pixels N, as shown in Expression (505) in FIG. ), The sum of p (j) is 1. In FIG. 2, a density histogram 104 and a real number density value 105 are obtained from the grayscale image data 102 by a density histogram creation process 103. This corresponds to the density histogram p (j) (Equation (505)) and the real number density value u (j) (Equation (503)) in FIG.
[0007]
Next, assuming that the gradation conversion parameter is g, the real number density value u (j) is converted to a gradation conversion density value v (g; j) by equation (508) in FIG. This corresponds to obtaining a gradation conversion density value 107 from the real number density value 105 in FIG. Equation (508) in FIG. 5 shows that when j = 0, v (g; 0) = u (0) = 0, and when j = L−1, v (g; L−1) = u (L−1). = 1, and the density values of j = 1 to L-2 on the way change depending on the parameter g. g is a positive real number and can take a value from around zero (0) to infinity (∞), but in practice, it is sufficient to take a range of about 0.45 to 2.23 in 0.01 steps. It is. When g = 1, no gradation conversion is performed, and u and v have the same value for all j. The gamma conversion of Expression (509) is used as a normal tone conversion function. However, when Expression (509) is used, two types of images are obtained: an image in which the density value of the grayscale image data is inverted, and an image that is not inverted. The quantification result will be different. Since it is unnatural that the binarization result is different even though it is simply inverted, the function for performing the gradation conversion is such that even if the pixel value is inverted, the binarization result is the same. A function that maintains symmetry is preferred. Any function may be used as long as the function maintains the symmetry. Here, equation (508) shown in FIG. 5 is used as an example.
[0008]
Next, a statistic when the provisional threshold is set to the kth is defined. Here, binarization using the k-th density value v (g; k) as a threshold value means that a density value equal to or less than v (g; k) falls into class 0 and exceeds v (g; k). This means that the density value is set to class 1. When the provisional threshold value is the kth and the density values are divided into two classes, the occurrence probability, the density average value, the total density average value, the variance, and the intra-class variance, FIG. 6 defines the statistics of the inter-variance and the total variance. Although each statistic in FIG. 6 changes with the parameters g and k, only the total density average value and the total variance change only with the parameter g, and do not change with k.
[0009]
Next, using the statistics of FIG. 6, a likelihood criterion based on the binarization evaluation value is defined in FIG. Kurita's likelihood criterion formulated assuming that two normal distributions, which are one of the likelihood criterion, have the same probability of occurrence and different variances, is given by equation (701). Equation (702) of FIG. 7 is obtained by adding the total variance of Equation (611) in FIG. 6 so that it becomes an invariant function of the density affine transformation, and this is called Kurita's degree of separation. The upper limit of this equation (702) is 1, but the lower limit is unknown, and can be 0 or less. For comparison, Otsu's likelihood criterion formulated assuming that both the occurrence probability and variance of two normal distributions are equal is shown in equation (703), and Otsu's degree of separation is shown in equation (704). Otsu's degree of separation has an upper limit of 1 and a lower limit of 0, and is a scale normalized to 0-1. The likelihood criterion, the degree of separation, and the binarization evaluation value described later are all defined such that the larger the evaluation value, the higher the evaluation as the binarization threshold. Depending on the definition method, the smaller the binary evaluation value, the higher the evaluation. The above process corresponds to obtaining a likelihood standard value 109 and a total variance 110 from the density histogram 104 and the gradation conversion density value 107 in FIG.
[0010]
The degree of separation defined above has the property that it becomes larger and approaches 1 as the gradation conversion parameter g approaches either 0 or ∞ or both depending on the form of the density histogram of the grayscale image data. There is. This results in that it is optimal to set the parameter g to 0 or an extreme value of ∞. That is, no matter what the grayscale image data is, an extreme and abnormal state of the parameter g is adopted, and it is not only meaningless to introduce the parameter g but also a good binarization threshold. Means that it cannot be obtained.
[0011]
Therefore, the degree of separation is corrected using the total variance (Equation (611) in FIG. 6). However, for the Otsu separation degree for comparison (Equation (704) in FIG. 7), the gradation conversion parameter g is fixed at g = 1, and the gradation conversion is not performed and the separation degree is not corrected. . This is because Otsu's degree of separation is formulated assuming that the occurrence probability and variance are also equal, so even if gradation conversion or correction of the degree of separation is performed, the performance as a binary evaluation value does not improve. It is.
[0012]
The number L of processing density levels is not the number Lg of density levels from the minimum to the maximum existing in the grayscale image data, but is a number obtained by adding an extra density value to each of the maximum and the minimum. By doing so, the frequency of the density value at both ends for performing the grayscale conversion is always 0, and as the grayscale conversion parameter g approaches 0 or ∞, the portion where the frequency of the density histogram is 1 or more is pushed to one side. Go. By using the calculation formula in FIG. 5 (508), the density histogram is pushed to the density value 1 side as g becomes smaller than 1, and the density histogram is pushed to the density value 0 side as g becomes larger than 1. Also, the total variance (Equation (611) in FIG. 6) approaches 0.
[0013]
For example, the number of processing density levels is L = 11, and the real number density value (Equation (503) in FIG. 5) is 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6. , 0.7, 0.8, 0.9, and 1.0, and the frequency (Equation (504) in FIG. 5) of the pixel having the density value is 0, 2, 5, 1, 2, 4, 5, 4, Consider the case of 3, 1, 0. FIG. 3 shows the shape of the density histogram when the gradation conversion parameter is g = 1. On the other hand, the shape of the density histogram when g = 0.5 is as shown in FIG. 4. By making g a value smaller than 1, the whole is shifted rightward (in the direction of the density value 1) as compared with FIG. Being pushed away.
By making use of this property that the total variance approaches 0, a function that combines the degree of separation and the total variance is created, so that the binary conversion evaluation value can be obtained before the gradation conversion parameter g becomes 0 or an extreme value of 値. Can be corrected so as to find the maximum value of.
[0014]
The function of the total variance is shown in FIG. 7 (705), and Kurita's corrected separation is obtained by combining Kurita's separation (see FIG. 7 (702)) and FIG. 7 (705). I do. This is the binarized evaluation value. The function of the total variance (Equation (705)) may be any function as long as it holds the magnitude relation of the total variance. Here, the total variance itself (Equation (706) in FIG. 7) is used as the function of the total variance. , The square root of the total variance (Equation (707) in FIG. 7). Kurita's corrected separation degree may be any formula as long as it holds Kurita's separation degree and the magnitude relationship of the total variance. Here, the multiplication of Kurita's degree of separation and Equation (706) or Equation (707), which is a function of the total variance, is defined as Kurita's corrected degree of separation. The Kurita's corrected separation (Equation (709), Equation (710)) is a binarized evaluation value according to the related art.
[0015]
The density value of an image, which is originally an analog value, is quantized by passing through an image input process, is taken in as an integer value, and is quantized, thereby causing a quantization error. When the number L of processing density levels is large, the effect of the quantization error is small, but when the image data is text, the number L of processing density levels may be small. At this time, the influence of the quantization error appears greatly. Would. Therefore, it is necessary to consider this quantization error. Considering the quantization error, an increase in the variance shown in equation (712) of FIG. 7 occurs.
[0016]
The Kurita's likelihood criterion when using the increase in variance and considering the quantization error is shown in equation (713) in FIG. 7, the Kurita's degree of separation is shown in equation (714), and the Kurita's corrected degree of separation is shown in equation (714). (715). Kurita's corrected separation factor taking into account this quantization error (Equation (715)), in fact, Expressions (716) and (717) are also one of the prior arts. The Otsu likelihood criterion (Equation (703)) and the Otsu separation degree (Equation (704)) are obtained by simply adding the increase in variance (Equation (712) in FIG. 7) as a constant. It does not affect the evaluation, whether or not it is taken into account.
[0017]
From the above, Otsu's degree of separation (Equation (704) in FIG. 7) for comparison and five of Eq. (709), Eq. (710), Eq. (716) and Eq. It is a valuation evaluation value (Equation (718) in FIG. 7). In FIG. 2, a binarized evaluation value 122 is obtained from a likelihood reference value 109 and a total variance 110 by a binarized evaluation value calculation process 121 using one of the binarized evaluation values. Corresponding.
[0018]
For the provisional threshold number k, a binary evaluation value 122 for k = 0 to L-2 is calculated for each g value, and this binary evaluation value (equation (718) in FIG. 7) Find the maximum value of and k at that time. For the parameter g, starting from 1, the binarization evaluation value (equation (718)) is calculated alternately for g larger than 1 and g smaller than 1 in increments of 0.01. When the maximum value is found, the process ends at that point. The k-th density value at the time when the local maximum value is taken is the optimum binary threshold. This corresponds to obtaining the optimal binarization threshold value 114 from the binarization evaluation value 122 by the local maximum value determination process 113 in FIG.
[0019]
Here, the method of finding the maximum value instead of the maximum value is shown, but the method of finding the maximum value is because the processing speed is faster than the method of finding the maximum value because the processing is terminated midway. A similar result is obtained with the method of finding. In the method of finding the maximum value, g is changed from 0.45 to 2.23 in steps of 0.01 to find the maximum value of the binarization evaluation value, and the k-th density value at that time is the optimal binary value. Threshold.
[0020]
In the above, the binarization threshold value selection method of the related art has been described using the definitions of FIGS. 5, 6, and 7 and along the block diagram of FIG.
Next, the performance of this method will be investigated. A binary value indicating how good each density value is as a threshold for a character image data of a character database ETL1 in a web page (http://www.etl.go.jp/@etlcdb/gtbin/). There is data for evaluating the performance of the optimization algorithm. In this method, each density value of an image is classified according to the goodness as a binary threshold, and all 141 and 217 samples of the character database ETL1 are classified into excellent, good, acceptable, limited, and unacceptable. Data is given. Here, the performance of the conventional binarization threshold value selection method will be evaluated using the data of this web page.
[0021]
The threshold values obtained by the conventional binarization threshold selection method are classified into any of excellent, good, acceptable, limit, and unacceptable according to the data of this web page. it can. FIG. 8 shows the numbers obtained in the experiment. A weight of 1.00 (excellent), 1.00 (good), 0.90 (acceptable), 0.50 (limit), 0.00 (impossible) is given to each classification, and a weighted average of the number is calculated. Thus, the performance of the binarization threshold value selection method can be displayed as a numerical value. The evaluation value of FIG. 8 is obtained by calculating the weighted average for each of the conventional techniques. The larger the value, the better the binarization performance.
[0022]
In FIG. 8, among the conventional techniques, the evaluation value regarding the Otsu separation (formula (704)) investigated for comparison is 0.991714, which is the result that the performance as the binarization algorithm is the best. Kurita's four methods (Equation (709), Equation (710), Equation (716), and Equation (717)) all have lower evaluation values than the Otsu method.
[0023]
[Non-patent document 1]
Taiichi Saito: "Binarization threshold selection method based on likelihood criterion with density gradation correction", IEICE Transactions on Electronics (D-II), Vol. J80-D-II, No. 6, pp. 1343-1351 (1997-06).
[Non-patent document 2]
Taiichi Saito and Hirozo Yamada: "Creation of threshold information for binarization and performance comparison of likelihood criterion using it", "Research Report of Electronic Technology Research Institute", Vol. 62, No. 4, pp. 187-199 (1998-04).
[0024]
[Problems to be solved by the invention]
As described above, as a conventional technique, a method of calculating an optimum binarization threshold value by performing gradation conversion of image density and finding a maximum value of a binarization evaluation value obtained by combining a function of separation and total variance. However, it was shown that the binarization performance was lower than the method using Otsu's degree of separation for comparison. As a cause of this low performance, it can be considered that while the separation degree of Otsu is normalized to be a value from 0 to 1, the separation degree of Kurita is not normalized. In the method of performing density gradation conversion by changing the value of the parameter g, calculating the likelihood criterion, the degree of separation, and the binarization evaluation value using the converted density value, and finding the optimum value, The valuation value must be strictly defined. The fact that Kurita's degree of separation is not normalized from 0 to 1 means that the degree of rigor is lacking, which is considered to lower the binarization performance.
[0025]
Therefore, the present invention provides a binarization algorithm with high performance to improve the quality of a binarized image so that the binarization image recognition processing or compression processing is not adversely affected. The purpose is.
[0026]
[Means for Solving the Problems]
In order to achieve the above object, it is necessary to normalize Kurita's degree of separation to a function that changes from 0 to 1. A theoretical study of Kurita's degree of separation was performed, and as a result, a method of normalizing from 0 to 1 with a simple addition was discovered.
In FIG. 9, a normalized separation degree obtained by normalizing the separation degree of Kurita from 0 to 1 is shown in Expression (901). Kurita's corrected separability (Equation (708)) is changed to normalized separability. The corrected normalized separability is expressed by Equation (902), and Kurita's corrected separability (Equation (704) Equation (906) shows the corrected normalized separation in consideration of the quantization error in which the separation of ()) is changed to the normalized separation. Thus, the equations (903), (904), (907), and (908) in FIG. 9 are new binarized evaluation values.
[0027]
The performance evaluation of the new binarized evaluation value was evaluated in the same manner as that performed for the conventional technology using the data of the web page (http://www.etl.go.jp/@etlcdb/gtbin/). Try. The result is FIG. 10, which also shows the result of Otsu's degree of separation (formula (704)) for comparison (the same value as in FIG. 8). Among the new binarized evaluation values, the evaluation value of the corrected normalized separability (Equation (908)) taking the quantization error into consideration, taking the function of the total variance as the square root of the total variance, is 0.991839. The evaluation value of the degree of separation exceeds 0.991714, indicating that the binarization performance is improved by using the normalized degree of separation in which Kurita's degree of separation is normalized to 0 to 1. .
[0028]
According to the image processing method of the present invention, a density histogram is obtained from the density values of each pixel of the grayscale image, the density value of each pixel of the grayscale image is converted into a real number density value obtained by converting an integer to a real number, and The image data is converted into a gradation conversion density value by a gradation conversion function that changes according to the tone conversion parameter. From the density histogram and the gradation conversion density value, a likelihood standard value and a total variance formulated when it is assumed that the occurrence probabilities of the two normal distributions are equal and the variances are different are obtained. A binarization evaluation value for determining a normalized separation degree normalized to 0 to 1 from the likelihood standard value and the total variance, and determining an optimal binarization threshold from the normalized separation degree and the total variance. Is obtained. It is determined whether the normalized binarized evaluation value obtained for each value of the gradation conversion parameter is optimum, and the normalized binarized evaluation value at the optimized gradation conversion parameter value is determined. Is taken as the optimal binarization threshold.
[0029]
The image processing apparatus according to the present invention includes a density histogram obtained from density values of respective pixels of the grayscale image, in order to select a binarization threshold for binarizing the grayscale image having a multi-valued pixel value, The likelihood standard value and the total variance are obtained from a tone conversion density value obtained by further converting a real density value obtained by converting the density value of each pixel of the grayscale image from an integer to a real number with a tone conversion function that changes with a tone conversion parameter. Is calculated from the likelihood standard value and the total variance, and the binarized evaluation value is determined to obtain an optimal binarized threshold. Means for obtaining a normalized separation degree normalized to 0 to 1 from the likelihood standard value and the total variance; and a means for determining an optimal binarization threshold value from the normalized separation degree and the total variance. Means for calculating a normalized binarized evaluation value, which is a binarized evaluation value, and an optimum value determination for judging where the normalized binarized evaluation value obtained for each value of the gradation conversion parameter is optimal Means. A binarization threshold value that takes the normalized binarization evaluation value at the value of the gradation conversion parameter determined to be optimal by the optimal value determination unit is set as an optimal binarization threshold value.
[0030]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the processing according to the present invention will be described with reference to the block diagram of FIG. The image 6 is input by the image input processing 101 to obtain the gray image data 102. A density histogram 104 (formula (505) in FIG. 5) and a real density value 105 (formula (508) in FIG. 5) are obtained from the grayscale image data 102 by the density histogram creation processing 103. By the density gradation conversion processing 106, a gradation conversion density value 107 (formula (509) in FIG. 5) is obtained from the real number density value 105. 6 is calculated by the likelihood criterion calculation processing 108 in FIG. 1, and the likelihood criterion value 109 and the total variance 110 are calculated. The normalized binarized evaluation value calculation processing 111 shown in FIG. 1 calculates the normalized binarized evaluation value 112 using a part of the equations in FIG. 6 and the equations in FIG. The normalized binarized evaluation value is a normalized value obtained by normalizing the degree of separation of Kurita formulated assuming that the occurrence probabilities of two normal distributions are equal and the variances are different so as to have a value of 0 to 1. The degree of chemical separation was used. From the obtained normalized binarized evaluation value 112, an optimal binarized threshold 114 is selected by a local maximum value judging process 113 in FIG.
[0031]
FIG. 1 is substantially the same as FIG. 2 except that FIG. 1 differs from FIG. 2 in that the binarized evaluation value calculation processing in FIG. It is in the process of calculating the chemical conversion evaluation value.
[0032]
【Example】
FIG. 11 shows a configuration of an apparatus for performing a new binary threshold selection process. Each unit of the device is connected to a bus 1, and the overall control is controlled by a control unit 2. The program describing the processing method is stored in the memory 40 from the hard disk 3, and the control unit 2 controls the processing according to the program in the memory 40. The processing of the program includes addition, subtraction, multiplication, division, function calculation, and the like.
[0033]
First, in the first process, the image 6 is input from the input device 7 and the grayscale image data 102 (FIG. 1) is stored in the memory 41. The grayscale image data already on the hard disk 3 may be stored in the memory 41 in some cases. A density histogram (Equation (505) in FIG. 5) and a real number density value (Equation (503) in FIG. 5) are created from the grayscale image data in the memory 41. Then, the tone conversion density value (Equation (508) in FIG. 5) is calculated from the formula and stored in the memory 42. A likelihood criterion, a total variance, and a normalized binarized evaluation value (Equation (909) in FIG. 9) are calculated from the density histogram and the gradation conversion density value in the memory 42 and stored in the memory 43. From the normalized binarized evaluation value in the memory 43, a binarized threshold is obtained by a local maximum value detection process. The binary threshold is stored in the memory 44 or the hard disk 3 or output to the output device 8. Alternatively, using the binarization threshold, the grayscale image data in the memory 41 is binarized, and the binary image data is stored in the memory 45 or the hard disk 3 or output to the output device 8.
[0034]
【The invention's effect】
The binarization threshold selection method according to the present invention evaluates the performance of a binarization algorithm using data of a web page (http://www.etl.go.jp/@etlcdb/gtbin/), and performs a conventional technique. It was shown to be more efficient. If the performance of the binarization algorithm is low, the binarized image may be of low quality, which adversely affects the recognition processing of the binary image or the compression processing. The higher the binarization algorithm used, the less this effect can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a method of selecting a binarization threshold using a normalized binarization evaluation value in which a degree of separation normalized to 0 to 1 is introduced according to the present invention.
FIG. 2 is a block diagram showing a conventional technique of selecting a binarization threshold value using a binarization evaluation value based on a non-normalized degree of separation.
FIG. 3 shows real number density values of 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0. Is a diagram showing the shape of a density histogram when the frequency of a pixel having that density value is 0, 2, 5, 1, 2, 4, 5, 4, 3, 1, 0 (the gradation conversion parameter is g = 1 as in the case of gradation conversion).
FIG. 4 is a diagram showing a shape of a density histogram when a gradation conversion parameter is set to g = 0.5 with respect to FIG. 3;
FIG. 5 is a definition formula of information relating to gray-scale image data to be binarized.
FIG. 6 is a definition expression showing various statistics when binarizing with a provisional threshold.
FIG. 7 is a definition formula of a binarization evaluation value according to the related art, which is obtained from the statistics in FIG. 6;
FIG. 8 shows, for performance evaluation, a large number of grayscale image data, the number of binarization thresholds obtained by the conventional binarization threshold value selection method classified according to the binarization goodness, and the number of bins. A table displaying valuation evaluation values.
FIG. 9 is a definition formula of a normalized binarized evaluation value according to the present invention, which is obtained from the statistics in FIG.
FIG. 10 shows the number of binarization thresholds obtained by the binarization threshold value selection method of the present invention classified into good binarization values and the number of binarization values for a large amount of grayscale image data for performance evaluation. A table displaying valuation evaluation values.
FIG. 11 is a block diagram showing a configuration of an apparatus for selecting a binarization threshold value using a normalized binarization evaluation value according to the present invention.
[Explanation of symbols]
1: Bus
2: Control unit
3: Hard disk
4, 40, 41, 42, 43, 44, 45: Memory
5: Operation unit
6: Image
7: Input device
8: Output device
101: Image input processing
102: Grayscale image data
103: Density histogram creation processing
104: density histogram
105: Real number density value
106: density gradation conversion processing
107: tone conversion density value
108: Likelihood criterion calculation processing
109: likelihood standard value
110: Total dispersion
111: Normalized binary conversion evaluation value calculation processing
112: Normalized binarized evaluation value
113: Local maximum value judgment processing
114: Optimal binary threshold
121: Binary evaluation value calculation processing
122: Binary evaluation value

Claims (6)

濃淡画像の各画素の濃度値から濃度ヒストグラムを求めるステップと、前記濃淡画像の各画素の濃度値を整数から実数にした実数濃度値に変換するステップと、前記実数濃度値を階調変換パラメータで変化する階調変換関数により階調変換濃度値に変換するステップと、前記濃度ヒストグラム及び前記階調変換濃度値から、2つの正規分布の生起確率が等しく、分散が異なると仮定した場合において定式化したゆう度規準値及び全分散を求めるステップと、前記ゆう度規準値及び前記全分散から0〜1に正規化した正規化分離度を求めるステップと、前記正規化分離度及び前記全分散から最適ニ値化しきい値を判定するためのニ値化評価値である正規化ニ値化評価値を求めるステップと、前記階調変換パラメータの各値に対して求められた前記正規化ニ値化評価値が最適なところを判定する最適値判定ステップを備え、前記最適値判定ステップにおいて最適とされた前記階調変換パラメータの値における前記正規化ニ値化評価値をとるニ値化しきい値を最適ニ値化しきい値とする画像処理方法。Obtaining a density histogram from the density values of each pixel of the gray image, converting the density value of each pixel of the gray image from an integer to a real number density value, and converting the real number density value by a tone conversion parameter. A step of converting to a gradation conversion density value by a changing gradation conversion function; and formulating a case where it is assumed that the probability of occurrence of two normal distributions is equal and the variance is different from the density histogram and the gradation conversion density value. Obtaining the normalized likelihood standard value and the total variance; calculating the normalized separation degree normalized to 0 to 1 from the likelihood standard value and the total variance; Obtaining a binarized binarization evaluation value that is a binarization evaluation value for determining a binarization threshold; An optimal value judging step of judging a position where the normalized binarized evaluation value is optimal, and taking the normalized binarized evaluation value at the value of the gradation conversion parameter optimized in the optimal value judging step. An image processing method using a binarization threshold as an optimal binarization threshold. 前記階調変換関数は、濃淡画像の各濃度値が反転した反転濃淡画像に対しても、反転していない濃淡画像に対しても、前記正規化ニ値化評価値により求められる最適ニ値化しきい値が同じになるような、対称性を保持した階調変換関数である請求項1に記載の画像処理方法。The tone conversion function is an optimal binarization obtained by the normalized binarization evaluation value, even for an inverted gray image in which each density value of the gray image is inverted, and for a gray image that is not inverted. The image processing method according to claim 1, wherein the image processing method is a gradation conversion function that maintains symmetry such that threshold values are the same. 画素値が多値の濃淡画像をニ値化するためのニ値化しきい値を選定するために、濃淡画像の各画素の濃度値から求めた濃度ヒストグラムと、前記濃淡画像の各画素の濃度値を整数から実数に変換した実数濃度値を階調変換パラメータで変化する階調変換関数によりさらに変換処理した階調変換濃度値とから、ゆう度規準値及び全分散を求め、このゆう度規準値及び全分散からニ値化評価値を求め、このニ値化評価値を判定処理して最適ニ値化しきい値を求める画像処理装置において、
前記ゆう度規準値及び前記全分散から0〜1に正規化した正規化分離度を求める手段と、
前記正規化分離度及び前記全分散から最適ニ値化しきい値を判定するためのニ値化評価値である正規化ニ値化評価値を求める手段と、
前記階調変換パラメータの各値に対して求められた前記正規化ニ値化評価値が最適なところを判定する最適値判定手段とを備え、
前記最適値判定手段において最適とされた前記階調変換パラメータの値における前記正規化ニ値化評価値をとるニ値化しきい値を最適ニ値化しきい値とする画像処理装置。
In order to select a binarization threshold for binarizing a multi-valued gray-scale image, a density histogram obtained from the density values of each pixel of the gray-scale image, and a density value of each pixel of the gray-scale image Is calculated from an integer to a real number, and a tone conversion density value further converted by a tone conversion function that changes with a tone conversion parameter, a likelihood standard value and a total variance are obtained. And the binarization evaluation value is obtained from the total variance, and in the image processing apparatus for determining the binarization evaluation value and determining the optimal binarization threshold value by performing the determination processing,
Means for obtaining a normalized separation degree normalized to 0 to 1 from the likelihood reference value and the total variance,
Means for determining a normalized binarization evaluation value that is a binarization evaluation value for determining an optimal binarization threshold from the normalized separation degree and the total variance,
Optimal value determining means for determining where the normalized binarized evaluation value obtained for each value of the gradation conversion parameter is optimal,
An image processing apparatus in which a binarization threshold value that takes the normalized binarization evaluation value at the value of the gradation conversion parameter optimized by the optimal value determination unit is an optimal binarization threshold value.
前記階調変換関数は、濃淡画像の各濃度値が反転した反転濃淡画像に対しても、反転していない濃淡画像に対しても、前記正規化ニ値化評価値により求められる最適ニ値化しきい値が同じになるような、対称性を保持した階調変換関数である請求項3に記載の画像処理装置。The tone conversion function is an optimal binarization obtained by the normalized binarization evaluation value, even for an inverted gray image in which each density value of the gray image is inverted, and for a gray image that is not inverted. The image processing apparatus according to claim 3, wherein the image processing apparatus is a gradation conversion function that maintains symmetry such that threshold values are the same. 画素値が多値の濃淡画像をニ値化するためのニ値化しきい値を選定するために、濃淡画像の各画素の濃度値から求めた濃度ヒストグラムと、前記濃淡画像の各画素の濃度値を整数から実数に変換した実数濃度値をさらに変換処理した階調変換濃度値とから、ゆう度規準値及び全分散を求め、このゆう度規準値及び全分散からニ値化評価値を求め、このニ値化評価値を判定処理して最適ニ値化しきい値を求める画像処理プログラムにおいて、
前記ゆう度規準値及び前記全分散から0〜1に正規化した正規化分離度を求め、
前記正規化分離度及び前記全分散から最適ニ値化しきい値を判定するためのニ値化評価値である正規化ニ値化評価値を求め、
前記階調変換パラメータの各値に対して求められた前記正規化ニ値化評価値が最適なところを判定し、
最適とされた前記階調変換パラメータの値における前記正規化ニ値化評価値をとるニ値化しきい値を最適ニ値化しきい値とする各手順を実行する画像処理プログラム。
In order to select a binarization threshold for binarizing a multi-valued gray-scale image, a density histogram obtained from the density values of each pixel of the gray-scale image, and a density value of each pixel of the gray-scale image The tone conversion density value obtained by further converting the real number density value obtained by converting the integer into a real number, obtains the likelihood standard value and the total variance, and obtains the binarized evaluation value from the likelihood standard value and the total variance. In the image processing program for determining the binarization evaluation value to determine the optimal binarization threshold,
From the likelihood standard value and the total variance, determine a normalized separation degree normalized to 0 to 1,
Obtain a normalized binarization evaluation value that is a binarization evaluation value for determining an optimal binarization threshold from the normalized separation degree and the total variance,
Determine where the normalized binarized evaluation value obtained for each value of the tone conversion parameter is optimal,
An image processing program for executing each procedure of setting a binarization threshold value that takes the normalized binarization evaluation value at the optimized gradation conversion parameter value as an optimal binarization threshold value.
前記階調変換関数は、濃淡画像の各濃度値が反転した反転濃淡画像に対しても、反転していない濃淡画像に対しても、前記正規化ニ値化評価値により求められる最適ニ値化しきい値が同じになるような、対称性を保持した階調変換関数である請求項5に記載の画像処理プログラム。The tone conversion function is an optimal binarization obtained by the normalized binarization evaluation value, even for an inverted gray image in which each density value of the gray image is inverted, and for a gray image that is not inverted. The image processing program according to claim 5, wherein the image processing program is a gradation conversion function that maintains symmetry such that threshold values are the same.
JP2002261254A 2002-09-06 2002-09-06 Image processing method, image processing unit, and program Pending JP2004104318A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002261254A JP2004104318A (en) 2002-09-06 2002-09-06 Image processing method, image processing unit, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002261254A JP2004104318A (en) 2002-09-06 2002-09-06 Image processing method, image processing unit, and program

Publications (1)

Publication Number Publication Date
JP2004104318A true JP2004104318A (en) 2004-04-02

Family

ID=32261683

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002261254A Pending JP2004104318A (en) 2002-09-06 2002-09-06 Image processing method, image processing unit, and program

Country Status (1)

Country Link
JP (1) JP2004104318A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005354287A (en) * 2004-06-09 2005-12-22 National Institute Of Advanced Industrial & Technology Method, apparatus, and program for applying binarizing or multi-value processing to image
US8805072B2 (en) 2011-07-14 2014-08-12 Toshiba Tec Kabushiki Kaisha Binarized threshold value determination device, method thereof, and image processing device
CN106846282A (en) * 2017-03-28 2017-06-13 华侨大学 A kind of enhancement method of low-illumination image of use adaptively correcting

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005354287A (en) * 2004-06-09 2005-12-22 National Institute Of Advanced Industrial & Technology Method, apparatus, and program for applying binarizing or multi-value processing to image
US8805072B2 (en) 2011-07-14 2014-08-12 Toshiba Tec Kabushiki Kaisha Binarized threshold value determination device, method thereof, and image processing device
CN106846282A (en) * 2017-03-28 2017-06-13 华侨大学 A kind of enhancement method of low-illumination image of use adaptively correcting
CN106846282B (en) * 2017-03-28 2019-06-04 华侨大学 A kind of enhancement method of low-illumination image using adaptively correcting

Similar Documents

Publication Publication Date Title
JP4771906B2 (en) Method for classifying images with respect to JPEG compression history
US9367899B1 (en) Document image binarization method
Fardo et al. A formal evaluation of PSNR as quality measurement parameter for image segmentation algorithms
Rajput et al. Comparative study of image enhancement techniques
CN110428450B (en) Scale-adaptive target tracking method applied to mine tunnel mobile inspection image
US20140286527A1 (en) Systems and methods for accelerated face detection
Laishram et al. A novel minimal distortion-based edge adaptive image steganography scheme using local complexity: (BEASS)
US20050152604A1 (en) Template matching method and target image area extraction apparatus
CN110378893B (en) Image quality evaluation method and device and electronic equipment
CN111901594B (en) Visual analysis task-oriented image coding method, electronic device and medium
CN116894985B (en) Semi-supervised image classification method and semi-supervised image classification system
US20210192319A1 (en) Information processing apparatus, method, and medium
CN113344907B (en) Image detection method and device
EP1457927A2 (en) Device and method for detecting blurring of image
US7289679B2 (en) System and method for measuring image quality using compressed image data
Appiah et al. Fast generation of image’s histogram using approximation technique for image processing algorithms
US6970268B1 (en) Color image processing method and apparatus thereof
CN110287752B (en) Lattice code detection method and device
US9659227B2 (en) Detecting object from image data using feature quantities
JP2004104318A (en) Image processing method, image processing unit, and program
JP5061882B2 (en) Image processing apparatus, image processing method, program, and learning apparatus
CN116310644A (en) Abnormality detection method and device based on normalized stream network and encoder
JP2004246618A (en) Method, device, and program for generating image used for collating in pattern recognition and pattern recognition using the image
CN114693543A (en) Image noise reduction method and device, image processing chip and image acquisition equipment
JP3248965B2 (en) Binary threshold value determination device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060419

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060509

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070109