JP3945457B2 - Image reading method - Google Patents

Image reading method Download PDF

Info

Publication number
JP3945457B2
JP3945457B2 JP2003198199A JP2003198199A JP3945457B2 JP 3945457 B2 JP3945457 B2 JP 3945457B2 JP 2003198199 A JP2003198199 A JP 2003198199A JP 2003198199 A JP2003198199 A JP 2003198199A JP 3945457 B2 JP3945457 B2 JP 3945457B2
Authority
JP
Japan
Prior art keywords
reading
image
input data
unit
line
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
Application number
JP2003198199A
Other languages
Japanese (ja)
Other versions
JP2004064766A (en
Inventor
広隆 千葉
憲一郎 酒井
嗣男 野田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2003198199A priority Critical patent/JP3945457B2/en
Publication of JP2004064766A publication Critical patent/JP2004064766A/en
Application granted granted Critical
Publication of JP3945457B2 publication Critical patent/JP3945457B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の続する技術分野】
本発明は、スキャナやファクシミリ等の画像入力装置における画像読み取り方法に関し、具体的には、読み取り媒体上の画像を光学的に読み取ってアナログ電気信号に変換し、このアナログ信号をデジタル信号に更に変換して出力する画像入力装置の読み取り方法に関する。
【0002】
【従来の技術】
従来より、画像読み取り回路(特許出願番号:昭63-296557 号)として図12に示す画像入力装置がある。この画像読取装置によれば、入力原稿の1ライン読み取りに基づく読み取り値のピーク値を保持するピーク保持回路を設け、このピーク値を2値化閾値生成のためのの基準値としていた。
【0003】
【発明が解決しようとする課題】
しかし、従来技術ではセンサの感度ばらつきや光源のばらつきなどで発生する読み取り値の変動が大きい場合、1ラインの白ピーク値を保持し、この値を基準値にしても入力レベルの変動が大きいことから、安定して閾値を生成することができず、正しく画像の2値化処理が行われないという問題があった。
【0004】
そこで、本発明は、安定した2値化が行え、ユーザ操作を簡略化できる画像入力装置を提供することを目的とする。
【0005】
【課題を解決するための手段】
本発明は、手動で装置を移動させて媒体全体を読み取るスキャナにおける画像の読み取り方法であって、読み取り媒体上の画像について光学的に読み取るデータを入力するステップと、入力データの2値化処理に先立って、濃度むらを補正するシェーディング補正を行うステップと、前記入力データのシェーディング補正後に、前記読み取り媒体上の文字を含んだ画像の先頭の1ラインの入力データを入力データ保持部に一時的に保持するステップと、前記入力データ保持部に一時的に保存された文字を含む画像の先頭の1ラインの入力データから濃度ヒストグラム分布を生成するステップと、前記濃度ヒストグラム分布から2値化閾値を生成するステップと、媒体読み取り時に、前記2値化閾値に基づき、前記読み取り媒体より得られる入力データの2値化処理を行うステップと、を有することを特徴とする画像読み取り方法に関する。
【0006】
手動で装置を移動させて行くことにより媒体全体を読み取るスキャナにおいては、読み取りを行うに当たっては、必ず読み取り先頭位置に装置を位置付ける。
【0007】
本願発明ではこの読み取り開始時の先頭データから閾値を作成することにより、閾値作成から実際の読み取りに移行する時間を極力削減し、操作者が閾値作成から読み取りに移行する際に位置変えを行う手間省くものである。
【0008】
その他の特徴として、入力データのシェーディング補正を行う補正部を備え、補正された入力データを前記入力データ保持部に保持することを特徴とする。
【0009】
また、閾値生成部は、濃度ヒストグラム分布生成部で生成された濃度ヒストグラム分布から、用紙白部の白ピーク値(WP)、文字黒部の黒ピーク値(BP)を求め、閾値をα×(WP−BP)+BP(0< α< 1)の条件で閾値を生成することを特徴とする。
【0010】
入力したデータの濃度は、用紙の下地の濃度と文字部分(インク)の濃度の間に分布する。一般に文字領域では文字間スペースを含むため、用紙の下地の濃度は一定割合で分布する。また、スキャナの光学解像度が高ければ、文字の線の分布も一定割合でインクの濃度レベルを含む。従って、濃度ヒストグラム分布から下地レベルと文字部の黒レベルを検出できる。
【0011】
センサや照明などの影響による感度ばらつきが発生するセンサの入力データであっても、入力データの濃度ヒストグラム分布から用紙の下地(白)の入力レベルの白ピーク値(白ピーク:WP)、および文字部の入力レベルの黒ピーク値(黒ピーク値:BP)を基準値として保持する。この基準値から閾値を生成することで、決定される閾値が白、黒レベルを超えることはなく、常に正しい2 値化が行える。
【0012】
センサや照明などの静的な感度ばらつきを補正する方法として、予め読み込んである白黒入力レベルで補正するシェーディング補正処理もある。シェーディング補正処理を行うことで、センサ全領域にわたり入力のダイナミックレンジを拡大する効果がある。まず、シェーディング補正処理後の入力データを保持する。この入力データから、閾値生成のための基準値を求め、閾値を生成する。この方法では、ダイナミックレンジが拡大されディザを用いた(ある面積で複数の2値化データを組み合わせて定義したもの)擬似中間調入力についても常に正しい閾値で処理が行える。
【0013】
閾値生成部で生成される閾値は、
閾値=α×(白ピーク値−黒ピーク値)+黒ピーク値 (0<α<1)
により生成することにより、白、黒レベルを超えない最適な閾値を生成することができる。特に、α=0.5 の場合が白、黒レベルに対して最大のマージンを設定した場合に相当する。
【0014】
読み込み対象の用紙が画像読み取り部のセンサ長より短い場合(例えば、A6サイズのスキャナで名刺を読む場合)には、濃度ヒストグラム分布は対象の用紙以外を含めて白ピーク値や黒ピーク値を求めてしまう。予め指定された1ライン上の限定された場所(例えば、名刺サイズ)の入力データの濃度ヒストグラム分布から白ピーク値と黒ピーク値を使用して閾値を生成することで、読み取り対象の濃度レンジ以外の背景も同時に入力した場合でも2値化閾値を生成することができる。
【0015】
【実施の形態】
図1に、本発明の一実施形態による画像読取装置の構成を示す図面を図示する。
【0016】
本実施形態による画像読取装置は、読み取られるべき画像が記録された媒体上の画像を光学的に読み取り、電気信号に変換する画像読取部と、画像読取部から出力される画像信号を二値化する画像信号処理部(二値化部)と、ライン読取時の画像読取部からの入力データを一時的に保持する入力データ保持部と、入力データから濃度ヒストグラム分布を生成する濃度ヒストグラム分布生成部と、濃度ヒストグラム分布の下地値の白ピーク値と、文字の黒ピーク値から画像信号処理部への二値化閾値を生成する閾値生成部とを備えている。
【0017】
画像読取部は、センサ部とA/D変換部とからなる。センサ部は、CCDなどにより構成されるラインセンサが、本実施形態では使用されている。センサ種類は、本発明とは直接関係しないため、他のどのような種類のセンサであっても利用することは可能である。センサ部は、媒体から読み取った画像の濃度に応じた値を持つアナログの電気信号を出力する。
【0018】
A/D変換部は、センサ部より出力されたアナログ電気信号をデジタル信号に変換するものである。ここで、8ビットのデジタル信号を扱うとすると、読取結果が白の場合には255、黒の場合には0がA/D変換部より出力される。
【0019】
図2は、本実施形態による二値化処理の流れを示した図面である。図2に示されるように、本実施形態の画像読取装置では、閾値生成の処理と読み取られた画像の二値化処理とが実行される。
【0020】
まず、閾値を生成するために、媒体の文字を含んだ下地(白部)部分の画像を1ライン分読み取ってデータを入力し、これをラインデータ保持部に保存する。また、入力データを濃度ヒストグラム分布生成部に渡す。濃度ヒストグラム分布生成部では入力データの画素毎の濃度値から濃度ヒストグラム分布を生成する。閾値生成部では、濃度ヒストグラム分布生成部で生成された濃度ヒストグラムを元に、下地の白を示す白ピーク値と文字の黒を示す黒ピークを求め、この白黒のピーク値から閾値を生成し、画像処理部(二値化部)に送る。1 ラインの読み取り対象領域が全て黒、あるいは全て白の場合には、1ラインの読取のみでは白ピーク値や黒ピーク値が求められない。この場合は、予め準備した白最大値(255)や黒最小値(0)を使って閾値を生成し、以降の処理を行う。
【0021】
次に、画像の読み込み処理では、画像処理部が閾値生成部の閾値を使用して画像読み取り部からのデジタル画信号を2値化する処理が行われる。閾値生成部より生成される閾値は、媒体の下地(白部)と文字部(黒部)を読み込んだ入力データから生成されるため、その原稿に最適な閾値となり、正しく2値化が行われる。
【0022】
図3は、図1に図示された画像読取装置を組み込んだ一例である、ペン型スキャナ装置の概観とその内部構成図を示している。本実施形態によるペン型スキャナ装置では、画像読み取り部を原稿に密着させて原稿を読み取る形態を採用している。ペン型スキャナを、このように読取原稿上で移動させて原稿を走査し、得られた入力データを決定された閾値に基づいて二値化していくことで、二値化画像データを出力している。
【0023】
図4は、図3に図示されたペン型スキャナにおける画像読取り時の制御と、データの流れを説明している。本例では4ライン分のデータの読取り例を示している。図4において、エンコーダパルスは移動量検出部から出力される移動量信号に相当する。また、ラインセンサ起動信号は、ラインセンサの1駆動周期毎に発生される信号であり、これに基づいてラインセンサからの信号転送が開始される。図3においては、駆動信号に相当する。ラインセンサ画像信号は、ラインセンサからラインセンサ起動信号に基づいて出力される画像信号である。画像処理済とされた信号は、二値化処理が完了した画像信号である。
【0024】
装置へのデータ転送割り込みは、詳細は後述するが、画像読取装置から外部の情報処理装置へ画像データを転送する際に、画像読取装置から情報処理装置に対して行われる。以下、読取動作の制御とデータの流れを、図1乃至図4を用いて説明する。
【0025】
画像読み取り部はラインセンサと光源(LEDもしくは冷陰極管)とレンズとを備え、読取り媒体と密着方式の画像読み取りを行う。読取り中は光源を点灯し、ラインセンサを起動信号で読取り開始させることで、センサ上の各位置での反射光量を電気信号に変換しアナログ信号として出力する。移動量検出部は、エンコーダにより読取り媒体上の移動量をパルス信号に変換して出力する。これによって、媒体に対する画像読取装置の相対的な移動量が検出される。画像信号処理部は、画像読み取り部からの画像信号をA/D変換回路によりデジタル化し、濃度ヒストグラム分布から決定した閾値で2値化画像処理を行う。制御部は、全体の読取り制御と情報処理装置へのデータの転送を行う。ラインセンサへの起動信号は、媒体の読取期間中は常に発生しており、画像処理済みのラインデータ(画像データ)は画像読取装置内部のバッファに保存しておく。
【0026】
制御部では、移動量検出部からの移動パルス(エンコーダパルス)を検出した場合、情報処理装置へ割り込みを上げ、バッファに保存してある画像処理済みのラインデータのデータ転送を行う。移動パルスは、通常の動作時には、ラインセンサの1駆動周期に一つのみ出力されるよう構成されている(図4のラインセンサ画像信号1)。二値化処理が行われると、画像読取装置から情報処理装置に対してデータ転送割り込みが行われ、情報処理装置に対して画像データが転送される。
【0027】
しかし、移動パルスがラインセンサの1駆動周期内で2回以上検出された場合には、スキャナの読み込み性能以上にスキャナの移動が発生したと制御部では判断し、移動パルス1回分のデータのみを転送する。図4の例では、ラインセンサ画像信号2に相当する。ここでは、ラインセンサ起動信号の間に二つのエンコーダパルスが出現している。一方、移動パルスがラインセンサの1駆動周期内に検出されない場合には、スキャナが移動していないことを意味する。図4では、ラインセンサ画像信号3の部分に相当する。ここでは、ラインセンサ起動信号間にエンコーダパルスは出現していない。この場合には、バッファに保存してある画像処理済みのラインデータを破棄して、次のラインの読取データ(ラインセンサ画像信号4)を保持する。
【0028】
I/F部は、画像読取装置に接続される情報処理装置への電気的インタフェースであり、情報処理装置への割り込みやデータアクセスを行う。情報処理装置に転送された二値化データは、情報処理装置の表示部に表示される。そのためオペレータは読取り中の画像データを表示部から確認することができる。
【0029】
図5は、第二の実施形態による画像読取装置のブロック図を示した図面である。図5に図示された画像読取装置は、読取り媒体上の画像を光学的に読み取り電気信号に変換する画像読み取り部と、画像読み取り部から出力される画像信号をシェーディング補正後に2値化する画像信号処理部(2値化部)と、ライン読み取り時にシェーディング補正後の入力データを保持する入力データ保持部と、入力データ保持部のデータから濃度ヒストグラム分布を生成する濃度ヒストグラム生成部と、濃度ヒストグラムの下地値の白ピーク値と文字の黒ピーク値から画像信号処理部への2値化閾値を生成する閾値生成部とを備えている。
【0030】
画像読み取り部はセンサ部とA/D変換部からなり、読取り対象の画信号をデジタル化して出力する(例えば8ビットの場合、白が255、黒が0の出力となる)。画像読み取り部の出力はシェーディング補正部で面むらなどの影響を取り除いた出力に変換される。予め読み込んだ下地値を白シェーディング補正値として保存し、入力された入力画信号は常に下の(1)式により変換され出力される。
【0031】
入力画信号 :x(i)、補正後の信号:y(i)
白シェーディング補正値:ww(i)
y(i)=255x(i)/ww(i) ...(1)
上式により変換された画信号は実施例1と同様に二値化処理される。そのために、1ライン分のシェーディング補正済みの入力データが入力データ保持部で保持される。一方、入力データから第一の実施形態の場合と同様に閾値を生成する。ここでは、白シェーディング補正の処理を示したが、黒シェーディング補正を同様に行ってもよい。
【0032】
図6に本発明の第3の実施形態による画像読取動作を説明する図面であり、下地の入力波形と濃度ヒストグラム分布と決定される閾値の関係を示したグラフである。図示左側のグラフは読取原稿の下地、文字に相当する黒部分を含む、1ライン分の読取信号の入力値を示している。横軸は媒体横手方向の画素(pixel)を、縦軸は濃度値を示している。また、図示右側のグラフは画素の濃度ヒストグラム分布を示している。図示横軸は濃度値を、縦軸は濃度値の発生頻度をそれぞれ示す。
【0033】
ここで、センサの感度にばらつきがあっても、濃度ヒストグラム分布でには下地を示す白ピーク値(WP)と、文字を示す黒ピーク値(BP)が出現する。そのため、この白ピーク値と黒ピーク値との内側に閾値を生成すれば、読取された画像を二値化することができる。つまり、図示されるような位置に閾値を生成すれば、黒ピーク値付近の信号は黒として、白ピーク値付近の信号は白として、正しく出力される。閾値は、以下の式により算出される。
【0034】
閾値=α×(W P−BP)+BP (1<α<1)
なお、αは閾値を決定するための係数であり、任意の値を適用できる。αの値は、読み取られる原稿の濃さや、望まれる出力画像の画質等に応じて適宜選択すればよい。
【0035】
このように、閾値を生成するために白ピーク値(WP)、黒ピーク値(BP)を使用することで、正しい2値化が行える。
【0036】
図7に第4の実施形態による画像読取装置が図示されている。読み込み対象の用紙幅が画像読み取り部の読み取り領域より短い場合には、ライン入力データ値を求めても対象外の部分(原稿の外側)も一緒に読み取られてしまう。そのため、媒体とは無関係なデータが入力されてしまい、用紙の濃度ヒストグラム分布を正しく求めることができない。そのため、本実施形態では、有効領域指定部で、予め指定されたライン上の限定された場所のデータのみの入力データ値として使用し、濃度ヒストグラム分布を生成する。有効領域の指定は、例えば読み取られる媒体の幅を指定すればよい。画像読取装置では、有効領域の指定に基づいて読み取られた信号のうち有効な信号として扱うべき部分を認識し、その部分についてのみ濃度ヒストグラムを生成、閾値を発生させる(図7有効領域)。これにより、画像読み取り部のライン長より短い用紙でも最適な2値化閾値を生成することができる。
【0037】
図8は、本発明の第5の実施形態による画像読取装置を図示した図面である。また、図9乃至図11は、図8に図示された画像読取装置における読取処理の手順を示したフローチャートである。
【0038】
上記図面は、閾値決定のためのライン入力データ保持と実際の読み込み処理との関係を示している。閾値決定のためのライン入力は4通りに構成する。
1)別処理型
実際の画像の読み取りとは別に、用紙の1ライン入力を行いその濃度ヒストグラム分布から予め閾値を決定し、以降の読み取りは決定した閾値で二値化処理を行う。
2)読み込み前型
読み取り開始の先頭ラインを1ライン入力し、読取の結果得られた濃度ヒストグラム分布から閾値を決定し、読み取り時は先頭で決定した閾値で二値化処理を行う。
3)読み込み後型
読み取りの終了ラインを1ライン入力し、濃度ヒストグラム分布から閾値を決定する。以降の原稿の読み取りは、前回の読み取り最後で決定した閾値で二値化処理を行う。
4)逐次型
1ラインの画像入力と同時に、ライン毎に濃度ヒストグラム分布から閾値を決定し、決定した閾値を使って常に最新の閾値で二値化処理を行う。
【0039】
このような構成を採用することによって、ハードウェアの構成と処理時間の優先度に応じた構成が選択できる。
【0040】
【本発明の効果】
以上説明してきたように、本発明によれば、本願発明ではこの読み取り開始時の先頭1ライン目のデータから閾値を作成することにより、閾値作成から実際の読み取りに移行する時間を極力削減し、操作者が閾値作成から読み取りに移行する際に位置変えを行う手間省き、媒体に応じた正確な読み取り処理、高速に、かつ操作者に負担をかけることなく実現することが可能となる。
【図面の簡単な説明】
【図1】 本発明の一実施形態による画像読取装置の構成
【図2】 一実施形態による画像読取処理手順を示した図面
【図3】 画像読取装置の具体的な構成例
【図4】 画像読取のタイミングチャート
【図5】 第二の実施形態による画像読取装置の構成
【図6】 読取画像信号と濃度ヒストグラムの関係を示す図面
【図7】 有効領域が画像読取装置の読取範囲よりも狭い例を説明する図面
【図8】 その他の実施形態による画像読取を説明する図面
【図9】 その他の実施形態による二値化処理手順を示す図面
【図10】さらにその他の二値化処理手順を示す図面
【図11】さらにその他の二値化処理手順を示す図面
【図12】従来の二値化処理を示す図面
[0001]
[Technical field continued]
The present invention relates to an image reading method in an image input apparatus such as a scanner or a facsimile. Specifically, the image on a reading medium is optically read and converted into an analog electric signal, and the analog signal is further converted into a digital signal. The present invention relates to a reading method of an image input device that outputs the image.
[0002]
[Prior art]
Conventionally, there is an image input device shown in FIG. 12 as an image reading circuit (patent application number: Sho-63-296557). According to this image reading apparatus, a peak holding circuit for holding a peak value of a reading value based on one line reading of an input document is provided, and this peak value is used as a reference value for generating a binarization threshold value.
[0003]
[Problems to be solved by the invention]
However, in the conventional technology, when the fluctuation of the reading value caused by the sensitivity variation of the sensor or the variation of the light source is large, the white peak value of one line is held, and even if this value is used as the reference value, the variation of the input level is large. Therefore, there is a problem that the threshold value cannot be generated stably and the binarization processing of the image is not performed correctly.
[0004]
SUMMARY OF THE INVENTION An object of the present invention is to provide an image input apparatus that can perform stable binarization and simplify user operations.
[0005]
[Means for Solving the Problems]
The present invention is an image reading method in a scanner that manually moves an apparatus to read an entire medium, and includes a step of inputting optically read data for an image on a reading medium, and a binarization process of input data. Prior to performing shading correction for correcting density unevenness, and after shading correction of the input data, the input data of the first line of the image including characters on the reading medium is temporarily stored in the input data holding unit. A step of generating, a step of generating a density histogram distribution from the input data of the first line of the image including characters temporarily stored in the input data holding unit, and a binarization threshold value from the density histogram distribution And an input obtained from the reading medium based on the binarization threshold at the time of reading the medium. And performing a binarization processing of data, an image reading method characterized by having a.
[0006]
In a scanner that reads the entire medium by moving the device manually, the device is always positioned at the reading head position when reading.
[0007]
In the present invention, by creating a threshold value from the head data at the start of reading, the time to shift from threshold value creation to actual reading is reduced as much as possible, and the operator has to change the position when shifting from threshold value creation to reading. It is something to omit.
[0008]
As another feature, a correction unit that performs shading correction of input data is provided, and the corrected input data is held in the input data holding unit.
[0009]
The threshold generation unit obtains the white peak value (WP) of the white portion of the paper and the black peak value (BP) of the black portion of the character from the density histogram distribution generated by the density histogram distribution generation portion, and sets the threshold value to α × (WP The threshold value is generated under the condition of −BP) + BP (0 <α <1).
[0010]
The density of the input data is distributed between the density of the background of the paper and the density of the character portion (ink). In general, since the character area includes a space between characters, the density of the background of the paper is distributed at a constant rate. If the optical resolution of the scanner is high, the distribution of character lines also includes the ink density level at a constant rate. Therefore, the background level and the black level of the character portion can be detected from the density histogram distribution.
[0011]
Even for sensor input data that varies in sensitivity due to the effects of sensors, lighting, etc., the white peak value (white peak: WP) of the input level of the background (white) of the paper and characters from the density histogram distribution of the input data The black peak value (black peak value: BP) of the input level is held as a reference value. By generating a threshold value from this reference value, the determined threshold value does not exceed the white and black levels, and correct binarization can always be performed.
[0012]
As a method of correcting static sensitivity variations such as sensors and illumination, there is also a shading correction process in which correction is performed at a black and white input level read in advance. By performing the shading correction process, there is an effect of expanding the dynamic range of the input over the entire sensor area. First, the input data after the shading correction process is held. A reference value for generating a threshold is obtained from this input data, and a threshold is generated. In this method, the dynamic range is expanded, and a pseudo halftone input using dither (defined by combining a plurality of binarized data in a certain area) can always be processed with a correct threshold value.
[0013]
The threshold generated by the threshold generation unit is
Threshold = α × (white peak value−black peak value) + black peak value (0 <α <1)
As a result, the optimum threshold value that does not exceed the white and black levels can be generated. In particular, α = 0.5 corresponds to the case where the maximum margin is set for the white and black levels.
[0014]
When the paper to be read is shorter than the sensor length of the image reading unit (for example, when reading a business card with an A6 size scanner), the density histogram distribution obtains white peak values and black peak values including those other than the target paper. End up. By generating a threshold value using a white peak value and a black peak value from the density histogram distribution of input data in a limited place (for example, business card size) on one line specified in advance, other than the density range to be read The binarization threshold can be generated even when the background of the image is input at the same time.
[0015]
[Embodiment]
FIG. 1 is a diagram showing the configuration of an image reading apparatus according to an embodiment of the present invention.
[0016]
The image reading apparatus according to the present embodiment optically reads an image on a medium on which an image to be read is recorded, converts the image into an electric signal, and binarizes an image signal output from the image reading unit. An image signal processing unit (binarization unit) to perform, an input data holding unit for temporarily holding input data from the image reading unit at the time of line reading, and a density histogram distribution generating unit for generating a density histogram distribution from the input data And a white peak value of the background value of the density histogram distribution, and a threshold value generation unit that generates a binarization threshold value from the black peak value of the character to the image signal processing unit.
[0017]
The image reading unit includes a sensor unit and an A / D conversion unit. In the present embodiment, a line sensor composed of a CCD or the like is used as the sensor unit. Since the sensor type is not directly related to the present invention, any other type of sensor can be used. The sensor unit outputs an analog electric signal having a value corresponding to the density of the image read from the medium.
[0018]
The A / D conversion unit converts the analog electric signal output from the sensor unit into a digital signal. Assuming that an 8-bit digital signal is handled, 255 is output from the A / D converter when the read result is white, and 0 is output when the read result is black.
[0019]
FIG. 2 is a drawing showing the flow of binarization processing according to this embodiment. As shown in FIG. 2, in the image reading apparatus of the present embodiment, threshold value generation processing and binarization processing of the read image are executed.
[0020]
First, in order to generate a threshold value, one line of an image of a background (white part) including characters on a medium is read, data is input, and the data is stored in a line data holding unit. Also, the input data is passed to the density histogram distribution generation unit. The density histogram distribution generation unit generates a density histogram distribution from the density value for each pixel of the input data. In the threshold value generation unit, based on the density histogram generated by the density histogram distribution generation unit, a white peak value indicating the background white and a black peak indicating the black character are obtained, and a threshold value is generated from the black and white peak value, The image is sent to the image processing unit (binarization unit). When the reading target area of one line is all black or all white, the white peak value and the black peak value cannot be obtained only by reading one line. In this case, a threshold value is generated using a white maximum value (255) or a black minimum value (0) prepared in advance, and the subsequent processing is performed.
[0021]
Next, in the image reading process, the image processing unit performs a process of binarizing the digital image signal from the image reading unit using the threshold value of the threshold value generation unit. The threshold value generated by the threshold value generation unit is generated from input data obtained by reading the background (white portion) and character portion (black portion) of the medium. Therefore, the threshold value is optimal for the original and is correctly binarized.
[0022]
FIG. 3 shows an overview of a pen-type scanner device and an internal configuration diagram thereof, which is an example in which the image reading device shown in FIG. 1 is incorporated. The pen-type scanner device according to the present embodiment employs a form in which an image reading unit is placed in close contact with the original to read the original. The pen-type scanner is moved on the read original in this way to scan the original, and the obtained input data is binarized based on the determined threshold value to output binarized image data. Yes.
[0023]
FIG. 4 illustrates control and data flow at the time of image reading in the pen type scanner shown in FIG. In this example, an example of reading data for four lines is shown. In FIG. 4, the encoder pulse corresponds to a movement amount signal output from the movement amount detector. Further, the line sensor activation signal is a signal generated every driving cycle of the line sensor, and signal transfer from the line sensor is started based on this signal. In FIG. 3, it corresponds to a drive signal. The line sensor image signal is an image signal output from the line sensor based on the line sensor activation signal. A signal that has been subjected to image processing is an image signal that has undergone binarization processing.
[0024]
Although details will be described later, the data transfer interruption to the apparatus is performed from the image reading apparatus to the information processing apparatus when image data is transferred from the image reading apparatus to an external information processing apparatus. Hereinafter, control of reading operation and data flow will be described with reference to FIGS.
[0025]
The image reading unit includes a line sensor, a light source (LED or cold cathode tube), and a lens, and performs image reading in a contact system with a reading medium. During reading, the light source is turned on, and the line sensor is started to read with an activation signal, whereby the amount of reflected light at each position on the sensor is converted into an electrical signal and output as an analog signal. The movement amount detection unit converts the movement amount on the reading medium into a pulse signal by the encoder and outputs the pulse signal. Thereby, the relative movement amount of the image reading apparatus with respect to the medium is detected. The image signal processing unit digitizes the image signal from the image reading unit by an A / D conversion circuit, and performs binarized image processing with a threshold value determined from the density histogram distribution. The control unit performs overall reading control and data transfer to the information processing apparatus. The activation signal to the line sensor is always generated during the reading period of the medium, and the line data (image data) after image processing is stored in a buffer inside the image reading apparatus.
[0026]
When the control unit detects a movement pulse (encoder pulse) from the movement amount detection unit, the control unit issues an interrupt to the information processing apparatus and performs data transfer of the image-processed line data stored in the buffer. Only one movement pulse is output in one driving cycle of the line sensor during normal operation (line sensor image signal 1 in FIG. 4). When the binarization process is performed, a data transfer interrupt is performed from the image reading apparatus to the information processing apparatus, and the image data is transferred to the information processing apparatus.
[0027]
However, if the movement pulse is detected twice or more within one driving cycle of the line sensor, the control unit determines that the movement of the scanner has exceeded the reading performance of the scanner, and only the data for one movement pulse is obtained. Forward. In the example of FIG. 4, this corresponds to the line sensor image signal 2. Here, two encoder pulses appear between the line sensor activation signals. On the other hand, if the movement pulse is not detected within one driving cycle of the line sensor, it means that the scanner is not moving. In FIG. 4, it corresponds to the part of the line sensor image signal 3. Here, no encoder pulse appears between the line sensor activation signals. In this case, the image-processed line data stored in the buffer is discarded, and the read data (line sensor image signal 4) of the next line is held.
[0028]
The I / F unit is an electrical interface to the information processing apparatus connected to the image reading apparatus, and performs interrupts and data access to the information processing apparatus. The binarized data transferred to the information processing apparatus is displayed on the display unit of the information processing apparatus. Therefore, the operator can check the image data being read from the display unit.
[0029]
FIG. 5 is a block diagram showing an image reading apparatus according to the second embodiment. The image reading apparatus shown in FIG. 5 optically reads an image on a reading medium and converts it into an electrical signal, and an image signal that binarizes the image signal output from the image reading unit after shading correction. A processing unit (binarization unit), an input data holding unit that holds input data after shading correction at the time of line reading, a density histogram generation unit that generates a density histogram distribution from data in the input data holding unit, and a density histogram A threshold generation unit that generates a binarization threshold value from the white peak value of the background value and the black peak value of the character to the image signal processing unit;
[0030]
The image reading unit includes a sensor unit and an A / D conversion unit, and digitizes and outputs an image signal to be read (for example, in the case of 8 bits, white is 255 and black is 0). The output of the image reading unit is converted into an output from which influences such as surface unevenness are removed by the shading correction unit. The background value read in advance is stored as a white shading correction value, and the input image signal that is input is always converted and output according to the following equation (1).
[0031]
Input image signal: x (i), corrected signal: y (i)
White shading correction value: ww (i)
y (i) = 255x (i) / ww (i). . . (1)
The image signal converted by the above equation is binarized as in the first embodiment. For this purpose, input data for which one line of shading correction has been completed is held in the input data holding unit. On the other hand, a threshold value is generated from input data as in the first embodiment. Here, white shading correction processing is shown, but black shading correction may be performed in the same manner.
[0032]
FIG. 6 is a diagram for explaining the image reading operation according to the third embodiment of the present invention, and is a graph showing the relationship between the input waveform of the background, the density histogram distribution, and the threshold value to be determined. The graph on the left side of the drawing shows the input value of the read signal for one line including the background of the read original and the black portion corresponding to the character. The horizontal axis represents pixels in the lateral direction of the medium, and the vertical axis represents density values. Further, the graph on the right side of the drawing shows the density histogram distribution of the pixels. The horizontal axis in the figure indicates the density value, and the vertical axis indicates the frequency of occurrence of the density value.
[0033]
Here, even if the sensitivity of the sensor varies, a white peak value (WP) indicating the background and a black peak value (BP) indicating the character appear in the density histogram distribution. Therefore, if the threshold value is generated inside the white peak value and the black peak value, the read image can be binarized. That is, if a threshold value is generated at the position shown in the figure, the signal near the black peak value is output as black, and the signal near the white peak value is output as white. The threshold value is calculated by the following formula.
[0034]
Threshold = α × (W P−BP) + BP (1 <α <1)
Α is a coefficient for determining the threshold, and an arbitrary value can be applied. The value of α may be appropriately selected according to the density of the original to be read, the desired output image quality, and the like.
[0035]
Thus, by using the white peak value (WP) and the black peak value (BP) to generate the threshold value, correct binarization can be performed.
[0036]
FIG. 7 shows an image reading apparatus according to the fourth embodiment. If the paper width to be read is shorter than the reading area of the image reading unit, even if the line input data value is obtained, the non-target portion (outside the document) is also read together. Therefore, data irrelevant to the medium is input, and the density histogram distribution of the paper cannot be obtained correctly. For this reason, in the present embodiment, the effective area designation unit uses as input data values only for data in a limited place on a line designated in advance, and generates a density histogram distribution. The effective area may be specified, for example, by specifying the width of the medium to be read. The image reading apparatus recognizes a portion to be treated as a valid signal from signals read based on the designation of the effective region, generates a density histogram only for that portion, and generates a threshold value (FIG. 7 effective region). As a result, an optimum binarization threshold can be generated even for a sheet shorter than the line length of the image reading unit.
[0037]
FIG. 8 illustrates an image reading apparatus according to a fifth embodiment of the present invention. 9 to 11 are flowcharts showing the procedure of the reading process in the image reading apparatus shown in FIG.
[0038]
The above drawing shows the relationship between holding the line input data for determining the threshold and the actual reading process. There are four line inputs for determining the threshold.
1) Separate processing type Separately from actual image reading, one line of paper is input and a threshold is determined in advance from the density histogram distribution, and subsequent reading is binarized using the determined threshold.
2) One leading line for starting reading before reading type is input, a threshold value is determined from the density histogram distribution obtained as a result of reading, and binarization processing is performed with the threshold value determined at the beginning at the time of reading.
3) One line is input as the end line of post-reading type reading, and the threshold is determined from the density histogram distribution. Subsequent reading of the document is binarized using a threshold determined at the end of the previous reading.
4) Simultaneously with sequential one-line image input, a threshold value is determined for each line from the density histogram distribution, and binarization processing is always performed with the latest threshold value using the determined threshold value.
[0039]
By adopting such a configuration, a configuration corresponding to the hardware configuration and the priority of the processing time can be selected.
[0040]
[Effect of the present invention]
As described above, according to the present invention, by creating a threshold value from the data of the first line at the start of reading in the present invention, the time required to shift from threshold value creation to actual reading is reduced as much as possible. It is possible to save the labor of changing the position when the operator shifts from threshold value creation to reading, and to realize an accurate reading process according to the medium, at high speed and without burdening the operator.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an image reading apparatus according to an embodiment of the present invention. FIG. 2 is a diagram illustrating an image reading processing procedure according to an embodiment. FIG. 3 is a specific configuration example of an image reading apparatus. FIG. 5 is a timing chart of reading. FIG. 5 is a diagram showing the relationship between the read image signal and the density histogram. FIG. 7 is an effective area narrower than the reading range of the image reading apparatus. FIG. 8 illustrates an example of image reading according to another embodiment. FIG. 9 illustrates a binarization processing procedure according to another embodiment. FIG. 10 illustrates another binarization processing procedure. FIG. 11 shows still another binarization processing procedure. FIG. 12 shows a conventional binarization processing.

Claims (1)

手動で装置を移動させて媒体全体を読み取るスキャナにおける画像の読み取り方法であって、
読み取り媒体上の画像について光学的に読み取るデータを入力するステップと、
入力データの2値化処理に先立って、濃度むらを補正するシェーディング補正を行うステップと、
前記入力データのシェーディング補正後に、前記読み取り媒体上の文字を含んだ画像の先頭の1ラインの入力データを入力データ保持部に一時的に保持するステップと、
前記入力データ保持部に一時的に保存された文字を含画像の先頭の1ラインの入力データから濃度ヒストグラム分布を生成するステップと、
前記濃度ヒストグラム分布から2値化閾値を生成するステップと、
媒体読み取り時に、前記2値化閾値に基づき、前記読み取り媒体より得られる入力データの2値化処理を行うステップと、
を有することを特徴とする画像読み取り方法。
A method of reading an image in a scanner that manually moves the apparatus and reads the entire medium,
Inputting the Lud over data reading optically the image on the scanned medium,
Prior to the binarization processing of the input data, performing a shading correction for correcting density unevenness;
Temporarily holding the input data of the first line of the image including characters on the reading medium in the input data holding unit after the shading correction of the input data;
Generating a concentration histogram distribution temporarily stored characters in the input data holding unit from the input data of the head of a line of including images,
Generating a binarization threshold from the density histogram distribution;
Performing binarization processing of input data obtained from the reading medium based on the binarization threshold when reading the medium;
An image reading method comprising:
JP2003198199A 2003-07-17 2003-07-17 Image reading method Expired - Fee Related JP3945457B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003198199A JP3945457B2 (en) 2003-07-17 2003-07-17 Image reading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003198199A JP3945457B2 (en) 2003-07-17 2003-07-17 Image reading method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP01567998A Division JP3523045B2 (en) 1998-01-28 1998-01-28 Image reading device

Publications (2)

Publication Number Publication Date
JP2004064766A JP2004064766A (en) 2004-02-26
JP3945457B2 true JP3945457B2 (en) 2007-07-18

Family

ID=31944737

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003198199A Expired - Fee Related JP3945457B2 (en) 2003-07-17 2003-07-17 Image reading method

Country Status (1)

Country Link
JP (1) JP3945457B2 (en)

Also Published As

Publication number Publication date
JP2004064766A (en) 2004-02-26

Similar Documents

Publication Publication Date Title
JP6849320B2 (en) Image reader and image forming device
US8107132B2 (en) Image forming apparatus and control method thereof
US7830563B2 (en) Image scanner and image forming apparatus
JP2003348336A (en) Image processing method and apparatus
US7292372B2 (en) Image processing apparatus and image forming apparatus which adaptively switches image processing methods between a dot image portion and a non-dot image portion
EP0719032B1 (en) Apparatus for reading image and method therefor
JP2008227625A (en) Image processor, image processing method, image processing program and recording medium
JP2005117090A (en) Image reading apparatus
JP4150316B2 (en) Image reading apparatus and shading correction method for the same
JP3945457B2 (en) Image reading method
JP2009303164A (en) Image reading apparatus and method of controlling the same
JP2001036744A (en) Image reading method, image reader and image processor
JP3523045B2 (en) Image reading device
US20030156302A1 (en) Color image reading apparatus and color image reading method
JPH09298628A (en) Image reader
JPH03201774A (en) Multi-value picture input device
US20080204823A1 (en) Compensating Method for Image Scanning, Image Scanning Apparatus and Image Processing System
JP2005123915A (en) Image reader and image forming apparatus employing it
JP4149964B2 (en) Image processing device
JP2021090222A (en) Image reading device and image forming apparatus
JP2003333335A (en) Image processing apparatus
JPH0253375A (en) Reading part dirt detecting circuit
JPH0537770A (en) Picture processor
KR20000000673A (en) Shading correction method
JP2001245203A (en) Image pickup device, its control method and storage medium

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060613

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060810

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20061031

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061221

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: 20070320

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070402

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: 20110420

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110420

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120420

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130420

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140420

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees