Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3733227B2 - Image processing apparatus and method - Google Patents
[go: Go Back, main page]

JP3733227B2 - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP3733227B2
JP3733227B2 JP35829397A JP35829397A JP3733227B2 JP 3733227 B2 JP3733227 B2 JP 3733227B2 JP 35829397 A JP35829397 A JP 35829397A JP 35829397 A JP35829397 A JP 35829397A JP 3733227 B2 JP3733227 B2 JP 3733227B2
Authority
JP
Japan
Prior art keywords
reference value
input
value
transfer
unit
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
JP35829397A
Other languages
Japanese (ja)
Other versions
JPH11191843A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP35829397A priority Critical patent/JP3733227B2/en
Publication of JPH11191843A publication Critical patent/JPH11191843A/en
Application granted granted Critical
Publication of JP3733227B2 publication Critical patent/JP3733227B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は画像処理装置及びその方法に関し、例えば、シェーディング補正を行なう画像処理装置及びその方法に関する。
【0002】
【従来の技術】
従来、用紙上の原稿画像の読み取りを行なう画像処理装置においては、光電センサ群が用紙サイズの幅分配置されているラインヘッド型のスキャナユニットを、該センサ群の配列方向に対して垂直方向に移動しながら原稿を読みとる、フラットヘッドタイプが主流であった。
【0003】
このタイプは、高速かつ高精度の画像読み取りが可能である反面、紙幅分の光電センサを必要とするため、装置の大きさやコストの面で制約があり、個人ユースには不向きであった。
【0004】
これに対して、印字ヘッドを搭載するキャリア部に、紙送り方向に対して平行な方向に光電センサを配置することにより、印刷のみでなく、比較的安価に画像読み取りも可能とする、いわゆるシリアルタイプのスキャナ付プリンタユニットを搭載した、パーソナルワードプロセッサ等が近年商品化されている。
【0005】
このシリアルタイプのスキャナについて更に詳細に説明すると、印字ヘッドユニットとスキャナユニットとを交換することで、紙送り方向(Y軸方向)に平行に配置された光電センサ群が紙送り方向に対して垂直方向(X軸方向)に移動しながらの画像入力動作と、光電センサ群を原稿用紙に対してY軸方向に相対的に移動させる紙送り動作と、の繰り返しで原稿を読みとる方式である。
【0006】
【発明が解決しようとする課題】
上記従来例で示したシリアルタイプの画像読取りを行なう画像処理装置においては、図2に示すように、プリンタヘッドと交換可能なサイズにスキャナユニットが設計されている。このため、フラットヘッドタイプのスキャナに比べて、電気ノイズや温度特性に対して、よりシビアな制御が必要になる。
【0007】
特にスキャナの基本機能の一つである、シェーディング補正機能に与える影響が大きい。シェーディング補正機能とは、図5に示すように、発光部の両端部での光量低下や各受光素子の受光特性のばらつきを補償する機能である。一般的には、リファレンス値となる白基準値測定用原稿(フラットヘッドタイプでは、読み取り領域外のところに白基準測定用原稿がある)の読み取り値を、シェーディング補正用データ、即ち白基準データとして使用する。
【0008】
図5中段に示す、正常な白基準データによるシェーディング補正後のデータでは、原稿の黒い部分に対応する読み取りデータが0(絶対黒)に近いレベルで、その他は発行部の両端部での光量低下の影響が補正されて、比較的フラットな値が得られている。ところが、図5下段に示すように、白基準測定時にたまたまノイズが生じて、以後その白基準データでシェーディング補正を行った場合は、ノイズがのった画素に対応する原稿部に対して、正しい読み取り画像データを得ることができなくなる。
【0009】
こうした電気的なノイズにともなう部分的な白基準値のドロップと、受光素子の特性に基づく正常な値とを明確に判別することは困難であり、一般的には統計的な手法によって、ノイズ分の除去が行われる。
【0010】
例えば、複数の白基準測定値の平均化により、ノイズの影響を排除した白基準データを取得している。具体的には、白基準値を測定してその大きさに基づいてソーティングするという処理を複数回くり返し、全サンプル数分の測定値のソーティングが終了したら、所定数分をその上下からカットし、残りのサンプル数による平均値をもって白基準値を決定する。
【0011】
この場合、サンプル数が大きくなればなるほど、ノイズの除去率も高くなるが、同時に温度特性の問題が浮上してくる。図6に示すように、光源であるLEDの出力はスキャナユニット内部の電気素子の温度特性変化に応じて点灯後急速に低下してくる。もちろん、比較的安定したタイミング(例えばLED点灯後60秒)で白基準の測定を行えば良いが、それでもLEDの出力特性は常に変化しているため、上記白基準値の複数回の測定時間を必要最小限に抑えねばならない。更に、白基準原稿上の白基準測定点が汚れている場合等を考慮して、図6に示すように、白基準値の測定ポイントは複数でなければならない。
【0012】
以上説明したように、図2に示すような超小型スキャナユニットにおける白基準値の測定の際には、最初の測定ポイントの1回目の測定から、最後の測定ポイントの最後の測定までに要する時間をいかに短くするかが、重要となってくる。
【0013】
本発明は上記の問題点を解消するためになされたものであり、白基準値の測定、及び最終白基準値の決定に要する処理時間を短縮することが可能な画像処理装置及びその方法を提供することを目的とする。
【0014】
【課題を解決するための手段】
上記目的を達成するための一手段として、本発明の画像処理装置は以下の構成を備える。
【0015】
即ち、ライン状に並べた複数の受光素子により原稿画像を読取って入力する画像入力手段と、前記入力手段によって基準濃度原稿を複数回読取って入力された前記受光素子の素子毎の複数の入力値を、所定領域に転送・格納する転送手段と、前記転送手段によって前記所定領域に格納された複数の入力値を前記素子毎に、大小関係でソート処理して、大小両端夫々複数所定数の入力値を除いて平均値を求めて、前記素子毎の濃度基準値を決定する統計手段と、前記統計手段によって決定された前記濃度基準値を保持する濃度基準値保持手段と、前記入力手段による各素子毎の入力値を前記濃度基準値に基づいてシェーディング補正する補正手段と、前記転送手段における第nラインの入力値の転送・格納処理と、前記統計手段による第n‐1ラインの入力値の前記ソート処理とが並行して行われるように制御する制御手段と、を有することを特徴とする。
【0017】
【発明の実施の形態】
以下、本発明に係る一実施形態について、図面を参照して詳細に説明する。
【0018】
<第1実施形態>
[装置構成]
図1は、本実施形態におけるスキャナ装置の概観図である。同図において1はスキャナ装置本体、2は画像読み取り手段であるところのスキャナユニット、3はスキャナユニット2をホールドするためのキャリヤユニット、4はスキャナユニット2でA/D変換されたデジタル画像データをメイン制御ユニット部(不図示)に転送するためのフレキシブルなケーブル、5はスキャナユニット2が搭載されたキャリヤユニット3を紙送り方向に対して垂直方向に走査させるキャリヤ駆動ユニット、6は原稿用紙をキャリヤユニット3の走査方向に対して垂直方向に動かすための紙送りユニット、7はホストコンピュータ8とスキャナ装置1間におけるコマンドや画像データの経路となる入出力コネクタ、9は原稿用紙を給紙するための給紙トレイである。このほか、図示されていないユニットとして、紙送りユニット6やキャリヤユニット3等のメカ駆動系の制御や、スキャナユニット2が読みとった画像データを必要に応じて編集・加工して入出力コネクタ7を経由してホストコンピュータ8に転送するためのメイン制御ユニット等を備える。
【0019】
図2は、図1に示したスキャナユニット2の外観斜視図であり、プリントヘッドユニット(不図示)と交換することによってスキャナ装置1がプリンタとしても使用できるように、約40mm×45mm×25mmのユニット内部にスキャナとしての基本的な機能を凝縮した、超小型ユニットになっている。スキャナユニット2をキャリヤユニット3に装着すると、キャリヤユニット3の端子とスキャナユニット2の端子10とが接触し、ケーブル4を介してスキャナユニット2とメイン制御ユニットとが接続される。
【0020】
図3は、図2に示したスキャナユニット2の詳細構成を示すブロック図である。スキャナユニット2は、読み取り面を照射する発光部11と、読み取り面からの反射光を受光するために紙送り方向に360dpiの密度で配置された128個の受光素子(第1受光素子〜第128受光素子)からなる受光部12と、受光部12によるアナログ電圧をデジタル値に変換するA/D変換部13と、A/D変換後の値から絶対黒レベルを保持しているオフセットレジスタ14の値を減算する減算部15と、減算後の画像データにシェーディングRAM16に保持されている内容(白基準値)でシェーディング補正を行うシェーディング補正部17と、最終的な画像データをメイン制御ユニット側にシリアル転送する転送部18と、メイン制御ユニットからヘッドレジスタ設定信号20を介して指定されるコマンドに応じてスキャナユニット2内の各種動作(LEDのオン/オフ、オフセット値の測定、白基準値の測定、原稿の読込等)を制御する内部レジスタ設定部19から構成される。尚、発光部11と受光部12とにより、スキャナヘッド100を構成する。
【0021】
尚、ヘッドレジスタ設定信号20は、オフセットレジスタ14やシェーディングRAM16にも接続されており、メイン制御ユニット側からの書き込みも可能な回路構成になっている。また、スキャナユニット2内部で実行される前述の各種動作は、メイン制御ユニットから送出される同期クロックCRST21に同期して実行されることになる。
【0022】
図4は、スキャナエンジン22の詳細構成を示すブロック図である。同図においてスキャナエンジン22は、メイン制御を行なうMPU23を中心に構成される。このMPU23は、MPU23の動作手順やモータ制御用の各種テーブル等が記載されたROM部や、MPU23の演算用等に使用される内部ワークRAMを内蔵したいわゆるワンチップマイコンである。MPU23の周辺には、スキャナユニット2から転送された画像データを格納するための1メガバイトの外部RAM24、スキャナユニット2からの画像データをシリアル/パラレル変換後、MPU23が指定する外部RAM24のエリア内の指定アドレスから順に画像データを格納する画像データ格納制御部25、アドレスラインとデータラインから構成され、MPU23と画像データ格納制御部25の双方からの外部RAM24エリアへのアクセスを可能にするデータバス26、入出力コネクタ7を経由してホストコンピュータ8からのコマンドを受け取ったり、あるいは読み取った画像データをホストコンピュータ8に転送するための、ホストPCインタフェース制御部27、MPU23からの制御信号に応じてキャリヤユニット3駆動用のステッピングモータ28と、紙送り用のステッピングモータ29との電流量を制御するモータドライバ30等が配置されている。キャリア・紙送りの両ステッピングモータ28,29はともに、モータ1パルス(1ステップ)でキャリア・原稿用紙が1/360インチ動くようなギヤ比で設計されている。
【0023】
MPU23と画像データ格納制御部25とスキャナユニット2とは、MPU23から出力されるCRST(Column Read Start Timing)信号21によって同期がとられている。つまり、キャリアユニット3が1/360インチ移動するごとにMPU23はCRST信号21をワンショット信号として出力し、スキャナユニット2はこの信号をトリガにして1カラム分の画像データを画像クロック信号(SCLK)31と画像データ信号(SDATA)32によって、シリアル形式のデータとして画像データ格納制御部25に転送する。画像データ格納制御部25では、転送されてきたシリアルデータを8ビットを1単位としてパラレル変換後に、格納アドレスが示す先頭アドレスから順に、データバス26を経由して外部RAM24へ画像データを格納していく。
【0024】
但し、画像データの読込動作以外の場合(オフセットスキャンや白基準測定等)は、MPU23の制御の元に、キャリヤユニット3側の制御は切り放して、スキャナユニット2側の制御のみが実行される。
[白基準値設定の基本処理]
以下、本実施形態のスキャナ装置1における白基準値設定の動作を図7Aのフローチャートに示し、説明する。
【0025】
スキャナユニット2内のシェーディングRAM16に保持されている白基準値は、スキャナユニット2の交換やスキャナユニット2の電源オフにより失われる。MPU23は、スキャナユニット2への電源供給を管理しており、白基準値の取得・未取得を常に把握している。
【0026】
ホストコンピュータ8からスキャンコマンドが送られてきた場合、MPU23は、白基準値が未取得の場合は、白基準値未取得のワーニングをリターンする。ホストコンピュータ8側のスキャナドライバはこのワーニングを受けると、ポップアップメニューでユーザに白基準取得用の用紙を給紙するように促す。ユーザは白基準用紙を給紙トレイにセットし、ポップアップメニュー上のOKボタンをクリックする。スキャナドライバはOKボタンのクリックを検出すると、スキャナ装置1に白基準取得コマンドを発行し、スキャナ装置1側では図7以降に示す制御フローチャートに基づいた白基準値取得処理が実行される(以上不図示)。
【0027】
MPU23はモータ制御部30を介してLFモータ29を回転させ、白基準用紙がスキャナユニット2の下まで十分到達するまで(例えば1800パルス(360×5インチ)回転分)紙送りを実行する(S701)。
【0028】
MPU23はキャリヤモータ28を回転させ、スキャナユニット2の読み取り位置がキャリヤユニット3のホームポジションから4インチの位置(以降、A点)にくるように、キャリヤユニット3を移動させる(S702)。
【0029】
このポイント(A点)で後述する白基準値測定処理を実行し、外部RAM24の878000hからの128バイトに格納されている統計処理済みの白基準値最終データを、878100hからの128バイトに転送する(S703)。
【0030】
MPU23はキャリヤユニット3をさらに右方向に360パルス分移動させ(S704)、A点から1インチ離れたB点において前記S703と同様の処理を実行し、外部RAM24の878000hからの128バイトにおける最終データを878200hに転送する(S705)。
【0031】
MPU23はキャリヤユニット3をさらに右方向に1インチ移動させ(S706)、前記同様にC点での白基準値測定処理を行ない、最終結果を外部RAM24の878300hに格納する(S707)。このように、白基準値を3点で測定する理由は、白基準用紙表面の汚れの影響を排斥するためである。
【0032】
以上測定して外部RAM24に格納された、A点での白基準値(878100h)・B点での白基準値(878200h)・C点での白基準値(878300h)の3ポイントの白基準値から最終的な白基準値αを算出し(S708)、この値αをヘッドレジスタ設定信号20を経由して、スキャナユニット2内のシェーディングRAM16に書き込む(S709)。これにより、本実施形態における白基準値設定処理が終了する。
[白基準値最終データ算出処理]
以下、前記S708で実行される白基準値最終データ算出処理の詳細を、図7Bのフローチャートに基づいて説明する。
【0033】
前記S703の処理によって、A点における、受光部12の第1受光素子での白基準値測定値は外部RAM24の878100hに、第128受光素子での白基準値は87817Fhに格納されている。B点においても同様に、第1受光素子での値は878200hに、第128受光素子での値は87827Fhに格納され、C点においては第1受光素子の値は878300hに、第128受光素子での値は87837Fhに格納されている。
【0034】
測定点にたまたま汚れや挨が付着している場合は、その部分を読み取った白基準値は、他のポイントでの値より低い値になる。よってA点・B点・C点の3ポイントでの、同一受光素子での白基準値を大小比較し、最も大きな値を、その受光素子における白基準値とすることで、上記の汚れや挨の影響をなくすことが可能になる。即ち、
まず、受光素子番号を示すnを1で初期化する(S711)。次に、前述のアドレスのRAMエリアに格納されているA点・B点・C点での第1(n)受光素子の白基準値について、大小比較を行う(S712)。そして、その最大値を第1(n)受光素子の白基準値として採用し、879000hに格納する(S713)。
【0035】
そして、受光素子番号nに1加算して(S714)、nがスキャナヘッド100上の受光素子の個数である128以下の場合は、ステップS712に分岐し、次の受光素子についての白基準値の判断を繰り返す(S715)。nが129になった場合、白基準最終データ算出処理を終了する。これにより、外部RAM24の879000hからの128バイトに、第1受光素子から第128受光素子までの白基準値が順次格納されたことになる。
[白基準値測定処理]
次に、前記ステップS703・S705・S707で実行される白基準値測定処理の詳細を説明する。
【0036】
本実施形態においては、白基準値の測定及び転送処理と並行して、前回測定した白基準値のソーティング処理を行うことを特徴とする。この並行処理により、測定・転送処理とソーティング処理とを分割して行う場合に比べて処理時間を短縮することができる。
【0037】
まず、白基準値測定処理および後述するソーティング処理で使用するワークRAMの構造を図12〜図14に示し、説明する。
【0038】
図12に示す様に、画像データ格納制御部25によってスキャナユニット2側で測定した白基準値を自動格納するためのワークエリアとして、外部RAM24上の、860000hから8618FFhの6400バイト(128バイト×50回)のエリアが確保される。尚、本実施形態の画像データ格納制御部25はASICにより構成されており、後述するASICによる自動格納では、1回目の測定における第1受光素子の白基準値は860000hに、50回目の第128受光素子の白基準値は8618FFhに格納される。以降、画像データ格納制御部25をASIC25と表記する。
【0039】
また、本実施形態においてASIC(画像データ格納制御部25)による自動格納処理と平行してソーティング処理が実行される。このソーティング処理とは即ち、測定された白基準値を大きさの順に並べ代える処理であり、外部RAM24上で3ブロックのワークエリアが使用される。以下、この3つのワークエリアについて説明する。
【0040】
まず1つ目として、外部RAM24の872000hからの256バイトは白基準値累積値算出用のワークエリア(不図示)であり、例えば872000hからの2バイトは第1受光素子における50回分の白基準測定値の合計が格納されることになる。
【0041】
次は図13に示した、ロウアーデータ(Lowwer Data)格納エリアである。第1受光素子でのロウアーデータは870000hからの32バイトに格納される。2バイトがワンセットで、ローバイト(Low Byte)が測定値を示し、ハイバイト(High Byte)が測定回数番号を示す。ワークエリアとしては、16個のロウアーデータまで対応できるが、本実施形態では10個までに限定している。後述するソーティング処理によって、10個のデータの並びはその受光素子での白基準値のなかで小さい10個が格納され、さらにその10個の中で最も大きい白基準値が先頭アドレス(第1受光素子については、870000hからの2バイト)に格納されることになる。
【0042】
また、ハイアーデータ(Higher Data)についても同様に、図14に示すハイアーデータ格納エリアが用意され、各受光素子ごとの白基準測定値で高い方から10個のサンプルについて、白基準値と測定回数番号がワンセットで、871000hから871FFFhのエリアに格納される。上記ロウアーデータ用格納エリアとの違いは、10個の配列順序において10個の中で最も小さい白基準値が先頭アドレスに格納される点である。
【0043】
以下、図8のフローチャートを参照して、本実施形態の白基準値測定処理について詳細に説明する。
【0044】
尚、本実施形態の白基準値測定処理においては、オフセット値及び白基準値の測定開始や測定値の転送開始等は、後述するINT7割込処理によって、ヘッドレジスタ設定信号20を介してスキャナユニット2に命じられることにより制御される。
【0045】
まず、外部RAM24中のソーティング処理用のワークエリアを、ロウアーデータ格納エリアは00hで、ハイアーデータ格納エリアはFFhで、累積値算出用ワークエリアは00hで初期化する(S801)。次にMPU23は、ヘッドレジスタ設定信号20を介して、スキャナヘッド100の発光部11に対して、光源であるLEDの消灯命令を発効する(S802)。そして残光が完全に無くなるまで10ミリ秒待ったのち(S803)、後述するINT7割込処理で参照するオフセットフラグをセットし(S804)、測定回数nを1に、ASICによる自動格納処理の格納先頭アドレス(以降、格納ポインタP)を860000hで初期設定する(S805)。以降、n回目の測定値の格納先頭アドレスをPnで表す。
【0046】
前述のように、スキャナユニット2内部の動作は、基本的にMPUからASIC25を経由して送られてくる信号CRST21に同期して動作する。スキャナユニット2内部では、CRST21の周期が白基準値測定時間に相当し、実際の画像読み取りの際もCRST21の周期でキャリヤユニット3は1パルス(1ドット/360インチ)移動する。つまり、360dpiの読み取りを行う場合に、1ドット幅の原稿面に照射される時間がCRST21の周期になる。本実施形態においては、512μ秒周期をCRST21周期としている。
【0047】
また、スキャナユニット2内部でのオフセット値及び白基準測定処理において、最初の2パルス分はスキャナユニット2内部のバッファをクリアするためのウォームアップに使用され、実際の測定は3パルス目以降に実行される。本実施形態では、7パルス目で白基準値の測定を行ない、オフセット値の測定結果はオフセットレジスタ14に、白基準値の測定結果は128バイトのシェーディングRAM16に格納されることになる。
【0048】
また、オフセットレジスタ14やシェーディングRAM16内部の測定値をASCI25を介して、前記ステップS805で指定したスキャナエンジン22内の外部RAM24に自動転送する処理も、CRST21に同期して実行される。この場合も数段のバッファを経由して送られてくるため、実際に外部RAM24に格納されるタイミングは、スキャナユニット2とASIC25に自動転送の開始を命じた5パルス後になる。このため、測定用と自動転送用として、トータル15パルスのCRST21出力をASIC25に設定する(S806)。
【0049】
前述のオフセット値及び白基準値の測定開始や、測定値の転送開始は、後述するINT7割込処理によって、ヘッドレジスタ設定信号20を介してスキャナユニット2に命じられることにより制御される。ここでは、その起動になる、CRST21の2パルス後のINT7の発生をASIC25に設定する(S807)。
【0050】
CRST21の出力開始をASIC25に命じて(S808)、後述するINT7処理の最終処理でセットされるフラグをポ-リングし、CRST21の出力終了を待つ(S809)。CRST出力が終わると、外部RAM24の860000hにはスキャナユニット2内部のオフセットレジスタ14の内容と同じ値が格納されていることになる。この値をオフセット値演算用ワーク(不図示)に転送し(S810)、測定回数nを1増加させ(S811)、測定回数nが10回以下の場合は再度前記ステップS806に分岐し、オフセット値の測定処理を繰り返す(S812)。
【0051】
10回分のオフセットの測定が終了すると、ノイズ除去のために上下各2サンプルをカット後、残り6個のサンプルでの平均値(β)を算出する(S813)。このβをヘッドレジスタ設定信号20を介して、スキャナユニット2内部のオフセットレジスタ14に書き込むことで、オフセットレジスタ14の設定処理が終了し(S814)、即ち絶対黒レベルが決定される。
【0052】
次に、白基準値の測定処理が開始される。基本的な制御は前述のオフセット値の設定処理と同じ手順になる。但し、オフセット値取得の場合は、発光部11のLEDは消灯しているが、白基準値取得の場合は、LEDが点灯している状態での処理になる。このため、ノイズやスキャナユニット2内部の昇温の影響が大きくなる。このため、測定回数は50回に、また処理手順も高速化するための工夫が盛り込まれている。
【0053】
まずスキャナユニット2に対して、発光部11内のLEDの点灯命令を発行する(S815)。そして、コマンド実行までのディレイとして10ミリ秒待った後(S816)、後述するINT7割込処理で使用する白基準フラグをセットする(S817)。そして、前述のステップS805と同様に測定回数と格納アドレスを設定し(S818)、白基準の測定と測定値の転送のために15パルスのCRST出力をASIC25に設定し(S819)、更に2パルス目のCRST21でINT7を発行するようにASIC25に設定後(S820)、CRST21の出力開始をASIC25に指令して(S821)、1回目の白基準値の測定・転送処理を開始する。尚、前記ステップS818における格納先アドレスの設定により、測定白基準値はワークエリアに保持されるのみであり、後述するINT7の中でこのワークエリアの値を参照し、ASIC25に設定することになる。
【0054】
その後、前記ステップS809と同様にCRST21の出力終了を待って(S822)、次回の測定用に測定回数を1増加させるとともにASIC25による自動転送の格納先アドレスを128増加させる(S823)。ここで図12に示すように、1回目測定において第1受光素子の白基準値は860000hに、第128受光素子の白基準値は86007Fhに格納されており、二回目の測定では860080h(860000h+128)からの128バイトに白基準値が格納されることになる。
【0055】
そして、1回目の測定におけるステップS819〜S821までの処理と同様の処理を行い、2回目の測定・転送処理を開始する(S824,S825,S826)。
【0056】
ここで、前回の測定・転送処理で格納されている128バイトの白基準値について、後述するソーティング処理を実行する(S827)。つまり、スキャナユニット2とASIC25によるn回目の白基準測定及び転送処理と平行して、MPU23ではn−1回目の白基準測定値についてのソーティング処理(統計処理)を実行することになる。尚、このソーティング処理については後述する。
【0057】
測定回数が50回を越えるまで前記ステップS822からS827の処理を繰り返し(S828)、50回の測定が終了すると、ソーティング処理によって図13及び図14に示すように構築されるロウアーデータ・ハイアーデータを使用して、同じくソーティング処理によって累積された累積値ワークエリアの内容からロウアーデータ・ハイアーデータの値を減算し、30サンプルでの平均値γを算出する(S829)。そして、外部RAM24の878000hからの128バイトに前記γの値を格納して(S830)、白基準値測定処理が終了し、即ち絶対白レベルが決定される。
[ソーティング処理(統計処理)]
以下、前記ステップS827で実行されるソーティング処理の詳細を、図9のフローチャートを参照して説明する。このフローチャートに示す1回のソーティング処理により、図12に示されるワークエリア中の128画素×50回の白基準測定値のうち、128画素×1回の測定分が、図13及び図14のソーティング用のデータ格納エリアに格納されるべきか否かチェックされる。
【0058】
まず、前回の測定における白基準値先頭格納アドレスの値を便宜上Pとする(S901)。次に、受光素子番号mとして、第1受光素子は0番(S902)、第128受光素子は127番として取り扱い、まず第1受光素子の白基準値より、累積値データ,ロウアーデータ,ハイアーデータの更新を開始する。
【0059】
m番の受光素子の白基準測定値は、P+mのアドレスに格納されている。この値を便宜上AとしてMPU23のレジスタにセットする(S903)。そして、Aを第(m+1)受光素子用の2バイトの累積値ワークエリアの内容に加算する(S904)。
【0060】
そして、第(m+1)受光素子用のロウアーデータ格納エリアの先頭アドレスを便宜上LTとする(S905)。例えば、画素番号m=2(つまり第3受光素子)用のロウアーデータ格納エリアの先頭アドレスLTは図13に示すように870040hになる。
【0061】
そして、ソーティング用のワークポインタLSPを0で初期化し(S906)、ロウアーデータ格納エリアのアドレス(LT+LSP)の内容をBとする(S907)。そして、白基準測定値Aがロウアーデータ格納エリアに既に格納されている値Bより小さければ(S908)、該白基準測定値Aはロウアーデータ格納エリアに格納すべき値であるとしてLSPに2加算し(S909)、LSPが20を越えるまで(S910)、前記ステップS907に戻る。
【0062】
ステップS908で白基準測定値Aがロウアーデータ格納エリアに既に格納されている値Bより大きければ、Aをロウアーデータ格納エリアに格納すべきかのチェックは終了し、その時のLSPの値に基づいて、ロウアーデータ格納エリア内の第m画素における10個のデータの並べかえを行なう(S911)。
【0063】
このようにしてロウアーデータ格納エリアに対するソーティングが終了すると、次にハイアーデータ格納エリアに対するソーティングを開始するが、これは上述したロウアーデータ格納エリアに対するソーティングと略同様であるため、詳細な説明は省略する。ただし、ステップS915における白基準測定値Aと格納データBとの比較方法が上記ステップS908の場合とは逆になる。
【0064】
以上のように、ステップS918まででハイアーデータ格納エリアに対する第m画素のソーティングが終了する。続いて画素番号mに1加算して(S919)、第128画素まで以上ステップS903〜S919の処理をくり返す(S920)ことにより、1回の測定による第1画素から第128画素までの白基準測定値がソーティングされる。
[INT7割込処理]
以下、前記白基準測定処理中のオフセット値(絶対黒レベル)の測定や、白基準値(絶対白レベル)の測定で起動がかけられ、フォアグランドでの前記ソーティング処理と平行して、バックグラウンドで実行されるINT7割込処理について、図10,図11のフローチャートを参照して説明する。
【0065】
INT7割込は、CRST21の出力回数がASIC25内部のINT7設定レジスタに設定した回数分に達したときに、ASIC25からMPU23に外部割込として入力される。INT7割込が発生する処理としては、前述のオフセット値の測定・白基準値の測定、及び画像データの読込の3種類の処理が含まれるが、本実施形態においては画像データの読込処理についての説明は割愛する。
【0066】
●オフセット値処理におけるINT7割込
図10を参照して、オフセット値処理におけるINT7割込について説明する。
【0067】
まず、図8AのステップS804でセットしたオフセットフラグをチェックし(S101)、1の場合はステップS102以降のオフセット処理を実行する。
【0068】
図8AのステップS806では、15パルスのCRST出力を設定した。本実施形態においてはこの15パルス中、2パルス目でオフセット値測定開始を、7パルス目でオフセット値測定終了とオフセット値リード開始を、12パルス目でオフセット値リード終了を、それぞれヘッドレジスタ設定信号20を介してMPU23からスキャナユニット2に命令しなければならない。この3種類の制御を判断するために、INT7SN(Sequence Nomber)というワークエリアを用いる。即ち、INT7SN=0の場合は、スキャナユニット2にオフセット値測定開始命令を発行し(S103)、次のシーケンスのためにINT7SNに1をセットし(S104)、同じく次のシーケンス起動のために5パルス後のCRST21でINT7を発生するようにASIC25に設定し(S105)、割込処理を一旦終了する。
【0069】
そして、CRST21の5パルス出力後、再度INT7が発生し、前記ステップS101,S102と同様の処理が行われた後、INT7SN=1の処理に分岐する。スキャナユニット2に前記ステップS103で命じていたオフセット値の測定を止めるために、オフセット値測定終了命令を発行し(S106)、次のシーケンスのためにINT7SNに2をセットする(S107)。そして、ASIC25によるオフセット値の自動格納処理のために、ASIC25内のデータ格納アドレス設定レジスタに860000hを設定する(S108)。同じく、ASIC25内部のデータ格納制御レジスタで、スキャナユニット2から転送されてくるオフセット値を、スキャナエンジン22上の外部RAM24(前記S108で860000hにセット済み)に格納することを許可する(S109)。その後、スキャナユニット2内部のオフセットレジスタ14に格納されている1バイトのオフセット値を、スキャナエンジン22側に転送するように、オフセット値リード開始命令をスキャナユニット2に発行する(S110)。
【0070】
スキャナユニット2からは、1バイトのオフセット値を8ビットのシリアルデータに変換し、2メガヘルツの転送クロックでスキャナエンジン22側に転送してくる。転送回数はCRST21の1回に対して1回の割合である。スキャナエンジン22側では、一旦ASIC25に該シリアルデータがバッファリングされ、ASIC25内部で8ビットシリアルから1バイトにシリ−パラ変換されたあとに、ステップS108で設定した外部RAM24上のアドレスに格納される。このため、ステップS110でリード開始命令を発行しても、ただちに外部RAM24上の所定のアドレスにデータが格納されるわけではなく、CRST21の数パルス分のディレイが必要になる。本実施形態においては、CRST21の5パルス後に外部RAM24にデータが格納されるように、ASIC(画像データ格納制御部)25を設計している。このため、INT7での次のシーケンスであるオフセット値リード終了処理の起動のために、さらに5パルスのCRST21出力後に再度INT7が発生するように、ASIC25を設定し(S111)、割込処理を一旦終了する。
【0071】
そしてCRST21の5パルス出力後、再度INT7が発生し、ステップS101,S102と同様の処理が行われ、INT7SN=2の処理に分岐する。スキャナユニット2にステップS110で命じていたオフセット値のリード(スキャナユニット2からスキャナエンジン22側へのオフセット値の転送)を止めるために、スキャナユニット2にオフセット値リード終了命令を発行する(S112)。そして、次のシーケンスのためにINT7SNに3をセットする(S113)。
【0072】
以上でバックグラウンドにおける処理が終了したことを、フォアグラウンドに通知するためにCRST出力エンドフラグをセットし(S114)、オフセット値に関するINT7割込処理を終了する。
【0073】
●白基準値処理におけるINT7割込
図11を参照して、白基準値処理におけるINT7割込について説明する。
【0074】
図10のステップS101で、オフセットフラグが0で、かつ白基準フラグが1の場合は、図11に示す白基準値に関するINT7割込処理が実行される。白基準値に関するINT7割込処理も、基本構造は上述したオフセット値の割込処理と類似している。
【0075】
INT7SN=0の場合は、スキャナユニット2に白基準値測定開始命令を発行し(S117)、次のシーケンスのためにINT7SNに1をセットし(S118)、同じく次のシーケンス起動のために5パルス後のCRST21でINT7を発生するようにASIC25に設定して(S119)、割込処理を一旦終了する。
【0076】
CRSTの5パルス出力後、再度INT7が発生し、ステップS101,S116と同様の処理が行われ、INT7SN=1の処理に分岐する。スキャナユニット2にステップS117で命じていた白基準値の測定を止めるために、白基準値測定終了命令を発行し(S120)、次のシーケンスのためにINT7SNに2をセットする(S121)。
【0077】
図8Bに示すステップS823の処理において、測定中の白基準値の格納アドレスはフォアグラウンドの処理でワークエリアに保持されていている。このワークエリアの内容を参照し、その値(Pn)をASIC25内のデータ格納アドレス設定レジスタに設定する(S122)。そして、前記ステップS109と同様にASIC25による白基準値の格納をイネーブルにし(S123)、スキャナユニット2に白基準値リード開始命令を発行する(S124)。
【0078】
スキャナユニット2内部の128バイトのRAMに保持されている白基準測定値は、本コマンドを受けると、第1受光素子に対応する1バイトデータから順にパラ−シリ変換され、128×8ビットのシリアルデータとして2メガヘルツの転送クロックでスキャナエンジン22側のASIC25に転送されてくる。ASIC25では、該白基準測定値を再度シリ−パラ変換し、第1受光素子での白基準測定値を外部RAM24上のPnのアドレスに、第2受光素子での測定値をPn+1のアドレスというように、順次に格納していく。そして、INT7での次のシーケンスである白基準値リード終了処理の起動のために、さらに5パルス後のCRST出力後に再度INT7が発生するようにASIC25に設定し(S125)、割込処理を一旦終了する。
【0079】
そして、CRST21の5パルス出力後、再度INT7が発生し、前記ステップS101,S116と同様の処理が行われ、INT7SN=2の処理に分岐する。スキャナユニット2にステップS124で命じていた白基準値のリード(スキャナユニット2からスキャナエンジン22側への白基準値の転送)を止めるために、スキャナユニット2に白基準値リード終了命令を発行し(S126)、次のシーケンスのためにINT7SNに3をセットする(S127)。そして、バックグラウンドでの処理が終了したことをフォアグラウンドに通知するために、CRST出力エンドフラグをセットし(S128)、白基準値に関するINT7割込処理を終了する。
【0080】
以上、図8A〜図11のフローチャートを参照して、本実施形態の白基準値取得処理について説明したが、このタイミングチャートを図15(a)に示す。同図によれば、バックグラウンドでスキャナユニット2とASIC25によるn回目の白基準値の測定と転送処理を実行中に、フォアグラウンドではn−1回目の白基準値でのソーティング処理が行われていることが分かる。
【0081】
このような並行処理を行なうことにより得られる効果を、図15(b)に示す。同図において、上部が白基準値の測定・転送処理とソーティング処理とを分割して行った際に要する全体の処理時間を示し、下部が本実施形態の並行処理による全体処理時間を示す。即ち、本実施形態の並行処理によれば、従来の分割処理に比べて、全体としての処理時間を、50回分のソーティング処理に要する時間程度、短縮することができる。また同時に、n回目に測定された白基準値の転送直後にn+1回目の白基準値の測定が行なえるため、50回分の白基準値を測定するための時間も短縮される。
【0082】
尚、本実施形態ではノイズの影響を除去する手法として、50回の測定データのうち上下各10サンプルを除いた値で平均化する例について説明を行なったが、もちろん統計処理の手法としてはこの方法に限定されるものではなく、例えば標準備差等を用いたより高度な統計処理を行うことも可能である。この場合は、本実施形態におけるソーティング処理を当該統計処理に変更すれば良い。
【0083】
また、本実施形態では、スキャナユニット2の光源として単色LEDを用いたモノクロスキャナについて説明したが、例えばR・G・Bの3種類の光源を用いたカラースキャナの場合においては、ノイズや昇温の問題はさらに厳しくなることが予想される。従って、本発明はカラースキャナに更に好適に適用され、その効果もより期待できる。
【0084】
また、本実施形態では各ワークエリアとしてのRAMのアドレスについて、説明の簡便上具体的に説明したが、もちろんこのアドレスは本実施形態に限定されるものではない。
【0085】
以上説明したように本実施形態によれば、白基準値の測定・転送処理とソーティング処理とを並行して行なった上で統計処理を施すことにより、白基準値の測定時間、及び最終白基準値が決定されるまでの処理時間が短縮される。従って、スキャナユニット2の小型化に伴うノイズ及びLED出力変動の影響を、最小限に押さえた白基準値を算出することが可能になる。
【0086】
そして、この白基準値に基づいてシェーディング補正を実行することにより、むらのない画像読込を行うことができる。
【0087】
<他の実施形態>
なお、本発明は、複数の機器(例えばホストコンピュータ,インタフェイス機器,リーダ,プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機,ファクシミリ装置など)に適用してもよい。
【0088】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても、達成されることは言うまでもない。
【0089】
この場合、記憶媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0090】
プログラムコードを供給するための記憶媒体としては、例えば、フロッピディスク,ハードディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,磁気テープ,不揮発性のメモリカード,ROMなどを用いることができる。
【0091】
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0092】
さらに、記憶媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0093】
【発明の効果】
以上説明したように本発明によれば、スキャナユニットのノイズや温度特性の影響を押さえ、高精度な白基準値を設定することができる。従って、この白基準値でシェーディング補正を行うことで、むらのない画像読込が可能となる。
【0094】
【図面の簡単な説明】
【図1】本発明に係る一実施形態におけるスキャナ装置の外観図である。
【図2】本実施形態におけるスキャナユニットの外観図である。
【図3】本実施形態におけるスキャナユニットの構成を示すブロック図である。
【図4】本実施形態におけるメイン制御ユニットの構成を示すブロック図である。
【図5】シェーディング補正を説明する図である。
【図6】シェーディング補正のための白基準値測定ポイント例を示す図である。
【図7A】本実施形態における白基準値設定処理のフローチャートである。
【図7B】本実施形態における白基準値設定処理のフローチャートである。
【図8A】本実施形態における白基準値測定処理のフローチャートである。
【図8B】本実施形態における白基準値測定処理のフローチャートである。
【図9】本実施形態におけるソーティング処理のフローチャートである。
【図10】本実施形態における割込処理(オフセット値用)のフローチャートである。
【図11】本実施形態における割込処理(白基準値用)のフローチャートである。
【図12】本実施形態における白基準測定値格納イメージを示す図である。
【図13】本実施形態におけるロウアーデータ格納イメージを示す図である。
【図14】本実施形態におけるハイアーデータ格納イメージを示す図である。
【図15】本実施形態における白基準値測定・転送・ソーティング処理のタイミングチャートである。
【符号の説明】
1 スキャナ装置
2 スキャナユニット
3 キャリヤユニット
4 フレキシブルケーブル
5 キャリヤ駆動ユニット
6 紙送りユニット
7 入出力コネクタ
8 ホストコンピュータ
9 給紙トレイ
10 スキャナユニット接触端子
11 発光部
12 受光部
13 画像データA/D変換部
14 オフセットレジスタ
15 減算回路
16 シェーディングデータ(白基準値)格納RAM
17 シェーディング補正部
18 デジタル画像データ転送部
19 内部レジスタ設定部
20 ヘッドレジスタ設定信号
21 CRST(スキャナユニット・ASIC・MPU同期信号)
22 スキャナエンジン
23 MPU
24 画像データ格納用外部RAM
25 画像データ格納制御部(ASIC)
26 アドレス・データバス
27 ホストPCインターフェース制御部
28 キャリヤモータ
29 LFモータ
30 モータ制御部
31 画像データ転送クロック信号
32 画像データ信号
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus and method thereof, and more particularly to an image processing apparatus and method for performing shading correction.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in an image processing apparatus that reads a document image on a sheet, a line head type scanner unit in which photoelectric sensor groups are arranged by the width of the sheet size is arranged in a direction perpendicular to the arrangement direction of the sensor groups. The flat head type that reads the original while moving was the mainstream.
[0003]
This type is capable of high-speed and high-precision image reading, but requires a photoelectric sensor for the width of the paper, and is therefore unsuitable for personal use due to restrictions on the size and cost of the device.
[0004]
On the other hand, by arranging a photoelectric sensor in a direction parallel to the paper feed direction on the carrier portion on which the print head is mounted, not only printing but also image reading at a relatively low cost is possible. In recent years, personal word processors and the like equipped with a type of scanner-equipped printer unit have been commercialized.
[0005]
This serial type scanner will be described in more detail. By replacing the print head unit and the scanner unit, a group of photoelectric sensors arranged in parallel to the paper feed direction (Y-axis direction) is perpendicular to the paper feed direction. This is a method of reading an original by repeating an image input operation while moving in the direction (X-axis direction) and a paper feeding operation in which the photoelectric sensor group is moved relative to the original paper in the Y-axis direction.
[0006]
[Problems to be solved by the invention]
In the image processing apparatus for serial type image reading shown in the above conventional example, as shown in FIG. 2, the scanner unit is designed to have a size replaceable with the printer head. For this reason, compared with a flat head type scanner, more severe control is required for electrical noise and temperature characteristics.
[0007]
In particular, it greatly affects the shading correction function, which is one of the basic functions of the scanner. As shown in FIG. 5, the shading correction function is a function that compensates for a decrease in the amount of light at both ends of the light emitting unit and variations in light receiving characteristics of each light receiving element. In general, the reading value of a white reference value measurement document serving as a reference value (in the flat head type, the white reference measurement document is located outside the reading area) is used as shading correction data, that is, white reference data. use.
[0008]
In the data after shading correction by normal white reference data shown in the middle of FIG. 5, the read data corresponding to the black portion of the document is at a level close to 0 (absolute black), and the other is a decrease in the light amount at both ends of the issuing portion. Is corrected, and a relatively flat value is obtained. However, as shown in the lower part of FIG. 5, when noise occurs by chance during white reference measurement and shading correction is performed with the white reference data thereafter, the original portion corresponding to the noisy pixel is correct. The read image data cannot be obtained.
[0009]
It is difficult to clearly distinguish between a partial white reference value drop due to such electrical noise and a normal value based on the characteristics of the light receiving element. Is removed.
[0010]
For example, white reference data excluding the influence of noise is acquired by averaging a plurality of white reference measurement values. Specifically, the process of measuring the white reference value and sorting based on the size is repeated a plurality of times, and when sorting of the measured values for the total number of samples is completed, a predetermined number of parts are cut from the top and bottom, The white reference value is determined based on the average value based on the remaining number of samples.
[0011]
In this case, the larger the number of samples, the higher the noise removal rate, but at the same time, the problem of temperature characteristics arises. As shown in FIG. 6, the output of the LED, which is a light source, rapidly decreases after lighting in accordance with the temperature characteristic change of the electric elements in the scanner unit. Of course, the white reference measurement may be performed at a relatively stable timing (for example, 60 seconds after the LED is turned on). However, since the output characteristics of the LED are always changing, the measurement time of the white reference value is determined several times. Must be kept to the minimum necessary. Furthermore, considering the case where the white reference measurement point on the white reference document is dirty, as shown in FIG. 6, there must be a plurality of white reference value measurement points.
[0012]
As described above, in the measurement of the white reference value in the micro scanner unit as shown in FIG. 2, the time required from the first measurement at the first measurement point to the last measurement at the last measurement point. It is important to shorten the time.
[0013]
The present invention has been made to solve the above problems, and provides an image processing apparatus and method capable of reducing the processing time required for measuring the white reference value and determining the final white reference value. The purpose is to do.
[0014]
[Means for Solving the Problems]
As a means for achieving the above object, an image processing apparatus of the present invention comprises the following arrangement.
[0015]
That is, Arranged in line Image input means for reading and inputting a document image by a plurality of light receiving elements, and a reference by the input means concentration The document was scanned multiple times and entered Of the light receiving element Transfer means for transferring and storing a plurality of input values for each element in a predetermined area, and a plurality of input values stored in the predetermined area by the transfer means Sort by size for each element Process The average value is obtained by excluding a predetermined number of input values at both large and small ends, and Per element concentration Statistical means for determining a reference value, and determined by the statistical means The concentration Hold the reference value concentration Reference value holding means and the input value for each element by the input means concentration Based on the reference value shading Correction means for correcting, and in the transfer means Of the input value of the nth line Transfer / store processing and statistical means Sorting of input values of the n-1st line And control means for controlling the processing to be performed in parallel.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment according to the present invention will be described in detail with reference to the drawings.
[0018]
<First Embodiment>
[Device configuration]
FIG. 1 is a schematic view of a scanner device according to this embodiment. In the figure, reference numeral 1 denotes a scanner apparatus main body, 2 a scanner unit which is an image reading means, 3 a carrier unit for holding the scanner unit 2, and 4 digital image data A / D converted by the scanner unit 2. A flexible cable for transferring to a main control unit (not shown), 5 is a carrier drive unit for scanning the carrier unit 3 on which the scanner unit 2 is mounted in a direction perpendicular to the paper feed direction, and 6 is a document sheet. A paper feed unit for moving the carrier unit 3 in a direction perpendicular to the scanning direction, 7 is an input / output connector that provides a path for commands and image data between the host computer 8 and the scanner device 1, and 9 is for feeding original paper. This is a paper feed tray. In addition, as a unit not shown, the mechanical drive system such as the paper feed unit 6 and the carrier unit 3 is controlled, and the image data read by the scanner unit 2 is edited and processed as necessary to set the input / output connector 7. A main control unit or the like for transferring to the host computer 8 via the host computer 8 is provided.
[0019]
2 is an external perspective view of the scanner unit 2 shown in FIG. 1. The scanner unit 1 can be used as a printer by replacing it with a print head unit (not shown). The scanner unit 2 has a size of about 40 mm × 45 mm × 25 mm. It is an ultra-compact unit that integrates the basic functions of a scanner inside the unit. When the scanner unit 2 is mounted on the carrier unit 3, the terminal of the carrier unit 3 comes into contact with the terminal 10 of the scanner unit 2, and the scanner unit 2 and the main control unit are connected via the cable 4.
[0020]
FIG. 3 is a block diagram showing a detailed configuration of the scanner unit 2 shown in FIG. The scanner unit 2 includes a light emitting unit 11 that irradiates the reading surface, and 128 light receiving elements (first light receiving element to 128th light element) that are arranged at a density of 360 dpi in the paper feeding direction in order to receive reflected light from the reading surface. A light receiving unit 12 composed of a light receiving element), an A / D conversion unit 13 that converts an analog voltage by the light receiving unit 12 into a digital value, and an offset register 14 that holds an absolute black level from the value after A / D conversion. A subtracting unit 15 for subtracting the value, a shading correcting unit 17 for performing shading correction on the subtracted image data with the content (white reference value) held in the shading RAM 16, and final image data to the main control unit side The transfer unit 18 for serial transfer and the scan specified by the main control unit via the head register setting signal 20 are used. Various operations in the unit 2 (LED on / off, measurement of the offset value, the measurement of the white reference value, reading, etc. of the document) composed from the internal register setting unit 19 for controlling the. The light emitting unit 11 and the light receiving unit 12 constitute a scanner head 100.
[0021]
The head register setting signal 20 is also connected to the offset register 14 and the shading RAM 16, and has a circuit configuration that can be written from the main control unit side. The various operations described above executed in the scanner unit 2 are executed in synchronization with the synchronous clock CRST21 sent from the main control unit.
[0022]
FIG. 4 is a block diagram showing a detailed configuration of the scanner engine 22. In the figure, the scanner engine 22 is configured around an MPU 23 that performs main control. The MPU 23 is a so-called one-chip microcomputer that incorporates a ROM section in which operation procedures of the MPU 23, various tables for motor control, and the like are described, and an internal work RAM used for the calculation of the MPU 23 and the like. In the periphery of the MPU 23, there is a 1 megabyte external RAM 24 for storing the image data transferred from the scanner unit 2, and the image data from the scanner unit 2 is serial / parallel converted and then in the area of the external RAM 24 designated by the MPU 23. An image data storage control unit 25 that stores image data in order from a specified address, and a data bus 26 that includes an address line and a data line and enables access to the external RAM 24 area from both the MPU 23 and the image data storage control unit 25. In response to a control signal from the host PC interface control unit 27 and MPU 23 for receiving a command from the host computer 8 via the input / output connector 7 or transferring read image data to the host computer 8 Unit 3WD A stepping motor 28 for use, the motor driver 30 for controlling the current amount of the stepping motor 29 for paper feeding is disposed. Both the carrier and paper feed stepping motors 28 and 29 are designed with a gear ratio such that the carrier and the original paper move 1/360 inch by one pulse (one step) of the motor.
[0023]
The MPU 23, the image data storage control unit 25, and the scanner unit 2 are synchronized by a CRST (Column Read Start Timing) signal 21 output from the MPU 23. That is, every time the carrier unit 3 moves 1/360 inch, the MPU 23 outputs the CRST signal 21 as a one-shot signal, and the scanner unit 2 uses this signal as a trigger for image data for one column as an image clock signal (SCLK). 31 and the image data signal (SDATA) 32 are transferred to the image data storage controller 25 as serial data. The image data storage controller 25 stores the image data in the external RAM 24 via the data bus 26 in order from the top address indicated by the storage address after the transferred serial data is converted into 8 bits as a unit and converted into parallel data. Go.
[0024]
However, in cases other than the image data reading operation (offset scan, white reference measurement, etc.), the control on the carrier unit 3 side is cut off under the control of the MPU 23, and only the control on the scanner unit 2 side is executed.
[Basic processing for white reference value setting]
Hereinafter, the white reference value setting operation in the scanner apparatus 1 of the present embodiment will be described with reference to the flowchart of FIG. 7A.
[0025]
The white reference value held in the shading RAM 16 in the scanner unit 2 is lost when the scanner unit 2 is replaced or the scanner unit 2 is turned off. The MPU 23 manages power supply to the scanner unit 2 and always grasps whether or not the white reference value has been acquired.
[0026]
When a scan command is sent from the host computer 8, the MPU 23 returns a warning that the white reference value is not acquired if the white reference value is not acquired. Upon receiving this warning, the scanner driver on the host computer 8 side prompts the user to feed the white reference acquisition paper using a pop-up menu. The user sets the white reference paper in the paper feed tray and clicks the OK button on the pop-up menu. When the scanner driver detects that the OK button is clicked, it issues a white reference acquisition command to the scanner device 1, and the scanner device 1 executes white reference value acquisition processing based on the control flowchart shown in FIG. (Illustrated).
[0027]
The MPU 23 rotates the LF motor 29 via the motor control unit 30 and executes paper feeding until the white reference paper reaches sufficiently below the scanner unit 2 (for example, 1800 pulses (360 × 5 inches)) (S701). ).
[0028]
The MPU 23 rotates the carrier motor 28 to move the carrier unit 3 so that the reading position of the scanner unit 2 is 4 inches from the home position of the carrier unit 3 (hereinafter, point A) (S702).
[0029]
At this point (point A), the white reference value measurement process described later is executed, and the statistically processed white reference value final data stored in 128 bytes from 878000h of the external RAM 24 is transferred to 128 bytes from 878100h. (S703).
[0030]
The MPU 23 further moves the carrier unit 3 to the right by 360 pulses (S704), and executes the same processing as S703 at the point B, which is 1 inch away from the point A. The final data in 128 bytes from the 878000h of the external RAM 24 Is transferred to 878200h (S705).
[0031]
The MPU 23 further moves the carrier unit 3 to the right by 1 inch (S706), performs white reference value measurement processing at the point C as described above, and stores the final result in 878300h of the external RAM 24 (S707). Thus, the reason for measuring the white reference value at three points is to eliminate the influence of the stain on the surface of the white reference sheet.
[0032]
Three points of white reference values, the white reference value at point A (878100h), the white reference value at point B (878200h), and the white reference value at point C (878300h), stored as above in the external RAM 24 From this, the final white reference value α is calculated (S708), and this value α is written to the shading RAM 16 in the scanner unit 2 via the head register setting signal 20 (S709). Thereby, the white reference value setting process in this embodiment is completed.
[White reference value final data calculation process]
Details of the white reference value final data calculation process executed in S708 will be described below based on the flowchart of FIG. 7B.
[0033]
By the processing of S703, the white reference value measurement value at the first light receiving element of the light receiving unit 12 at point A is stored in 878100h of the external RAM 24, and the white reference value at the 128th light receiving element is stored in 87817Fh. Similarly, at the point B, the value at the first light receiving element is stored in 878200h, the value at the 128th light receiving element is stored in 87727Fh, and at the point C, the value of the first light receiving element is stored at 878300h and at the 128th light receiving element. Is stored in 87837Fh.
[0034]
When dirt or dust happens to be attached to the measurement point, the white reference value obtained by reading the portion is lower than the values at other points. Therefore, by comparing the white reference values of the same light receiving element at the three points A point, B point, and C point, and using the largest value as the white reference value of the light receiving element, the above-mentioned dirt and dust It becomes possible to eliminate the influence of. That is,
First, n indicating the light receiving element number is initialized with 1 (S711). Next, the size comparison is performed on the white reference values of the first (n) light receiving elements at the points A, B, and C stored in the RAM area at the address (S712). Then, the maximum value is adopted as the white reference value of the first (n) light receiving element and stored in 879000h (S713).
[0035]
Then, 1 is added to the light receiving element number n (S714), and when n is 128 or less, which is the number of light receiving elements on the scanner head 100, the process branches to step S712, and the white reference value for the next light receiving element is determined. The determination is repeated (S715). When n becomes 129, the white reference final data calculation process is terminated. As a result, the white reference values from the first light receiving element to the 128th light receiving element are sequentially stored in 128 bytes from 879000h of the external RAM 24.
[White reference value measurement processing]
Next, details of the white reference value measurement process executed in steps S703, S705, and S707 will be described.
[0036]
The present embodiment is characterized in that sorting processing of the white reference value measured last time is performed in parallel with the measurement and transfer processing of the white reference value. By this parallel processing, the processing time can be shortened as compared with the case where the measurement / transfer processing and the sorting processing are performed separately.
[0037]
First, the structure of the work RAM used in the white reference value measurement process and the sorting process described later will be described with reference to FIGS.
[0038]
As shown in FIG. 12, 6400 bytes (128 bytes × 50 bytes) from 80000h to 8618FFh on the external RAM 24 as a work area for automatically storing the white reference value measured on the scanner unit 2 side by the image data storage control unit 25. Times) area is secured. Note that the image data storage control unit 25 of the present embodiment is configured by an ASIC, and in the automatic storage by the ASIC to be described later, the white reference value of the first light receiving element in the first measurement is 860000h, and the 128th in the 50th time. The white reference value of the light receiving element is stored in 8618FFh. Hereinafter, the image data storage control unit 25 is referred to as ASIC 25.
[0039]
In this embodiment, the sorting process is executed in parallel with the automatic storage process by the ASIC (image data storage control unit 25). This sorting process is a process of rearranging the measured white reference values in order of size, and a work area of 3 blocks is used on the external RAM 24. Hereinafter, these three work areas will be described.
[0040]
First, 256 bytes from 872000h of the external RAM 24 are a work area (not shown) for calculating the accumulated white reference value. For example, 2 bytes from 872000h are 50 white reference measurements in the first light receiving element. The sum of the values will be stored.
[0041]
The following is the lower data storage area shown in FIG. The lower data in the first light receiving element is stored in 32 bytes from 870000h. 2 bytes are one set, Low Byte indicates the measured value, and High Byte indicates the measurement number. The work area can support up to 16 lower data, but is limited to 10 in this embodiment. By the sorting process described later, the array of 10 data stores 10 small white reference values among the white reference values in the light receiving element, and the largest white reference value among the 10 data is the leading address (first light receiving light). The element is stored in 2 bytes from 870000h).
[0042]
Similarly, for the higher data, a higher data storage area shown in FIG. 14 is prepared, and the white reference value and the number of times of measurement are measured for the 10 highest white reference measured values for each light receiving element. The number is one set and is stored in the area from 871000h to 871FFFh. The difference from the lower data storage area is that the smallest white reference value of 10 in the arrangement order of 10 is stored at the head address.
[0043]
Hereinafter, the white reference value measurement process of the present embodiment will be described in detail with reference to the flowchart of FIG.
[0044]
In the white reference value measurement process of the present embodiment, the measurement of the offset value and the white reference value, the start of transfer of the measurement value, and the like are performed via the head register setting signal 20 by the INT7 interrupt process described later. Controlled by commanding 2.
[0045]
First, a work area for sorting processing in the external RAM 24 is initialized with 00h for the lower data storage area, FFh for the higher data storage area, and 00h for the cumulative value calculation work area (S801). Next, the MPU 23 issues an LED turn-off command to the light emitting unit 11 of the scanner head 100 via the head register setting signal 20 (S802). Then, after waiting for 10 milliseconds until the afterglow is completely eliminated (S803), an offset flag to be referred to in the INT7 interrupt process described later is set (S804), the number of times of measurement n is set to 1, and the storage start of the automatic storage process by the ASIC An address (hereinafter, storage pointer P) is initialized with 860000h (S805). Hereinafter, the storage start address of the nth measurement value is represented by Pn.
[0046]
As described above, the internal operation of the scanner unit 2 basically operates in synchronization with the signal CRST21 sent from the MPU via the ASIC 25. In the scanner unit 2, the cycle of the CRST 21 corresponds to the white reference value measurement time, and the carrier unit 3 moves by one pulse (1 dot / 360 inches) in the cycle of the CRST 21 even during actual image reading. In other words, when 360 dpi reading is performed, the time for irradiating the document surface with a width of 1 dot becomes the cycle of CRST21. In the present embodiment, the 512 μs cycle is the CRST 21 cycle.
[0047]
In the offset value and white reference measurement processing in the scanner unit 2, the first two pulses are used for warm-up to clear the buffer in the scanner unit 2, and the actual measurement is performed after the third pulse. Is done. In this embodiment, the white reference value is measured at the seventh pulse, the offset value measurement result is stored in the offset register 14, and the white reference value measurement result is stored in the 128-byte shading RAM 16.
[0048]
Also, the process of automatically transferring the measured values in the offset register 14 and the shading RAM 16 to the external RAM 24 in the scanner engine 22 designated in step S805 via the ASCI 25 is executed in synchronization with the CRST 21. Also in this case, since it is sent via several stages of buffers, the actual storage timing in the external RAM 24 is five pulses after the scanner unit 2 and the ASIC 25 are instructed to start automatic transfer. For this reason, a total of 15 pulses of CRST21 output is set in the ASIC 25 for measurement and automatic transfer (S806).
[0049]
The start of measurement of the offset value and the white reference value and the start of transfer of the measurement value are controlled by being instructed to the scanner unit 2 via the head register setting signal 20 by the INT7 interrupt processing described later. Here, the generation of INT7 after two pulses of CRST21, which is the activation, is set in the ASIC 25 (S807).
[0050]
The ASIC 25 is instructed to start output of the CRST 21 (S808), polls a flag set in the final process of the INT7 process described later, and waits for the end of output of the CRST 21 (S809). When the CRST output ends, the same value as the contents of the offset register 14 in the scanner unit 2 is stored in 860000h of the external RAM 24. This value is transferred to an offset value calculation work (not shown) (S810), the number of times of measurement n is incremented by 1 (S811), and if the number of times of measurement n is 10 or less, the process branches back to step S806, where the offset value The measurement process is repeated (S812).
[0051]
When the offset measurement for 10 times is completed, the upper and lower two samples are cut for noise removal, and then the average value (β) of the remaining six samples is calculated (S813). By writing β to the offset register 14 in the scanner unit 2 via the head register setting signal 20, the setting process of the offset register 14 is completed (S814), that is, the absolute black level is determined.
[0052]
Next, the white reference value measurement process is started. The basic control is the same as the offset value setting process described above. However, in the case of acquiring the offset value, the LED of the light emitting unit 11 is turned off. However, in the case of acquiring the white reference value, the processing is performed in a state where the LED is lit. For this reason, the influence of noise and the temperature rise inside the scanner unit 2 is increased. For this reason, the number of times of measurement is 50, and a device for speeding up the processing procedure is incorporated.
[0053]
First, an LED lighting command is issued to the scanner unit 2 (S815). Then, after waiting for 10 milliseconds as a delay until command execution (S816), a white reference flag used in INT7 interrupt processing described later is set (S817). Then, the number of measurements and the storage address are set in the same manner as in the above-described step S805 (S818), and the 15-pulse CRST output is set in the ASIC 25 for white reference measurement and measurement value transfer (S 819 ) After setting the ASIC 25 to issue INT7 at the second pulse CRST21 (S820), the ASIC25 is instructed to start outputting CRST21 (S821), and the first white reference value measurement / transfer process is started. To do. Note that the measured white reference value is only held in the work area by the setting of the storage destination address in the step S818, and this work is included in the INT 7 described later. area The ASIC 25 is set with reference to the value of.
[0054]
Thereafter, the output of CRST 21 is awaited in the same manner as in step S809 (S822), the number of measurements is increased by 1 for the next measurement, and the storage destination address of automatic transfer by ASIC 25 is increased by 128 (S823). Here, as shown in FIG. 12, the white reference value of the first light receiving element is stored in 860000h and the white reference value of the 128th light receiving element is stored in 86007Fh in the first measurement, and 860080h (860000h + in the second measurement). The white reference value is stored in 128 bytes from 128).
[0055]
Then, processing similar to the processing from step S819 to S821 in the first measurement is performed, and the second measurement / transfer processing is started (S824, S825, S826).
[0056]
Here, a sorting process to be described later is executed for the 128-byte white reference value stored in the previous measurement / transfer process (S827). That is, in parallel with the n-th white reference measurement and transfer process by the scanner unit 2 and the ASIC 25, the MPU 23 executes a sorting process (statistical process) for the n-1th white reference measurement value. This sorting process will be described later.
[0057]
Steps S822 to S827 are repeated until the number of measurements exceeds 50 (S828). When 50 measurements are completed, lower data and higher data constructed as shown in FIGS. 13 and 14 are sorted by the sorting process. Similarly, the value of the lower data and the higher data is subtracted from the contents of the accumulated value work area accumulated by the sorting process, and the average value γ of 30 samples is calculated (S829). Then, the value of γ is stored in 128 bytes from 878000h of the external RAM 24 (S830), the white reference value measurement process is completed, that is, the absolute white level is determined.
[Sort processing (statistical processing)]
Details of the sorting process executed in step S827 will be described below with reference to the flowchart of FIG. By the single sorting process shown in this flowchart, among the 128 reference pixels × 50 white reference measurement values in the work area shown in FIG. It is checked whether it should be stored in the data storage area.
[0058]
First, the value of the white reference value head storage address in the previous measurement is set to P for convenience (S901). Next, as the light receiving element number m, the first light receiving element is handled as No. 0 (S902), the 128th light receiving element is handled as No. 127, and from the white reference value of the first light receiving element, accumulated value data, lower data, higher data Start updating.
[0059]
The white reference measurement value of the mth light receiving element is stored at the address P + m. This value is set as A for convenience in the register of the MPU 23 (S903). Then, A is added to the contents of the 2-byte cumulative value work area for the (m + 1) th light receiving element (S904).
[0060]
The head address of the lower data storage area for the (m + 1) th light receiving element is set to LT for convenience (S905). For example, the leading address LT of the lower data storage area for pixel number m = 2 (that is, the third light receiving element) is 870040h as shown in FIG.
[0061]
Then, the sorting work pointer LSP is initialized to 0 (S906), and the content of the address (LT + LSP) of the lower data storage area is set to B (S907). If the white reference measurement value A is smaller than the value B already stored in the lower data storage area (S908), the white reference measurement value A is added to the LSP by assuming that the white reference measurement value A should be stored in the lower data storage area. The process returns to step S907 until the LSP exceeds 20 (S910).
[0062]
If the white reference measurement value A is larger than the value B already stored in the lower data storage area in step S908, the check of whether A should be stored in the lower data storage area ends, and based on the LSP value at that time, The ten pieces of data in the mth pixel in the lower data storage area are rearranged (S911).
[0063]
When the sorting for the lower data storage area is completed in this way, the sorting for the higher data storage area is started next, which is substantially the same as the sorting for the lower data storage area described above, and thus detailed description is omitted. . However, the method of comparing the white reference measurement value A and the stored data B in step S915 is the reverse of that in step S908.
[0064]
As described above, the sorting of the mth pixel with respect to the higher data storage area is completed up to step S918. Subsequently, 1 is added to the pixel number m (S919), and the processing of steps S903 to S919 is repeated up to the 128th pixel (S920), whereby the white reference from the first pixel to the 128th pixel by one measurement is obtained. The measured values are sorted.
[INT7 interrupt processing]
In the following, the measurement is started by measuring the offset value (absolute black level) or the white reference value (absolute white level) during the white reference measurement process, and in parallel with the sorting process in the foreground, the background The INT7 interrupt process executed in step 1 will be described with reference to the flowcharts of FIGS.
[0065]
The INT7 interrupt is input from the ASIC 25 to the MPU 23 as an external interrupt when the number of outputs of the CRST 21 reaches the number set in the INT7 setting register in the ASIC 25. The processing that generates the INT7 interrupt includes the above-described three types of processing of offset value measurement, white reference value measurement, and image data reading. In the present embodiment, the processing for reading image data is described below. I will omit the explanation.
[0066]
● INT7 interrupt in offset value processing
With reference to FIG. 10, the INT7 interrupt in the offset value processing will be described.
[0067]
First, the offset flag set in step S804 of FIG. 8A is checked (S101), and in the case of 1, the offset processing after step S102 is executed.
[0068]
In step S806 of FIG. 8A, a 15-pulse CRST output is set. In this embodiment, of the 15 pulses, the offset value measurement start is performed at the second pulse, the offset value measurement end and the offset value read start are performed at the 7th pulse, and the offset value read end is performed at the 12th pulse. The scanner unit 2 must be commanded from the MPU 23 via 20. In order to determine these three types of control, a work area called INT7SN (Sequence Nomber) is used. That is, if INT7SN = 0, an offset value measurement start command is issued to the scanner unit 2 (S103), 1 is set in INT7SN for the next sequence (S104), and 5 is also used for starting the next sequence. The ASIC 25 is set so as to generate INT7 at the CRST21 after the pulse (S105), and the interrupt process is temporarily terminated.
[0069]
Then, after outputting 5 pulses of CRST21, INT7 is generated again, the same processing as in steps S101 and S102 is performed, and then the processing branches to processing of INT7SN = 1. In order to stop the measurement of the offset value commanded in step S103 to the scanner unit 2, an offset value measurement end command is issued (S106), and 2 is set in INT7SN for the next sequence (S107). Then, in order to automatically store the offset value by the ASIC 25, 860000h is set in the data storage address setting register in the ASIC 25 (S108). Similarly, the data storage control register in the ASIC 25 permits the offset value transferred from the scanner unit 2 to be stored in the external RAM 24 on the scanner engine 22 (set to 860000h in S108) (S109). Thereafter, an offset value read start command is issued to the scanner unit 2 so that the 1-byte offset value stored in the offset register 14 in the scanner unit 2 is transferred to the scanner engine 22 (S110).
[0070]
From the scanner unit 2, the 1-byte offset value is converted into 8-bit serial data and transferred to the scanner engine 22 side with a transfer clock of 2 megahertz. The number of transfers is one per CRST21. On the scanner engine 22 side, the serial data is once buffered in the ASIC 25, serially converted from 8-bit serial to 1 byte in the ASIC 25, and then stored in the address on the external RAM 24 set in step S108. . For this reason, even if a read start command is issued in step S110, data is not immediately stored in a predetermined address on the external RAM 24, and a delay corresponding to several pulses of the CRST 21 is required. In the present embodiment, the ASIC (image data storage control unit) 25 is designed so that data is stored in the external RAM 24 after 5 pulses of the CRST 21. For this reason, in order to start the offset value read end process, which is the next sequence in INT7, the ASIC 25 is set so that INT7 is generated again after outputting 5 pulses of CRST21 (S111), and the interrupt process is temporarily performed. finish.
[0071]
Then, after outputting 5 pulses of CRST21, INT7 is generated again, processing similar to steps S101 and S102 is performed, and processing branches to processing of INT7SN = 2. In order to stop reading the offset value (transfer of the offset value from the scanner unit 2 to the scanner engine 22 side) commanded to the scanner unit 2 in step S110, an offset value read end command is issued to the scanner unit 2 (S112). . Then, 3 is set in INT7SN for the next sequence (S113).
[0072]
The CRST output end flag is set in order to notify the foreground that the background processing has been completed (S114), and the INT7 interrupt processing relating to the offset value is completed.
[0073]
● INT7 interrupt in white reference value processing
With reference to FIG. 11, the INT7 interrupt in the white reference value processing will be described.
[0074]
If the offset flag is 0 and the white reference flag is 1 in step S101 of FIG. 10, the INT7 interrupt process for the white reference value shown in FIG. 11 is executed. The basic structure of the INT7 interrupt processing related to the white reference value is similar to the offset value interrupt processing described above.
[0075]
When INT7SN = 0, a white reference value measurement start command is issued to the scanner unit 2 (S117), 1 is set in INT7SN for the next sequence (S118), and 5 pulses are also used to activate the next sequence. The ASIC 25 is set so that INT7 is generated in the later CRST 21 (S119), and the interrupt process is temporarily terminated.
[0076]
After outputting 5 CRST pulses, INT7 occurs again, the same processing as in steps S101 and S116 is performed, and the processing branches to processing of INT7SN = 1. In order to stop the measurement of the white reference value commanded to the scanner unit 2 in step S117, a white reference value measurement end command is issued (S120), and 2 is set in INT7SN for the next sequence (S121).
[0077]
In the process of step S823 shown in FIG. 8B, the storage address of the white reference value being measured is held in the work area by the foreground process. With reference to the contents of this work area, the value (Pn) is set in the data storage address setting register in the ASIC 25 (S122). Then, storage of the white reference value by the ASIC 25 is enabled as in step S109 (S123), and a white reference value read start command is issued to the scanner unit 2 (S124).
[0078]
When this command is received, the white reference measurement value held in the 128-byte RAM inside the scanner unit 2 is subjected to parallel-serial conversion in order from 1-byte data corresponding to the first light receiving element, and a 128 × 8-bit serial number is obtained. Data is transferred to the ASIC 25 on the scanner engine 22 side with a transfer clock of 2 MHz. In the ASIC 25, the white reference measurement value is serial-parallel converted again, the white reference measurement value at the first light receiving element is referred to as the Pn address on the external RAM 24, and the measurement value at the second light receiving element is referred to as the Pn + 1 address. The data is stored sequentially. Then, in order to start the white reference value read end process, which is the next sequence in INT7, the ASIC 25 is set so that INT7 is generated again after CRST output after 5 pulses (S125), and the interrupt process is temporarily performed. finish.
[0079]
Then, after outputting 5 pulses of CRST21, INT7 occurs again, the same processing as in steps S101 and S116 is performed, and the processing branches to processing of INT7SN = 2. In order to stop the reading of the white reference value commanded to the scanner unit 2 in step S124 (transfer of the white reference value from the scanner unit 2 to the scanner engine 22), a white reference value read end command is issued to the scanner unit 2. (S126), 3 is set in INT7SN for the next sequence (S127). Then, in order to notify the foreground that the processing in the background has ended, the CRST output end flag is set (S128), and the INT7 interrupt processing relating to the white reference value is ended.
[0080]
The white reference value acquisition process of the present embodiment has been described above with reference to the flowcharts of FIGS. 8A to 11, and this timing chart is shown in FIG. According to the figure, while the n-th white reference value is measured and transferred by the scanner unit 2 and the ASIC 25 in the background, the n-1th white reference value is sorted in the foreground. I understand that.
[0081]
The effects obtained by performing such parallel processing are shown in FIG. In the figure, the upper part shows the total processing time required when the white reference value measurement / transfer process and the sorting process are divided, and the lower part shows the total processing time by the parallel processing of this embodiment. That is, according to the parallel processing of the present embodiment, the overall processing time can be shortened to the time required for 50 sorting processes as compared with the conventional division processing. At the same time, since the n + 1th white reference value can be measured immediately after the transfer of the white reference value measured at the nth time, the time for measuring the white reference value for 50 times is shortened.
[0082]
In the present embodiment, as an example of a method for removing the influence of noise, an example is described in which averaging is performed using values obtained by removing 10 samples from the upper and lower samples from 50 measurement data. It is not limited to the method, and it is also possible to perform more advanced statistical processing using, for example, standard differences. In this case, the sorting process in this embodiment may be changed to the statistical process.
[0083]
In the present embodiment, the monochrome scanner using the monochromatic LED as the light source of the scanner unit 2 has been described. However, for example, in the case of a color scanner using three types of light sources of R, G, and B, noise and temperature rise This problem is expected to become even more severe. Therefore, the present invention is more suitably applied to a color scanner, and the effect can be expected more.
[0084]
Further, in the present embodiment, the RAM address as each work area has been specifically described for the convenience of explanation, but of course, this address is not limited to the present embodiment.
[0085]
As described above, according to the present embodiment, the white reference value measurement time and the final white reference are obtained by performing statistical processing after performing the white reference value measurement / transfer processing and sorting processing in parallel. Processing time until the value is determined is shortened. Therefore, it is possible to calculate a white reference value that minimizes the influence of noise and LED output fluctuation accompanying the downsizing of the scanner unit 2.
[0086]
Then, by performing shading correction based on the white reference value, it is possible to read the image without unevenness.
[0087]
<Other embodiments>
Note that the present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), or a device (for example, a copier, a facsimile device, etc.) including a single device. You may apply to.
[0088]
Another object of the present invention is to supply a storage medium recording a program code of software for realizing the functions of the above-described embodiments to a system or apparatus, and the computer (or CPU or MPU) of the system or apparatus stores the storage medium. Needless to say, this can also be achieved by reading and executing the program code stored in the.
[0089]
In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.
[0090]
As a storage medium for supplying the program code, for example, a floppy disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.
[0091]
Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) operating on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
[0092]
Further, after the program code read from the storage medium is written into a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.
[0093]
【The invention's effect】
As described above, according to the present invention, it is possible to set a highly accurate white reference value while suppressing the influence of noise and temperature characteristics of the scanner unit. Therefore, by performing shading correction using this white reference value, it is possible to read an image without unevenness.
[0094]
[Brief description of the drawings]
FIG. 1 is an external view of a scanner device according to an embodiment of the present invention.
FIG. 2 is an external view of a scanner unit in the present embodiment.
FIG. 3 is a block diagram showing a configuration of a scanner unit in the present embodiment.
FIG. 4 is a block diagram showing a configuration of a main control unit in the present embodiment.
FIG. 5 is a diagram illustrating shading correction.
FIG. 6 is a diagram illustrating an example of white reference value measurement points for shading correction.
FIG. 7A is a flowchart of white reference value setting processing in the present embodiment.
FIG. 7B is a flowchart of white reference value setting processing in the present embodiment.
FIG. 8A is a flowchart of white reference value measurement processing in the present embodiment.
FIG. 8B is a flowchart of white reference value measurement processing in the present embodiment.
FIG. 9 is a flowchart of a sorting process in the present embodiment.
FIG. 10 is a flowchart of interrupt processing (for offset value) in the present embodiment.
FIG. 11 is a flowchart of interrupt processing (for white reference value) in the present embodiment.
FIG. 12 is a diagram showing a white reference measurement value storage image in the present embodiment.
FIG. 13 is a diagram showing a lower data storage image in the present embodiment.
FIG. 14 is a diagram showing an image of storing higher data in the present embodiment.
FIG. 15 is a timing chart of white reference value measurement / transfer / sorting processing in the embodiment;
[Explanation of symbols]
1 Scanner device
2 Scanner unit
3 Carrier unit
4 Flexible cable
5 Carrier drive unit
6 Paper feed unit
7 I / O connector
8 Host computer
9 Paper tray
10 Scanner unit contact terminal
11 Light emitting part
12 Light receiver
13 Image data A / D converter
14 Offset register
15 Subtraction circuit
16 Shading data (white reference value) storage RAM
17 Shading correction part
18 Digital image data transfer unit
19 Internal register setting section
20 Head register setting signal
21 CRST (scanner unit / ASIC / MPU synchronization signal)
22 Scanner engine
23 MPU
24 External RAM for storing image data
25 Image data storage controller (ASIC)
26 Address data bus
27 Host PC interface controller
28 Carrier motor
29 LF motor
30 Motor controller
31 Image data transfer clock signal
32 Image data signal

Claims (9)

ライン状に並べた複数の受光素子により原稿画像を読取って入力する画像入力手段と、
前記入力手段によって基準濃度原稿を複数回読取って入力された前記受光素子の素子毎の複数の入力値を、所定領域に転送・格納する転送手段と、
前記転送手段によって前記所定領域に格納された複数の入力値を前記素子毎に、大小関係でソート処理して、大小両端夫々複数所定数の入力値を除いて平均値を求めて、前記素子毎の濃度基準値を決定する統計手段と、
前記統計手段によって決定された前記濃度基準値を保持する濃度基準値保持手段と、
前記入力手段による各素子毎の入力値を前記濃度基準値に基づいてシェーディング補正する補正手段と、
前記転送手段における第nラインの入力値の転送・格納処理と、前記統計手段による第n‐1ラインの入力値の前記ソート処理とが並行して行われるように制御する制御手段と、
を有することを特徴とする画像処理装置。
Image input means for reading and inputting a document image by a plurality of light receiving elements arranged in a line ;
Transfer means for transferring and storing a plurality of input values for each element of the light receiving element input by reading the reference density document a plurality of times by the input means in a predetermined area;
A plurality of input values stored in the predetermined area by the transfer means are sorted for each element according to the magnitude relationship, and an average value is obtained by excluding a plurality of predetermined input values for both large and small ends, and for each element. Statistical means for determining the concentration reference value of
A concentration reference value holding means for holding said concentration reference value determined by the statistical means,
Correction means for correcting shading the input value for each element by the input means based on the density reference value;
Control means for controlling the transfer / storage process of the input value of the nth line in the transfer means and the sort process of the input value of the n-1st line by the statistical means;
An image processing apparatus comprising:
前記画像入力手段及び前記濃度基準値保持手段、及び前記補正手段は画像処理装置に着脱可能なユニット内に備えられ、該入力手段による入力値は該濃度基準値保持手段に一旦保持されることを特徴とする請求項記載の画像処理装置。Said image input means and said concentration reference value holding means, and the correction means is provided in the detachable unit to the image processing apparatus, the input value by the input means to be temporarily held on the concentration reference value holding means The image processing apparatus according to claim 1, wherein: 前記転送手段は、前記ユニット内の前濃度基準値保持手段に一旦保持された複数の入力値を画像処理装置内の所定領域に転送・格納することを特徴とする請求項記載の画像処理装置。 3. The image processing apparatus according to claim 2 , wherein the transfer means transfers and stores a plurality of input values once held in the previous density reference value holding means in the unit to a predetermined area in the image processing apparatus. . 前記制御手段は、前記ユニットへ所定の同期信号及びコマンドを送出することによって、前記転送手段における転送・格納処理と、前記統計手段による統計処理とが並行して行われるように制御することを特徴とする請求項記載の画像処理装置。The control unit controls the transfer / storage process in the transfer unit and the statistical process by the statistical unit to be performed in parallel by sending a predetermined synchronization signal and command to the unit. The image processing apparatus according to claim 2 . 前記制御手段は、前記統計手段によって決定された基準値を前記ユニット内の前記濃度基準値保持手段に格納することを特徴とする請求項記載の画像処理装置。 3. The image processing apparatus according to claim 2 , wherein the control unit stores the reference value determined by the statistical unit in the density reference value holding unit in the unit. 前記基準濃度原稿の複数の位置で夫々前記複数回読取による前記濃度基準値を決定し、素子毎の前記複数の位置での前記濃度基準値のうちの最大値を前記濃度基準値保持手段に保持することを特徴とする請求項1に記載の画像処理装置。  The density reference value is determined by reading the plurality of times at a plurality of positions of the reference density document, and the maximum value among the density reference values at the plurality of positions for each element is held in the density reference value holding unit. The image processing apparatus according to claim 1, wherein: ライン状に並べた複数の受光素子により原稿画像を読取って入力する画像入力手段を備えたユニットが着脱可能な画像処理装置であって、
前記入力手段によって基準濃度原稿を複数回読取って入力された前記受光素子の素子毎の複数の入力値を、所定領域に転送・格納する転送手段と、
前記転送手段によって前記所定領域に格納された複数の入力値を前記素子毎に、大小関係でソート処理して、大小両端夫々複数所定数の入力値を除いて平均値を求めて、前記素子毎の濃度基準値を決定する統計手段と、
前記転送手段における第nラインの入力値の転送・格納処理と、前記統計手段による第n‐1ラインの入力値の前記ソート処理とが並行して行われるように制御する制御手段と、
前記ユニット内で、前記統計手段によって決定された前記濃度基準値を保持する濃度基準値保持手段と、
前記ユニット内で、前記入力手段による各素子毎の入力値を前記濃度基準値に基づいてシェーディング補正する補正手段と、
を有することを特徴とする画像処理装置。
An image processing apparatus in which a unit including image input means for reading and inputting a document image by a plurality of light receiving elements arranged in a line is detachable,
Transfer means for transferring and storing a plurality of input values for each element of the light receiving element input by reading the reference density document a plurality of times by the input means in a predetermined area;
A plurality of input values stored in the predetermined area by the transfer means are sorted for each element according to the magnitude relationship, and an average value is obtained by excluding a plurality of predetermined input values for both large and small ends, and for each element. Statistical means for determining the concentration reference value of
Control means for controlling the transfer / storage process of the input value of the nth line in the transfer means and the sort process of the input value of the n-1st line by the statistical means;
Within the unit, the concentration reference value holding means for holding said concentration reference value determined by the statistical means,
In the unit, correction means for correcting shading the input value for each element by the input means based on the density reference value;
An image processing apparatus comprising:
ライン状に並べた複数の受光素子により基準濃度原稿を複数回読取って入力する測定工程と、
前記測定工程において入力された前記受光素子の素子毎の複数の入力値を、所定領域に転送・格納する転送工程と、
前記転送工程によって前記所定領域に格納された複数の入力値を前記素子毎に、大小関係でソート処理して、大小両端夫々複数所定数の入力値を除いて平均値を求めて、前記素子毎の濃度基準値を決定する統計工程と、
前記統計工程によって決定された前記濃度基準値を濃度基準値保持手段に格納する保持工程と、
各素子毎の入力値を前記濃度基準値に基づいてシェーディング補正する補正工程と、を有し、
第nラインの入力値の前記転送工程と、第n‐1ラインの入力値の前記統計工程におけるソート処理とは並行して行われることを特徴とする画像処理方法。
A measurement process in which a reference density original is read and input a plurality of times by a plurality of light receiving elements arranged in a line , and
A transfer step of transferring and storing a plurality of input values for each of the light receiving elements input in the measurement step in a predetermined area;
A plurality of input values stored in the predetermined area by the transfer step are sorted for each element in a size relationship, and an average value is obtained by removing a plurality of predetermined input values for each of the large and small ends, and for each element. A statistical process for determining the concentration reference value of
A holding step of storing the density reference value determined by the statistical process on the concentration reference value holding means,
A correction step of correcting the shading of the input value for each element based on the density reference value,
An image processing method , wherein the transfer process of the input value of the nth line and the sorting process in the statistical process of the input value of the n-1st line are performed in parallel.
ライン状に並べた複数の受光素子により原稿画像を読取る入力手段を備えた画像処理装置における画像処理のプログラムコードが格納されたコンピュータ可読メモリであって、
前記入力手段により基準濃度原稿を複数回読取って入力する測定工程のコードと、
前記測定工程において入力された前記受光素子の素子毎の複数の入力値を、所定領域に転送・格納する転送工程のコードと、
前記転送工程によって前記所定領域に格納された複数の入力値を前記素子毎に、大小関係でソート処理して、大小両端夫々複数所定数の入力値を除いて平均値を求めて、前記素子毎の濃度基準値を決定する統計工程のコードと、
前記統計工程によって決定された前記濃度基準値を濃度基準値保持手段に格納する保持工程のコードと、
各素子毎の入力値を前記濃度基準値に基づいてシェーディング補正する補正工程のコードと、を有し、
前記転送工程のコードによる第nラインの入力値の転送工程と、前記統計工程のコードによる第n‐1ラインの入力値の転送工程におけるソート処理とは並行して行われることを特徴とするコンピュータ可読メモリ。
A computer-readable memory storing a program code for image processing in an image processing apparatus provided with an input means for reading a document image by a plurality of light receiving elements arranged in a line ,
A code of a measurement process for reading and inputting a reference density original document a plurality of times by the input means;
A transfer process code for transferring and storing a plurality of input values for each of the light receiving elements input in the measurement process in a predetermined area;
A plurality of input values stored in the predetermined area by the transfer step are sorted for each element in a size relationship, and an average value is obtained by removing a plurality of predetermined input values for each of the large and small ends, and for each element. A statistical process code for determining the concentration reference value of
And code holding step of storing the density reference value determined by the statistical process on the concentration reference value holding means,
A correction process code for correcting the shading of the input value for each element based on the density reference value,
The transfer process of the input value of the nth line by the code of the transfer process and the sort process in the transfer process of the input value of the n-1st line by the code of the statistical process are performed in parallel. Readable memory.
JP35829397A 1997-12-25 1997-12-25 Image processing apparatus and method Expired - Fee Related JP3733227B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35829397A JP3733227B2 (en) 1997-12-25 1997-12-25 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35829397A JP3733227B2 (en) 1997-12-25 1997-12-25 Image processing apparatus and method

Publications (2)

Publication Number Publication Date
JPH11191843A JPH11191843A (en) 1999-07-13
JP3733227B2 true JP3733227B2 (en) 2006-01-11

Family

ID=18458550

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35829397A Expired - Fee Related JP3733227B2 (en) 1997-12-25 1997-12-25 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP3733227B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6051246B2 (en) 2015-02-25 2016-12-27 京セラドキュメントソリューションズ株式会社 Image reading apparatus and image forming apparatus
JP6380197B2 (en) * 2015-03-30 2018-08-29 ブラザー工業株式会社 Image reading device

Also Published As

Publication number Publication date
JPH11191843A (en) 1999-07-13

Similar Documents

Publication Publication Date Title
JP3733227B2 (en) Image processing apparatus and method
US5987186A (en) Image processing apparatus and system having detachably mounted read cartridge
US10958801B2 (en) Image scanning apparatus with dirt detection and removal of influence of the dirt
RU2477512C1 (en) Recording device and processing method executed by recording device
JP4134151B2 (en) Image reading apparatus and shading correction data creation method
JP2000196806A (en) Image processing device, control method thereof, information reading device, recording device, information reading method, and storage medium
US20010021030A1 (en) Method and apparatus for image data processing system increasing quality of produced images
JP2001036744A (en) Image reading method, image reading device, and image processing device
JP5743430B2 (en) Reading apparatus, printing apparatus, and control method
US6262813B1 (en) Apparatus and method for image data processing apparatus capable of correcting dots of bit-mapped image data with a relatively smaller-sized memory
JP4656214B2 (en) Image reading apparatus and image sensor discrimination method
JP2021022795A (en) Image reading device
CN106954001B (en) A kind of scanning sequence control method for multi-function printer chip
JPH09231311A (en) Image data reading device
JP2013021491A (en) Copying machine and control program for the same
JPH06311365A (en) Picture input output device
JP4897400B2 (en) Scanner
JP2008284752A (en) Recording apparatus and recording method therefor
JP2005212388A (en) Data processor for printer
JP2737924B2 (en) Document reading device
JP2009027248A (en) Image reading apparatus and image sensor discrimination method
JP2005035024A (en) Inkjet recording apparatus, recording time calculation method, and computer-readable recording medium storing a program for executing the method
JP2024058576A (en) Image reading device and program
JPH11136454A (en) Image reading device
JP5857718B2 (en) Information processing apparatus and information processing method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050628

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050704

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050902

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051017

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20091021

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101021

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20101021

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111021

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20111021

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20121021

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20131021

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees