JPH0584974B2 - - Google Patents

Info

Publication number
JPH0584974B2
JPH0584974B2 JP60057897A JP5789785A JPH0584974B2 JP H0584974 B2 JPH0584974 B2 JP H0584974B2 JP 60057897 A JP60057897 A JP 60057897A JP 5789785 A JP5789785 A JP 5789785A JP H0584974 B2 JPH0584974 B2 JP H0584974B2
Authority
JP
Japan
Prior art keywords
image
value
document
latch
white
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 - Lifetime
Application number
JP60057897A
Other languages
Japanese (ja)
Other versions
JPS61214866A (en
Inventor
Masanori Yamada
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 JP60057897A priority Critical patent/JPS61214866A/en
Publication of JPS61214866A publication Critical patent/JPS61214866A/en
Priority to US07/595,634 priority patent/US5065257A/en
Publication of JPH0584974B2 publication Critical patent/JPH0584974B2/ja
Granted legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】[Detailed description of the invention]

〔技術分野〕 本発明は原稿画像を電気的に処理する画像処理
装置に関するものである。 〔従来技術〕 従来、フアクシミリ等の原稿画像を光電的に読
取り、その読取り画像信号を電気的に処理する画
像処理装置が提案されている。この様な画像処理
装置においては、信号処理の容易さや外部雑音の
影響に対する強さ等の長所をもつたデジタル処理
が最近では一般的になりつつある。従つて、原稿
画像を正確にデジタル画像信号に変換する必要が
ある。 ところで、読取るべき原稿画像の状態(濃度や
サイズ等)は多種多様であり、これら全ての原稿
画像に対して同一の処理によつて対処することは
不可能である。そこで、原稿画像の状態をオペレ
ータが判断し、これによつて画像処理動作を調整
する様な構成がとられている。しかしながら、そ
の調整動作は煩わしく、誤つた調整により良好な
画像処理が実行できない場合もある。 そこで、読取るべき原稿画像の状態を検出する
機能を設け、この検出結果に従つて、原稿画像に
応じた画像処理動作を自動的に実行することが考
えられる。これによると、前述の様なオペレータ
の調整の手間が省け、また、装置に不慣れなオペ
レータによつてもある程度良好な画像処理が可能
となるものである。 しかしながら、この様な自動処理において、例
えば原稿の画像濃度の最大値、最小値を検出し、
これに基づいて原稿画像のデジタル化処理を実行
する場合、白ベタ、黒ベタ或いは中間調の画像領
域から検出した最大値、最小値は原稿全体におけ
る最大値、最小値とはかなり異なり、従つて、こ
の様な値を用いるとデジタル化処理が正確になさ
れない等の不都合を生じることもある。 〔目的〕 本発明は以上の点に鑑みてなされたもので、読
取るべき原稿画像の状態に適した画像処理を自動
的に行なうとともに、この自動処理における不都
合を除去し、最適な画像処理を実行可能な画像処
理装置を提供することを目的とする。 〔実施例〕 以下本発明の実施例を図面を参照して詳細に説
明する。第1図は本発明が適用できる原稿読取装
置の該略図である。原稿カバー110により押え
られ、原稿台101上に置かれた原稿102の画
像情報を読取る為に、数千個の受光素子からなる
CCDラインセンサ等のの撮像素子103が使用
され、光源104からの照明光が原稿102面上
で反射されて、ミラー105,106,107を
介してレンズ108により撮像素子103上に結
像される。光源104、ミラー105とミラー1
06,107は2:1の相対速度で移動するよう
になつている。この光源104及びミラー10
5,106,107よりなる光学ユニツトはDC
サーボモータ109によつてPLL制御をかけな
がら一定速度で往復移動する。この移動速度は左
から右への往路では読取り倍率に応じて90mm/
secから360mm/secまで可能であり、右から左へ
の復路では常に630mm/secである。 この光学ユニツトの移動する方向を副走査方向
と呼び、この副走査方向に直交する主走査ライン
を撮像素子により16pel/mmの解像度で読取りな
がら(主走査)光学ユニツトを左端から右端まで
往動させた後、再び左端まで復動させて1回の走
査を終える。以上の動作により、原稿台101に
載置された原稿102の全面が、1ライン毎に順
次読取られ、撮像素子103からは1ライン毎に
読取画像の濃度を示すアナログ画信号が繰返し出
力される。 第2図に撮像素子103からのアナログ画信号
を処理する回路の概略のブロツク図を示す。撮像
素子103で読取られた画信号VDはA/Dコン
バータ201で各画素の画像濃度をデジタル的に
示す6ビツトのデジタル信号に変換される。A/
Dコンバータ201のデジタル信号出力はラツチ
202を介して撮像素子103から画信号を読出
すための画像データクロツクCLKに同期したサ
ンプリングクロツクSCLに同期してラツチ20
3、コンパレータ204,207、ラツチ20
5,208に6ビツトパラレルに送られる。 コンパレータ204ではラツチ202から送ら
れてきた6ビツトの画信号とラツチ203及びび
205から送られてきた6ビツトの画信号を比較
して、もしラツチ202から送られてきた新しい
画信号の方が小さければ、アンドゲート206へ
コンパレート出力を出す。アンドゲート206は
コンパレータ204からのコンパレート出力をサ
ンプリングクロツクSCLと同期させてラツチ20
5へ送る。 コンパレータ207ではコンパレータ204と
同様にラツチ202から送られてきた6ビツトの
画信号とラツチ203及び208から送られてき
た6ビツトの画信号を比較して、もしラツチ20
2から送られてきた新しい画信号の方が大きけれ
ば、アンドゲート209へコンパレート出力を出
す。アンドゲート209はコンパレータ207か
らのコンパレート出力をサンプリングクロツク
SCL同期させてラツチ208へ送る。 ラツチ205,208は夫々アンドゲート20
6,209よりコンパレート出力を受けるとラツ
チ202から送られてきた6ビツトの画信号をラ
ツチし、CPU211へ送る。以上により、ラツ
チ205,207には夫々それ迄に入力した画信
号の最小値、最大値がラツチされることになる。 尚、アンドゲート206,209には、コンパ
レート出力とサンプリングクロツクSCLの他に、
撮像素子103からの画信号の各ラインの有効区
間を示すイネブル信号ENが入力される。従つ
て、主走査ライン毎の所定区間の画信号に対する
コンパレート結果をラツチ205,208から
CPU211に送るようになつている。 マイクロコンピユータよりなるCPU211は、
主走査1ライン毎の同期信号MSに同期してラツ
チ205,208からの画信号をとりこむこと
で、各主走査ラインの最も低い濃度レベル(以下
白ピークと呼ぶ)と、最も高い濃度レベル(以下
黒ピークと呼ぶ)を検出できる。 CPU211は各ライン毎に検出した白ピーク
と黒ピークをもとにROM212に予じめ格納さ
れたプログラムに従つて後述するアルゴリズムで
スライスレベルを決定し、コンパレータ210に
送る。コンパレータ210ではラツチ203から
の6ビツトの画信号とCPU211からの6ビツ
トのスライスレベルを比較し、各画素毎の白/黒
を示す2値化信号(画像データVIDEO)を生成
する。 尚、座標検出部215は原稿読取装置の原稿台
101上に載置された原稿の原稿台101上にお
ける座標(位置)を検出するものである。また、
214は第1図示の原稿読取装置の上面に設けら
れた操作表示部、213はCPU211の演算デ
ータを一時格納するメモリRAMである。 第3図は原稿読取装置(第1図)の原稿台10
1上に原稿が置かれている状態を示す。この場合
原稿台101上の基準座標SPから主走査方向を
X、副走査方向をYとした時の4点の座標X1
Y1、X2,Y2、X3,Y3、X4,Y4を光学系を前走
査して検出する。原稿の置かれている領域外の画
像データは必ず黒データになる様に、原稿カバー
110(第1図)が鏡面処理されている。前走査
はガラス面全域を行うべく、主走査、副走査を行
う。 第4図に座標検出部215の詳細な回路構成を
示す。図中、主走査カウンタ351はダウンカウ
ンタであり、主走査1ライン中における走査位置
を表わす。このカウンタは水平同期信号HSYNC
で主走査方向(X方向)の最大値にセツトされた
画像データクロツクCLKが入力される毎にカウ
ントダウンする。副走査カウンタ352はアツプ
カウンタでありVSYNC(画像先端信号)の立ち
上りで“0”にリセツトされ、HSYNC信号でカ
ウントアツプし、副走査方向における走査位置を
表わす。 前走査時において、コンパレータ210により
2値化された画像データVIDEOはシフト・レジ
スタ301に8ビツト単位で入力される。尚、前
走査時にはCPU211はコンパレータ210に
対して予じめ定められた固定スライスレベルを供
給する。8ビツト入力が完了した時点で、ゲート
回路302はシフト・レジスタ310の8ビツト
データの全てが白画像(0レベル)からチエツク
を行ない、全て白画像ならば信号ライン303に
1を出力する。 原稿の前走査開始後、最初の8ビツト白が現わ
れた時F/F(フリツプフロツプ)304がセツ
トする。このF/F304はVSYNC(往動開始
時に出力される画像先端信号)によつて予じめリ
セツトされている。以後、次のVSYNCの来るま
でセツトし放しである。主走査カウンタ351は
コンパレータ210からの画像データの各画素出
力に同期したクロツクにより、ダウンカウンタす
るもので、F/F304がセツトした時点でラツ
チ305にその時の主走査カウンタ351の値が
ロードされる。これがX1座標値になる。又副走
査カウンタ352は1ライン毎の走査に同期した
信号をアツプカウントするもので、ラツチ306
にF/F304がセツトした時の副走査カウンタ
352の値(ライン数)がロードされる。これが
Y1座標値になる。従つてP1,X1,Y1が求まる。 又、信号303に1が出力する度に主走査カウ
ンタ351からの値をラツチ307にロードす
る。最初の8ビツトの白が現われた時の主走査カ
ウンタ351からの値がラツチ307にロードさ
れると、ラツチ310(これはVSYNC時点でX
方向の最大値にされている)のデータとコンパレ
ータ309で大小比較される。もしラツチ307
のデータの方が小ならばラツチ307のデータが
ラツチ310にロードされる。又、この時副走査
カウンタ352の値がラツチ311にロードされ
る。この動作は次の8ビツトがシフト・レジスタ
301に入る迄に処理される。この様にラツチ3
07とラツチ310のデータ比較を全画像領域に
ついて行なえば、ラツチ310には原稿領域X方
向の最小値が残り、この時のY方向の座標がラツ
チ311に残ることになる。即ち、主走査カウン
タ351はダウンカウンタなので、X方向の最小
値に対応する座標は、主走査方向でSPから一番
近い座標を表わす。これがP2,X2,Y2座標であ
る。 F/F312は各主走査ライン毎に最初に8ビ
ツト白が現われた時点でセツトするF/Fで水平
同期信号HSYNCでリセツトされ最初の8ビツト
白でセツトし、次のHSYNCまで保持する。この
F/F312がセツトする時点で1ライン中で最
初に現われた白信号の位置に相当する主走査カウ
ンタ351の値をラツチ313にセツトする。そ
してラツチ315の値とコンパレータ316で大
小比較される。ラツチ315にはVSYNC発生時
点でX方向の最小値即ち0がプリセツトされてい
る。もしラツチ315のデータの方がラツチ31
3のデータより小さいか等しいならば信号317
がアクテイブになりラツチ313のデータがラツ
チ315にロードされる。この動作はHSYNC−
HSYNC間で行なわれる。以上の比較動作を全面
像領域について行なうとラツチ315には原稿座
標のX方向の最大値、即ち、主走査方向で、走査
開始点から一番遠い点からの白信号のX座標が残
ることになる。これがX3である。又、信号ライ
ン317が出力する時、副走査からの値がラツチ
318にロードされる。これがY3になり、P3
X3,Y3が得られる。 ラツチ319と320は全面像領域において8
ビツト白が現われる度にその時の主走査カウンタ
の値と副走査カウンタの値がロードされる。従つ
て、原稿前走査完了時では最後に8ビツト白が現
われた時点でのカウント値がカウンタに残つてい
ることになる。これがP4,X4,Y4である。 以上の8つのラツチ306,311,320,
318,305,310,315,319のデー
タラインはCPU211のバスラインBUSに接続
され、CPU211は前走査における往動終了時
にこのデータを読み込むことになる。 第5図に原稿読取りシーケンスのフローチヤー
トを示す。尚、ステツプ501〜507が前走査
に関する。まず、ステツプ501において光学ユ
ニツトは第1図の左端から右端まで往動走査を行
なつて先に述べたように第4図示の座標検出部2
15によつて原稿台101上の原稿の座標を検出
し、その検出した各座標データを取込む。 次にステツプ502において、2値化のためのス
ライスレベル決定のためのピーク値をサンプルす
ベきエリアをステツプ501で検出した座標データ
から算出する。例えば、第3図の斜線部のように
置かれた原稿について検出した座標から、この原
稿のピーク値サンプリングエリアとして、Y3
Y2及び、X1,X4で囲まれる長方形エリアを選択
する。それは、通常原稿は原稿台に極力平行に載
置されるものであり、また、たとえ第3図のよう
に多少傾いて載置されても原稿外の不要な情報を
原稿からのデータとして誤まつてひろうおそれは
ないからである。尚、当然他の方法でサンプリン
グエリアを決定してもよい。 第6図から分かるように原稿座標検出を終える
と光学系は副走査方向Ymaxの点にある。この時
点で、ピーク値サンプリング開始点Y2と終了点
Y3が分かつているので、第5図のステツプ504と
505及び506を実行するスケジユールをたてること
ができる。 すなわち、ステツプ503において復動を開始し
たらCPU211は距離(Ymax−Y2)相当分だ
け主走査ライン同期信号を数えた後、第2図で前
述した白ピーク値/黒ピーク値の検出を開始し、
さらにその点から距離Y2−Y3相当分だけ主走査
ライン同期信号を数えたならば、ピーク値の検出
を終了し、さらに距離Y3相当分だけ主走査ライ
ン同期信号を数えた後、復動を停止する。 またステツプ504においてピーク値検出開始時
には、先に述べたイネブル信号ENを第6図のよ
うに検出座標X1,X4に対応して出力する様に設
定しておくことはいうまでもない。 以上の動作で、原稿台101上の任意の位置に
置かれた原稿内の主走査ライン毎の画像濃度の白
ピークと黒ピークを確実検出でき、原稿カバー等
の原稿以外のものによりその検出動作が左右され
ることを防止する。 次に2値化のためのスライスレベル決定のアル
ゴリズムについて説明する。 前述した手順により、CPU211は原稿領域
内から各主走査ライン毎に黒ピーク値と白ピーク
値をとりこむ。今、第i主走査ライン上の黒ピー
クをBPi、白ピークをWPiとすると、画像データ
は6ビツト値であるから各々0\0\(HEX)から3F(HEX)
までのいずれかの値をとり、かつBPiWPiであ
る。 CPU211はRAM213内に用意された64×
2バイトの黒ピークヒストグラム用エリアと64×
2バイトの白ピークヒストグラム用エリア内の2
バイトエリアHB(j)、HW(j)の内容のうち検出し
たデータBPiとWPiに対応したエリアを各々1つ
ずつカウントアツプする。そして、次の主走査ラ
イン同期信号MSを待ち、第i+1ラインからの
データBPi+1とWPi+1をとりこんで、再びヒス
トグラムの対応エリアをカウントアツプして以
下、ステツプ505のサンプル終了まで続ける。 但し、この時、検出したBPiとWPiを必らずし
もヒストグラムデータとして用いるとは限らな
い。例えば、主走査ライン方向に一様な濃度の帯
があれば、それが真白、真黒、あるいは他の濃度
でもそこからのサンプル値BPiとWPiはほとんど
等しいものになり、地肌部と情報部を区別して2
値化を行なうための情報としてはふさわしくな
い。また地肌部であつても必らずしも均一な濃度
ではないため、地肌レベルのばらつきの黒ピーク
を情報レベルとして扱つても適切な2値化は行な
えない。従つて、CPU211はBPi−WPiαの
時、即ち黒ピーク値と白ピーク値との差が所定値
より小さく、濃度変化が少ないと判断した場合に
はそのBPi,WPiをヒストグラム作成用のデータ
として採用しない。このαは経験的に設定される
定数である。 また一方、原稿台ガラス上のホコリ等で実際の
地肌レベルよりも白い値を白ピークとしてサンプ
リングするケースや汚れ等で実際の情報レベルよ
りも黒い値を黒ピークとして、サンプリングする
ケースも考えられる。これらの場合もヒストグラ
ム作成用のデータとしては適切でない。従つて、
CPU211はBPiβ又はWPiγの時、即ち、
黒ピーク値又は白ピーク値が夫々の基準値からは
ずれた、特異な値である場合にはそのBPi,WPi
をヒストグラム作成用のデータとして採用しな
い。このβやγも経験的に設定される定数であ
る。 また、ステツプ504によりサンプル開始する以
前にRAM213の全ヒストグラムエリア64×2
×2バイトを0\にクリアしておくのは当然のこと
である。 第7図に第5図のステツプS504,505,506に
おけるピーク値サンプリングの詳細なフローチヤ
ートを示し、以下に説明する。 CPU211はまず、ヒストグラム作成用のエ
リアHW(j)とHB(j)を全て0\にクリアする(S14
−1)。このHW(j)及びHB(j)は第2図RAM21
3上のエリアで、各jについてHW(j),HB(j)と
もに2バイトから構成され、又、jは検出したピ
ーク値のとりうる値0\(00HEX)から63(3FHEX
まで変化しうるので、HW(j),j=0,…,63で
計2×64=128バイト、HB(j)についても同じく
計128バイトである。HW(j)は白ピーク値WPi(=
j)の頻度を示す。HB(j)は黒ピークBPi(=j)
の頻度を示す。ヒストグラム作成用エリアが各2
バイトあれば65535までカウントでき、16pelの解
像度ではA3の全主走査ライン数が6720ラインで
あるから充分である。 次にCPU211は主走査ライン番号iを初期
化し(S14−2)、第1ラインのピーク値検出の
終了を主走査ライン同期信号MSにより検知した
ら(S14−3)、前述のラツチから第1ラインの
白ピーク値WP1、黒ピーク値BP1をとりこむ
(S14−4)。もし、BP1−WP0≦αすなわち各ピ
ークの差が所定値αより小さい時は、前述の如
く、BP1,WP1をヒストグラムデータとして用い
ない(S14−5)。 一方、BP1−WP1>αであれば次にBP1≧βす
なわち黒ピーク値が所定値βより大きいかどうか
を判定し、大きい時にはやはりヒストグラム作成
データとして用いない(S14−6)。 又、BP1<βであれば、次にWP1≦γ、すなわ
ち白ピーク値が所定値γより小さいがどうか判定
し小さい時にはやはりヒストグラム作成データと
して用いない(S14−7)。 WP1>γであれば、WP1,BP1をヒストグラム
作成データとして用いることにして、白ピーク値
WP1に対応するRAM上の頻度エリアHW(WP1
を1カウントアツプし(S14−8)、黒ピーク値
BP1に対応する同様のHB(BP1)を1カウントア
ツプする(S14−9)。 以上のように第1ラインに対するピーク値サン
プリング及びヒストグラムの生成もしくはデータ
の棄却を行なつたのち、iの値を2,3,4……
と増加し(S14−10)、第2,第3,第4,……
各ラインに対しても同様の処理を復動を停止する
まで行なう。 この結果ステツプ505(第5図)でサンプル終了
した時には、例えば第8図1,2に示すようなヒ
ストグラムが黒ピークBP/白ピークWPの各々
について構成されている。 サンプルを終了した後、光学系がスタート地点
に戻りステツプ506で復動を終了したら、次にス
テツプ507でスライスレベルを設定する。 各ヒストグラムのスライスレベルの設定度数の
ピークを示す濃度レベルを各々の代表値と考え
る。 第8図の例によれば原稿情報部の濃度を36H原
稿地肌部の濃度をOAHとし、例えばその中央値
20Hをスライスレベルとする。尚、このスライス
レベルの決定については他にも考えられ、このス
ライスレベルの決定動作は後で詳説する。 最後にステツプ508で原稿読取スキヤンを行な
つて動作を終了する。このときは、ステツプ507
で決定したスライスレベルCPC211はコンパ
レータ210に供給することは当然である。 実際の情報レベルよりも黒い値を黒ピークBP
としてサンプリングするケースについて第9図を
用いて説明する。 原稿台ガラスの汚れGD等のある画像のOG
からピーク値をサンプリングした場合、汚れの部
分GDが極めて黒い、黒ピーク値BPとなり、の
如くの白ピークWP、黒ピークBPがサンプリン
グされる。これをそのままヒストグラム生成デー
タとすると、の如く黒ピークヒストグラムの極
大値が情報部よりも汚れ部で高くなつてしまうた
め、スライスレベルが情報部の濃度より高く決定
され、適切な2値化が実行されない。 このケースで前記のβという値を採用して、汚
れ部の黒ピーク値BPをヒストグラム生成データ
として不採用にすると、その場合の黒ピークヒス
トグラムはの如く情報部の濃度値で最大値をも
ち適切なスライスレベルを決定することができ
る。 同様に実際の地肌レベルよりも白い値を白ピー
クWPとしてサンプリングするケースについて、
第9図を用いて説明する。 原稿台ガラス上のホコリDS等のある、地肌の
かぶつた原稿を読取る場合、の如くホコリの
部分DSが極めて白く白ピーク値WPとしてサン
プリングされる。このデータをそのまま使つてヒ
ストグラムを生成とするとの如く実際の地肌よ
りも白いところにスライスレベルが決定され、適
切な2値化が実行されない。 このようなケースで前記のγという値を採用し
てホコリ部分の白ピーク値WPを、ヒストグラム
生成データとし採用しなけば、の如く、白ピー
クヒストグラムの山が実際の地肌部に生成され、
適切なスライスレベルが決定される。 従つて、以上説明したβ及びγの値を用いた黒
ピーク値BPと白ピーク値WPの補正動作を組合
せればノイズ等に影響されない良好なスライスレ
ベルを決定することができる。又、白ピーク値又
は黒ピーク値のいずれか一方に対してパラメータ
を設定し、いずれかのピーク値がそのパラメータ
以上又は以下の場合、その値をヒストグラム作成
用データとして無効としてもよい。 第10図に濃度選択のために原稿読取装置の上
面に設けられた操作表示部214を示す。802
は7個のLEDからなる7段階のレベルを示し得
る濃度表示部で、濃度4が選択されている状態を
示している。キー800を押す毎に、802の表
示段階は1つずつ左へ移動し、キー801を押す
毎に、1つずつ右へ移動する。 803は原稿のコントラストを選択するキー
で、このキーを押す毎に、3個のLED804が
ノーマル→ハイコントラスト→ローコントラスト
→ノーマルと段階的に表示が変化する。 この操作表示部214の各キーの動作状態は
CPU211に取込まれ、また、LED等の表示部
はCPU211からの指令に応じて表示動作する。 LED802の濃度表示段階をf(=1,…,
7)とし、また白ピークヒストグラムから推測さ
れる原稿地肌部の濃度レベルをWpp、黒ピーク
ヒストグラムから推測される原稿情報部の濃度レ
ベルをBppとして2値化のためのスライスレベル
SLを SL=Bpp+Wpp/2 +[Bpp−Wpp/8]×(f−4) のように決定することもできる。但し、[ ]は
ガウス記号 例えば前述した第8図のケースではWpp=
φAH,Bpp=36Hであるから、濃度表示とスライ
スレベルの関係は、次表のようになる。
[Technical Field] The present invention relates to an image processing device that electrically processes a document image. [Prior Art] Conventionally, an image processing apparatus has been proposed that photoelectrically reads an image of a document such as a facsimile and electrically processes the read image signal. In such image processing apparatuses, digital processing has recently become common, as it has advantages such as ease of signal processing and resistance to the influence of external noise. Therefore, it is necessary to accurately convert the original image into a digital image signal. By the way, the conditions (density, size, etc.) of the original images to be read vary widely, and it is impossible to apply the same processing to all these original images. Therefore, a configuration is adopted in which an operator judges the state of the document image and adjusts the image processing operation based on this judgment. However, the adjustment operation is troublesome, and there are cases where good image processing cannot be performed due to incorrect adjustment. Therefore, it is conceivable to provide a function to detect the state of the document image to be read and automatically execute an image processing operation according to the document image according to the detection result. According to this, the operator's adjustment effort as described above can be saved, and even an operator who is unfamiliar with the apparatus can perform image processing to a certain extent. However, in such automatic processing, for example, the maximum and minimum values of the image density of the document are detected,
When digitizing a document image based on this, the maximum and minimum values detected from solid white, solid black, or halftone image areas are quite different from the maximum and minimum values of the entire document, and therefore , if such values are used, problems may occur such as digitization processing not being performed accurately. [Purpose] The present invention has been made in view of the above points, and it is an object of the present invention to automatically perform image processing suitable for the condition of a document image to be read, eliminate inconveniences in this automatic processing, and perform optimal image processing. The purpose is to provide a capable image processing device. [Examples] Examples of the present invention will be described in detail below with reference to the drawings. FIG. 1 is a schematic diagram of a document reading device to which the present invention is applicable. It consists of several thousand light receiving elements in order to read the image information of the original 102 held by the original cover 110 and placed on the original table 101.
An image sensor 103 such as a CCD line sensor is used, and illumination light from a light source 104 is reflected on the surface of the original 102, and an image is formed on the image sensor 103 by a lens 108 via mirrors 105, 106, and 107. . Light source 104, mirror 105 and mirror 1
06 and 107 are adapted to move at a relative speed of 2:1. This light source 104 and mirror 10
The optical unit consisting of 5,106,107 is DC
It moves back and forth at a constant speed under PLL control by a servo motor 109. The moving speed is 90mm/90mm on the outward path from left to right depending on the reading magnification.
sec to 360mm/sec, and always 630mm/sec on the return journey from right to left. The direction in which this optical unit moves is called the sub-scanning direction, and the optical unit is moved forward from the left end to the right end while reading the main scanning line perpendicular to this sub-scanning direction with a resolution of 16 pel/mm (main scanning). After that, it is moved back to the left end again to complete one scan. Through the above operations, the entire surface of the document 102 placed on the document table 101 is sequentially read line by line, and the image sensor 103 repeatedly outputs an analog image signal indicating the density of the read image for each line. . FIG. 2 shows a schematic block diagram of a circuit that processes analog image signals from the image sensor 103. The image signal V D read by the image sensor 103 is converted by the A/D converter 201 into a 6-bit digital signal digitally indicating the image density of each pixel. A/
The digital signal output of the D converter 201 is sent to the latch 20 in synchronization with the sampling clock SCL which is synchronized with the image data clock CLK for reading out the image signal from the image sensor 103 via the latch 202.
3. Comparators 204, 207, latch 20
5,208 in 6-bit parallel. Comparator 204 compares the 6-bit image signal sent from latch 202 with the 6-bit image signal sent from latches 203 and 205, and if the new image signal sent from latch 202 is better. If it is smaller, a comparison output is output to the AND gate 206. AND gate 206 synchronizes the comparator output from comparator 204 with sampling clock SCL to latch 20.
Send to 5. Similar to the comparator 204, the comparator 207 compares the 6-bit image signal sent from the latch 202 with the 6-bit image signal sent from the latches 203 and 208.
If the new image signal sent from 2 is larger, a comparator output is output to AND gate 209. AND gate 209 uses the comparator output from comparator 207 as a sampling clock.
SCL is synchronized and sent to latch 208. The latches 205 and 208 are the AND gates 20 and 20, respectively.
Upon receiving the comparator output from the latch 209, the 6-bit image signal sent from the latch 202 is latched and sent to the CPU 211. As a result, the minimum and maximum values of the image signals inputted up to that point are latched in the latches 205 and 207, respectively. In addition to the comparator output and sampling clock SCL, the AND gates 206 and 209 have
An enable signal EN indicating the valid section of each line of the image signal from the image sensor 103 is input. Therefore, the comparison results for the image signals in a predetermined section for each main scanning line are output from the latches 205 and 208.
It is configured to be sent to CPU211. The CPU 211, which consists of a microcomputer,
By capturing the image signals from the latches 205 and 208 in synchronization with the synchronization signal MS for each main scanning line, the lowest density level (hereinafter referred to as white peak) and the highest density level (hereinafter referred to as white peak) of each main scanning line is captured. black peak) can be detected. The CPU 211 determines a slice level based on the white peak and black peak detected for each line using an algorithm described later in accordance with a program stored in the ROM 212 in advance, and sends the slice level to the comparator 210. The comparator 210 compares the 6-bit image signal from the latch 203 with the 6-bit slice level from the CPU 211, and generates a binary signal (image data VIDEO) indicating white/black for each pixel. Note that the coordinate detection unit 215 detects the coordinates (position) on the document table 101 of the document placed on the document table 101 of the document reading device. Also,
214 is an operation display section provided on the top surface of the document reading device shown in the first diagram; 213 is a memory RAM that temporarily stores calculation data of the CPU 211; Figure 3 shows the document table 10 of the document reading device (Figure 1).
1 shows a state in which a document is placed on top. In this case, the coordinates of four points from the reference coordinate SP on the document table 101, where X is the main scanning direction and Y is the subscanning direction, are the coordinates X 1 ,
Y 1 , X 2 , Y 2 , X 3 , Y 3 , X 4 , and Y 4 are detected by pre-scanning the optical system. The document cover 110 (FIG. 1) is mirror-finished so that image data outside the area where the document is placed is always black data. The pre-scanning includes main scanning and sub-scanning to cover the entire glass surface. FIG. 4 shows a detailed circuit configuration of the coordinate detection section 215. In the figure, a main scanning counter 351 is a down counter and represents a scanning position in one main scanning line. This counter uses the horizontal synchronization signal HSYNC
The countdown is performed each time the image data clock CLK, which is set to the maximum value in the main scanning direction (X direction), is input. The sub-scanning counter 352 is an up counter that is reset to "0" at the rising edge of VSYNC (image leading edge signal), counts up in response to the HSYNC signal, and represents the scanning position in the sub-scanning direction. During pre-scanning, the image data VIDEO binarized by the comparator 210 is input to the shift register 301 in units of 8 bits. Note that during pre-scanning, the CPU 211 supplies a predetermined fixed slice level to the comparator 210. When the 8-bit input is completed, the gate circuit 302 checks that all of the 8-bit data in the shift register 310 is a white image (0 level), and outputs 1 to the signal line 303 if all of the 8-bit data is a white image. After the start of pre-scanning of the original, an F/F (flip-flop) 304 is set when the first 8-bit white appears. This F/F 304 is reset in advance by VSYNC (image leading edge signal output at the start of forward movement). After that, it remains set until the next VSYNC. The main scanning counter 351 counts down by a clock synchronized with each pixel output of the image data from the comparator 210, and when the F/F 304 is set, the value of the main scanning counter 351 at that time is loaded into the latch 305. . This becomes the X 1 coordinate value. The sub-scanning counter 352 counts up the signal synchronized with the scanning of each line, and the latch 306
The value (number of lines) of the sub-scanning counter 352 when the F/F 304 is set is loaded. This is
Y becomes 1 coordinate value. Therefore, P 1 , X 1 , and Y 1 are found. Also, each time 1 is output to the signal 303, the value from the main scanning counter 351 is loaded into the latch 307. When the value from main scan counter 351 when the first 8-bit white appears is loaded into latch 307, latch 310 (which is
The comparator 309 compares the magnitude with the data of the direction (which is set to the maximum value of the direction). Moshi Latch 307
If the data in latch 307 is smaller, the data in latch 307 is loaded into latch 310. Also, at this time, the value of the sub-scanning counter 352 is loaded into the latch 311. This operation is processed until the next 8 bits enter shift register 301. Latch 3 like this
07 and the latch 310 for the entire image area, the minimum value of the document area in the X direction remains in the latch 310, and the coordinate in the Y direction at this time remains in the latch 311. That is, since the main scanning counter 351 is a down counter, the coordinate corresponding to the minimum value in the X direction represents the coordinate closest to SP in the main scanning direction. These are the P 2 , X 2 , Y 2 coordinates. The F/F 312 is an F/F that is set when 8-bit white appears for the first time in each main scanning line, and is reset by the horizontal synchronizing signal HSYNC, set at the first 8-bit white, and held until the next HSYNC. When the F/F 312 is set, the value of the main scanning counter 351 corresponding to the position of the first white signal appearing in one line is set in the latch 313. The value of the latch 315 and the comparator 316 are then compared in magnitude. The latch 315 is preset to the minimum value in the X direction, ie, 0, at the time VSYNC occurs. If the data of latch 315 is better than latch 31,
If the data is less than or equal to 3, the signal 317
becomes active and the data in latch 313 is loaded into latch 315. This operation is HSYNC−
This is done between HSYNCs. When the above comparison operation is performed for the entire image area, the maximum value of the document coordinates in the X direction, that is, the X coordinate of the white signal from the point farthest from the scanning start point in the main scanning direction remains in the latch 315. Become. This is X3 . Also, when signal line 317 outputs, the value from sub-scan is loaded into latch 318. This becomes Y 3 , P 3 ,
X 3 and Y 3 are obtained. Latches 319 and 320 are 8 in the full image area.
Each time a bit white appears, the value of the main scanning counter and the value of the sub-scanning counter at that time are loaded. Therefore, when the document pre-scanning is completed, the count value at the time when 8-bit white appears last remains on the counter. These are P 4 , X 4 , and Y 4 . The above eight latches 306, 311, 320,
The data lines 318, 305, 310, 315, and 319 are connected to the bus line BUS of the CPU 211, and the CPU 211 reads this data at the end of the forward movement in the previous scan. FIG. 5 shows a flowchart of the document reading sequence. Note that steps 501 to 507 relate to pre-scanning. First, in step 501, the optical unit performs forward scanning from the left end to the right end in FIG.
15 detects the coordinates of the document on the document table 101, and captures each detected coordinate data. Next, in step 502, the area in which the peak value for determining the slice level for binarization should be sampled is calculated from the coordinate data detected in step 501. For example, from the coordinates detected for a document placed as shown in the shaded area in FIG. 3, Y 3 ,
Select a rectangular area surrounded by Y 2 , X 1 and X 4 . This is because the original is normally placed as parallel to the original table as possible, and even if the original is placed at a slight angle as shown in Figure 3, unnecessary information outside the original will not be mistaken as data from the original. This is because there is no danger of it being stolen. Of course, the sampling area may be determined using other methods. As can be seen from FIG. 6, when the document coordinate detection is completed, the optical system is at a point in the sub-scanning direction Ymax. At this point, the peak value sampling start point Y 2 and end point
Since Y 3 is known, step 504 in Figure 5 and
You can set a schedule to execute 505 and 506. That is, when the backward movement is started in step 503, the CPU 211 counts the main scanning line synchronization signals for the distance (Ymax - Y2 ), and then starts detecting the white peak value/black peak value described above in FIG. ,
Furthermore, after counting the main scanning line synchronization signals for a distance equivalent to Y 2 - Y 3 from that point, the detection of the peak value is completed, and after counting the main scanning line synchronization signals for a distance equivalent to Y 3 , the stop moving. It goes without saying that when peak value detection is started in step 504, the enable signal EN mentioned above is set to be output in correspondence with the detection coordinates X 1 and X 4 as shown in FIG. With the above operation, it is possible to reliably detect the white peak and black peak of the image density for each main scanning line in the document placed at any position on the document table 101, and the detection operation can be performed by using something other than the document, such as the document cover. prevent it from being influenced. Next, an algorithm for determining slice levels for binarization will be explained. According to the procedure described above, the CPU 211 takes in the black peak value and the white peak value for each main scanning line from within the document area. Now, if the black peak on the i-th main scanning line is BPi and the white peak is WPi, the image data is a 6-bit value, so they are respectively 0\0\ (HEX) to 3F (HEX).
Takes any value up to and is BPiWPi. The CPU 211 has 64× prepared in the RAM 213.
2-byte black peak histogram area and 64×
2 in the 2-byte white peak histogram area
Among the contents of byte areas HB(j) and HW(j), the areas corresponding to the detected data BPi and WPi are counted up one by one. Then, it waits for the next main scanning line synchronization signal MS, takes in the data BPi+ 1 and WPi+ 1 from the i+1th line, counts up the corresponding area of the histogram again, and continues until the end of the sample in step 505. However, at this time, the detected BPi and WPi are not necessarily used as histogram data. For example, if there is a band of uniform density in the main scanning line direction, the sample values BPi and WPi from that band will be almost equal, even if it is pure white, pure black, or other density, and the background part and the information part will be distinguished. Separately 2
It is not suitable as information for valuing. Further, since the density is not necessarily uniform even in the background area, appropriate binarization cannot be performed even if the black peak of the variation in the background level is treated as the information level. Therefore, when the CPU 211 determines that BPi−WPiα, that is, the difference between the black peak value and the white peak value is smaller than a predetermined value and there is little change in density, the CPU 211 uses the BPi and WPi as data for creating a histogram. do not. This α is a constant set empirically. On the other hand, there may also be cases where a value whiter than the actual background level due to dust on the platen glass is sampled as a white peak, or a value blacker than the actual information level due to dirt etc. is sampled as a black peak. These cases are also not suitable as data for creating a histogram. Therefore,
When the CPU 211 is BPiβ or WPiγ, that is,
If the black peak value or white peak value is a unique value that deviates from the respective reference value, its BPi, WPi
is not used as data for creating histograms. These β and γ are also constants set empirically. Also, before starting sampling in step 504, the entire histogram area of RAM 213 is 64×2.
It is natural to clear the x2 byte to 0\. FIG. 7 shows a detailed flowchart of peak value sampling in steps S504, 505, and 506 in FIG. 5, and will be described below. First, the CPU 211 clears the histogram creation areas HW(j) and HB(j) to 0\(S14
-1). These HW(j) and HB(j) are shown in RAM21 in Figure 2.
In the area above 3, both HW(j) and HB(j) are composed of 2 bytes for each j, and j is the possible value of the detected peak value from 0\(00 HEX ) to 63(3F HEX )
Therefore, HW(j), j=0, . . . , 63, totals 2×64=128 bytes, and HB(j) also has a total of 128 bytes. HW(j) is the white peak value WPi (=
Indicates the frequency of j). HB(j) is the black peak BPi(=j)
shows the frequency of 2 areas for creating histograms each
If there are bytes, it can be counted up to 65,535, and with a resolution of 16 pels, the total number of main scanning lines for A3 is 6,720 lines, which is sufficient. Next, the CPU 211 initializes the main scanning line number i (S14-2), and when detecting the end of the peak value detection of the first line using the main scanning line synchronization signal MS (S14-3), the CPU 211 initializes the main scanning line number i from the latch described above. The white peak value WP 1 and the black peak value BP 1 are taken in (S14-4). If BP 1 −WP 0 ≦α, that is, the difference between each peak is smaller than the predetermined value α, BP 1 and WP 1 are not used as histogram data as described above (S14-5). On the other hand, if BP 1 -WP 1 >α, then it is determined whether BP 1 ≧β, that is, the black peak value is larger than the predetermined value β, and if it is larger, it is not used as the histogram creation data (S14-6). If BP 1 <β, then it is determined whether WP 1 ≦γ, that is, the white peak value is smaller than the predetermined value γ, and if it is smaller, it is not used as histogram creation data (S14-7). If WP 1 > γ, WP 1 and BP 1 are used as histogram creation data, and the white peak value is
Frequency area HW on RAM corresponding to WP 1 (WP 1 )
is increased by 1 count (S14-8), and the black peak value is
A similar HB (BP 1 ) corresponding to BP 1 is counted up by 1 (S14-9). After peak value sampling and histogram generation or data rejection for the first line as described above, the value of i is set to 2, 3, 4...
(S14-10), 2nd, 3rd, 4th, etc.
Similar processing is performed for each line until the backward movement is stopped. As a result, when the sample is completed in step 505 (FIG. 5), histograms as shown in FIGS. 1 and 2, for example, are constructed for each of the black peak BP and white peak WP. After completing the sample, the optical system returns to the starting point and completes the backward movement in step 506. Next, in step 507, the slice level is set. The density level showing the peak of the set frequency of the slice level of each histogram is considered to be each representative value. According to the example in FIG. 8, the density of the document information area is 36H, and the density of the background area of the document is OAH, for example, the median value.
Let 20H be the slice level. Note that there are other ways to determine this slice level, and the operation for determining this slice level will be explained in detail later. Finally, in step 508, the original is read and scanned, and the operation ends. In this case, step 507
It goes without saying that the slice level CPC 211 determined in step 1 is supplied to the comparator 210. Black peak BP for values that are blacker than the actual information level
A case in which sampling is performed will be explained using FIG. 9. OG of images with dirt GD etc. on the platen glass
When the peak value is sampled from , the dirty portion GD is extremely black, resulting in a black peak value BP, and the white peak WP and black peak BP are sampled as shown below. If this is used as histogram generation data as is, the maximum value of the black peak histogram will be higher in the dirty part than in the information part, so the slice level will be determined to be higher than the density of the information part, and appropriate binarization will be performed. Not done. In this case, if we adopt the value β mentioned above and discard the black peak value BP of the dirty area as the histogram generation data, the black peak histogram in that case has the maximum value at the density value of the information area and is appropriate. The desired slice level can be determined. Similarly, regarding the case where a value whiter than the actual background level is sampled as the white peak WP,
This will be explained using FIG. 9. When reading a rough original with dust on the platen glass, the dusty part DS is extremely white and is sampled as the white peak value WP. If this data is used as is to generate a histogram, the slice level will be determined to be whiter than the actual background, and appropriate binarization will not be performed. In such a case, if we do not adopt the value of γ mentioned above and use the white peak value WP of the dusty area as the histogram generation data, a mountain in the white peak histogram will be generated in the actual background area, as shown below.
An appropriate slicing level is determined. Therefore, by combining the black peak value BP and white peak value WP correction operations using the values of β and γ as described above, it is possible to determine a good slice level that is not affected by noise or the like. Alternatively, a parameter may be set for either the white peak value or the black peak value, and if either peak value is greater than or equal to the parameter or less than that parameter, that value may be invalidated as data for creating a histogram. FIG. 10 shows an operation display section 214 provided on the top surface of the document reading device for density selection. 802
is a density display section made up of seven LEDs that can indicate seven levels, and shows that density 4 is selected. Each time the key 800 is pressed, the display stage 802 moves one step to the left, and each time the key 801 is pressed, the display stage 802 moves one step to the right. Reference numeral 803 is a key for selecting the contrast of the original, and each time this key is pressed, the display of the three LEDs 804 changes in stages from normal to high contrast to low contrast to normal. The operating status of each key on this operation display section 214 is
The information is taken in by the CPU 211, and display units such as LEDs perform display operations in accordance with commands from the CPU 211. The concentration display stage of the LED 802 is f(=1,...,
7), and the slice level for binarization is set as Wpp, the density level of the background part of the document estimated from the white peak histogram, and Bpp, the density level of the document information part estimated from the black peak histogram.
S L can also be determined as S L =Bpp+Wpp/2+[Bpp-Wpp/8]×(f-4). However, [ ] is a Gaussian symbol. For example, in the case of Figure 8 mentioned above, Wpp=
Since φA H , Bpp=36 H , the relationship between density display and slice level is as shown in the following table.

【表】 この表に示されたヒストグラムとスライスレベ
ルの関係をグラフに示したのが第11図Aであ
る。 このようにピーク値検出によつて推定される地
肌レベルと情報レベルの間を内分して設けられる
スライスレベルの内分比を濃度表示fで変化させ
ることで完全な地肌とばしを行ないつつも操作者
の好みで中間濃度部分を濃くしたり、うすくした
りする如くの調節が可能になる。 例えば第11図Aのように黒ピークヒストグラ
ムに点Bp2のように、2つ目の極大値があるよう
なケースでは、このBp2を示すレベルが情報レベ
ルなのか地肌レベルなのか読取装置には判断でき
ない。従つて、操作者がキー800,801によ
りf5以上を選択してBp2を地肌レベルとするか
f4以下を選択して情報レベルとするかの選択が
できる。 また、上記の手法によると、濃度表示fの分解
能を上げられるというメリツトも合せ持つ。例え
ば第11図Cのように、黒ピーク、白ピークに関
係なく濃度表示fに対応するスライスレベルが
[Table] FIG. 11A is a graph showing the relationship between the histogram shown in this table and the slice level. In this way, by changing the internal division ratio of the slice level, which is created by internally dividing the area between the background level estimated by peak value detection and the information level, using the density display f, it is possible to perform operations while completely removing the background. It is possible to make adjustments such as making the intermediate density part darker or lighter depending on the user's preference. For example, in a case where there is a second maximum value such as point Bp 2 in the black peak histogram as shown in Figure 11A, the reading device needs to check whether the level indicating Bp 2 is an information level or a background level. cannot be determined. Therefore, the operator can use the keys 800 and 801 to select f5 or higher to set Bp2 as the background level, or select f4 or lower to set Bp2 as the information level. Furthermore, the above method also has the advantage of increasing the resolution of the concentration display f. For example, as shown in Figure 11C, the slice level corresponding to the density display f is

【表】 と固定されていると、第11図Cにともに示して
あるような黒、白各ピークヒストグラムを示す画
像に対してはf1及びf7では読取つた情報が真
白又は真黒となり有効とはいえず、さらに、この
ケースでのf6は黒ピークの山の中に位置し情報
部が一部とんでしまい、さにf2は白ピークの山
の中に位置し、地肌がかぶつてしまう。従つて、
実質f3からf5の3段階しか表現できない。 しかし、第11図Aのように推定される地肌レ
ベルと黒レベルの間で濃度表示fに対応してスラ
イスレベルを決定するようにすると、実質7段階
の表現が可能となり、有効である。 以上はスライスレベルが1つ、すなわち2値画
像出力のケースであるがスライスレベルを2つ、
すなわち3値値画像出力の場合も同様に第11図
Bのように2種類のスライスレベルをピーク検出
により推定される地肌、情報レベルの間で濃度表
示fに対応して設定することもできる。 第12図にスライスレベルの算出のためのフロ
ーチヤートを示し、以下に説明する。 前述のようにピーク値のサンプリングを終了し
たら、生成した黒ピーク、白ピークのヒストグラ
ムの各々において HW(Wpp)=maxHW(j)なるWpp、すなわち、
白ピークヒストグラムのうち最も高い頻度を示す
濃度レベルWppと、HB(Bpp)=maxHB(j)なる
Bpp、すなわち、黒ピークヒストグラムのうち最
も高い頻度を示す濃度レベルBppをさがす(S15
−1,S15−2)。 その後スライスレベル決定ステツプ(S15−
10)においてスライスレベルを決定する。 スライスレベル決定ステツプ(S15−10)とし
ては4種のアルゴリズムA,B,C,Dのうちい
ずれか1つが実行される。これら4つのアルゴリ
ズムを操作表示部214に設けられた不図示のモ
ードキーにより選択し、所望のスライスレベルを
得ることができる。尚、4つのアルゴリズムを全
て設けることはなく、少なくとも1つ設ければ良
いものである。 アルゴリズムAは前述のWppとBppの平均値を
2値画像のためのスライスレベルSLとする例であ
る(S15−3)。アルゴリズムBは第11図Aを
用いて前述した濃度表示段階値fによつてWpp
とBppの内分比を変化させてスライスレベルSL
決定する例である(S15−4,5)。 アルゴリズムCは3値画像読取りのために2つ
のスライスレベルSL A,SL Bを決定する例で、
SL A,SL BはWppとBppの間を1:1:1に内
分する(S15−6)。先の第8図の例(Wpp=
OAH,Bpp=36Hの時)ではSL A=27H,SL B
19Hとなる。アルゴリズムDは濃度表示段階値f
によつてBppとWppの内分比を変化させて3画像
のための2つのスライスレベルSL A,SL Bを決
定する例であり、その算出式は以下である SL A=Wpp+2Bpp/3+Bpp−Wpp+2Bpp/3/
4×(f−4)〔f4の時〕 =Wpp+2Bpp/3+Wpp+2Bpp/3−Wpp/4
×(f−4)〔f<4の時〕 SL B=2Wpp+Bpp/3+Bpp−2Wpp+Bpp/3/
4×(f−4)〔f4の時〕 =2Wpp+Bpp/3+2Wpp+Bpp/3−Wpp/4
×(f−4)〔f<4の時〕 以上の式によるとスライスレベルSLとfの関
係は下表の如くなる。
[Table] If the image is fixed as shown in FIG. Furthermore, in this case, f6 is located in a mountain of black peaks, and part of the information part is cut off, while f2 is located in a mountain of white peaks, and the background is covered. Therefore,
In reality, only three stages, f3 to f5, can be expressed. However, if the slice level is determined between the estimated background level and black level in accordance with the density display f as shown in FIG. 11A, it becomes possible to express the image in seven levels, which is effective. The above is a case of one slice level, that is, binary image output, but two slice levels,
That is, in the case of outputting a ternary value image, two types of slice levels can be similarly set between the background and information levels estimated by peak detection, corresponding to the density display f, as shown in FIG. 11B. FIG. 12 shows a flowchart for calculating the slice level, and will be described below. After completing the peak value sampling as described above, in each of the generated histograms of the black peak and white peak, Wpp such that HW(Wpp) = maxHW(j), that is,
The concentration level Wpp that shows the highest frequency in the white peak histogram and HB (Bpp) = maxHB (j)
Bpp, that is, the density level Bpp that shows the highest frequency in the black peak histogram (S15
-1, S15-2). After that, the slice level determination step (S15-
10) Determine the slice level. As the slice level determination step (S15-10), one of four algorithms A, B, C, and D is executed. A desired slice level can be obtained by selecting one of these four algorithms using a mode key (not shown) provided on the operation display section 214. Note that it is not necessary to provide all four algorithms, but it is sufficient to provide at least one. Algorithm A is an example in which the average value of Wpp and Bpp mentioned above is used as the slice level S L for a binary image (S15-3). Algorithm B uses the concentration display step value f described above using FIG.
This is an example in which the slice level S L is determined by changing the internal division ratio of and Bpp (S15-4, 5). Algorithm C is an example of determining two slice levels S L A and S L B for reading a ternary image.
S L A and S L B internally divide Wpp and Bpp at a ratio of 1:1:1 (S15-6). The example in Figure 8 above (Wpp=
OA H , Bpp = 36 H ), S L A = 27 H , S L B =
19H . Algorithm D is the concentration display stage value f
This is an example of determining two slice levels S L A and S L B for three images by changing the internal division ratio of Bpp and Wpp, and the calculation formula is as follows: S L A = Wpp + 2Bpp/ 3+Bpp−Wpp+2Bpp/3/
4×(f-4) [at f4] =Wpp+2Bpp/3+Wpp+2Bpp/3-Wpp/4
×(f-4) [When f<4] S L B =2Wpp+Bpp/3+Bpp-2Wpp+Bpp/3/
4×(f-4) [at f4] =2Wpp+Bpp/3+2Wpp+Bpp/3-Wpp/4
×(f-4) [When f<4] According to the above equation, the relationship between slice level SL and f is as shown in the table below.

〔効果〕〔effect〕

以上説明した様に、本発明によると、原稿の画
像濃度レベルの最大値及び最小値をライン毎に検
出し、検出した最大値及び最小値に基づいて、原
稿を読取つて得た画像信号を処理するとともに、
検出した最大値及び最小値の差が所定範囲内の値
でない場合はそのラインの最大値、最小値を無効
とするので、白ベタや黒ベタ或いは中間調を含む
様な原稿に対しても最適な画像処理を実行するこ
とが可能となるものである。
As explained above, according to the present invention, the maximum and minimum values of the image density level of the original are detected for each line, and the image signal obtained by reading the original is processed based on the detected maximum and minimum values. At the same time,
If the difference between the detected maximum and minimum values is not within a predetermined range, the maximum and minimum values for that line are invalidated, making it ideal for originals that include solid white, solid black, or halftones. This makes it possible to perform sophisticated image processing.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明を適用した原稿読取装置の概略
図、第2図は画信号処理回路のブロツク図、第3
図は原稿台上の原稿の座標を示す図、第4図は座
標検出部のブロツク図、第5図は原稿読取りシー
ケンスを示すフローチヤート図、第6図は原稿載
置位置と原稿読取りシーケンスの対応を示す図、
第7図はピーク値サンプリング手順を示すフロー
チヤート図、第8図1,2は夫々黒ピークヒスト
グラムと白ピークヒストグラムの例を示す図、第
9図及び第14図は各種原稿に対するスライスレ
ベルの決定動作を示す図、第10図は、操作表示
部の外観図、第11図A,B,Cはピーク値とス
ライスレベルの関係を示す図、第12図はスライ
スレベルの算出手順を示すフローチヤート図、第
13図はパラメータαの設定動作を示す図、第1
5図はパラメータα,γの設定動作を示す図、第
16図はピーク値サンプリングの他の手順を示す
図であり、101は原稿台、103は撮像素子、
202,203,205,207はラツチ、20
4,207はコンパレータ、211はCPU、2
15は座標検出回路、214は操作表示部であ
る。
Fig. 1 is a schematic diagram of a document reading device to which the present invention is applied, Fig. 2 is a block diagram of an image signal processing circuit, and Fig. 3 is a block diagram of an image signal processing circuit.
The figure shows the coordinates of the document on the document table, FIG. 4 is a block diagram of the coordinate detection unit, FIG. 5 is a flowchart showing the document reading sequence, and FIG. 6 shows the document placement position and the document reading sequence. Diagram showing correspondence,
Figure 7 is a flowchart showing the peak value sampling procedure, Figures 8 1 and 2 are diagrams showing examples of black peak histograms and white peak histograms, respectively, and Figures 9 and 14 are slice level determination for various originals. Figure 10 is an external view of the operation display section, Figures 11A, B, and C are diagrams showing the relationship between peak values and slice levels, and Figure 12 is a flowchart showing the procedure for calculating slice levels. Fig. 13 is a diagram showing the setting operation of parameter α, Fig. 1
FIG. 5 is a diagram showing the setting operation of parameters α and γ, and FIG. 16 is a diagram showing another procedure for peak value sampling.
202, 203, 205, 207 are latches, 20
4,207 is a comparator, 211 is a CPU, 2
15 is a coordinate detection circuit, and 214 is an operation display section.

Claims (1)

【特許請求の範囲】 1 原稿画像を読取る手段と、上記原稿画像の画
像濃度レベルの最大値及び最小値をライン毎に検
出する手段と、上記検出手段によつて検出した最
大値及び最小値に基づき上記読取手段からの画像
信号を処理する手段とを有し、上記検出手段によ
り検出した最大値及び最小値の差が所定の範囲内
の値でない場合そのラインの最大値及び最小値を
無効とすることを特徴とする画像処理装置。 2 特許請求の範囲第1項において、上記検出手
段により検出した最大値及び最小値を無効とする
ための基準となる範囲が可変であることを特徴と
する画像処理装置。 3 特許請求の範囲第1項において、上記処理手
段は上記読取手段からの画像信号を量子化するこ
とを特徴とする画像処理装置。
[Claims] 1. means for reading an original image; means for detecting the maximum and minimum values of the image density level of the original image for each line; means for processing the image signal from the reading means based on the detection means, and if the difference between the maximum value and the minimum value detected by the detection means is not within a predetermined range, the maximum value and minimum value of that line are invalidated. An image processing device characterized by: 2. An image processing device according to claim 1, characterized in that a reference range for invalidating the maximum value and minimum value detected by the detection means is variable. 3. The image processing device according to claim 1, wherein the processing means quantizes the image signal from the reading means.
JP60057897A 1985-03-20 1985-03-20 Picture processing device Granted JPS61214866A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP60057897A JPS61214866A (en) 1985-03-20 1985-03-20 Picture processing device
US07/595,634 US5065257A (en) 1985-03-20 1990-09-18 Image processing apparatus with means for compensating for dust., etc., on an original

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60057897A JPS61214866A (en) 1985-03-20 1985-03-20 Picture processing device

Publications (2)

Publication Number Publication Date
JPS61214866A JPS61214866A (en) 1986-09-24
JPH0584974B2 true JPH0584974B2 (en) 1993-12-03

Family

ID=13068774

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60057897A Granted JPS61214866A (en) 1985-03-20 1985-03-20 Picture processing device

Country Status (1)

Country Link
JP (1) JPS61214866A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0722329B2 (en) * 1985-07-17 1995-03-08 日本電信電話株式会社 Image processing method and image processing circuit

Also Published As

Publication number Publication date
JPS61214866A (en) 1986-09-24

Similar Documents

Publication Publication Date Title
US5065257A (en) Image processing apparatus with means for compensating for dust., etc., on an original
JP2721334B2 (en) Image binarization processing device
JP3576810B2 (en) Image processing device
US5086486A (en) Apparatus for reading a document and processing the image
EP0719032A2 (en) Apparatus for reading image and method therefor
JPH0787313A (en) System and device for image processing
JPH0584974B2 (en)
US5228099A (en) Apparatus for reading a document and processing the image
JPH04248766A (en) Image area separation system
JPH0636553B2 (en) Image processing device
JP2541937B2 (en) Image processing device
JP3177508B2 (en) Image processing device
JPH067626Y2 (en) Image information reader
JPH02166582A (en) Shading correcting circuit
JPH04287566A (en) Picture processor
JP2900343B2 (en) Image processing device
JPH0622129A (en) Picture processing unit
JPH078005B2 (en) Image processing device
JPH09149251A (en) Image reader
JP3095767B2 (en) Image processing device
JPH0582782B2 (en)
JPH084311B2 (en) Image processing device
JPS5963884A (en) Picture reader
JPH099044A (en) Picture reader and processing method for read picture
JPH04287565A (en) Picture processor

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term