JP3748366B2 - Binarization and binarization threshold determination method - Google Patents
Binarization and binarization threshold determination method Download PDFInfo
- Publication number
- JP3748366B2 JP3748366B2 JP2000217402A JP2000217402A JP3748366B2 JP 3748366 B2 JP3748366 B2 JP 3748366B2 JP 2000217402 A JP2000217402 A JP 2000217402A JP 2000217402 A JP2000217402 A JP 2000217402A JP 3748366 B2 JP3748366 B2 JP 3748366B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- threshold value
- pixel
- value
- binarization
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 35
- 230000002093 peripheral effect Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 16
- 238000013459 approach Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Images
Landscapes
- Image Input (AREA)
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、スキャナ等において原稿に印刷された文字や画像等のイメージデータを2値化する方法に関するものである。
【0002】
【従来の技術】
図4は、この種の画像読取装置であるスキャナの構成の一例を示す図であり、図において10は図の主走査方向に複数の読み取り画素が配列されるイメージセンサ、11はイメージセンサ10の出力信号をデジタル信号に変換するA/D変換器、12はイメージセンサ10の出力を主走査方向について1ライン毎のデータとして順次保持するラインバッファ、2はラインバッファ12のデータより閾値を算出する閾値演算部、3は閾値演算部2とラインバッファ12のデータより着目画素における2値データを出力する2値化処理部、4はメモリ、5は処理回路、6は原稿である。
【0003】
この種の画像読み取り装置において、イメージセンサ10からの読み取りデータを白黒の2値に量子化する場合は、この読み取りデータ(IMGD)と所定の閾値(Th)とを比較して、着目画素における画像が黒データか或いは白データかを決定するよう構成されている。
この2値化を行う基準となる閾値を一定のレベルとすると、例えば原稿6の下地、即ち画像が形成されていない余白部分の濃度が変化するような場合は、本来読み取るべき画像を抽出することができなくなるという不具合が生じる。
そこで、2値化を行うための閾値を一定とせず、下地の濃度に応じてその都度決定すること(動的閾値)により、読み取るべき画像を良好に抽出する方法が知られている。この方法としては、例えば図5に示すように、閾値演算部2において、ラインバッファ12より読み取るべき着目画素(図の×印)を中心とし、その前後のラインデータを含む周辺画素(3×3マトリクス上の9画素分)のデータを読み出し、得られたデータの平均値を求めてこれを閾値(Th)とし、2値化処理部3において算出した閾値Thと着目画素における読み取りデータIMGDとを比較して、着目画素における白黒2値データの決定を行う、等が考えられている。
【0004】
上述の着目画素周辺のデータより平均値を求め、これを閾値とする方法においては、下地濃度と抽出した画像との濃度差が少ない場合、或いは図6に示すように、細線等の濃度の低い画像の近辺に太線等の濃度の高い画像がある場合は、閾値として算出されるデータの平均値が抽出すべき画像の濃度に近似或いはこれを越えてしまうこととなり、これにより抽出すべき画像(細線)を抽出できなくなるといった不具合を生じていた。
【0005】
上記のような不具合を解決するために、抽出すべき画像データ部分を取り除いて原稿等の下地濃度に追従した閾値を算出し、これにより正確な2値化を行うことができるよう、本出願人は特願平11−172145号に次の2値化閾値決定方法を提案した。
すなわち、この先の出願に関わる2値化閾値決定方法は、2値化すべき着目画素(N)およびその周辺画素における画像データより、着目画素(N)における平均濃度値を算出し、この平均濃度値と2値化すべき着目画素(N)の直前画素(N−1)における閾値の差を求めてこれを変化値とし、この変化値に基づいて着目画素(N)における閾値の変化度を示す追従値を算出し、この追従値と平均濃度を加算することにより、着目画素(N)における閾値を求めるよう構成し、これにより画像データ(黒データ)の存在により閾値の変化量が大きくなるという影響を低減させ、閾値の変化を下地の濃度の変化のみに追従させて、画像データの抽出を良好に行うことができるようにした。
【0006】
更に詳細に先の出願の閾値決定方法を説明すると、図7はこの閾値決定方法を行うための閾値演算部2の構成を示す図、図8はこの閾値決定方法を示すフローチャート図であり、この閾値決定方法においては、着目画素(N)の画像データIMGD(N)と、この着目画素(N)を中心とした複数の周辺画素における画像データを、主走査方向にライン毎のデータとして且つ副走査方向にその前後のラインのデータを格納しているラインバッファより読み出し、これら読み出したn個の画像データより、着目画素(N)における平均濃度値Mn(N)を算出する。(数式1)
Mn(N) = Σ(IMGD) / n ・・・数式1
続いて、着目画素(N)の主走査方向における直前画素(N−1)の閾値Th(N−1)と、上記算出した着目画素(N)における平均濃度Mn(N)との差を算出し(数式2)、これを変化値
ΔTMn(N)とする。
ΔTMn(N) = Th(N−1) − Mn(N) ・・・数式2
この算出したΔTMn(N)に、任意の係数である追従係数fkを乗算して、追従値F(N)を算出する。(数式3)
F(N) = ΔTMn(N) × fk ・・・数式3
更に算出した追従値F(N)と、着目画素(N)における平均濃度値Mn(N)を加算して、着目画素(N)における閾値Th(N)を算出する。(数式4)
Th(N) = F(N) + Mn(N) ・・・数式4
この先の出願の2値化閾値決定方法によれば、着目画素の閾値を決定する場合に、この着目画素とその周辺画素の画像データの平均濃度値と、着目画素に隣接する直前画素における閾値との差を変化値として算出するので、画像データ(黒データ)の存在により閾値の変化量が大きくなるという影響を低減することができ、下地の濃度の変化のみに追従させ、画像データの抽出を良好に行うことができる。
即ち、下地部分から画像領域に移る部分であっても、その濃度変化値が、着目画素の周辺の平均濃度値と直前画素(即ち下地部分)における閾値の差を求めて、さらにこの変化値に任意の係数である追従係数を適正な値に設定して乗算することにより、閾値の変化分を小さくすることができる。
この追従係数fkは、0<fk≦1の任意の数値で、追従係数fkを1に近い値に設定して追従値F(N)を大きくすることにより、閾値Thの変化量を小さくすることができ、画像データが現れることにより平均値濃度Mnの変化が大きくなっても、閾値Thの変化量を抑えることができ、閾値を原稿の下地濃度のみに追従させることができる。
また、この追従係数fkを適正に設定することにより、閾値を平均値濃度Mnの変化に追従させ、これにより例えば細線が密となるような画像データ領域においても良好に2値化することができる。
即ち、追従係数fkを0に近い値に設定すると追従値F(N)は小さくなって、算出される閾値Th(N)は平均値濃度Mnに近い値となり、これによりその変化に追従することとなる。従って、原稿の画像が白と黒のデータが狭い範囲で多数存在するような場合は、追従係数を1に近い値に設定し、逆の場合は0に近い値に設定することにより、画像データに応じた閾値Thの変化量を適宜設定することができる。
【0007】
【発明が解決しようとする課題】
この先の出願に関わる2値化閾値決定方法において、例えば原稿の下地濃度が抽出すべき画像の濃度に近似しているような原稿であって、下地部分を取り除いて画像部分のみを抽出する場合は、閾値が下地濃度即ち周辺画素の平均濃度値に近づくように、上記数式3における追従係数fkを0に近い値に設定する。これにより算出される追従値F(N)を小さくして着目画素(N)における閾値Th(N)を平均濃度値Mnに近い値として、下地部分を取り除いて画像部分のみを抽出するよう構成されている。
この時、原稿上に主走査方向に伸びるとともに副走査方向に複数ラインにわたる太線や塗り潰し領域が存在する場合、以下のような不具合を生じていた。
即ち、このような領域においては、平均濃度値Mnが抽出すべき画像の濃度となるので、算出されるセンサの各画素の閾値は、主走査方向に向かって次第に抽出画像濃度に近似する。
図9および10はこれらを模式的に示した図で、主走査方向に順次0,1,2....,N−1,Nと読み取り画素が配列されているセンサS1,S2,S3,....により、原稿上の塗り潰し領域を読み取ったその出力(入力画像)と、追従係数fkを0に近い値に設定して算出された閾値を用いて2値化された結果を示している。この2値化閾値決定方法において各画素における閾値を算出する際には、直前画素の閾値を参照して算出するので、図10上図に示すように、主走査方向の上流位置(即ち図9に示すセンサS1の画素0)付近での閾値は、初期設定値に近似しているので抽出画像を黒データとして2値化することができるが、主走査方向の下流側(即ち画素N)付近に近づくにしたがって、閾値は平均濃度値、この領域の場合は入力画像の出力に近い値となる。図10中図はセンサS1の読み取り画素に対応した主走査方向のl,(l+1),(l+2),(l+3)ラインの2値化データを示すもので、主走査方向の下流側付近では閾値が入力画像データの濃度を越える部分が生じるので、白データ(0)を出力することとなる。従って2値化された出力結果は、図10下図に示すように、主走査方向に向かって徐々に淡くなるといった結果が得られることとなる。
さらに、図9に示すように複数のセンサを主走査方向に複数個千鳥状に配列して、その読み取り範囲を大きくしたスキャナにおいては、図11に示すように各センサのつなぎ目部分において明らかな出力の濃淡が発生することとなり、良好な出力を得ることができないという不具合を生じていた。
【0008】
このセンサのつなぎ目部分における出力の濃淡発生を防止するには、主走査方向上流側のセンサにおいて算出した閾値を、隣り合う下流側のセンサにおける閾値に反映させることが考えられるが、この種のスキャナにおいては、主走査方向に複数のセンサを配列することにより読み取り不可能な領域が生じるのを防ぐために、隣り合うセンサは互いに副走査方向に所定の間隔をおいて配置されるので、画像読み取り時にそのオフセット量だけセンサの出力(閾値)を保持しておかなければならず、このための回路等を追加することによりコストの上昇を招くといった新たな問題が生じていた。
【0009】
本発明はこれらの不具合を解決するためになされたもので、簡単な構成によりセンサのつなぎ目部分に生じる出力の濃淡発生を防止するものである。
【0010】
【課題を解決するための手段】
上記課題を解決するために、本発明の2値化方法および2値化閾値決定方法においては、各ラインデータにおける主走査方向のデータの読み出し方向を、1ライン毎に順方向,逆方向と交互に切り替えるよう構成した。
【0011】
【発明の実施の形態】
以下、図面に基づいて本発明の2値化および2値化閾値決定方法を詳細に説明する。
本発明の2値化閾値決定方法が適用される画像読み取り装置の構成は、図4に示される従来の装置と同様な構成でよいので、装置の構成は図4を参照し、図1に基づいて本発明の2値化および2値化閾値決定方法を説明する。
【0012】
本発明の2値化方法が適用される画像読取装置において、先ず閾値演算部2はラインバッファ12より読み出す画像データIMGDの読み出し方向を、主走査方向について順方向と設定する。即ち、図9に示すセンサS1においては、読み取り画素0,1,2,3,・・・,N−1,Nの順で読み出す、と設定する。
【0013】
2値化動作においては、ラインバッファ12に1ライン毎のデータとして格納されている画素データを主走査方向について順方向に順次読み出し、2値に量子化しようとする単位画素(着目画素)およびその周辺画素の画像データより閾値演算部2において閾値Thを算出し、この算出した閾値Thと着目画素における画像データIMGDとを2値化処理部3で比較することにより2値データを作成する。
閾値演算部2において閾値Thを算出する場合は、上述の従来の装置と同様に、平均値演算部21において、着目画素(N)の画像データIMGD(N)と、この着目画素(N)を中心とした複数の周辺画素における画像データを、ラインバッファ12より読み出す。(STEP1)
【0014】
次に読み出したこれらn個の画像データより、着目画素(N)における平均濃度値Mn(N)を下記の数式1により算出する。(STEP2)
Mn(N) = Σ(IMGD) / n ・・・数式1
続いて変化値演算部22において、着目画素(N)の主走査方向の直前画素(N−1)の閾値Th(N−1)とSTEP2において算出した着目画素(N)における平均濃度値Mn(N)との差を算出(下記数式2)し、これを変化値ΔTMn(N)とする。(STEP3)
ΔTMn(N) = Th(N−1) − Mn(N) ・・・数式2
この算出した変化値ΔTMn(N)に、任意の係数である追従係数fkを乗算して、追従値F(N)を算出(下記数式3)する。(STEP4)
F(N) = ΔTMn(N) × fk ・・・数式3
次に、STEP4で算出した追従値F(N)と平均値演算部21において算出した着目画素(N)における平均濃度値Mn(N)を加算して、着目画素(N)における閾値Th(N)を算出(下記数式4)する。(STEP5)
Th(N) = F(N) + Mn(N) ・・・数式4
算出した閾値Th(N)は、2値化処理部3に出力されて、着目画素(N)における画像データの2値化処理に供される。同時に、閾値Th(N)は閾値演算部2の閾値保持部25に格納され、続く着目画素(N+1)における閾値の算出に利用される。
【0015】
算出した閾値Th(N)を2値化処理部3に出力すると、STEP6において続く着目画素、即ち読み込むべき画像があるか否かを判断し、続く画像がある場合は着目画素の番号をカウントアップ(N=N+1)してSTEP1に復帰し、続くがその閾値決定処理を行い、続く画像がない場合には、閾値決定処理を終了する。
【0016】
STEP6において、1ライン分の画像データ読み出しが完了したことを検出すると、STEP7に移行して続くラインデータがあるか否かを判断する。
STEP7において続くラインデータがあると判断した場合は、閾値演算部2は読み出し方向の設定を反転する。
即ち、直前ラインにおいては、主走査方向について順方向に画像データIMGDを読み出したので、続くラインにおいては、主走査方向について逆方向、即ち図9に示すセンサS1においては、読み取り画素N,N−1,・・・,3,2,1,0の順で読み出す、と設定してSTEP1に復帰する。
この読み出し方向が主走査方向について逆方向に画像データIMGDを読み出す設定のラインにおいては、閾値演算部2はラインバッファ12より画像データを読み取り画素N,N−1,・・・,3,2,1,0の順で読み出し、閾値決定および2値化を行う。この場合、STEP3における変化値ΔTMn(N)の算出は、読み取るべき画素の番号をRとすると直前画素(N−1)は(R+1)であり、閾値Th(N−1)は画素番号(R+1)における閾値が用いられる。
【0017】
当該ラインにおける閾値決定ならびに2値化が順次行われ、STEP6において当該1ライン分の画像データの読み出しが完了したことを検出すると、STEP7に移行して続くラインデータの有無を判断する。
このSTEP7において続くラインデータがあると判断した場合は、閾値処理部2は読み出し方向の設定を反転し、主走査方向について順方向に読み出すよう設定する。
【0018】
図2はセンサS1において、lライン目の読み出し方向が順方向と設定された場合の2値化結果を模式的に説明する図である。
即ち、lライン目は主走査方向について順方向に画像データを読み出して2値化を行い、これに続く(l+1)ライン目は逆方向に画像データを読み出し、以降(l+2)ライン目は順方向、(l+3)ライン目は逆方向と、各ライン毎に双方向に読み出し方向を反転させて2値化を行うよう構成されている。
【0019】
本発明の2値化および2値化閾値決定方法においても、上記数式3における追従係数fkを0に近い値に設定すると、塗り潰し領域の読み取りを行った場合、算出されるセンサの各画素の閾値は、読み出し方向の下流側に向かって次第に抽出画像濃度に近似して、白データ(0)が出力されることとなるが、各ライン毎に双方向に画像データの読み出し方向を反転させているので、図2下図に示されるように白データが片側に集中して出現することがなく、且つ、1ラインおきに白データが出現することとなるので、一方向に向かって徐々に淡くなるといった出力にはならず、良好な結果が得られることとなる。
また、各センサのつなぎ目部分においても、双方のセンサの端部で白データが出現することになるので、濃淡が目立つという不具合を生じない。
【0020】
【発明の効果】
以上詳述したとおり、本発明の2値化方法および2値化閾値決定方法においては、各ラインデータにおける主走査方向のデータの読み出し方向を、1ライン毎に順方向,逆方向と交互に切り替えるよう構成したので、専用の回路等を追加することなく簡単な構成によりセンサのつなぎ目部分に生じる出力の濃淡発生を防止することができるという効果を奏する。
【図面の簡単な説明】
【図1】本発明の閾値決定方法を示すフローチャートである。
【図2】本発明による2値化結果を説明する図である。
【図3】本発明による2値化結果におけるセンサのつなぎ目部分の出力を示す図である。
【図4】画像読取装置の構成を示す図である
【図5】従来の閾値決定方法を示す図である
【図6】従来の閾値決定方法により得られる閾値を示す図である。
【図7】閾値演算部2の構成を示す図である。
【図8】従来の閾値決定方法を示すフローチャートである。
【図9】画像読み取り装置を示す図である。
【図10】先の出願の閾値決定方法により得られる2値化結果を示す図である。
【図11】先の出願の閾値決定方法により得られる出力画像を示す図である。
【符号の説明】
10 イメージセンサ
11 A/D変換器
12 ラインバッファ
2 閾値演算部
3 2値化処理部
4 メモリ
5 処理回路
6 原稿[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method for binarizing image data such as characters and images printed on a document by a scanner or the like.
[0002]
[Prior art]
FIG. 4 is a diagram showing an example of the configuration of a scanner which is this type of image reading apparatus. In the figure, 10 is an image sensor in which a plurality of reading pixels are arranged in the main scanning direction of the figure, and 11 is an
[0003]
In this type of image reading apparatus, when the read data from the
If the threshold value used as a reference for binarization is set to a certain level, for example, when the density of the background of the original 6, that is, the density of a blank portion where no image is formed, an image to be originally read is extracted. The problem that it becomes impossible to occur occurs.
In view of this, there is known a method of satisfactorily extracting an image to be read by making the threshold for binarization constant and determining each time according to the background density (dynamic threshold). As this method, for example, as shown in FIG. 5, in the threshold
[0004]
In the method in which the average value is obtained from the data around the pixel of interest described above and this is used as a threshold value, when the density difference between the background density and the extracted image is small, or as shown in FIG. When there is an image with high density such as a thick line near the image, the average value of the data calculated as the threshold value approximates or exceeds the density of the image to be extracted. There was a problem that it was impossible to extract the thin line).
[0005]
In order to solve the above-described problems, the present applicant has calculated a threshold value that follows the background density of a manuscript or the like by removing the image data portion to be extracted, thereby enabling accurate binarization. Proposed the following binarization threshold value determination method in Japanese Patent Application No. 11-172145.
That is, the binarization threshold value determining method related to the earlier application calculates an average density value in the target pixel (N) from the image data in the target pixel (N) to be binarized and its surrounding pixels, and this average density value And the difference between the threshold values of the pixel (N−1) immediately before the target pixel (N) to be binarized is used as a change value, and the follow-up indicating the degree of change in the threshold value of the target pixel (N) based on the change value. By calculating the value and adding the follow-up value and the average density, the threshold value for the pixel of interest (N) is obtained, and the change amount of the threshold value increases due to the presence of the image data (black data). Image data can be extracted satisfactorily by making the change in threshold value follow only the change in the background density.
[0006]
Describing the threshold value determination method of the previous application in more detail, FIG. 7 is a diagram showing the configuration of the threshold
Mn (N) = Σ (IMGD) /
Subsequently, the difference between the threshold value Th (N-1) of the immediately preceding pixel (N-1) in the main scanning direction of the target pixel (N) and the calculated average density Mn (N) of the target pixel (N) is calculated. (Formula 2), which is defined as a change value ΔTMn (N).
ΔTMn (N) = Th (N−1) −Mn (N)
The calculated ΔTMn (N) is multiplied by a tracking coefficient fk, which is an arbitrary coefficient, to calculate a tracking value F (N). (Formula 3)
F (N) = ΔTMn (N) × fk Equation 3
Further, the calculated follow-up value F (N) and the average density value Mn (N) at the target pixel (N) are added to calculate the threshold Th (N) at the target pixel (N). (Formula 4)
Th (N) = F (N) + Mn (N) Expression 4
According to the binarization threshold value determination method of the previous application, when determining the threshold value of the target pixel, the average density value of the image data of the target pixel and its surrounding pixels, the threshold value of the immediately preceding pixel adjacent to the target pixel, and Difference is calculated as a change value, so that it is possible to reduce the influence that the amount of change in the threshold increases due to the presence of image data (black data). It can be done well.
That is, even in the portion that moves from the background portion to the image region, the density change value is obtained by calculating the difference between the average density value around the pixel of interest and the threshold value in the immediately preceding pixel (that is, the background portion), and further to this change value. By setting and multiplying the tracking coefficient, which is an arbitrary coefficient, to an appropriate value, the amount of change in the threshold can be reduced.
The follow-up coefficient fk is an arbitrary value of 0 <fk ≦ 1, and the follow-up coefficient fk is set to a value close to 1 to increase the follow-up value F (N), thereby reducing the amount of change in the threshold Th. Even if the change in the average density Mn increases due to the appearance of the image data, the amount of change in the threshold Th can be suppressed, and the threshold can be made to follow only the background density of the document.
Further, by appropriately setting the follow-up coefficient fk, the threshold value can be made to follow the change of the average value density Mn, so that, for example, even in an image data region where fine lines are dense, binarization can be favorably performed. .
That is, when the follow-up coefficient fk is set to a value close to 0, the follow-up value F (N) becomes small, and the calculated threshold value Th (N) becomes a value close to the average value concentration Mn, thereby following the change. It becomes. Accordingly, when there are a large number of white and black data in a document in a narrow range, the tracking coefficient is set to a value close to 1, and vice versa, the image data is set to a value close to 0. The amount of change in the threshold value Th can be set as appropriate.
[0007]
[Problems to be solved by the invention]
In the binarization threshold value determination method related to this earlier application, for example, when a document in which the background density of the document is close to the density of the image to be extracted and only the image portion is extracted by removing the background portion The tracking coefficient fk in Equation 3 is set to a value close to 0 so that the threshold value approaches the background density, that is, the average density value of surrounding pixels. The follow-up value F (N) calculated in this way is reduced, the threshold Th (N) at the pixel of interest (N) is set to a value close to the average density value Mn, the background portion is removed, and only the image portion is extracted. ing.
At this time, when there are thick lines or filled areas extending in the main scanning direction and extending over a plurality of lines in the sub-scanning direction, the following problems have occurred.
That is, in such a region, since the average density value Mn is the density of the image to be extracted, the calculated threshold value of each pixel of the sensor gradually approaches the extracted image density in the main scanning direction.
FIGS. 9 and 10 schematically show these, and sensors S1, S2, S3 in which 0, 1, 2,..., N−1, N and reading pixels are sequentially arranged in the main scanning direction are shown. .. Shows the result of binarization using the output (input image) obtained by reading the painted area on the document and the threshold value calculated by setting the tracking coefficient fk to a value close to 0. Yes. When calculating the threshold value for each pixel in this binarization threshold value determining method, the threshold value is calculated with reference to the threshold value of the immediately preceding pixel. Therefore, as shown in the upper diagram of FIG. The threshold value in the vicinity of the pixel 0) of the sensor S1 shown in FIG. 5 is close to the initial setting value, so that the extracted image can be binarized as black data, but the downstream side in the main scanning direction (that is, the vicinity of the pixel N) As the value approaches, the threshold value becomes an average density value, and in this region, the value becomes closer to the output of the input image. FIG. 10 shows binarized data of l, (l + 1), (l + 2), and (l + 3) lines in the main scanning direction corresponding to the read pixel of the sensor S1, and a threshold value in the vicinity of the downstream side in the main scanning direction. Therefore, a portion exceeding the density of the input image data is generated, and white data (0) is output. Therefore, as shown in the lower diagram of FIG. 10, the binarized output result is obtained such that the result becomes gradually lighter in the main scanning direction.
Further, in a scanner in which a plurality of sensors are arranged in a staggered manner in the main scanning direction as shown in FIG. 9 and the reading range is enlarged, an output that is apparent at the joint portion of each sensor as shown in FIG. As a result, there is a problem in that good output cannot be obtained.
[0008]
In order to prevent the output density from occurring at the joint portion of this sensor, it is conceivable that the threshold value calculated in the upstream sensor in the main scanning direction is reflected in the threshold value in the adjacent downstream sensor. In order to prevent an unreadable region from being generated by arranging a plurality of sensors in the main scanning direction, adjacent sensors are arranged at a predetermined interval in the sub-scanning direction. The output (threshold value) of the sensor must be held by the offset amount, and there has been a new problem that adding a circuit for this causes an increase in cost.
[0009]
The present invention has been made to solve these problems, and prevents the occurrence of light and shade of the output generated at the joint portion of the sensor with a simple configuration.
[0010]
[Means for Solving the Problems]
In order to solve the above-described problem, in the binarization method and the binarization threshold value determination method of the present invention, the data reading direction in the main scanning direction in each line data alternates between the forward direction and the reverse direction for each line. It was configured to switch to.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the binarization and binarization threshold value determination method of the present invention will be described in detail with reference to the drawings.
Since the configuration of the image reading apparatus to which the binarization threshold value determining method of the present invention is applied may be the same as the configuration of the conventional apparatus shown in FIG. 4, the configuration of the apparatus is based on FIG. 1 with reference to FIG. The binarization and binarization threshold value determination method of the present invention will be described.
[0012]
In the image reading apparatus to which the binarization method of the present invention is applied, the threshold
[0013]
In the binarization operation, pixel data stored as data for each line in the
When the threshold value Th is calculated in the threshold
[0014]
Next, an average density value Mn (N) at the target pixel (N) is calculated from the n pieces of image data read out by the following
Mn (N) = Σ (IMGD) /
Subsequently, in the change
ΔTMn (N) = Th (N−1) −Mn (N)
The calculated change value ΔTMn (N) is multiplied by a tracking coefficient fk, which is an arbitrary coefficient, to calculate a tracking value F (N) (Formula 3 below). (STEP4)
F (N) = ΔTMn (N) × fk Equation 3
Next, the follow-up value F (N) calculated in STEP 4 and the average density value Mn (N) in the target pixel (N) calculated in the average
Th (N) = F (N) + Mn (N) Expression 4
The calculated threshold Th (N) is output to the binarization processing unit 3 and used for the binarization processing of the image data in the pixel of interest (N). At the same time, the threshold value Th (N) is stored in the threshold
[0015]
When the calculated threshold value Th (N) is output to the binarization processing unit 3, it is determined whether or not there is a subsequent pixel of interest, that is, an image to be read in STEP 6, and if there is a subsequent image, the number of the pixel of interest is counted up. (N = N + 1) and return to
[0016]
In STEP 6, when it is detected that the reading of image data for one line is completed, the process proceeds to STEP 7 and it is determined whether or not there is subsequent line data.
If it is determined in
That is, since the image data IMGD is read in the forward direction in the main scanning direction in the immediately preceding line, the reading pixels N, N− in the reverse direction in the main scanning direction, that is, in the sensor S1 shown in FIG. Set to read in the order of 1,..., 3, 2, 1, 0 and return to STEP1.
In a line where the reading direction is set to read the image data IMGD in the reverse direction with respect to the main scanning direction, the threshold
[0017]
Threshold value determination and binarization are sequentially performed on the line, and when it is detected in STEP 6 that the reading of the image data for one line has been completed, the process proceeds to STEP 7 to determine whether there is subsequent line data.
If it is determined in
[0018]
FIG. 2 is a diagram schematically illustrating a binarization result when the reading direction of the l-th line is set to the forward direction in the sensor S1.
That is, for the l-th line, image data is read in the forward direction in the main scanning direction and binarized, and the subsequent (l + 1) -th line reads image data in the reverse direction, and the (l + 2) -th line thereafter is the forward direction. The (l + 3) -th line is configured to perform binarization by reversing the reading direction bi-directionally for each line in the reverse direction.
[0019]
Also in the binarization and binarization threshold value determination method of the present invention, when the tracking coefficient fk in Equation 3 is set to a value close to 0, the threshold value of each pixel of the sensor calculated when the filled area is read. The white data (0) is output gradually approximating the extracted image density toward the downstream side in the reading direction, but the reading direction of the image data is reversed bi-directionally for each line. Therefore, as shown in the lower diagram of FIG. 2, white data does not appear concentrated on one side, and white data appears every other line, so that it gradually fades in one direction. An output is not obtained, and a good result is obtained.
Also, in the joint portion of each sensor, white data appears at the ends of both sensors, so that there is no problem that the shading is conspicuous.
[0020]
【The invention's effect】
As described above in detail, in the binarization method and binarization threshold value determination method of the present invention, the data reading direction in the main scanning direction in each line data is alternately switched between the forward direction and the reverse direction for each line. With this configuration, there is an effect that it is possible to prevent the occurrence of light and shade of the output generated at the joint portion of the sensor with a simple configuration without adding a dedicated circuit or the like.
[Brief description of the drawings]
FIG. 1 is a flowchart showing a threshold determination method according to the present invention.
FIG. 2 is a diagram illustrating a binarization result according to the present invention.
FIG. 3 is a diagram illustrating an output of a joint portion of a sensor in a binarization result according to the present invention.
FIG. 4 is a diagram illustrating a configuration of an image reading apparatus. FIG. 5 is a diagram illustrating a conventional threshold value determination method. FIG. 6 is a diagram illustrating threshold values obtained by a conventional threshold value determination method.
7 is a diagram illustrating a configuration of a threshold
FIG. 8 is a flowchart showing a conventional threshold value determination method.
FIG. 9 is a diagram illustrating an image reading apparatus.
FIG. 10 is a diagram showing a binarization result obtained by the threshold value determination method of the previous application.
FIG. 11 is a diagram showing an output image obtained by the threshold value determination method of the previous application.
[Explanation of symbols]
DESCRIPTION OF
Claims (1)
2値化に関わるラインデータにおいて、2値化すべき着目画素およびその周辺画素のデータより当該着目画素における平均濃度を算出し、この平均濃度値と2値化すべき着目画素の主走査方向の直前画素における閾値との差を求めてこれを変化値とし、算出した変化値に基づいて、着目画素における閾値の変化度を示す追従値を算出し、この追従値と上記平均濃度値を加算して、着目画素における閾値を求め、これを主走査方向について順方向に画素データおよびその直前画素データを順次読み出して1ライン分の各々の画素データの2値化閾値を算出し、当該ラインデータに続くラインデータにおいては、上記直前のラインデータにおいて画素データを読み出した方向と主走査方向について逆方向に画素データおよびその直前画素データを順次読み出して2値化閾値を算出することを特徴とする2値化閾値決定方法。Line data is configured by arranging and storing a plurality of pixel data in the main scanning direction, and further storing image data two-dimensionally by storing a plurality of line data in the sub-scanning direction. In the method for determining a threshold value for binarizing the data of each pixel,
In the line data related to binarization, the average density of the target pixel is calculated from the data of the target pixel to be binarized and its peripheral pixels, and this average density value and the previous pixel in the main scanning direction of the target pixel to be binarized The difference between the threshold value and the change value is obtained as a change value. Based on the calculated change value, a follow-up value indicating the change degree of the threshold value in the target pixel is calculated, and the follow-up value and the average density value are added. A threshold value for the pixel of interest is obtained, and pixel data and immediately preceding pixel data are sequentially read out in the forward direction in the main scanning direction to calculate a binary threshold value for each pixel data for one line, and the line following the line data In the data, the pixel data and the immediately preceding pixel data in the direction opposite to the main scanning direction and the direction in which the pixel data is read in the immediately preceding line data Binarization threshold value determination method characterized by calculating the next read out binarization threshold.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000217402A JP3748366B2 (en) | 2000-07-18 | 2000-07-18 | Binarization and binarization threshold determination method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000217402A JP3748366B2 (en) | 2000-07-18 | 2000-07-18 | Binarization and binarization threshold determination method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2002033916A JP2002033916A (en) | 2002-01-31 |
| JP3748366B2 true JP3748366B2 (en) | 2006-02-22 |
Family
ID=18712516
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000217402A Expired - Fee Related JP3748366B2 (en) | 2000-07-18 | 2000-07-18 | Binarization and binarization threshold determination method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3748366B2 (en) |
-
2000
- 2000-07-18 JP JP2000217402A patent/JP3748366B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2002033916A (en) | 2002-01-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2702928B2 (en) | Image input device | |
| JP2744619B2 (en) | Image processing device | |
| JP3576810B2 (en) | Image processing device | |
| JPS62172867A (en) | Picture processor | |
| JPH0435167A (en) | Line picture separation system | |
| JP3989341B2 (en) | Image processing device | |
| JP2616386B2 (en) | Image processing device | |
| JP4408771B2 (en) | Image reading device | |
| JP3748366B2 (en) | Binarization and binarization threshold determination method | |
| JP3073837B2 (en) | Image region separation device and image region separation method | |
| JPH0950519A (en) | Image processing apparatus and method | |
| JPH10294870A (en) | Image processing device | |
| JP3705405B2 (en) | Binarization threshold determination method | |
| JP3705414B2 (en) | Binarization threshold determination method | |
| JPH05136994A (en) | Image area separation circuit | |
| JP3451490B2 (en) | Image information processing method | |
| JP3036244B2 (en) | Image signal processing device | |
| JP2777476B2 (en) | Image processing device | |
| JP2002368998A (en) | Method for determining binary threshold | |
| JP3080110B2 (en) | Image reading device | |
| JP2937603B2 (en) | Binary discrimination method of image data in image data reading device | |
| JP2757868B2 (en) | Image information binarization processing circuit | |
| JPH0787320A (en) | Image reader | |
| JP2001197306A (en) | White background area detection method, white background area detection device, image area separation method, and recording medium | |
| JPH07226840A (en) | Binarizer |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050831 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050920 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20051014 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20051125 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20051125 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091209 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101209 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111209 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111209 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121209 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121209 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131209 Year of fee payment: 8 |
|
| LAPS | Cancellation because of no payment of annual fees |