JP4039911B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP4039911B2
JP4039911B2 JP2002221656A JP2002221656A JP4039911B2 JP 4039911 B2 JP4039911 B2 JP 4039911B2 JP 2002221656 A JP2002221656 A JP 2002221656A JP 2002221656 A JP2002221656 A JP 2002221656A JP 4039911 B2 JP4039911 B2 JP 4039911B2
Authority
JP
Japan
Prior art keywords
determination
pixel
density
document
background
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
JP2002221656A
Other languages
Japanese (ja)
Other versions
JP2004064532A (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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2002221656A priority Critical patent/JP4039911B2/en
Publication of JP2004064532A publication Critical patent/JP2004064532A/en
Application granted granted Critical
Publication of JP4039911B2 publication Critical patent/JP4039911B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、原稿を走査して得られる入力画像データに対して、文字・網点・写真(印画紙)・べた等の画像領域や原稿種別の判別処理を行い、その判別結果に応じて処理を行う画像処理装置、それを備えた画像形成装置、画像処理方法、その方法を実行可能なプログラム、及びそのプログラムを記録した記録媒体に関するものである。
【0002】
【従来の技術】
電子複写機などの画像形成装置は、従来のアナログ式のほかにデジタル式のものが普及しており、またデジタル画像処理技術の進展によって、カラー画像を高画質に再現するフルカラーのデジタル複写機が製品化されている。
上記の画像形成装置によって複写される原稿画像としては、文字、線画、印刷写真(網点)、印画紙写真これらを組み合わせたものが存在しており、良好な再現画像を得るためには、それぞれの原稿にあった画像処理を行う必要がある。そして、上記の画像処理を効率よく行うために、画像形成装置の操作モードとして、原稿の種類を選択する、文字モード、文字/写真(印刷写真)モード、写真(印刷写真)モードなどが用意されている。
【0003】
しかしながら、各原稿に対して上記のモードの切り換えを行うことは、ユーザにとって、非常に煩わしい作業である。また、不適切なモードを選択した場合などでは、著しい画像の劣化が見られることも多く、無駄な複写が行われることにもなる。そこで、このような問題を解決するために、原稿の種別を自動的に判別処理を行うことが提案されている。
【0004】
例えば、特開平9−261460号公報では、複数の画像が混在する原稿画像の画像領域を自動的に識別する画像処理方法が開示されている。
上記公報の画像処理方法では、像域分離を少なくとも2回以上行い、最初の像域分離判定を基に原稿を判定する時のパラメータと、本スキャン時に局所的に領域を判定する時のパラメータとを変える。そして、原稿を判定する時、正確度の高い情報のみを利用する。例えば、プレスキャン時に、エッジの検出が困難なパラメータを設定して像域分離の判定基準(閾値)を高くすると、文字内部などはエッジとして検出されなくなり、かつ、網点画像において、該網点画像を文字として誤って検出する領域が少なくなる。
【0005】
また、特開平8−251402号公報において、原稿の種類を自動的に判別し、操作モードを自動的に切り換える技術が開示されている。上記公報記載の技術によれば、予備スキャンで読み取られたデータから明度のヒストグラムが作成される。このヒストグラムから、原稿種別を自動的に判定する。そして、各々原稿種類に適した操作モードが選択され、原稿の種類に応じた画像処理(下地調整、黒文字判別の有無、階調再現切り換え等)が実行される。
すなわち、この技術では、光電変換素子により原稿(カラー原稿と白黒原稿を含む)を読み取って得られた3原色のR,G,B信号を明度信号に変換し、明度信号からヒストグラムを作成し、作成されたヒストグラムの形状を基に、原稿種別を判定し、その判定結果に基づいて以後の画像処理内容を切り換えている。
【0006】
また、特開平8−251406号公報では、原稿の有彩無彩の判定を行うと共に、画像分離の機能、すなわち、エッジ分離・網点判定を行うことにより、原稿を▲1▼線画、▲2▼中間調画、▲3▼連続調画、▲4▼線画と中間調画、▲5▼中間調と連続調画、▲6▼連続調画と線画、▲7▼線画・中間調・連続調画からなるの7通りの何れかであるかを判定し、これに対応した処理モードを自動的にフィルタ、色補正、セレクタ及び階調処理に与えることが示されている。
【0007】
【発明が解決しようとする課題】
しかしながら、上記公報に記載された画像処理方法では、以下のような問題点がある。
【0008】
すなわち、特開平9−261460号公報では、上記閾値のみを調整したものであり、処理内容は同一であるため、判別精度が充分高いわけでなく、また、原稿種別に関わらず、固定した上記閾値を用いて処理を行っているので、判別精度が充分高いわけでない。
【0009】
また、特開平8−251402号公報では、大局的な情報(ヒストグラム)で判定を行っているため、写真でも印画紙写真、印刷写真の区別が不可能であり、さらに原稿中の画像領域が小さい時、または、複数の画像が混在するときなどは判定が難しくなる。したがって、誤判定が生じることもあり得るが、この場合、本来の原稿種類に適合しない画像処理が行われることになり、出力画像の画質に悪影響を及ぼすという問題が発生する。これにより、ミスプリンントの増加、用紙の無駄使いとなり、省資源化という観点から好ましくない。
【0010】
また、手動により処理モードを入力する手順としても、出力された画像が好ましくないので、再度画像を出力する場合、前回の画像情報がなければ、どのように操作モードを切り換えてよいか解らなくなるおそれがある。すなわち、ユーザインターフェースとして不充分である。
【0011】
また、特開平8−251406号公報では、原稿の種別を判定するのに、画素毎に各要素に対するそれぞれの領域分離(画像分離)を行うことは、非常に処理が複雑になるうえに、また、処理を行う回路が非常に大きくなってしまうという問題がある。
【0012】
すなわち、原稿の種別を判定するのに、各画素に対して何らかの判定結果を得るために、どちらとでも判定できる画素の判定を何らかの形で判別を行おうとする。そのための回路が必要となり、夫々で非常に複雑な処理内容必要となり、また処理を行う回路が非常に大きくなってしまうという問題がある。また、単色信号を用いるので、カラー原稿のように同じ画素であっても信号別によって大きく濃度が変わる場合のものや、文字を判定する上で3値化を行うことにより、高濃度、低濃度の画素に対して文字判定を行っているものの、色文字などといった中間濃度の文字の判定などは、対象外となっているため、各画素に対する誤判定が生じることにより、原稿判別結果も誤判定を生じる可能性があるという問題がある。また、網点・文字でないものを印画紙としているため正確さに欠ける。また、副走査方向の解像度が低下したプレスキャンデータに対して対応しきれないという問題もある。
【0013】
本発明は、上記従来の問題点に鑑みなされたものであって、その目的は、入力画像の画像領域や画像種別を判別する際に、簡易な方法で精度よく画像領域や原稿種別を判別する画像処理装置、それを備えた画像形成装置、画像処理方法、その方法を実行可能なプログラム、及びそのプログラムを記録した記録媒体を提供することにある。
【0014】
【課題を解決するための手段】
本発明に係る画像処理装置は、画像入力手段により原稿を走査して読み込まれた入力画像データより原稿の種別を判定する原稿種別判別手段を備え、この判定結果に基づいて画像処理を施す画像処理装置において、前記原稿種別判別手段は、入力画像データの濃度ヒストグラムデータと、前記濃度ヒストグラムデータから画像データとして入力された原稿の下地を判別するための閾値データにより原稿の下地の有無を判定する第1判定手段と、前記第1判定手段により判定された原稿の下地の判定結果と、入力画像データの画素単位で判定することにより得られた入力画像の種類から画像データとして入力された原稿の種別を判定する第2判定手段と、を備えており、前記第1判定手段は、入力画像データから各画素の濃度と、その度数との関係を示す濃度ヒストグラムを作成するヒストグラム作成手段と、上記濃度ヒストグラムにおける最大度数値を第1最大度数値として抽出するとともに、第1最大度数値が属する濃度区分を第1最大度数濃度区分として抽出し、さらに上記の第1最大度数濃度区分に隣接する濃度区分以外で、第2最大度数値を抽出するとともに、第2最大度数値が属する濃度区分を第2最大度数濃度区分として抽出する最大度数濃度区分抽出手段と、べたからなる下地と判別するための第1閾値と、べたおよび網点からなる下地と判別するための第2閾値とを設定する閾値設定手段と、上記の第1最大度数値・第2最大度数値と上記の第1・第2閾値とを比較して、第1最大度数値<第1閾値の場合または第1最大度数値+第2最大度数値<第2閾値の場合、下地なしと判定し、第1最大度数値≧第1閾値の場合または第1最大度数値+第2最大度数値≧第2閾値の場合、下地ありと判定し、その上、下地濃度を算出する下地判定手段と、を有することを特徴とする。
【0015】
本発明に係る画像処理装置は、画像入力手段により原稿を走査して読み込まれた入力画像データより原稿の種別を判定する原稿種別判別手段を備え、この判定結果に基づいて画像処理を施す画像処理装置において、前記原稿種別判別手段は、入力画像データの濃度ヒストグラムデータと、前記濃度ヒストグラムデータから画像データとして入力された原稿の下地を判別するための閾値データにより原稿の下地の有無を判定する第1判定手段と、前記第1判定手段により判定された原稿の下地の判定結果と、入力画像データの画素単位で判定することにより得られた入力画像の種類から画像データとして入力された原稿の種別を判定する第2判定手段と、を備えており、前記第2判定手段は、入力画像データから抽出された複数の画素にてなるブロックのある注目画素に対して、主走査方向の画像データと、前記第1判定手段により判定された原稿の下地の判定結果から特徴量を抽出し、該注目画素がべた、写真、文字または網点のいずれの種類に属するかの判定を行う注目画素判定手段と、注目画素の周辺に存在する周辺画素に対して、主走査方向の画像データと、前記第1判定手段により判定された原稿の下地の判定結果から特徴量を抽出し、該周辺画素がべた、写真、文字または網点のいずれの領域に属するかの判定を行う周辺画素判定手段と、前記注目画素の副走査方向前段に存在する同じラインの周辺画素判定手段の判定結果に基づいて、該副走査方向前段に存在するラインがべた、写真、文字または網点のいずれの種類に属するかの判定を行う上ライン判定手段と、前記注目画素の副走査方向後段に存在する同じラインの周辺画素判定手段の判定結果に基づいて、該副走査方向後段に存在するラインがべた、写真、文字または網点のいずれの種類に属するかの判定を行う下ライン判定手段と、を有し、前記注目画素判定手段、前記上ライン判定手段及び前記下ライン判定手段の判定結果に基づいて、注目画素がべた、写真、文字または網点のいずれの種類に属するかの判定を行うことを特徴とする。
【0016】
本発明に係る画像処理装置は、画像入力手段により原稿を走査して読み込まれた入力画像データより原稿の種別を判定する原稿種別判別手段を備え、この判定結果に基づいて画像処理を施す画像処理装置において、前記原稿種別判別手段は、入力画像データの濃度ヒストグラムデータと、前記濃度ヒストグラムデータから画像データとして入力された原稿の下地を判別するための閾値データにより原稿の下地の有無を判定する第1判定手段と、前記第1判定手段により判定された原稿の下地の判定結果と、入力画像データの画素単位で判定することにより得られた入力画像の種類から画像データとして入力された原稿の種別を判定する第2判定手段と、を備えており、前記第1判定手段は、入力画像データから各画素の濃度と、その度数との関係を示す濃度ヒストグラムを作成するヒストグラム作成手段と、上記濃度ヒストグラムにおける最大度数値を第1最大度数値として抽出するとともに、第1最大度数値が属する濃度区分を第1最大度数濃度区分として抽出し、さらに上記の第1最大度数濃度区分に隣接する濃度区分以外で、第2最大度数値を抽出するとともに、第2最大度数値が属する濃度区分を第2最大度数濃度区分として抽出する最大度数濃度区分抽出手段と、べたからなる下地と判別するための第1閾値と、べたおよび網点からなる下地と判別するための第2閾値とを設定する閾値設定手段と、上記の第1最大度数値・第2最大度数値と上記の第1・第2閾値とを比較して、第1最大度数値<第1閾値の場合または第1最大度数値+第2最大度数値<第2閾値の場合、下地なしと判定し、第1最大度数値≧第1閾値の場合または第1最大度数値+第2最大度数値≧第2閾値の場合、下地ありと判定し、その上、下地濃度を算出する下地判定手段と、を有し、前記第2判定手段は、入力画像データから抽出された複数の画素にてなるブロックのある注目画素に対して、主走査方向の画像データと、前記第1判定手段により判定された原稿の下地の判定結果から特徴量を抽出し、該注目画素がべた、写真、文字または網点のいずれの種類に属するかの判定を行う注目画素判定手段と、注目画素の周辺に存在する周辺画素に対して、主走査方向の画像データと、前記第1判定手段により判定された原稿の下地の判定結果から特徴量を抽出し、該周辺画素がべた、写真、文字または網点のいずれの領域に属するかの判定を行う周辺画素判定手段と、前記注目画素の副走査方向前段に存在する同じラインの周辺画素判定手段の判定結果に基づいて、該副走査方向前段に存在するラインがべた、写真、文字または網点のいずれの種類に属するかの判定を行う上ライン判定手段と、前記注目画素の副走査方向後段に存在する同じラインの周辺画素判定手段の判定結果に基づいて、該副走査方向後段に存在するラインがべた、写真、文字または網点のいずれの種類に属するかの判定を行う下ライン判定手段と、を有し、前記注目画素判定手段、前記上ライン判定手段及び前記下ライン判定手段の判定結果に基づいて、注目画素がべた、写真、文字または網点のいずれの種類に属するかの判定を行うことを特徴とする。
【0043】
本願発明において、入力画像データより原稿の種別を自動的に判定する原稿種別判別手段により、下地の有無による結果を原稿種別の判別に利用できるので、原稿種別の判定精度が向上する。
また、閾値を固定するのではなく、各々の原稿の種類に応じて閾値を設定し、原稿種別の判別を行うに当たり、予め定められた度数以上の特定の画像データのみを抽出することができるので、判別精度を向上することができる。
また、不確定な要素を有する画素を除き、どの領域に属するかが明らかな画素のみを抽出して原稿種別の判別を行うので、原稿種別の判別精度を上げることができる。
さらに、原稿種別判別手段が原稿を判別できない場合、デフォルトの画像モードで処理を行うのではなく、原稿種別が不確かであるのを表示手段に表示し、ユーザに処理モードの入力を促すことができる。これにより、原稿種別判別手段が原稿を判別できない場合であっても、ユーザが入力手段を介して処理モードを選択するので、本来の原稿種別に応じた画像処理を実行することができる。
【0044】
【発明の実施の形態】
以下に、本発明の実施の形態について図面を用いて説明する。
【0045】
図1に示すように、本実施の形態に係る画像形成装置10は、カラー画像入力装置(画像入力手段)2、画像処理装置1、カラー画像出力装置3、および操作パネル4から構成されている。
カラー画像入力装置2は、例えば、スキャナ部より構成されており、原稿からの反射光像をRGB(R:赤・G:緑・B:青)アナログ信号としてCCD(Charge Coupled Device)にて読み取るものである。
カラー画像出力装置3は、画像処理装置1にて所定の画像処理を行い、その結果を出力する装置である。
【0046】
画像処理装置1は、A/D(アナログ/デジタル)変換部11、シェーディング補正部12、原稿種別自動判別部13、入力階調補正部14、色補正部15、黒生成下色除去部16、空間フィルタ処理部17、出力階調補正部18、階調再現処理部19、および領域分離処理部20からなっている。
【0047】
A/D変換部11は、画像入力装置2にて読み取ったアナログ信号をデジタル信号に変換するものである。
シェーディング補正部12は、画像入力装置2の照明系・結像系・撮像系で生じる各種歪みを取り除くためのシェーディング補正を行うものである。
【0048】
原稿種別自動判別部13は、シェーディング補正部12にて各種の歪みが取り除かれたRGB信号(RGBの反射率信号)に対して、濃度信号などカラー画像処理装置に採用されている画像処理システムの扱い易い信号に変換すると共に、入力された原稿画像が、文字原稿、印刷写真原稿、印画紙写真であるか、あるいはそれらを組み合わせた文字/印刷写真原稿であるかなど原稿種別の判別を行うものである。なお、詳細については後述する。
【0049】
入力階調補正部14は、カラーバランスを整えると同時に、上記原稿種別自動判別部13の判定結果を基に下地領域濃度の除去やコントラストなどの画質調整処理を施こすものである。
【0050】
色補正部15は、色再現の忠実化実現のために、不要吸収成分を含むCMY(C:シアン・M:マゼンタ・Y:イエロー)色材の分光特性に基づいた色濁りを取り除く色補正処理を行うものである。色補正処理された画像信号は、領域分離処理部20にて、上記原稿種別自動判別部13の判定結果を基に画素毎に文字、網点、写真(その他)領域の何れかに分離される。この領域分離処理部20は、分離結果に基づき、画素がどの領域に属しているかを示す領域識別信号を、黒生成下色除去部16、空間フィルタ処理部17、および階調再現処理部19へと出力する。
【0051】
黒生成下色除去部16は、色補正後のCMYの3色信号から黒(K)信号を生成する黒生成処理を行う一方、元のCMY信号から黒生成で得たK信号を差し引いて新たなCMY信号を生成する下色除去処理を行うものである。そして、これらの処理(黒生成処理・下色除去処理)の結果、CMYの3色信号はCMYKの4色信号に変換される。
【0052】
空間フィルタ処理部17は、デジタルフィルタによる空間フィルタ処理を行い、空間周波数特性を補正することによって、出力画像のボヤケや粒状性劣化を防ぐものである。
出力階調補正部18は、濃度信号等の信号を、画像出力装置3の特性値である網点面積率に変換する出力階調補正処理を行うものである。
階調再現処理部19は、最終的に画像を画素に分割してそれぞれの階調を再現できるように処理する階調再現処理(中間調生成処理)を行うものである。
【0053】
なお、領域分離処理部20により黒文字や場合によっては色文字として抽出された画像領域に関しては、黒文字あるいは色文字の再現性を高めるために、空間フィルタ処理部17における鮮鋭度強調処理において、高域周波数の強調量を大きくされる。同時に、中間調生成処理では高周波数再現に適した高解像のスクリーンでの二値化又は多値化処理が選択される。
【0054】
一方、領域分離処理部20により網点と判別された領域に関しては、空間フィルタ処理部17において、入力網点成分を除去するためのローパス・フィルタ処理が施される。同時に、中間調生成処理では、階調再現性を重視したスクリーンでの二値化又は多値化処理が行われる。
【0055】
操作パネル4は、表示部である液晶ディスプレーと、テンキー、コピーボタン、処理モード等の設定を行う入力部としての設定ボタンより構成される。後述するが、本実施の形態では原稿種別自動判別部13における判別結果が液晶ディスプレーを介してユーザに表示される。そして、ユーザは、判別結果を基に設定ボタン等を介して処理モードを選択入力することができる。
【0056】
このように、上述した各処理が施された画像データは、一旦図示しない記憶手段に記憶され、所定のタイミングで読み出されてカラー画像出力装置3に入力される。なお、上記の処理はCPU(Central Processing Unit)により行われる。
【0057】
なお、この画像出力装置3は、画像データを記録媒体(例えば紙等)上に出力するもので、例えば、電子写真方式やインクジェット方式を用いたカラー画像出力装置等を挙げることができるが、特に限定されるものではない。
【0058】
本発明の特徴は、画像形成装置10の画像処理装置1にあり、特に、原稿種別自動判別部13に特徴がある。従って、以下に原稿種別自動判別部(原稿種別判別手段)13の実施形態について詳しく説明する。
【0059】
<第1実施形態>
図2は、第1実施形態における原稿種別自動判別部13−1を示すブロック図である。
まず、第1実施形態の原稿種別自動判別部13−1は、図2に示すように、信号変換部21と、第1判定部(第1判定手段)31と、第2判定部(第2判定手段)41とから構成されている。
【0060】
信号変換部21は、RGBの反射率信号を濃度信号に変換するとともにRGB濃度信号から補色のCMY信号に変換するものである。
第1判定部31は、ヒストグラム作成部(ヒストグラム作成手段)32、最大度数濃度区分抽出部(最大度数濃度区分抽出手段)33、閾値設定部(閾値設定手段)34、および下地判定部(下地判定手段)35から構成されている。そして、この第1判定部31が、原稿に下地が有るか無いかを判定し、下地が有ると判定された濃度区分を下地濃度区分とする。
【0061】
ヒストグラム作成部32は、原稿画像の各画素の濃度と、その度数との関係を示す濃度ヒストグラムを作成するものである。具体的には、図4に示すように、スキャナ(画像入力装置1)の例えば、往路(フィード)時に読み込まれた主走査方向の画像データ(図4(b)参照)より、複数の画素の平均値(例えば、7×7の画素:図4(b)参照)を算出し濃度ヒストグラム(図4(a)参照)を作成する。これは、例えば、図3(b)に示すように、下地が網点(下地(網点))で形成されている場合、画素毎に濃度ヒストグラムを作成すると、図3(a)のように最大度数値を2つ有する特性を示し、最大度数値が小さくなり下地として検出できなくなるおそれがある。一方、図4(b)のように、複数の画素の平均値を求めて濃度ヒストグラムを作成すると、図4(a)のように、ある濃度区分に1つの最大度数値を有する特性を示し、下地として検出することが可能となる(べたの下地では、複数の画素の平均値と下地領域の画素の濃度値はほとんど同じであり、最大度数値を有する濃度区分は変わらない。)。
【0062】
最大度数濃度区分抽出部33は、図5〜図7に示すように、ヒストグラム作成部32にて作成された上記濃度ヒストグラムにおける最大度数値を第1最大度数値(MAX1)として抽出するとともに、MAX1が属する濃度区分を第1最大度数濃度区分として抽出する。
さらに、最大度数濃度区分抽出部33は、上記の第1最大度数濃度区分に隣接する濃度区分以外で、第2最大度数値(MAX2)を抽出するとともに、MAX2が属する濃度区分を第2最大度数濃度区分として抽出する。つまり、少なくともMAX1をとる濃度区分に隣接しない濃度区分における2番目に大きな度数値をMAX2として抽出する。
【0063】
閾値設定部34は、べたからなる下地と判別するための第1閾値と、べたおよび網点からなる下地と判別するための第2閾値とを設定する。
下地判定部35は、MAX1・MAX2と第1・第2閾値とを比較して、以下のような判定を行う。
【0064】
MAX1≧第1閾値の場合、下地ありと判定し、MAX1が属する濃度区分を下地濃度区分とする。この判定は、例えば、図5に示すように、べたの下地からなる文字原稿での第1最大度数濃度区分(いわゆる白地)が、他の濃度値に比して高いことを利用している。
【0065】
MAX1+MAX2≧第2閾値の場合、下地ありと判定し、MAX1とMAX2が属する濃度区分を下地濃度区分とする。この判定は、例えば、図6に示すように、べた・網点の下地からなる文字原稿での、白地を示す第1最大度数濃度区分と、網点の下地を示す第2最大度数濃度区分とが、他の濃度値に比して高いことを利用している。
【0066】
MAX1第1閾値の場合、あるいはMAX1+MAX2第2閾値の場合、下地なしと判定する。この判定は、例えば、図7に示すように、印画紙からなる写真原稿において、第1最大度数濃度区分は、他の濃度値に比して際だって高くはならないことを利用している。
【0067】
次に、第2判定部41の説明を行う。
先ず、第2判定部41は、図2に示すように、上記の信号変換部21により変換された各色成分の信号において、処理対象画素がべた、つまり濃度が略一定の領域、印画紙(写真)、文字、網点のいずれの領域に属するかの判定を行う色成分の信号(C・M・Y)ごとに設けられた信号処理部42(42c・42m・42y)と、これら各信号処理部42c・42m・42yによる色成分の信号ごとの信号処理の結果に基づき、最終的に注目画素がべた、印画紙、文字又は網点のいずれの種類に属するかの判定を行う給合判定手段としての総合判定部47により構成されている。
【0068】
上記の各信号処理部42c・42m・42yは、図2に示すように、注目画素判定部45、周辺画素判定部48(48a・48b・48c・48d・48e・48f)と、上ライン判定部43、下ライン判定部44、信号別判定部46とから構成されている。
【0069】
注目画素判定部45は、注目画素を中心とする例えば3×3等のn×nのブロックにおいて、主走査方向の画像データから注目画素の特徴量を抽出し、当該注目画素Xに対して、べた、印画紙、文字又は網点のいずれの種類に属するかの判定を行う注目画素判定手段である。
【0070】
周辺画素判定部48は、注目画素判定部45と注目画素の周辺に存在する例えば周辺画素a・b・c・d・e・fについても上記注目画素判定部45と同様の処理を行い、各周辺画素a・b・c・d・e・fの種類判定を行う周辺画素判定手段である。
【0071】
上ライン判定部43は、注目画素Xの上部つまり副走査方向前段にある周辺画素a・b・cのそれぞれの周辺画素判定結果に基づいて注目画素Xに対する上ラインの判定を行う上ライン判定手段である。
下ライン判定部44は、注目画素Xの下部つまり副走査方向後段にある周辺画素d・e・fの周辺画素判定結果に基づいて注目画素Xに対する下ラインの判定を行う下ライン判定手段である。
【0072】
信号別判定部46は、これら注目画素判定部45、上ライン判定部43および下ライン判定部44の各判定結果に基づき、各信号別の判定を行う信号別判定手段である。そして、上記各信号処理部42c・42m・42yにおける信号別判定部46の判定結果に基づき、前述した総合判定部47により、注目画素Xがべた、印画紙、文字又は網点のいずれの種類に属するかの最終的な判定が行なわれる。
【0073】
なお、上記の例では、周辺画素a・b・c・d・e・fの種類判別を行うにあたり、周辺画素a・b・c・d・e・fごとに周辺画素判定部48a・48b・48c・48d・48e・48fを設けている。
【0074】
しかし、必ずしもこれに限らず、周辺画素判定部48a・48b・48c・48d・48e・48fを一つにし、周辺画素a・b・c・d・e・fの判別結果を、上ライン判定部43や下ライン判定部44に順次格納し、その結果を基に上ライン・下ラインの判定を行うようにしてもよい。すなわち、周辺画素判定部48a・48b・48c・48d・48e・48fはいずれも同じ処理を行うものゆえ、周辺画素判定部を一つにして、それを共有して時系列的に処理を行うことが可能である。
このときには、周辺画素a・b・c・d・e・fに対して、最初に周辺画素aの判定処理を行い、次に、周辺画素b、周辺画素c、…、周辺画素fと順次各判定処理を行う。
【0075】
また、注目画素Xの前段に存在する周辺画素a・b・cについては、各々の判別結果を上ライン判定部32に格納する一方、注目画素Xの後段に存在する周辺画素d・e・fについては、各々の判別結果を下ライン判定部44に格納する。そして、所定数の判別結果が格納された後、それぞれの結果を基に上ラインおよび下ラインの判定を行うようにする。
【0076】
また、上ライン判定部43および下ライン判定部44での各判定処理や、信号別判定部46に入力される上ライン判定部43、注目画素判定部45および下ライン判定部44の各判定結果、あるいは総合判定部47に入力される各信号別判定部46・46・46からの色成分毎の各信号の各判定結果に対しては、それぞれ優先順位を決めておく。そして、信号別判定部46や総合判定部47に入ってくる画素の判定結果がそれぞれ異なる場合、信号別判定部46および総合判定部47の優先順位にしたがって判別を行う。例えば、色成分毎で判定結果が異なる場合、網点>文字>印画紙>下地とする。これは、各色成分で網点、文字という結果が得られている場合、反転回数が大きいと判断されており、これは文字では見られない特徴であることより網点が優先される。
【0077】
なお、優先順位については、第1判定部31で用いられる第1・第2閾値により判定結果の信頼度が変わるため、前記判定結果の信頼度に基づき優先順位を決めることが望ましい。
【0078】
また、上ライン判定部43および下ライン判定部44での各判定処理の優先順位については、各上ライン判定部43および下ライン判定部44では、複数の周辺画素a・b・cおよび周辺画素d・e・fの結果を基に、上ラインおよび下ラインの判定処理を行い、各周辺画素a・b・cおよび各周辺画素d・e・fの結果が異なる場合、優先順位により最終的な判断をする。
優先順位は、例えば、画素の判別処理に用いる閾値の設定に基づいて事前に決めておく。
【0079】
今、周辺画素aがべた、周辺画素bが網点であると判別されているとする。この場合、網点を抽出する際の閾値が網点を抽出し難いレベルに設定され、他の領域の閾値は網点の抽出レベルと比較して緩く設定されているにも関わらず、網点と判別されているときには、この結果に対する信頼性は高くなると判断される。このような情報を基にして優先順位を決定する。
【0080】
次に、上記の注目画素判定部45の構成を図8に基づいて説明する。なお、本実施の形態においては、各周辺画素判定部48a・48b・48c・48d・48e・48fも、この注目画素判定部45と同じ判定機構を有しているが、説明は、注目画素判定部45についてのみ行う。
【0081】
注目画素判定部45は、同図に示すように、隣接画素濃度差算出部51、立ち上り・立ち下り判定部52、反転数算出部53、画素判定部54、べた画素判定閾値設定部55、立ち上り・立ち下り判定閾値設定部56、および反転数閾値設定部57から構成されている。
【0082】
隣接画素濃度差算出部51は、上記注目画素Xを含む主走査方向の隣接画素の濃度差(隣接画素濃度差)を算出するものである。
立ち上り・立ち下り判定部52は、図13〜図16に示すように、算出された隣接画素濃度差に基づいて、注目画素Xがべた、印画紙に属しているか否か、あるいは、立ち上り画素か立ち下り画素を判別するものである。なお、図13〜図16の詳細は、後述するものとする。
【0083】
反転数算出部53は、注目画素Xに対して主走査方向の一定領域つまりM画素(Mは2以上の整数)の間に立ち上り画素又は立ち下り画素が複数続いてもカウントせず、立ち上りから立ち下りおよび立ち下りから立ち上りに反転する回数をカウントするものである。
画素判定部54は、算出された反転数に基づいて注目画素Xが文字、網点かを判別し、さらに、網点と判別された画素に対して、濃度値を下地判定部35で検出された下地(網点)の濃度と比較し、網点か下地(網点)かの判定を行うものである。
【0084】
べた画素判定閾値設定部55は、上記の立ち上り・立ち下り判定部52に備えられており、隣接画素濃度差算出部51にて算出された注目画素Xの結果に対し、注目画素Xがべたに属するか否かを判定するためのべた画素判定閾値を設定するものである。なお、このべた画素判定閾値設定部55は、下地が小さく、下地判定部35で下地領域なしと判断された場合でも、べたからなる下地領域を分離できる。
【0085】
立ち上り・立ち下り判定閾値設定部56は、上記のべた画素判定閾値設定部55同様、立ち上り・立ち下り判定部52に備えられており、隣接画素濃度差算出部51にて算出された注目画素Xの結果に対して、注目画素Xが立ち上り画素又は立ち下り画素であるかを判定するための立ち上り・立ち下り判定閾値を設定するものである。
【0086】
反転数閾値設定部57は、上記画素判定部54に備えられており、上記の反転数算出部53にて算出された反転数に基づいて、注目画素Xが文字に属するか網点に属するかを判別する第3の閾値としての反転数閾値を設定するものである。
【0087】
次に、上述した信号変換部21・第1判定部31・第2判定部41における画像判定の方法を図9、及び図10に示すフローチャートに基づいて説明する。また、ステップを示す符号は「S」とする。
【0088】
まず、最初に、信号変換部21が、RGBの反射率信号を濃度信号に変換するとともにRGB濃度信号から補色のCMY信号に変換する(S1)。次に、ヒストグラム作成部32が、原稿画像の各画素の濃度と、その度数との関係を示す濃度ヒストグラムを作成する(S2)。そして、最大度数濃度区分抽出部33が、第1・第2最大度数濃度区分を抽出する(S3)。その後、下地判定部35が、下地領域の有無を判定し、下地領域があれば下地濃度区分とする(S4)。なお、上記のSl〜S4までの画像処理が第1判定工程に相当する。
【0089】
次に、信号変換部21が再度RGBの反射率信号を濃度信号に変換するとともにRGB濃度信号から補色のCMY信号に変換し(S5)、第2判定部41に出力する。変換されたCMY信号は、第2判定部41の注目画素判定部45に入力され、隣接画素濃度差算出部51が上記注目画素Xを含む主走査方向の隣接画素との濃度差を算出する(S6)。
【0090】
そして、立ち上り・立ち下り判定部52が、算出された隣接画素濃度差の絶対値とべた画素判定閾値との比較を行う(S7)。算出された隣接画素濃度差の絶対値がべた画素判定閾値より小さい時、立ち上り・立ち下り判定部52では、画素濃度が、「下地濃度の最大値>画素濃度>下地濃度の最小値」の関係を満たすか否かを確認する(S9)。そして、満たす場合、下地(べた)であると判定し(S10)、満たさない場合、印画紙写真と判定する(S11)。なお、下地濃度の最小値・最大値は、下地判定部35にて求めている。下地濃度の最小値・最大値は、下地と判定された濃度区分の最小値と最大値のことである。
【0091】
一方、S7において、隣接画素濃度差の絶対値の方が大きい画素については、立ち上り・立ち下り判定部52が、算出された隣接画素濃度差の絶対値と、立ち上り・立ち下り判定閾値との比較を行う(S8)。
【0092】
なお、立ち上り・立ち下り判定閾値よりも隣接画素濃度差の絶対値の方が大きい画素であって、かつ隣接画素濃度差が正の画素は、立ち下り画素と判定される。また、立ち上り・立ち下り判定閾値よりも隣接画素濃度差の絶対値の方が大きい画素であって、かつ隣接画素濃度差が負の画素は立ち上り画素と判定される。
【0093】
この例では、隣接画素濃度差は左側の画素の濃度値から右側の画素の濃度値を引くことにより求め、それに応じて正負を判定している。また、濃度差を基に左側の画素に対して立ち上り画素・立ち下り画素の判定を行うものである。
そして、S8にて、立ち上り・立ち下り判定閾値が隣接画素濃度差の絶対値よりも大きい場合、印画紙と判定する(S11)。
【0094】
次に、S8において、立ち上り・立ち下り判定閾値よりも隣接画素濃度差の絶対値の方が大きい画素であると判定されたときには、反転数算出部53が反転数算出を行う(S12)。
【0095】
この反転数算出においては、図11に示すように、主走査方向の例えば30画素等のM画素からなる一定領域の間において、立ち上り画素あるいは立ち下り画素が複数続いてもカウントせず、立ち上り画素から立ち下り画素に反転するところ、及び立ち下り画素から立ち上り画素に反転するところを検出してカウントされる。
【0096】
具体的には、図11に示すように、左側から5番目及び6番目の画素は両方とも立ち上り画素「1」と判定されているが、反転数を求める時は5番目の画素のみカウントし、6番目の画素についてはカウントしない。こうして、図12に示すように、n×nの各画素に対して、主走査方向の例えば30画素等のM画素からなる一定領域の立ち上り画素・立ち下り画素の判定を行う。なお、図12に示す一定領域は、立ち上り画素・立ち下り画素の判定を行う場合の主走査方向の一定領域の範囲を示すものであり、周辺画素毎にラインメモリが設けられていることを示すものではない。
【0097】
次に、S12において上述した反転数が算出されると、画素判定部54は、カウントされた反転数に対して反転数閾値との比較を行う(S13)。そして、反転数閾値よりも反転数の方が小さければ、文字であると判定する(S14)。
【0098】
一方、反転数閾値よりも反転数の方が大きいければ、画素判定部54では、画素濃度が、「下地濃度の最大値>画素濃度>下地濃度の最小値」の関係を満たすか否かを確認する(S15)。そして、満たす場合、下地(網点)であると判定し(S17)、満たさない場合、網点と判定する(S16)。なお、下地濃度の最小値・最大値は、上記の場合と同様に下地判定部35にて求めている。
【0099】
このようにして判定処理を行い、さらに前述した優先順位を加味して、注目画素に対する最終の判定結果が得られる。画素毎の判定結果は、総合判定部47で夫々カウントされ、予め定められている閾値と比較されて原稿種別の判別がなされる。例えば、文字と網点が閾値以上であるならば、原稿は文字/印刷写真原稿であると判定される。文字と下地(網点)が閾値以上の場合、下地(網点)はべたの下地と同じ処理を行えば良いので、例えば、文字原稿であると判別する。
以上のように、本発明の画像処理では、下地判定部35によって求めた下地濃度の最小値・最大値を用いて、原稿種類判別を行うことができる。上記S5からS17までの処理が第2判定工程に相当する。
【0100】
以上説明した、第1判定部による下地の有無を判定する処理(第1判定工程)と第2判定部による、下地の有無に基づいて特徴量を抽出し、原稿種別の判定を行う処理(第2判定工程)は、夫々1回ずつ原稿を走査する(本スキャンを行う前に2回プレスキャンを行う)ことにより行っても良いが、画像入力装置2で原稿画像をプレスキャンする時の往路(フィード)時に第1判定工程を行い、復路(リターン)時に第2の判定工程を行うことが望ましい。このようにすることで、プレスキャンの復路を有効に利用することができ、原稿種別の判別精度を向上させることができる。
【0101】
ここで、それぞれの画像の種別による濃度分布の代表例を、図13〜図16に示す分布図に基づいて説明する。なお、同図の縦軸は濃度値を示す。
通常、べたの画像の濃度分布図は、図13に示すように、濃度変化が少ないため隣接画素濃度差は非常に小さい。したがって、べた画素判定閾値よりも隣接画素濃度差が小さいものはべたであると判別することが可能である。
【0102】
次に、印画紙写真の画像の濃度分布図は、図14に示すように、滑らかな濃度変化をしており、隣接画素濃度差も小さく、べたよりは若干大きくなるため、べた画素判定閾値よりも隣接画素濃度差が大きく、立ち上り・立ち下り判定閾値よりも小さいものは印画紙写真であると判別することが可能である。また、印画紙写真においても隣接画素濃度差は非常に小さいべたの領域が存在するので、このような領域については、上記したように画素濃度が、「下地濃度の最大値>画素濃度>下地濃度の最小値」の関係を満たすか否かを確認することにより、下地のべた領域と区別することが可能である。
【0103】
また、網点の画像の濃度分布図は、図15に示すように、隣接画素濃度差は大きく立ち上り画素と立ち下り画素も網点の数だけ存在し、反転数が非常に大きくなるため、隣接画素濃度差が立ち上り・立ち下り判定閾値よりも大きく、反転数が反転数閾値よりも多いものは網点であると判別することが可能である。また、上記したように画素濃度が、「下地濃度の最大値>画素濃度>下地濃度の最小値」の関係を満たすか否かを確認することにより、下地(網点)と区別することが可能である。
【0104】
最後に、文字の画像の濃度分布図は、図16に示すように、隣接画素濃度差は非常に大きいが、立ち上り画素と立ち下り画素の数は文字のエッジ部分で存在するため、網点よりは反転数は少なくなるため、反転数が反転数閾値よりも少ないものは文字であると判別することが可能である。
【0105】
また、上記設定した各閾値においては、任意に調節することにより、より広範囲な処理を行うことが可能となる。そして、これらの閾値については予想される複数の値を予めROM(Read Only Memory)等に記憶させておき、必要に応じてスイッチ等により、メモリ等の図示しない記憶手段に格納される値を設定できるようにしておけばよい。
【0106】
上述した処理動作によって、原稿の種類(画像の種類)が判定され、その結果に基づいて、図1に示すように、それ以降の入力階調補正・色補正・黒生成下色除去処理・空間フィルタ処理・階調再現処理・領域分離処理が切り換わる。
【0107】
以下、その切り換えの一例を示す。
【0108】
例えば、文字原稿であると判断された場合には、領域分離処理部20では、文字、線画として領域分離されたところを有効とし、網点、印画紙といった連続階調と判別されたところは誤分離とみなし(文字原稿であったとしても、原稿の種類によっては誤判別される場合があるため)、反映させないようにする。入力階調補正部14、階調再現処理部19では、ハイライトを多めに除去したり、コントラストを大きくするような補正曲線が用いられたりする。色補正部15・黒生成下色除去部16では、色文字に対して彩度を重視した色補正処理を行い、黒文字に対して黒生成下色除去処理では黒生成量を多めに設定する。空間フィルタ処理部17では、文字に対して空間フィルタ処理でエッジを強調し、平滑化処理を弱くするようにフィルタ係数を設定するなどのパラメータの切り換えを行う。
【0109】
また、文字/印画紙写真原稿と判断された場合には、各処理において文字原稿処理と印画紙写真原稿処理の中間パラメータを用いた処理が行われる。そして、・領域分離処理部20では、文字、線画あるいは印画紙として領域分離されたところを有効とし、網点といった領域分離されたところは誤分離とみなし(文字・印画紙原稿であったとしても、原稿の種類によっては誤判別される場合があるため)、反映させないようにする。入力階調補正部14、階調再現処理部19では、文字原稿あるいは印画紙写真原稿のどちらを重視するかにより、印画紙写真原稿処理と文字原稿処理との中間のパラメータを用いてハイライトの除去やコントラストの調整を行う。色補正部15・黒生成下色除去部16では、彩度の強弱や階調性のバランスが極端にならないような色補正処理を行う。黒生成下色除去処理では、印画紙写真画像に影響が出ない程度に黒生成量の調整が行われる。
【0110】
<第2実施形態>
次に、本発明の第2実施形態である原稿種別自動判別部13−2について説明する。
第1実施形態では、第1判定部31・第2判定部41からなる原稿種別自動判別部13によって、原稿の種類を判定していた。しかし、本発明では、第2判定部41のみからなる原稿種別自動判別部13−2によって、原稿の種類を判定することもできる。
【0111】
図17は、第2実施形態における原稿種別自動判別部13−2を示すブロック図である。なお、第1実施形態で用いた部分と同様の機能を有する部分については、同一の符号を付記し、その説明を省略する。なお、本発明はこれに限定されるものではない。
【0112】
この図に示すように、構成は、図2の第2判定部41とほぼ同様である。しかし、注目画素判定部145・周辺画素判定部148(148a・148b・148c・148d・148e・148f)の構成が第1実施形態の注目画素判定部45・周辺画素判定部48と異なる。従って、注目画素判定部145・周辺画素判定部148について説明する。なお、周辺画素判定部148は、この注目画素判定部145と同じ判定機構を有しているので、説明は、注目画素判定部145についてのみ行う。
【0113】
図18に示すように、注目画素判定部145は、第1実施形態の注目画素判定部45と同様の隣接画素濃度差算出部51、反転数算出部53、画素判定部154、べた画素判定閾値設定部55、立ち上り・立ち下り判定閾値設定部56、反転数閾値設定部57に加えて、比較閾値設定部61が備わっている。尚、立ち上り・立ち下り判定部52は備えられていない。
【0114】
比較閾値設定部61は、画像の特徴量である反転数・隣接画素濃度差・度数からなる3次元の度数分布図を作成し、原稿の種別を精度良く判別するために、読み込まれる原稿毎に適切な閾値を設定する。画素判定部154は、比較閾値設定部61で設定された閾値を用いて、(1)反転数閾値と反転数との比較判定、(2)立ち上り・立ち下り判定閾値と隣接画素濃度差の絶対値との比較判定、(3)べた画素判定閾値と隣接画素濃度差の絶対値との比較判定を画素毎に行うものである。
【0115】
ここで、各原稿種類(下地・印刷紙、文字、網点)の隣接画素濃度差と反転数と度数との関係について図19及び図20を用いて説明する。なお、これらの図においては、X軸:反転数、Y軸:隣接画素濃度差、Z軸:度数を示しており、通常の各領域の度数分布を示している。尚、図19及び図20では簡略化のため、Z軸の度数分布を省いたX−Y平面の分布を示している。
【0116】
図19に示すように、通常、下地・印画紙(印画紙写真)、文字、および網点とが現れる。下地・印画紙写真では、反転数・隣接画素濃度差は少ない領域に現れる傾向がある。文字、網点については、共に隣接画素濃度差が、広範囲に渡って現れるが、反転数は、網点の方が多くなって現れる傾向がある。
【0117】
ところで、この図に示すように、文字と網点とが交わる領域が存在する。そこで、図20に示すように、文字・網点が顕著に現れる箇所に閾値を設けて、原稿判別処理を行う。これは、例えば、反転数・隣接画素濃度差・度数からなる3次元の度数分布図を作成し、文字・網点領域が重複しないように閾値を定める。
【0118】
具体的には、文字領域・網点領域の度数が予め定められる値以上となる閾値を定める。
【0119】
文字領域については、立ち上り・立ち下り判定閾値1、立ち上り・立ち下り判定閾値2および反転数閾値1、反転数閾値2により規定される。立ち上り・立ち下り判定閾値1、立ち上り・立ち下り判定閾値2は、隣接画素濃度差に基づいて定める。図19に示すように、隣接画素濃度差よりある程度文字が現れる箇所が特定できるので、その箇所の上限および下限を閾値として設定する。反転数閾値1、反転数閾値2は、上記の立ち上り・立ち下り判定閾値1、立ち上り・立ち下り判定閾値2の範囲内で頻出した反転数の範囲の上限(反転数閾値2)と下限(反転数閾値1)として定める。
【0120】
網点領域に対しては、反転数閾値3・反転数閾値4および立ち上り・立ち下り判定閾値3、立ち上り・立ち下り判定閾値4で規定される。反転数閾値3・反転数閾値4は、図19に示すように、反転数よりある程度網点が現れる箇所が特定できるので、その箇所の上限および下限を閾値に設定する。立ち上り・立ち下り判定閾値3、立ち上り・立ち下り判定閾値4は、上記の反転数閾値3、反転数閾値4の範囲内で頻出した隣接画素濃度差の上限(立ち上り・立ち下り判定閾値4)と下限(立ち上り・立ち下り判定閾値3)として定める。
本発明は、以上のように、文字領域または網点領域に属すると判定される確度の高い画素のみを抽出して、原稿種別の判別精度を向上させるものである。
【0121】
また、図21に示すように、メモリ領域を削減するために、文字・網点に対して計数する領域を決めておいても良い。すなわち、文字では、1枚の原稿に対して反転数は変化するが、隣接画素濃度差はさほど変わらない。そのため、反転数の計数幅を狭く、隣接画素濃度差を広く計数するよう設定にしている。一方、網点では、1枚の原稿に対して隣接画素濃度差は変化するが、反転数はさほど変わらない。
そのため、反転数の計数幅を広く、隣接画素濃度差を狭く計数するように設定している。
【0122】
次に、図22及び図23に示す上記注目画素判定部145による処理方法についてフローチャートを用いて説明する。
まず、最初に、信号変換部21が、RGBの反射率信号を濃度信号に変換するとともにRGB濃度信号から補色のCMY信号に変換する(S21)。次に、反転数算出部53が、反転数を算出し(S22)、隣接画素濃度差算出部51が、主走査方向の隣接画素間との濃度差を算出する(S23)。
【0123】
そして、比較閾値設定部61は、反転数・隣接画素濃度差・度数からなる3次元の度数分布図を作成する(S24)。そして、その分布図から、文字を確実に検出する、立ち上り・立ち下り判定閾値1、立ち上り・立ち下り判定閾値2、反転数閾値1、反転数閾値2および網点を確実に検出する、立ち上り・立ち下り判定閾値3、立ち上り・立ち下り判定閾値4、反転数閾値3、反転数閾値4を設定する(S25)。立ち上り・立ち下り判定閾値1〜4は、立ち上り・立ち下り判定閾値設定部56に記憶され、反転数閾値1〜4は反転数閾値設定部57に記憶される。ここまでの処理は、図17に示した原稿種別自動判別部13−2の注目画素判定部145のみで行われ、以下に説明する処理では、原稿種別自動判別部13−2の全ての処理部が動作する。
【0124】
次に、改めて原稿を読み込み、信号変換部21がRGBの反射率信号を濃度信号に変換するとともにRGB濃度信号から補色のCMY信号に変換し(S26)、反転数算出部53が、反転数を算出する(S27)。隣接画素濃度差算出部51が、隣接画素濃度差を算出する(S28)。
【0125】
その後、画素判定部154が、S27・S28にて算出した反転数・隣接画素濃度差と今までに設定した各閾値を用いて注目画素の判別を行う。
まず、画素判定部154は、「反転数閾値3<算出した反転数<反転数閾値4、かつ、立ち上り・立ち下り判定閾値3<算出した隣接画素濃度差算の絶対値<立ち上り・立ち下り判定閾値4」の関係を満たすか否かを判定する(S29)。そして、満たしている場合、網点とみなす(S30)。
【0126】
一方、S29での関係を満たさない場合、画素判定部154は、「反転数閾値1<算出した反転数<反転数閾値2、かつ、立ち上り・立ち下り判定閾値1<算出した隣接画素濃度差算の絶対値<立ち上り・立ち下り判定閾値2」の関係を満たすか否かを判定する(S31)。そして、満たしている場合、文字とみなす(S32)。
【0127】
一方、S31での関係を満たさない場合、画素判定部154は、「隣接画素濃度差の絶対値<べた画素判定閾値」の関係を満たすか否かを判定する(S33)。そして、満たしている場合、下地とみなす(S34)。そして、満たしていない場合、印画紙とみなす(S35)。
【0128】
上記判定結果は、第1実施形態の場合と同様に、優先順位を加味して、注目画素に対する結果が判定され、画素毎の判定結果は、総合判定部47で夫々カウントされて、予め定められている閾値と比較され原稿種別の判別がなされる。
以上、説明したS21〜S25までの適切な閾値を設定する処理、すなわち、文字領域あるいは網点領域に確実に属すると判断される画素を抽出するために反転数・隣接画素濃度差という特徴量に基づいて適切な閾値を設定する処理と、これらの閾値を用いて原稿種別の判別を行うS26〜S35までの処理は、夫々1回ずつ原稿を走査する(本スキャンを行う前に2回プレスキャンを行う)ことにより行っても良いが、画像入力装置2で原稿画像をプレスキャンする時の往路(フィード)時に閾値の設定を行い、復路(リターン)時に上記閾値を用いて原稿種別の判別を行うことが望ましい。このようにすることで、プレスキャンの復路を有効に利用することができ、原稿種別の判別精度を向上させることができる。
以上のように、本画像処理装置は、第2判定部41のみを用いても原稿種類判別を行うことができる。
【0129】
<実施形態3>
次に、本発明の第3実施形態である原稿種別自動判別部13−3について説明する。
図24は、第3実施形態における原稿種別自動判別部13−3を示すブロック図である。なお、第1実施形態で用いた部分と同様の機能を有する部分については、同一の符号を付記し、その説明を省略する。なお、本発明はこれに限定されるものではない。
【0130】
先ず、原稿種別自動判別部13−3は、図24に示すように、信号変換部21、判定ブロック部71、主走査方向判定部72(72c・72m・72y;領域判定手段)、副走査方向判定部73(73c・73m・73y;領域判定手段)、信号別判定部74(74c・74m・74y)、総合判定部(原稿判定手段)75より構成される。なお、主走査方向判定部72、副走査方向判定部73、信号別判定部74は、各CMY信号ごとに配されている。
【0131】
信号変換部21は、シェーディング補正部12より入力されたRGBの反射率信号を濃度信号に変換するとともにRGB濃度信号から補色のCMY信号に変換し、判定ブロック部71へ出力するためのものである。
【0132】
判定ブロック部71は、上記変換されたCMY信号に対して、例えば15×7等のn×mの複数の画素よりなるブロックの画像データを格納するためのものである。主走査方向判定部72は、上記判定ブロック部71の各画像データに対して、注目画素を含む主走査方向つまりスキャナ(画像入力装置)の走査方向に対して直交する方向の画像データを抽出し、各画素を文字、網点、文字または網点、下地、印画紙写真、下地または印画紙写真領域に分離するものである。
【0133】
副走査方向判定部73は、上記判定ブロック部71の各画像データに対して、注目画素を含む副走査方向つまりスキャナの走査方向と同じ方向の画像データを抽出し、各画素を文字、網点、文字または網点、下地、印画紙写真、下地または印画紙写真領域に分離するものである。
【0134】
信号別判別部74は、前記主走査方向判定部72・副走査方向判定部73の判定結果と優先順位(主走査方向と副走査方向の結果に対する優先順位)に基づき各信号の判別を行うものである。
【0135】
総合判定部75は、さらに各信号の信号別判別部の結果に基づき、最終的な画素判定が行なわれる。信号別判定部及び総合判定部に入ってくる各画素の信号(領域識別信号)には、優先順位を決めておき、それぞれの判別部に入ってくる画素判定結果が異なる場合は、優先順位に従って判別を行う。
【0136】
優先順位については、判定ブロック部71に格納される主走査方向、副走査方向の画像のデータ大きさ(ブロックの大きさにより主走査方向・副走査方向のデータ(画素数)が異なるため)や解像度、領域分離処理で用いられる閾値により判定結果の信頼度が変わるため、前記判定結果の信頼度に基づき優先順位を決めることが望ましい。例えば、ある画像領域が1つでも含まれていると、それを有効とする。カラー原稿の場合、黒文字はすべて色成分の信号が同じ文字としての特徴量を持っている。例えば、赤い文字ではM・Y信号は文字としての特徴量を持っているが、C信号は持っていない。このように、色成分の信号によって大きく画素濃度値が変わる場合に対しても対応可能である。
【0137】
次に、上記主走査方向判定部72及び副走査方向判定部73の具体的な構成を、図25に基づいて説明する。すなわち、上記主走査方向判定部72及び副走査方向判定部73は、いずれも同じ構成を有している。また、主走査方向判定部72で用いる画素は、判定ブロック部71に格納されている注目画素を含むn×mの判定ブロックの主走査方向のみの画素である一方、副走査方向判定部73にて用いる画素は、注目画素を含むn×mの判定ブロックの副走査方向のみの画素である。
【0138】
先ず、図25に示すように、上記主走査方向判定部72または副走査方向判定部73は、最小濃度値算出部81、最大濃度値算出部82、最大濃度差算出部83、総和差分値算出部84、判定領域設定部85、文字・網点判定部86、下地・印画紙判定部87から構成される。
【0139】
最小濃度値算出部81、最大濃度値算出部82は、主走査方向または副走査方向の画素における最小濃度値、最大濃度値を算出するためのものである。
最大濃度差算出部83は、上記最小濃度値算出部81及び最大濃度値算出部82にて算出された最小濃度値及び最大濃度値を用いて最大濃度差を算出するためのものである。
総和差分値算出部84は、隣接する画素の濃度差の絶対値の総和を算出するためのものである。
【0140】
判定領域設定部85は、上記最大濃度差算出部83にて算出された最大濃度差と総和差分値算出部84にて算出された総和差分値に対して、各閾値と比較することにより下地領域・印画紙(写真)領域と文字領域・網点領域に分離するためのものである。
【0141】
文字・網点判定部86は、上記判定領域設定部85において文字・網点領域と判別された画素に対して、注目画素が文字領域、網点領域、文字または網点領域(どちらか不明)のいずれに属するかを判定するためのものである。
【0142】
下地・印画紙判定部87は、上記判定領域設定部85において下地・印画紙領域と判別された画素に対して、注目画素が下地領域、印画紙領域、下地または印画紙領域(どちらか不明)のいずれに属するかを判定するためのものである。
【0143】
また、上記判定領域設定部85は、注目画素の最大濃度差算出部83にて算出された結果に対し、下地・印画紙(写真)領域と文字・網点領域とに分離するための第1の閾値としての最大濃度差閾値を設定するための最大濃度差閾値設定部88と、注目画素の総和差分値算出部84にて算出された結果に対し下地・印画紙領域と文字・網点領域とに分離するための第2の閾値としての総和差分値閾値を設定するための総和差分値設定部89とを有している。
【0144】
さらに、上記文字・網点判定部86は、注目画素が文字領域に属することを判別する第5の閾値としての文字判定閾値を設定するための文字判定閾値設定部90と、注目画素が網点領域に属することを判別する第6の閾値としての網点判定閾値を設定するための網点判定閾値設定部91とを有する。また、上記下地・印画紙判定部87は、注目画素が印画紙領域に属することを判別する第3の閾値としての印画紙判定閾値設定部92と、注目画素が下地領域に属することを判別する第4の閾値としての下地判定閾値設定部93とを有している。
【0145】
ここで、文字・網点領域、印画紙写真・下地領域における画素濃度の分布の例を、図26〜図29に基づいて説明する。また、それぞれの領域に対する最大濃度差と総和差分値とによる分布図を、図30及び図31に基づいて説明する(図30は各画素の実際の分布を示しており、図31は、この分布を模擬的に表し、かつ、各画素を分離するための閾値を記入したものである)。最大濃度差=総和差分値以下の領域は、総和差分値が最大濃度差以下となることはなく、画素が存在しない領域を示している。
【0146】
先ず、図26に示すように、下地領域の濃度分布は、通常、濃度変化が少ないため最大濃度差及び総和差分値ともに非常に小さくなり、図30に示す領域Aに分布している。すなわち、図31に示すように下地・印画紙領域に判別された画素に対して下地判定閾値よりも最大濃度差が小さい場合には、下地画素であると判別できる。
【0147】
次に、印画紙領域の濃度分布は、図27に示すように、通常、滑らかな濃度変化をしており、最大濃度差及び総和差分値はともに小さく、かつ、下地領域よりは多少大きくなるため、図30に示す領域Bに分布している。したがって、図31に示すように下地領域・印画紙領域と判別された画素に対して印画紙判定閾値よりも最大濃度差が大きい場合には、印画紙領域であると判別できる。
【0148】
さらに、下地・印画紙領域と判別された画素について、最大濃度差が下地判定閾値よりも大きいが、印画紙判定閾値よりも小さい場合、いずれの領域に属するのか不明であるので、下地または印画紙領域に属するものと判別できる。
【0149】
また、網点領域の濃度分布は、図28に示すように、最大濃度差は網点によりさまざまであるが、総和差分値は網点の数だけ濃度変化が存在するので、最大濃度差に対する総和差分値の割合が大きくなる。このため、図30に示す領域Dのような分布になる。したがって、図31に示すように文字・網点領域と判別された画素について、最大濃度差と網点判定閾値との積よりも総和差分値が大きい場合には、網点領域に属すると判別できる。
【0150】
つぎに、文字領域の濃度分布は、図29に示すように、最大濃度差が大きく、それに伴い総和差分値も大きくなるが、網点領域よりも濃度変化が少ないため、網点領域よりも総和差分値は小さくなる。特に、最大濃度差に対する総和差分値の割合が小さくなるため、図30に示す領域Cような分布になる。したがって、図31に示すように文字・網点領域と判別された画素について、最大濃度差と文字判定閾値との積よりも総和差分値が小さい場合には、文字領域に属すると判別できる。
【0151】
さらに、文字・網点領域と判別された画素について、総和差分値が最大濃度差と網点判定閾値との積よりも小さいが、最大濃度差と文字判定閾値との積よりも大きい場合、いずれの領域に属するのか不明であるので、文字または網点領域に属するものと判別できる。
【0152】
つぎに、原稿種別の判別動作を以下に説明する。なお、本実施の形態において原稿種別の判断は、プレスキャンで得られた画像データにより行われる。これにより、原稿種別を自動的に判別することが可能となり、また原稿種別が不確かな場合は優先順位をつけることにより、ユーザによる原稿種別の判断が容易に行うことが可能となり、ユーザの操作の衝略化を図ることができる。
【0153】
まず、主走査方向判定部72および副走査方向判定部73において、判断対象となる原稿から読み込まれる画像データについて、画素毎にいずれの領域に属するかの判別を行う。この判別手順を図32に示すフローチャートに基づいて説明する。
【0154】
最初に、原稿が原稿台に置かれたことを自動的に検知してプレスキャンが開始される。そして、同図に示すように、プレスキャンにより得られた画像データから、注目画素を含むn×mのブロックにおける最大濃度値を算出し(S41)、最小濃度値の算出を行う(S42)。次いで、算出された最大濃度値及び最小濃度値を用いて最大濃度差を算出し(S43)、さらに、隣接する画素の濃度差の絶対値の総和、つまり総和差分値を算出する(S44)。
【0155】
次に、算出された最大濃度差と最大濃度差閾値との比較、及び算出された総和差分値と給和差分値閾値との比較が行なわれる(S45)。そして、最大濃度差が最大濃度差閾値よりも小さく、かつ、総和差分値が総和差分値閾値よりも小さいと判断されたときには、注目画素は下地・印画紙領域に属すると判断される(S46)。
一方、S45において上記条件を充たさないとき、注目画素は文字・網点領域に属すると判断される(S52)。
【0156】
上記のS46に示す下地・印画紙領域においては、算出された最大濃度差と下地判定閾値との比較が行なわれ(S47)、最大濃度差の方が小さい場合、注目画素は下地領域に属すると判定される(S48)。そして、S47において最大濃度差の方が大きい場合は、さらに最大濃度差と印画紙判定閾値との比較が行われる(S49)。ここで、最大濃度差の方が大きい場合、注目画素は印画紙領域に属すると判断されるが、最大濃度差の方が小さい場合は下地または印画紙領域(どちらか不明)に属すると判断される(S51)。
【0157】
一方、上記S52に示す文字・網点領域においては、算出された総和差分値と最大濃度差に文字判定閾値を掛けた値との比較が行なわれ(S53)、総和差分値の方が小さければ、注目画素は文字領域に属すると判定される(S54)。そして、S53において総和差分値の方が大きい場合は、さらに総和差分値と最大濃度差に網点判定閾値を掛けた値との比較が行われる(S55)。ここで、総和差分値の方が大きい場合、注目画素は網点領域に属すると判断され(S56)、最大濃度差の方が小さい場合は文字または網点領域(どちらか不明)に属すると判断される(S57)。
【0158】
各画素がいずれの領域に属するか判断された後、信号別判定部74にて以下の演算が行われる。まず、各領域に分類された画素数が計数される。そして、各領域の計数値と領域毎に予め設定された閾値とが比較され、原稿種別の判断が行われる。
【0159】
なお、主走査方向と副走査方向とで判定結果が異なる場合、判定ブロック部71に格納される主走査方向、副走査方向の画像のデータ大きさ(ブロックの大きさにより主走査方向・副走査方向のデータ(画素数)が異なるため)や解像度、各走査方向判定部で用いられる閾値により判定結果の信頼度が変わるため、前記判定結果の信頼度(ブロックが大きいほうが判定に用いる画素も多いので情報量も多くなり、また判定に用いる閾値が厳しく設定してあるものが判定されたときは、その信頼度の方が高くなる)に基づき優先順位を決め、それに基づいて判定結果を採用する。
【0160】
さらに、プレスキャン時に副走査方向の画像データが間引かれる場合は主走査方向の画像データのみを用いる。
例えば、文字領域の計数値が予め定められた文字領域の閾値を越えている場合は文字原稿であると判断される。そして、文字領域以外の領域の計数値がその領域の閾値を越えていないものの閾値に近い場合、原稿種別が不明であると判断され、以下の手順により、ユーザ自身の判断が促される。
【0161】
まず、各領域の計数値が以下のように定義される。これら各領域の計数値を、操作パネル4を介してユーザに表示するようにしても良い。
Ct:文字領域の計数値 Ch:網点領域の計数値
Cth:文字または網点領域の計数値
Cb:下地領域の計数値 Cp:印画紙写真領域の計数値
Cbp:下地または印画紙写真領域の計数値
【0162】
さらに、閾値も以下のように定義される。これら閾値も表示手段を介してユーザに表示するようにしても良い。
THt:文字領域の計数値に対する閾値
THt1:文字領域と、文字または網点領域の計数値に対する閾値
THh1:網点領域と、文字または網点領域の計数値に対する閾値
THb1:下地領域と、下地または印画紙写真領域の計数値に対する閾値
THp1:印画紙簡域と、下地または印画紙写真領域の計数値に対する閾値
これらの閾値は、予め多くの原稿を基に好ましい結果が得られるように適切な値が定められている。
【0163】
ここで、Ct>THtの場合について説明する。この場合、文字領域を含んだ原稿である点は確定しているものの、それが文字原稿か、文字/写真原稿か、文字/印画紙写真原稿か不明である。そこで本発明では、他領域の計数値が閾値を越えていなくても閾値付近にある場合、原稿種別を予想して、以下のように原稿種別の優先順位を定め、これを表示することにしている。
【0164】
1)Ct>THtかつCt+Cth>THt1、Ch+Cth<THh1の時
▲1▼文字原稿
▲2▼文字/写真(印刷写真)原稿
(丸中数字は優先順位)
2)Ct>THtかつCt+Cth<THt1、Ch+Cth>THh1の時あるいは、Ct>THtかつCt+Cth<THt1、Ch+Cth<THh1の時
▲1▼文字/写真原稿
▲2▼文字原稿
3)Ct>THtかつCb+Cbp>THb1、Cp+Cbp<THp1の時
▲1▼文字原稿
▲2▼文字/印画紙写真原稿
4)Ct>THtかつCb+Cbp<THb1、Cp+Cbp>THp1の時、あるいは、Ct>THtかつCb+Cbp<THb1、Cp+Cbp<THp1の時
▲1▼文字/印画紙写真原稿
▲2▼文字原稿
【0165】
以上のように、例えば文字領域以外の領域の計数値が閾値を越えていないものの、閾値に近い場合、原稿種別が不明と判断することによって、ユーザに原稿種別の選択を促すことができる。これにより、原稿種別の誤判断を防ぐことができる。また、原稿種別に応じた処理モードで各種補正処理がおこなわれるから、ミスプリントを減少させることができる。
【0166】
さらに、原稿種別が不明な場合でも、予想される原稿種別について、優先順位をつけて表示することにより、ユーザは原稿種別の判断を容易に行うことができ、それに応じた処理モードを選択することができる。
【0167】
また、画像処理装置1には図示しないCPU(制御手段)と記憶手段が存在し、このCPUは、原稿種別の判別結果・総画素数・各領域の計数値を図示しない記憶手段に格納する。これにより、ユーザは、出力した画像が好ましくなく再び画像を出力する場合、前回出力時の判別結果を知ることができる。すなわち、前回の原稿種別の判別結果を知るには、原稿を原稿台に置いてプレスキャンを行い、総画素数・各領域の計数値を求め、この結果を記憶されているデータと比較することにより行われる。そして、ユーザに対して判別結果を表示する表示手段と、ユーザが処理モードを選択入力できる入力手段とを設けることで、ユーザは上記判別結果に応じた処理モードを選択入力できる。この場合、表示手段と入力手段は、操作パネル4で代用できる。
このようにして行われた原稿種別の判別結果は、前記したように原稿種別自動判別部13−3以降の各処理部においてフィードバックされる。
【0168】
このようにして、画像処理装置1は原稿の種類に応じた処理モードを自動的またはユーザ自身の選択によって切り換えることができる。
【0169】
なお、本発明の画像処理装置1は、画像読取装置(画像入力装置)2のみに適用することも可能である。この場合、画像処理装置1には、図1に示すA/D変換部11・シェーディング補正部12・原稿種別自動判別部13・入力階調補正部14が備えられる。
【0170】
<第4実施形態>
次に、本発明の第4実施形態である原稿種別自動判別部13−4について説明する。
図33は、第4実施形態における原稿種別自動判別部13−4を示すブロック図である。なお、第3実施形態で用いた部材と同様の機能を有する部材については、同一の符号を付記し、その説明を省略する。なお、本発明はこれに限定されるものではない。
【0171】
この原稿種別自動判別部13−4は、第3実施形態と異なるのは、主走査方向判定部172(172c,172m,172y)及び副走査方向判定部173(173c,173m,173y)である。上記主走査方向判定部172及び副走査方向判定部173は、いずれも同じ構成を有している。そこで、図34に主走査方向判定部172のブロック図を示す。図25に示した第3実施形態の主走査方向判定部72と同一部分には同一符合を付す。
【0172】
主走査方向判定部172で用いる画素は、判定ブロック部71に格納されている注目画素を含むn×mの判定ブロックの主走査方向のみの画素である一方、副走査方向判定部173にて用いる画素は、注目画素を含むn×mの判定ブロックの副走査方向のみの画素である。
【0173】
主走査方向判定部172及び副走査方向判定部173は、最小濃度値を算出する最小濃度値算出部81、最大濃度値を算出する最大濃度値算出部82、さらに前記算出された最小濃度値と最大濃度値を用いて最大濃度差を算出する最大濃度差算出部83、隣接する画素の濃度差の絶対値の総和を算出する総和差分値算出部84、前記最大濃度差算出部で算出された最大濃度差と前記算出された総和差分値とを予め定められるそれぞれの閾値と比較し、下地画素を判定する下地判定部101、印画紙画素を判定する印画紙判定部102、文字画素を判定する文字判定部103、網点画素を判定する網点判定部104により構成されている。
【0174】
さらに、前記下地判定部101は、最大濃度差算出部83で算出された結果に対して下地画素と判定するための閾値を設定するための下地最大濃度差閾値設定部111、総和差分値算出部84で算出された総和差分値に対して下地画素と判定するための閾値を設定するための下地総和差分値閾値設定部112、また、前記印画紙判定部102には、最大濃度差算出部83で算出された結果に対し、印画紙画素と判定するための閾値を設定するための印画紙最小濃度差閾値設定部113と印画紙最大濃度差閾値設定部114、総和差分値算出部84で算出された結果に対し印画紙画素と判定するための閾値を設定するための印画紙判定閾値設定部115、さらに前記文字判定部103は、最大濃度差算出部83で算出された結果に対して文字画素と判定するための閾値を設定するための文字最小濃度差閾値設定部116、前記総和差分値算出部84で算出された結果に対し文字画素と判定するための閾値を設定するための文字判定閾値設定部117、同様に、前記網点判定部104は、総和差分値算出部84で算出された結果に対し網点画素と判定するための閾値を設定するための網点総和差分値閾値設定部118と網点判定閾値設定部119より構成されている。
【0175】
図35は、本発明における注目画素を含むn×mのブロックにおいて、主走査方向判定部72、副走査方向判定部73ごとにおける原稿種別判別を行う上での領域分離処理の流れを表したフローチャートである。
【0176】
先ず、最初にステップ61(S61)にて、最大濃度値の算出を行い、S62にて最小濃度値の算出を行う。そして、S61、S62により算出された最小濃度値および最大濃度値を用いて最大濃度差を算出する(S63)。さらに、S64にて隣接する画素の濃度差の絶対値の総和を算出する。S65にて、S63で算出された最大濃度差と下地最大濃度差閾値との比較及びS63で算出された総和差分値と下地総和差分値閾値との比較がなされる。そして、最大濃度差が下地最大濃度差閾値より小さく、かつS64で算出された総和差分値が下地総和差分値閾値より小さいと判定された時(S65で「YES」)、注目画素は下地画素であると判定される(S73)。
【0177】
一方、S65で上記条件を充たさない時は、S66において印画紙画素であるかどうかの判定が行われる。S63で算出された最大濃度差が印画紙最小濃度差閾値よりも大きく、印画紙最大濃度差閾値よりも小さく、かつS63で算出された最大濃度差と印画紙判定閾値の積が、S64で算出された総和差分値よりも大きければ、印画紙写真画素であると判定される(S72)。さらに、S66で上記条件を充たさない時は、S67においてS63で算出された最大濃度差が文字最小濃度差閾値よりも大きく、そしてS63で算出された最大濃度差と文字判定閾値の積が、S64で算出された総和差分値よりも大きければ、注目画素は文字画素であると判定される(S71)。
【0178】
次に、S67で上記条件を充たさない時は、S68において、S64で算出された総和差分値が網点総和差分値閾値よりも大きく、かつ、S63で算出された最大濃度差と網点判定閾値の積が、S64で算出された総和差分値よりも大きければ網点画素であると判定され(S70)、それ以外は不確定画素(S69)であると判定される。
【0179】
このようにして判定処理を行い、注目画素に対する最終の判定結果が得られる。画素毎の判定結果は、総合判定部75で夫々カウントされ、予め定められている閾値と比較されて原稿種別の判別がなされる。例えば、文字と網点が閾値以上であるならば、原稿は文字/印刷写真原稿であると判定される。
【0180】
ここで、文字・網点領域、印画紙写真・下地領域における画素濃度の分布の例を、第3実施形態の図26〜図29を用いて説明する。また、それぞれの領域に対する最大濃度差と総和差分値とによる分布図を、図36及び図37を用いて説明する。(図36は各画素の実際の分布を示しており、図37は、この分布を模擬的に表し、かつ、各画素を分離するための閾値を記入したものである。最大濃度差=総和差分値以下の領域は、総和差分値が最大濃度差以下となることはなく、画素が存在しない領域を示している。
【0181】
先ず、図26に示すように、下地領域の濃度分布は、通常、濃度変化が少ないため最大濃度差及び総和差分値ともに非常に小さくなり、図36に示す領域Aに分布している。すなわち、図37に示すように下地最大濃度差閾値よりも最大濃度差が小さく、かつ総和差分値が下地総和差分値閾値よりも小さい場合には、下地画素であると判別できる。
【0182】
次に、印画紙領域の濃度分布は、図27に示すように、通常、滑らかな濃度変化をしており、最大濃度差は小さいが下地領域よりは多少大きくなる。また、滑らかな濃度変化をしているため、隣接する画素の濃度変化も小さいため、最大濃度差と総和差分値は非常に近い値になるため、図36に示す領域Bに分布している。したがって、図37に示すように印画紙最小濃度差閾値よりも最大濃度差が大きく、かつ印画紙最大濃度差閾値よりも最大濃度差が小さく、さらに最大濃度差と印画紙判定閾値との積よりも総和差分値が小さい場合には、印画紙写真領域であると判別できる。
【0183】
また、網点領域の濃度分布は、図28に示すように、最大濃度差は網点によりさまざまであるが、総和差分値は網点の数だけ濃度変化が存在するので、最大濃度差に対する総和差分値の割合が大きくなる。このため、図36に示す領域Dのような分布になる。したがって、図37に示すように総和差分値が網点総和差分値閾値よりも大きく、かつ最大濃度差と網点判定閾値との積よりも総和差分値が大きい場合には、網点領域に属すると判別できる。
【0184】
つぎに、文字領域の濃度分布は、図29に示すように、最大濃度差が大きく、それに伴い総和差分値も大きくなるが、網点領域よりも濃度変化が少ないため、網点領域よりも総和差分値は小さくなる。特に、最大濃度差に対する総和差分値の割合が小さくなるため、図36に示す領域Cような分布になる。したがって、図37に示すように、文字最小濃度差閾値よりも最大濃度差が大きく、かつ最大濃度差と文字判定閾値との積よりも総和差分値が小さい場合には、文字領域に属すると判別できる。
【0185】
さらに、上記下地領域、印画紙写真領域、網点領域、文字領域と判別されたもの以外については、いずれの領域に属するのかが明確ではないので、不確定領域に属するものと判別される。
以上のように、本実施の形態においては、不確定な要素を有する画素を除き、どの領域に属するかが明らかな画素のみを抽出して原稿種別の判別を行うので、原稿種別の判別精度を上げることができる。また、入力画像データの領域判定を行う際、特定の特徴量のみを抽出して行うので、回路が小さくてすむ。
【0186】
尚、上記設定した各閾値においては、任意に調節することにより、より広範囲な処理を行うことが可能となる。そして、これらの閾値については予想される複数の値を予めROM(Read Only Memory)等に記憶させておき、必要に応じてスイッチ等により、メモリ等の図示しない記憶手段に格納される値を設定できるようにしておけばよい。
【0187】
上述した処理動作によって、原稿の種類(画素の種類)が判定され、その結果に基づいて、前述したように、それ以降の入力階調補正・色補正・黒生成下色除去処理・空間フィルタ処理・階調再現処理・領域分離処理が切り換わる。
【0188】
また、本発明はコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体に、画像処理方法を記録するものとすることもできる。この結果、画像処理方法を行うプログラムを記録した記録媒体を持ち運び自在に提供することができる。
なお、本実施の形態では、この記録媒体としては、マイクロコンピュータで処理が行われるために図示していないメモリ、例えばROMのようなものそのものがプログラムメディアであっても良いし、また、図示していないが外部記憶装置としてプログラム読み取り装置が設けられ、そこに記録媒体を挿入することで読み取り可能なプログラムメディアであっても良い。
【0189】
いずれの場合においても、格納されているプログラムはマイクロプロセッサがアクセスして実行させる構成であっても良いし、あるいは、いずれの場合もプログラムを読み出し、読み出されたプログラムは、マイクロコンピュータの図示されていないプログラム記憶エリアにダウンロードされて、そのプログラムが実行される方式であってもよい。このダウンロード用のプログラムは予め本体装置に格納されているものとする。
【0190】
ここで、上記プログラムメディアは、本体と分離可能に構成される記録媒体であり、磁気テープやカセットテープ等のテープ系、フロッピー(R)ディスクやハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD等の光ディスクのディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM、EPROM(Erasable Programmable Read Only Memory)、EEPROM(Electrically Erasable Programmable Read Only Memory)、フラッシュROM等による半導体メモリを含めた固定的にプログラムを担持する媒体であっても良い。
【0191】
また、上本実施形態においては、インターネットを含む通信ネットワークを接続可能なシステム構成であることから、通信ネットワークからプログラムをダウンロードするように流動的にプログラムを担持する媒体であっても良い。なお、このように通信ネットワークからプログラムをダウンロードする場合には、そのダウンロード用のプログラムは予め本体装置に格納しておくか、あるいは別な記録媒体からインストールされるものであっても良い。
【0192】
上記記録媒体は、デジタルカラー画像形成装置に備えられるプログラム読み取り装置により読み取られることで上述した画像処理方法が実行される。
【0193】
上記では、電子写真プロセスを用いたデジタル複写機を例として説明しているが、本発明は上記の例に限定されるものではなく、画像入力装置から情報を入力して、所定の画像処理を行い、その結果を出力する画像形成装置、例えば、インクジェット記録方式や昇華型の記録方式を用いた画像形成装置にも無論適用可能である。
【0194】
【発明の効果】
本発明によれば、入力画像データより原稿の種別を自動的に判定する原稿種別判別手段は、先ず下地の有無を判定し、その結果に基づいて原稿種別の判別を行う。そのため、原稿種別の判定精度が向上する。
【0195】
本発明によれば、第1最大度数値≧第1閾値の場合は、例えば、べたからなる文字原稿での第1最大度数濃度区分(いわゆる白地)が、他の濃度値に比して高いことを利用して、下地があるかないかを判断できる。
第1最大度数値+第2最大度数値≧第2閾値の場合は、例えば、べた・網点からなる文字原稿での、白地を示す第1最大度数濃度区分と、網点の下地を示す第2最大度数濃度区分とが、他の濃度値に比して高いことを利用して、下地があるかないかを判断できる。
第1最大度数値≦第1閾値の場合は、例えば、印画紙写真からなる写真原稿において、第1最大度数濃度区分は、他の濃度値に比して際だって高くはならないことを利用して、下地があるかないかを判断できる。従って、原稿種別の判定精度がより向上する。
【0196】
本発明によれば、ヒストグラム作成部が、複数の入力画像データの濃度値の平均値に基づいてヒストグラムを作成するので、下地(網点)の抽出精度を向上することができる。
【0197】
本発明によれば、注目画素判定、及び注目画素の副走査方向前段や副走査方向後段にある周辺画素の判定結果による上ライン判定及び下ライン判定の判定結果に基づいて、注目画素がべた、印画紙写真、文字又は網点のいずれの種類に属するかを判定する。このため、注目画素の前後にある周辺画素の情報をライン情報として用いるので情報量が増える。したがって、精度のよい判定結果を得ることが可能となる。
また、注目画素、上ライン及び下ラインとも主走査方向の画像データを用いて判定処理を行うので、例えば、プレスキャンにより読み込まれたデータである副走査方向の劣化した画像データに対し、当該無駄な情報である副走査方向の画像データの判定結果を除去することが容易であり、有効な情報である主走査方向の画像データの判定結果を抽出して種類判別に応用することが可能となる。
したがって、入力画像の画像領域や画像種別を判別する際に、白黒又はカラー原稿に関係なく、簡易な方法で精度よく画像種別を判別し、回路規模の拡大を防止し得る画像処理装置を提供することができる。
【0198】
本発明によれば、第1判定部による判定は、画像入力手段で原稿を読み取る際の往路時に行われ、第2判定部による判定は、画像入力手段で原稿を読み取る際の復路時に行われるので、プレスキャンの復路を有効活用することにより原稿種別の判別精度を上げることができる。
【0199】
本発明によれば、閾値を固定するのではなく、各々の原稿の種類に応じて閾値を設定し、原稿種別の判別を行うに当たり、予め定められた度数以上の特定の画像データのみを抽出することができるので判別精度を向上することができる。
また、原稿(画像)の種別の特徴量である、反転数・隣接画素濃度差に対して特定の領域の画像データを抽出することにより画像データを格納するメモリ領域を削減することができる。
【0200】
本発明によれば、最適な閾値の設定が、画像入力手段で原稿を読み取る際の往路時に行われ、原稿種別の判別が、画像入力手段で原稿を読み取る際の復路時に行われるので、プレスキャンの復路を有効活用することにより原稿種別の判別精度を上げることができる。
【0201】
本発明によれば、不確定な要素を有する画素を除き、どの領域に属するかが明らかな画素のみを抽出して原稿種別の判別を行うので、原稿種別の判別精度を上げることができる。また、入力画像データの領域判定を行う際、特定の特徴量のみを抽出して行うので、回路が小さくてすむ。
【0202】
本発明によれば、原稿判別手段が、領域判定手段により各領域に分離された画素数をカウントし、カウント数を予め定められた閾値との比較を行うことにより原稿の判別を行うので、回路規模を小さくすることが可能となり、簡易な方法で原稿種別の判別を行うことができる。不確定な要素を除いているので、簡易な方法を用いて原稿種別の判別が可能であり、また、精度もさほど低下しない。
【0203】
本発明によれば、原稿種別判別手段が原稿を判別できない場合(原稿種別が不確かな場合)、デフォルトの画像モードで処理を行うのではなく、原稿種別が不確かであるのを表示手段に表示し、ユーザに処理モードの入力を促すことができる。これにより、原稿種別判別手段が原稿を判別できない場合であっても、ユーザが入力手段を介して処理モードを選択するので、本来の原稿種別に応じた画像処理を実行することができる。したがって、ミスプリントを抑え、用紙の無駄使いを低減させることができる。また、原稿種別の判別結果が不明となる事態を避けることができる。
【0204】
本発明によれば、制御手段が、候補となる原稿種別に優先順位を付けて表示手段に表示するので、ユーザは優先順位を参考でき、画像モード(処理モード)の選択を容易に行うことができる。
【0205】
本発明によれば、原稿種別判別手段の判定結果が不確かな場合、制御手段がユーザにより選択された原稿種別を記憶手段に格納するので、出力された画像が好ましくない場合、再度処理を行う際に前回の結果を参考にすることができるので操作モードの切り換えが容易になる。
【0206】
本発明によれば、制御手段が、原稿種別と共に上記原稿種別判別手段の処理結果の少なくとも一部分を記憶手段に格納するので、出力された画像が好ましくない場合、原稿種別判別手段の処理結果(例えば、総画素数および各領域の計数値)を基に前回の画像モードを見つけ出すことができ、画像出力後、時間が経過している場合でも、容易にやり直すことができる。
【0207】
本発明によれば、画像形成装置はこれら画像処理装置を備えているので、原稿種別の判別精度が向上し、それに応じた画像処理を施すことができ、品質の良い画像を出力する画像形成装置を提供することができる。
【0208】
本発明によれば、画像処理方法をコンピュータに実行させるためのプログラムであるので、原稿種別の判別を精度良く行う画像処理方法をコンピュータが読み取り実行することができ、汎用的なものとすることができる。
【0209】
本発明によれば、これらプログラムをコンピュータ実行可能に格納したので、原稿種別の判別を精度良く行う画像処理方法を容易にコンピュータに供給することができる。
【図面の簡単な説明】
【図1】本発明に係る画像形成装置を示すブロック図である。
【図2】第1実施形態における原稿種別自動判別部を示すブロック図である。
【図3】網点領域の画像データの例とそれに基づいて作成された濃度ヒストグラムを示す図である。
【図4】図3に示した画像データに対して、複数の画素の平均値を求めそれを用いて作成した濃度ヒストグラムを示す図である。
【図5】べたの下地からなる文字原稿の濃度ヒストグラムの例を示す図である。
【図6】べた及び網点の下地からなる文字原稿の濃度ヒストグラムの例を示す図である。
【図7】印画紙写真原稿の濃度ヒストグラムの例を示す図である。
【図8】第1実施形態における注目画素判定部を示すブロック図である。
【図9】第1実施形態における画像判定のステップ1からステップ6の処理手順を示すフローチャートである。
【図10】図9に続く第1実施形態における画像判定のステップ7からステップ17の処理手順を示すフローチャートである。
【図11】M個の画素からなる一定領域の間における立ち上り画素と立ち下り画素の反転数算出を示す説明図である。
【図12】n×nの各画素に対してM個の画素からなる一定領域の間における立ち上り画素と立ち下り画素の反転数算出を示す説明図である。
【図13】べたの画像の濃度分布図である。
【図14】印画紙写真の濃度分布図である。
【図15】網点画像の濃度分布図である。
【図16】文字画像の濃度分布図である。
【図17】第2実施形態における原稿種別自動判別部を示すブロック図である。
【図18】第2実施形態における注目画素判定部を示すブロック図である。
【図19】文字領域、網点領域および下地・印画紙写真領域の隣接画素濃度差と反転数と度数との関係を示す図である。
【図20】文字領域、網点領域および下地・印画紙写真領域の隣接画素濃度差と反転数と度数と閾値の関係を示す図である。
【図21】文字、網点に対して隣接画素濃度差と反転数と度数における計数する領域を示す図である。
【図22】第2実施形態における画像判定のステップ21からステップ28の処理手順を示すフローチャートである。
【図23】図22に続く第2実施形態における画像判定のステップ29からステップ35の処理手順を示すフローチャートである。
【図24】第3実施形態における原稿種別自動判別部を示すブロック図である。
【図25】第3実施形態における走査方向判定部及び副走査方向判定部を示すブロック図である。
【図26】下地領域の濃度分布図である。
【図27】印画紙写真領域の濃度分布図である。
【図28】網点領域の濃度分布図である。
【図29】文字領域の濃度分布図である。
【図30】最大濃度差と総和差分値に対する文字領域、文字領域または網点領域、網点領域、印画紙写真領域、下地または印画紙写真領域、下地領域の分布を示す図である。
【図31】図30を基に各領域を分離するための閾値を示した図である。
【図32】第3実施形態における画像判別の処理手順を示すフローチャートである。
【図33】第4実施形態における原稿種別自動判別部を示すブロック図である。
【図34】第4実施形態における主走査方向判定部を示すブロック図である。
【図35】第4実施形態における画像判別の処理手順を示すフローチャートである。
【図36】最大濃度差と総和差分値に対する文字領域、網点領域、印画紙写真領域、下地領域の分布を示す図である。
【図37】図36を基に不確定領域をも含めた各領域を分離するための閾値を示した図である。
【符号の説明】
1 画像処理装置
2 画像入力装置
3 画像出力装置
4 操作パネル
10 画像形成装置
11 A/D変換部
12 シェーディング補正部
13 原稿種別自動判別部
14 入力階調補正部
15 色補正部
16 黒生成下色除去部
17 空間フィルタ処理部
18 出力階調補正部
19 階調再現処理部
20 領域分離処理部
21 信号変換部
31 第1判定部
32 ヒストグラム作成部
33 最大度数濃度区分抽出部
34 閾値設定部
35 下地判定部
41 第2判定部
42 信号処理部
43 上ライン判定部
44 下ライン判定部
45 注目画素判定部
46 信号別判定部
47 総合判定部
48 周辺画素判定部
51 隣接画素濃度差算出部
52 立ち上り・立ち下り判定部
53 反転数算出部
54 画素判定部
55 べた画素判定閾値設定部
56 立ち上り・立ち下り判定閾値設定部
57 反転数閾値設定部
61 比較閾値設定部
71 判定ブロック部
72 主走査方向判定部
73 副走査方向判定部
74 信号別判定部
75 総合判定部
81 最小濃度値算出部
82 最大濃度値算出部
83 最大濃度差算出部
84 総和差分値算出部
85 判定領域設定部
86 文字・網点判定部
87 下地・印画紙判定部
88 最大濃度差閾値設定部
89 総和差分値閾値設定部
90 文字判定閾値設定部
91 網点判定閾値設定部
92 印画紙判定閾値設定部
93 下地判定閾値設定部
101 下地判定部
102 印画紙判定部
103 文字判定部
104 網点判定部
111 下地最大濃度差閾値設定部
112 下地総和差分値閾値設定部
113 印画紙最小濃度差閾値設定部
114 印画紙最大濃度差閾値設定部
115 印画紙判定閾値設定部
116 文字最小濃度差閾値設定部
117 文字判定閾値設定部
118 網点総和差分値閾値設定部
119 網点判定閾値設定部
145 注目画素判定部
148 周辺画素判定部
154 画素判定部
172 主走査方向判定部
173 副走査方向判定部
[0001]
BACKGROUND OF THE INVENTION
The present invention performs processing for determining image areas such as characters, halftone dots, photographs (printing paper), solids, etc., and document types for input image data obtained by scanning a document, and processing according to the determination result. The present invention relates to an image processing apparatus that performs the above, an image forming apparatus including the same, an image processing method, a program that can execute the method, and a recording medium that records the program.
[0002]
[Prior art]
In addition to the conventional analog type, digital type is widely used as an image forming apparatus such as an electronic copying machine, and with the advancement of digital image processing technology, a full-color digital copying machine that reproduces color images with high image quality is available. It has been commercialized.
Document images copied by the above-described image forming apparatus include characters, line drawings, printed photographs (halftone dots), and photographic paper photographs in combination of these. It is necessary to perform image processing suitable for the original. In order to efficiently perform the above image processing, a character mode, a character / photo (printed photo) mode, a photo (printed photo) mode, etc. are selected as the operation mode of the image forming apparatus. ing.
[0003]
However, it is very troublesome for the user to switch the mode for each document. In addition, when an inappropriate mode is selected, the image is often considerably deteriorated, and unnecessary copying is performed. Therefore, in order to solve such a problem, it has been proposed to automatically determine the type of document.
[0004]
For example, Japanese Patent Laid-Open No. 9-261460 discloses an image processing method for automatically identifying an image area of a document image in which a plurality of images are mixed.
In the image processing method disclosed in the above publication, parameters for performing image region separation at least twice and determining a document based on the first image region separation determination, and parameters for determining a region locally during the main scan, change. When determining a document, only highly accurate information is used. For example, when a parameter that makes it difficult to detect an edge is set during pre-scanning and the image region separation criterion (threshold value) is increased, the inside of a character or the like is not detected as an edge, and the halftone dot The area where an image is erroneously detected as a character is reduced.
[0005]
Japanese Patent Application Laid-Open No. 8-251402 discloses a technique for automatically determining the type of document and automatically switching the operation mode. According to the technique described in the above publication, a brightness histogram is created from data read in the preliminary scan. The document type is automatically determined from this histogram. Then, an operation mode suitable for each document type is selected, and image processing (background adjustment, presence / absence of black character discrimination, gradation reproduction switching, etc.) according to the document type is executed.
That is, in this technique, R, G, B signals of three primary colors obtained by reading a document (including a color document and a monochrome document) by a photoelectric conversion element are converted into a brightness signal, a histogram is created from the brightness signal, The document type is determined based on the shape of the created histogram, and the subsequent image processing contents are switched based on the determination result.
[0006]
In Japanese Patent Laid-Open No. 8-251406, chromatic / achromatic determination of a document is performed, and an image separation function, that is, edge separation / halftone dot determination, is performed, whereby a document is converted into (1) line drawing and (2). ▼ Halftone, ▲ 3 ▼ Continuous, ④ Line drawing and halftone, ▲ 5 ▼ Halftone and continuous, 6 Six continuation and line, ▲ Seven ”Line drawing, halftone, and continuous It is shown that one of seven types of images is determined and a processing mode corresponding to this is automatically given to the filter, color correction, selector, and gradation processing.
[0007]
[Problems to be solved by the invention]
However, the image processing method described in the above publication has the following problems.
[0008]
That is, in Japanese Patent Application Laid-Open No. 9-261460, only the threshold value is adjusted, and the processing contents are the same. Therefore, the discrimination accuracy is not sufficiently high, and the fixed threshold value is used regardless of the document type. Since the processing is performed using, the discrimination accuracy is not sufficiently high.
[0009]
In Japanese Patent Application Laid-Open No. 8-251402, since determination is performed based on global information (histogram), it is impossible to distinguish between a photographic paper photograph and a printed photograph even in a photograph, and the image area in the document is small. It is difficult to make a determination at the time or when a plurality of images are mixed. Accordingly, erroneous determination may occur, but in this case, image processing that does not conform to the original document type is performed, which causes a problem of adversely affecting the image quality of the output image. This increases misprinting and wastes paper, which is not preferable from the viewpoint of resource saving.
[0010]
Also, the procedure for manually inputting the processing mode is not preferable because the output image is not preferable. When the image is output again, there is a risk that it will not be understood how to switch the operation mode if there is no previous image information. There is. That is, it is insufficient as a user interface.
[0011]
In Japanese Patent Application Laid-Open No. 8-251406, it is very complicated to perform each region separation (image separation) for each element for each pixel to determine the type of document. There is a problem that a circuit for processing becomes very large.
[0012]
In other words, in order to determine the type of document, in order to obtain some determination result for each pixel, an attempt is made to determine the pixel that can be determined either way. There is a problem that a circuit for this is required, each of which requires very complicated processing contents, and a circuit for processing becomes very large. In addition, since a single color signal is used, even if the same pixel as in a color original, the density varies greatly depending on the signal, or by performing ternarization for determining characters, high density and low density Although character determination is performed for each pixel, intermediate density character determination such as color characters is out of scope, so erroneous determination for each pixel will result in erroneous document determination results. There is a problem that may occur. In addition, the paper is not halftone dots / characters, so it lacks accuracy. There is also a problem that it is not possible to cope with pre-scan data whose resolution in the sub-scanning direction is reduced.
[0013]
The present invention has been made in view of the above-described conventional problems, and an object of the present invention is to accurately determine an image area and a document type by a simple method when determining an image area and an image type of an input image. An image processing apparatus, an image forming apparatus including the image processing apparatus, an image processing method, a program capable of executing the method, and a recording medium on which the program is recorded.
[0014]
[Means for Solving the Problems]
  An image processing apparatus according to the present invention includes document type determination means for determining a document type from input image data read by scanning a document with an image input means, and performing image processing based on the determination result In the deviceSaidThe document type determination means includes first density determination means for determining the presence or absence of the background of the document based on the density histogram data of the input image data and threshold data for determining the background of the document input as image data from the density histogram data. ,SaidSecond determination for determining the type of document input as image data from the determination result of the background of the document determined by the first determination means and the type of input image obtained by determination in units of pixels of the input image data Means, andThe first determination means extracts a histogram of density from the input image data to create a density histogram indicating the relationship between the density of each pixel and its frequency, and extracts a maximum frequency value in the density histogram as a first maximum frequency value. In addition, the concentration category to which the first maximum power value belongs is extracted as the first maximum power concentration region, and the second maximum power value is extracted except for the concentration region adjacent to the first maximum power concentration region. 2) The maximum power density class extracting means for extracting the density class to which the maximum power value belongs as the second maximum power density class, the first threshold value for determining the solid background, and the background consisting of solid and halftone dots. A threshold value setting means for setting a second threshold value, and the first maximum power value / second maximum power value and the first / second threshold value are compared, and a first maximum power value < If 1 threshold value or 1st maximum power value + second maximum power value <second threshold value, it is determined that there is no background, and if 1st maximum power value ≧ first threshold value or 1st maximum power value + second maximum value In the case of the frequency value ≧ the second threshold value, it is determined that the background is present, and further, the background determination means for calculating the background density is provided.It is characterized by that.
[0015]
  An image processing apparatus according to the present invention includes:In an image processing apparatus that includes a document type determination unit that determines a document type from input image data read by scanning a document with an image input unit, and that performs image processing based on the determination result, the document type determination unit includes: First determination means for determining presence / absence of a document background based on density histogram data of input image data and threshold data for determining a document background input as image data from the density histogram data; A second determination unit that determines the type of the document input as image data from the determination result of the background of the document determined by the unit and the type of input image obtained by determining in units of pixels of the input image data; And the second determination means applies to a target pixel having a block made up of a plurality of pixels extracted from the input image data. The feature amount is extracted from the image data in the main scanning direction and the background determination result of the document determined by the first determination unit, and whether the pixel of interest belongs to the solid, photograph, character, or halftone dot type The target amount is determined from the target pixel determination unit that performs the determination, and the image data in the main scanning direction and the background determination result of the document determined by the first determination unit for the peripheral pixels that exist around the target pixel. Peripheral pixel determining means for extracting and determining whether the peripheral pixel belongs to a solid, photo, character, or halftone area; and peripheral pixel determining means for the same line existing in the preceding stage in the sub-scanning direction of the target pixel An upper line determining means for determining whether a line existing in the preceding stage in the sub-scanning direction belongs to a solid, a photo, a character, or a halftone dot, and a subsequent stage in the sub-scanning direction of the target pixel. Exist Lower line determination means for determining whether a line existing in the subsequent stage in the sub-scanning direction belongs to a solid, photo, character, or halftone dot based on the determination result of the peripheral pixel determination means for the same line, And determining whether the target pixel belongs to a solid, photo, character, or halftone dot based on the determination results of the target pixel determination unit, the upper line determination unit, and the lower line determination unit It is characterized by that.
[0016]
  An image processing apparatus according to the present invention includes:In an image processing apparatus that includes a document type determination unit that determines a document type from input image data read by scanning a document with an image input unit, and that performs image processing based on the determination result, the document type determination unit includes: First determination means for determining presence / absence of a document background based on density histogram data of input image data and threshold data for determining a document background input as image data from the density histogram data; A second determination unit that determines the type of the document input as image data from the determination result of the background of the document determined by the unit and the type of input image obtained by determining in units of pixels of the input image data; The first determination means includes a density histogram indicating a relationship between the density of each pixel and the frequency from the input image data. A histogram generating means configured to extract the maximum frequency value in the density histogram as a first maximum frequency value, and extract a density category to which the first maximum frequency value belongs as a first maximum frequency density category; A maximum frequency concentration category extracting means for extracting the second maximum frequency value other than the density category adjacent to the maximum frequency concentration category and extracting the concentration category to which the second maximum frequency value belongs as the second maximum frequency concentration category; Threshold setting means for setting a first threshold value for discriminating the background consisting of the above and a second threshold value for discriminating the background consisting of solid and halftone dots, and the first maximum power value and the second maximum power value described above Are compared with the first and second threshold values, and it is determined that there is no background if the first maximum degree value <the first threshold value or the first maximum degree value + the second maximum degree value <the second threshold value. , 1st maximum In the case of numerical value ≧ first threshold value or in the case of the first maximum degree value + second maximum degree value ≧ second threshold value, it is determined that there is a background, and further, background determination means for calculating the background density, The second determination means determines the image data in the main scanning direction and the background of the original document determined by the first determination means for a target pixel having a block composed of a plurality of pixels extracted from the input image data. A feature amount is extracted from the result, and the target pixel determination means for determining whether the target pixel belongs to a solid, a photograph, a character, or a halftone dot, and a peripheral pixel existing around the target pixel, A feature amount is extracted from the image data in the main scanning direction and the background determination result of the document determined by the first determination unit, and whether the surrounding pixel belongs to a solid, photograph, character, or halftone dot region Surrounding pixel determination means for performing determination; Whether the line existing in the preceding stage in the sub-scanning direction belongs to the solid, photograph, character, or halftone dot type based on the determination result of the surrounding pixel determining means for the same line existing in the preceding stage in the sub-scanning direction Based on the determination results of the upper line determination means for determining the above and the surrounding pixel determination means for the same line existing in the subsequent stage of the target pixel, the photograph, character Or a lower line determination unit that determines which type of halftone dot belongs, and based on the determination results of the target pixel determination unit, the upper line determination unit, and the lower line determination unit, It is characterized in that it is determined whether the image belongs to solid, photo, character or halftone dot.
[0043]
In the present invention, the document type determination means for automatically determining the document type from the input image data can use the result based on the presence or absence of the background to determine the document type, so that the accuracy of determining the document type is improved.
In addition, instead of fixing the threshold value, it is possible to extract only specific image data having a predetermined frequency or more when determining the document type by setting the threshold value according to the type of each document. The discrimination accuracy can be improved.
In addition, since only the pixels that are clear to which area belong are extracted except for pixels having uncertain elements, and the document type is determined, the accuracy of determining the document type can be improved.
Further, when the document type discrimination means cannot discriminate the original, instead of performing processing in the default image mode, the fact that the document type is uncertain is displayed on the display means, and the user can be prompted to enter the processing mode. . Thus, even when the document type determination unit cannot determine the document, the user selects the processing mode via the input unit, so that image processing according to the original document type can be executed.
[0044]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0045]
As shown in FIG. 1, an image forming apparatus 10 according to the present embodiment includes a color image input device (image input means) 2, an image processing device 1, a color image output device 3, and an operation panel 4. .
For example, the color image input device 2 includes a scanner unit, and reads a reflected light image from a document as an RGB (R: red, G: green, B: blue) analog signal by a CCD (Charge Coupled Device). Is.
The color image output device 3 is a device that performs predetermined image processing in the image processing device 1 and outputs the result.
[0046]
The image processing apparatus 1 includes an A / D (analog / digital) conversion unit 11, a shading correction unit 12, a document type automatic discrimination unit 13, an input tone correction unit 14, a color correction unit 15, a black generation and under color removal unit 16, It comprises a spatial filter processing unit 17, an output tone correction unit 18, a tone reproduction processing unit 19, and a region separation processing unit 20.
[0047]
The A / D converter 11 converts an analog signal read by the image input device 2 into a digital signal.
The shading correction unit 12 performs shading correction for removing various distortions generated in the illumination system, the imaging system, and the imaging system of the image input apparatus 2.
[0048]
The automatic document type discrimination unit 13 is an image processing system employed in a color image processing apparatus such as a density signal for an RGB signal (RGB reflectance signal) from which various distortions have been removed by the shading correction unit 12. Converts the signal into an easy-to-use signal and determines the document type such as whether the input document image is a text document, a printed photo document, a photographic paper photo, or a combined character / printed photo document It is. Details will be described later.
[0049]
The input tone correction unit 14 adjusts the color balance and simultaneously performs image quality adjustment processing such as removal of background area density and contrast based on the determination result of the document type automatic determination unit 13.
[0050]
The color correction unit 15 performs color correction processing to remove color turbidity based on spectral characteristics of CMY (C: cyan, M: magenta, Y: yellow) color materials including unnecessary absorption components in order to realize color reproduction faithfully. Is to do. The color-corrected image signal is separated into a character, halftone dot, or photograph (other) region for each pixel by the region separation processing unit 20 based on the determination result of the document type automatic determination unit 13. . This region separation processing unit 20 sends a region identification signal indicating which region a pixel belongs to to the black generation and under color removal unit 16, the spatial filter processing unit 17, and the gradation reproduction processing unit 19 based on the separation result. Is output.
[0051]
The black generation and under color removal unit 16 performs black generation processing for generating a black (K) signal from the CMY three-color signals after color correction, while subtracting the K signal obtained by black generation from the original CMY signal to newly The undercolor removal process for generating a simple CMY signal is performed. As a result of these processes (black generation process / under color removal process), the CMY three-color signal is converted into a CMYK four-color signal.
[0052]
The spatial filter processing unit 17 performs spatial filter processing using a digital filter and corrects spatial frequency characteristics, thereby preventing blurring and graininess deterioration of the output image.
The output tone correction unit 18 performs output tone correction processing for converting a signal such as a density signal into a halftone dot area ratio that is a characteristic value of the image output device 3.
The gradation reproduction processing unit 19 performs gradation reproduction processing (halftone generation processing) in which an image is finally divided into pixels and processed so that each gradation can be reproduced.
[0053]
It should be noted that the image region extracted as a black character or possibly a color character by the region separation processing unit 20 is subjected to a high frequency in the sharpness enhancement processing in the spatial filter processing unit 17 in order to improve the reproducibility of the black character or the color character. The amount of frequency enhancement is increased. At the same time, in the halftone generation process, a binarization process or a multi-value process on a high-resolution screen suitable for high-frequency reproduction is selected.
[0054]
On the other hand, with respect to the region determined as a halftone dot by the region separation processing unit 20, the spatial filter processing unit 17 performs a low pass filter process for removing the input halftone dot component. At the same time, in the halftone generation process, a binarization process or a multi-value process is performed on the screen with an emphasis on gradation reproducibility.
[0055]
The operation panel 4 includes a liquid crystal display as a display unit, and setting buttons as input units for setting a numeric keypad, a copy button, a processing mode, and the like. As will be described later, in the present embodiment, the determination result in the automatic document type determination unit 13 is displayed to the user via the liquid crystal display. The user can select and input a processing mode via a setting button or the like based on the determination result.
[0056]
As described above, the image data subjected to the above-described processes is temporarily stored in a storage unit (not shown), read at a predetermined timing, and input to the color image output device 3. The above processing is performed by a CPU (Central Processing Unit).
[0057]
The image output device 3 outputs image data onto a recording medium (for example, paper). Examples of the image output device 3 include a color image output device using an electrophotographic method or an ink jet method. It is not limited.
[0058]
The present invention is characterized in the image processing apparatus 1 of the image forming apparatus 10, and particularly in the document type automatic discrimination unit 13. Therefore, an embodiment of the automatic document type determination unit (document type determination unit) 13 will be described in detail below.
[0059]
<First Embodiment>
FIG. 2 is a block diagram showing the document type automatic discrimination unit 13-1 in the first embodiment.
First, as shown in FIG. 2, the document type automatic determination unit 13-1 of the first embodiment includes a signal conversion unit 21, a first determination unit (first determination unit) 31, and a second determination unit (second Determination means) 41.
[0060]
The signal converter 21 converts the RGB reflectance signal into a density signal and converts the RGB density signal into a complementary CMY signal.
The first determination unit 31 includes a histogram generation unit (histogram generation unit) 32, a maximum frequency density category extraction unit (maximum frequency density category extraction unit) 33, a threshold setting unit (threshold setting unit) 34, and a background determination unit (background determination). Means) 35. Then, the first determination unit 31 determines whether or not the document has a background, and sets the density category determined to have the background as the background density category.
[0061]
The histogram creation unit 32 creates a density histogram indicating the relationship between the density of each pixel of the document image and its frequency. Specifically, as shown in FIG. 4, for example, image data in the main scanning direction (see FIG. 4B) read during the forward path (feed) of the scanner (image input apparatus 1), a plurality of pixels are recorded. An average value (for example, 7 × 7 pixels: see FIG. 4B) is calculated, and a density histogram (see FIG. 4A) is created. For example, as shown in FIG. 3B, when the background is formed of halftone dots (background (halftone dots)), a density histogram is created for each pixel as shown in FIG. A characteristic having two maximum power values is shown, and the maximum power value may become small and may not be detected as a background. On the other hand, when an average value of a plurality of pixels is obtained as shown in FIG. 4B and a density histogram is created, as shown in FIG. It is possible to detect as a background (in a solid background, the average value of a plurality of pixels and the density value of the pixels in the background area are almost the same, and the density category having the maximum power value does not change).
[0062]
As shown in FIGS. 5 to 7, the maximum power density category extraction unit 33 extracts the maximum power value in the density histogram created by the histogram creation unit 32 as a first maximum power value (MAX1) and MAX1. Is extracted as the first maximum power density category.
Further, the maximum power density category extraction unit 33 extracts the second maximum power value (MAX2) other than the density zone adjacent to the first maximum power density zone, and sets the density zone to which MAX2 belongs to the second maximum power frequency. Extract as concentration category. That is, the second largest power value in the density section that is not adjacent to at least the density section having MAX1 is extracted as MAX2.
[0063]
The threshold value setting unit 34 sets a first threshold value for discriminating from a solid background and a second threshold value for discriminating from a solid and halftone background.
The background determination unit 35 compares MAX1 and MAX2 with the first and second threshold values and performs the following determination.
[0064]
When MAX1 ≧ first threshold value, it is determined that there is a background, and the density category to which MAX1 belongs is set as the background density category. For example, as shown in FIG. 5, this determination uses the fact that the first maximum power density classification (so-called white background) in a text document composed of a solid background is higher than other density values.
[0065]
When MAX1 + MAX2 ≧ second threshold value, it is determined that there is a background, and the density classification to which MAX1 and MAX2 belong is set as the background density classification. For example, as shown in FIG. 6, this determination is performed by using a first original power density class indicating a white background and a second maximum power density class indicating a halftone dot background in a character document including a solid / halftone background. However, it uses that it is higher than other density values.
[0066]
  MAX1<In the case of the first threshold or MAX1 + MAX2<In the case of the second threshold, it is determined that there is no background. For example, as shown in FIG. 7, this determination utilizes the fact that the first maximum power density classification is not significantly higher than other density values in a photographic document made of photographic paper.
[0067]
Next, the second determination unit 41 will be described.
First, as shown in FIG. 2, the second determination unit 41, in the signal of each color component converted by the signal conversion unit 21, is a region where the processing target pixel is solid, that is, a region where the density is substantially constant, photographic paper (photograph ), A signal processing unit 42 (42c, 42m, 42y) provided for each color component signal (C, M, Y) for determining whether the region belongs to a character or a halftone dot, and each of these signal processing Based on the result of the signal processing for each color component signal by the units 42c, 42m, and 42y, a determination unit for determining whether the pixel of interest finally belongs to a type of photographic paper, character, or halftone dot As a general determination unit 47.
[0068]
As shown in FIG. 2, each of the signal processing units 42c, 42m, and 42y includes an attention pixel determination unit 45, a surrounding pixel determination unit 48 (48a, 48b, 48c, 48d, 48e, and 48f), and an upper line determination unit. 43, a lower line determination unit 44, and a signal-specific determination unit 46.
[0069]
The pixel-of-interest determination unit 45 extracts the feature amount of the pixel of interest from image data in the main scanning direction in an n × n block such as 3 × 3 centered on the pixel of interest. This is a pixel-of-interest determining means for determining whether it belongs to a solid, photographic paper, character or halftone dot.
[0070]
The peripheral pixel determination unit 48 performs the same processing as the target pixel determination unit 45 on the target pixel determination unit 45 and the peripheral pixels a, b, c, d, e, and f that exist around the target pixel, This is a peripheral pixel determination means for determining the type of peripheral pixels a, b, c, d, e, and f.
[0071]
The upper line determination unit 43 determines an upper line for the target pixel X based on the peripheral pixel determination results of the peripheral pixels a, b, and c above the target pixel X, that is, in the preceding stage in the sub-scanning direction. It is.
The lower line determination unit 44 is a lower line determination unit that determines the lower line for the target pixel X based on the peripheral pixel determination result of the peripheral pixels d, e, and f below the target pixel X, that is, downstream of the sub-scanning direction. .
[0072]
The signal determination unit 46 is a signal determination unit that performs determination for each signal based on the determination results of the target pixel determination unit 45, the upper line determination unit 43, and the lower line determination unit 44. Then, based on the determination result of the signal-specific determination unit 46 in each of the signal processing units 42c, 42m, and 42y, the above-described comprehensive determination unit 47 converts the pixel of interest X into any type of photographic paper, text, or halftone dot. A final determination is made as to whether it belongs.
[0073]
In the above example, when the types of the peripheral pixels a, b, c, d, e, and f are determined, the peripheral pixel determination units 48 a, 48 b, 48c, 48d, 48e, and 48f are provided.
[0074]
However, the present invention is not necessarily limited to this, and the peripheral pixel determination units 48a, 48b, 48c, 48d, 48e, and 48f are combined into one, and the determination results of the peripheral pixels a, b, c, d, e, and f are displayed as upper line determination units. 43 and the lower line determination unit 44 may be sequentially stored, and the determination of the upper line and the lower line may be performed based on the result. That is, the peripheral pixel determination units 48a, 48b, 48c, 48d, 48e, and 48f all perform the same processing, and therefore, a single peripheral pixel determination unit is shared and processed in time series. Is possible.
At this time, the peripheral pixel a, b, c, d, e, and f are first subjected to the determination process of the peripheral pixel a, and then the peripheral pixel b, the peripheral pixel c,. Judgment processing is performed.
[0075]
For the peripheral pixels a, b, and c existing in the previous stage of the target pixel X, the respective determination results are stored in the upper line determination unit 32, while the peripheral pixels d, e, and f existing in the subsequent stage of the target pixel X are stored. Is stored in the lower line determination unit 44. Then, after a predetermined number of discrimination results are stored, the upper line and the lower line are judged based on the respective results.
[0076]
Further, each determination process in the upper line determination unit 43 and the lower line determination unit 44, and each determination result of the upper line determination unit 43, the target pixel determination unit 45, and the lower line determination unit 44 input to the signal-specific determination unit 46 Alternatively, a priority order is determined for each determination result of each signal for each color component from each signal determination unit 46, 46, 46 input to the overall determination unit 47. When the determination results of the pixels entering the signal determination unit 46 and the comprehensive determination unit 47 are different from each other, the determination is performed according to the priority order of the signal determination unit 46 and the comprehensive determination unit 47. For example, when the determination result differs for each color component, halftone dot> character> printing paper> background. This is because if the result of halftone dots and characters is obtained for each color component, it is determined that the number of inversions is large, and this is a feature that cannot be seen in characters, so that halftone dots are given priority.
[0077]
Regarding the priority order, since the reliability of the determination result varies depending on the first and second threshold values used in the first determination unit 31, it is desirable to determine the priority order based on the reliability of the determination result.
[0078]
In addition, regarding the priority of each determination process in the upper line determination unit 43 and the lower line determination unit 44, each of the upper line determination unit 43 and the lower line determination unit 44 has a plurality of peripheral pixels a, b, c and peripheral pixels. Based on the result of d · e · f, the upper line and the lower line are determined. If the results of each peripheral pixel a · b · c and each peripheral pixel d · e · f are different, the final order is determined by the priority order. Make a good judgment.
The priority order is determined in advance based on, for example, setting of a threshold value used for pixel discrimination processing.
[0079]
Assume that it is determined that the peripheral pixel a is solid and the peripheral pixel b is a halftone dot. In this case, the threshold value for extracting halftone dots is set to a level at which it is difficult to extract halftone dots, and the threshold values for other areas are set to be loose compared to the extraction level for halftone dots. Is determined, the reliability of the result is determined to be high. Priorities are determined based on such information.
[0080]
Next, the configuration of the target pixel determination unit 45 will be described with reference to FIG. In the present embodiment, each of the surrounding pixel determination units 48a, 48b, 48c, 48d, 48e, and 48f has the same determination mechanism as the target pixel determination unit 45. Only for the unit 45.
[0081]
The pixel-of-interest determination unit 45 includes an adjacent pixel density difference calculation unit 51, a rising / falling determination unit 52, an inversion number calculation unit 53, a pixel determination unit 54, a solid pixel determination threshold setting unit 55, a rising edge, as shown in FIG. A falling judgment threshold setting unit 56 and an inversion number threshold setting unit 57 are included.
[0082]
The adjacent pixel density difference calculation unit 51 calculates a density difference (adjacent pixel density difference) between adjacent pixels in the main scanning direction including the target pixel X.
As illustrated in FIGS. 13 to 16, the rising / falling determination unit 52 determines whether the pixel of interest X belongs to a solid photographic paper based on the calculated adjacent pixel density difference, or whether the pixel is a rising pixel. A falling pixel is discriminated. The details of FIGS. 13 to 16 will be described later.
[0083]
The inversion number calculation unit 53 does not count even if a plurality of rising pixels or falling pixels continue in a certain region in the main scanning direction, that is, M pixels (M is an integer of 2 or more) with respect to the target pixel X, and from the rising It counts the number of falling and the number of times of reversal from falling to rising.
The pixel determination unit 54 determines whether the target pixel X is a character or a halftone dot based on the calculated inversion number, and further, the background determination unit 35 detects the density value for the pixel determined to be a halftone dot. In comparison with the density of the background (halftone dot), it is determined whether it is a halftone dot or a background (halftone dot).
[0084]
The solid pixel determination threshold value setting unit 55 is provided in the rising / falling determination unit 52 described above, and the pixel of interest X is solid with respect to the result of the pixel of interest X calculated by the adjacent pixel density difference calculation unit 51. A solid pixel determination threshold value for determining whether or not the pixel belongs is set. The solid pixel determination threshold setting unit 55 can separate a solid background region even when the background is small and the background determination unit 35 determines that there is no background region.
[0085]
Like the above-described pixel determination threshold setting unit 55, the rising / falling determination threshold setting unit 56 is provided in the rising / falling determination unit 52, and the target pixel X calculated by the adjacent pixel density difference calculation unit 51 is provided. The rising / falling determination threshold value for determining whether the target pixel X is a rising pixel or a falling pixel is set for the above result.
[0086]
The inversion number threshold setting unit 57 is provided in the pixel determination unit 54, and based on the inversion number calculated by the inversion number calculation unit 53, whether the target pixel X belongs to a character or a halftone dot. Is set as a third threshold value for discriminating.
[0087]
Next, an image determination method in the signal conversion unit 21, the first determination unit 31, and the second determination unit 41 described above will be described with reference to the flowcharts shown in FIGS. Further, the symbol indicating the step is “S”.
[0088]
First, the signal converter 21 converts the RGB reflectance signal into a density signal and converts the RGB density signal into a complementary CMY signal (S1). Next, the histogram creation unit 32 creates a density histogram indicating the relationship between the density of each pixel of the document image and its frequency (S2). Then, the maximum power density category extraction unit 33 extracts the first and second maximum power density categories (S3). Thereafter, the background determination unit 35 determines the presence / absence of the background area, and if there is a background area, sets the background density classification (S4). The image processing from S1 to S4 corresponds to the first determination step.
[0089]
Next, the signal conversion unit 21 converts the RGB reflectance signal into a density signal again, converts the RGB density signal into a complementary CMY signal (S5), and outputs the converted signal to the second determination unit 41. The converted CMY signal is input to the target pixel determination unit 45 of the second determination unit 41, and the adjacent pixel density difference calculation unit 51 calculates the density difference with the adjacent pixels in the main scanning direction including the target pixel X ( S6).
[0090]
Then, the rising / falling determination unit 52 compares the calculated absolute value of the adjacent pixel density difference with the solid pixel determination threshold (S7). When the calculated absolute value of the adjacent pixel density difference is smaller than the solid pixel determination threshold, the rising / falling determination unit 52 has a relationship of “maximum background density> pixel density> minimum background density”. Whether or not the above is satisfied is confirmed (S9). If it is satisfied, it is determined that the background is solid (S10). If it is not satisfied, it is determined to be a photographic paper photograph (S11). Note that the background determination unit 35 obtains the minimum and maximum values of the background density. The minimum and maximum values of the background density are the minimum value and the maximum value of the density classification determined as the background.
[0091]
On the other hand, in S7, for the pixel having the larger absolute value of the adjacent pixel density difference, the rise / fall determination unit 52 compares the calculated absolute value of the adjacent pixel density difference with the rise / fall determination threshold value. (S8).
[0092]
A pixel having an absolute value of the adjacent pixel density difference larger than the rising / falling determination threshold and having a positive adjacent pixel density difference is determined as a falling pixel. A pixel having an absolute value of the adjacent pixel density difference larger than the rising / falling determination threshold and having a negative adjacent pixel density difference is determined as a rising pixel.
[0093]
In this example, the adjacent pixel density difference is obtained by subtracting the density value of the right pixel from the density value of the left pixel, and positive / negative is determined accordingly. Also, the rising pixel / falling pixel is determined for the left pixel based on the density difference.
If the rising / falling determination threshold value is larger than the absolute value of the adjacent pixel density difference in S8, it is determined as photographic paper (S11).
[0094]
Next, when it is determined in S8 that the absolute value of the adjacent pixel density difference is larger than the rising / falling determination threshold, the inversion number calculation unit 53 calculates the inversion number (S12).
[0095]
In this inversion number calculation, as shown in FIG. 11, even if a plurality of rising pixels or falling pixels continue in a certain region composed of M pixels such as 30 pixels in the main scanning direction, the rising pixels are not counted. Are detected and counted from the falling pixel to the falling pixel and from the falling pixel to the rising pixel.
[0096]
Specifically, as shown in FIG. 11, both the fifth and sixth pixels from the left are determined as rising pixels “1”, but when obtaining the inversion number, only the fifth pixel is counted, The sixth pixel is not counted. In this way, as shown in FIG. 12, for each n × n pixel, the rising pixel / falling pixel in a certain area composed of M pixels such as 30 pixels in the main scanning direction is determined. The fixed area shown in FIG. 12 indicates the range of the fixed area in the main scanning direction when the rising pixel / falling pixel is determined, and indicates that a line memory is provided for each peripheral pixel. It is not a thing.
[0097]
Next, when the above-described inversion number is calculated in S12, the pixel determination unit 54 compares the counted inversion number with an inversion number threshold (S13). If the inversion number is smaller than the inversion number threshold, it is determined that the character is a character (S14).
[0098]
On the other hand, if the inversion number is larger than the inversion number threshold, the pixel determination unit 54 determines whether or not the pixel density satisfies the relationship of “maximum background density> pixel density> minimum background density”. Confirm (S15). If it is satisfied, it is determined to be a background (halftone dot) (S17), and if not satisfied, it is determined to be a halftone dot (S16). The minimum and maximum values of the background density are obtained by the background determination unit 35 as in the above case.
[0099]
In this way, the determination process is performed, and the final determination result for the pixel of interest is obtained in consideration of the priorities described above. The determination result for each pixel is counted by the comprehensive determination unit 47 and compared with a predetermined threshold value to determine the document type. For example, if the characters and halftone dots are equal to or greater than the threshold, the document is determined to be a character / printed photo document. If the character and background (halftone dot) are equal to or greater than the threshold value, the background (halftone dot) may be determined to be a text document, for example.
As described above, in the image processing according to the present invention, the document type can be determined using the minimum and maximum values of the background density obtained by the background determination unit 35. The processing from S5 to S17 corresponds to the second determination step.
[0100]
As described above, the process for determining the presence / absence of the background by the first determination unit (first determination step) and the process by the second determination unit for extracting the feature amount based on the presence / absence of the background and determining the document type (first) (2 determination step) may be performed by scanning the document once each (prescanning is performed twice before performing the main scan), but the forward path when the image input device 2 prescans the document image. It is desirable to perform the first determination step during (feed) and to perform the second determination step during return (return). By doing so, it is possible to effectively use the pre-scan return path and to improve the document type discrimination accuracy.
[0101]
Here, a representative example of the density distribution according to the type of each image will be described based on the distribution charts shown in FIGS. In addition, the vertical axis | shaft of the figure shows a density value.
Normally, as shown in FIG. 13, the density distribution diagram of a solid image has a very small adjacent pixel density difference because the density change is small. Accordingly, it is possible to determine that a pixel having a smaller adjacent pixel density difference than the solid pixel determination threshold is solid.
[0102]
Next, as shown in FIG. 14, the density distribution diagram of an image of a photographic paper photograph has a smooth density change, and the adjacent pixel density difference is small and slightly larger than solid. Also, it is possible to determine that the adjacent pixel density difference is large and smaller than the rising / falling threshold is a photographic paper photograph. Also, since there are solid areas in which the adjacent pixel density difference is very small even in photographic paper photographs, the pixel density of such areas is “maximum background density> pixel density> background density as described above. By confirming whether or not the relationship of “minimum value” is satisfied, it is possible to distinguish from the solid region of the background.
[0103]
Further, as shown in FIG. 15, the density distribution diagram of a halftone dot image has a large adjacent pixel density difference, and there are as many rising and falling pixels as the number of halftone dots, and the inversion number becomes very large. It is possible to determine that a pixel density difference is larger than the rising / falling determination threshold and the inversion number is larger than the inversion number threshold as a halftone dot. In addition, as described above, it is possible to distinguish the pixel density from the background (halftone dot) by checking whether or not the pixel density satisfies the relationship of “maximum background density> pixel density> minimum background density”. It is.
[0104]
Finally, as shown in FIG. 16, the density distribution diagram of the character image has a very large adjacent pixel density difference, but the number of rising pixels and falling pixels is present at the edge portion of the character. Since the number of inversions decreases, it is possible to determine that a character whose inversion number is smaller than the inversion number threshold is a character.
[0105]
In addition, it is possible to perform a wider range of processing by arbitrarily adjusting each of the set threshold values. For these threshold values, a plurality of expected values are stored in advance in a ROM (Read Only Memory) or the like, and values stored in a storage means (not shown) such as a memory are set by a switch or the like as necessary. You should be able to do it.
[0106]
By the processing operation described above, the type of document (type of image) is determined, and based on the result, as shown in FIG. 1, the subsequent input tone correction / color correction / black generation under color removal processing / space is performed. Filter processing, gradation reproduction processing, and area separation processing are switched.
[0107]
An example of the switching will be shown below.
[0108]
For example, when it is determined that the document is a character document, the area separation processing unit 20 validates the area separated as a character or line drawing, and erroneously identifies a continuous tone such as halftone dot or photographic paper. It is regarded as separation (because it is a character document, it may be misidentified depending on the type of document) and is not reflected. In the input tone correction unit 14 and the tone reproduction processing unit 19, a large amount of highlight is removed or a correction curve that increases the contrast is used. The color correction unit 15 and the black generation and under color removal unit 16 perform color correction processing with an emphasis on saturation on color characters, and set a large amount of black generation for black characters in the black generation and under color removal processing. The spatial filter processing unit 17 switches parameters such as emphasizing edges with spatial filter processing and setting filter coefficients so as to weaken smoothing processing.
[0109]
If it is determined that the document is a character / photographic paper photographic original, processing using an intermediate parameter between the character original processing and the photographic paper photographic original processing is performed in each processing. Then, the area separation processing unit 20 validates the area separated as a character, line drawing, or photographic paper, and regards the area separated as a halftone dot as erroneous separation (even if it is a character / photographic paper original). However, depending on the type of document, there is a case where it is erroneously determined), so that it is not reflected. The input tone correction unit 14 and tone reproduction processing unit 19 use the intermediate parameters between the photographic paper photo manuscript processing and the character manuscript processing depending on whether the text manuscript or the photographic paper photo manuscript is important. Remove and adjust contrast. The color correction unit 15 and the black generation and under color removal unit 16 perform color correction processing so that the intensity of saturation and the balance of gradation are not excessive. In the black generation and under color removal processing, the black generation amount is adjusted to such an extent that the photographic paper photographic image is not affected.
[0110]
Second Embodiment
Next, the document type automatic determination unit 13-2 according to the second embodiment of the present invention will be described.
In the first embodiment, the type of document is determined by the document type automatic determination unit 13 including the first determination unit 31 and the second determination unit 41. However, in the present invention, the document type can also be determined by the document type automatic determination unit 13-2 including only the second determination unit 41.
[0111]
FIG. 17 is a block diagram illustrating the document type automatic determination unit 13-2 according to the second embodiment. In addition, about the part which has the same function as the part used in 1st Embodiment, the same code | symbol is attached and the description is abbreviate | omitted. Note that the present invention is not limited to this.
[0112]
As shown in this figure, the configuration is substantially the same as the second determination unit 41 in FIG. However, the configuration of the target pixel determination unit 145 and the peripheral pixel determination unit 148 (148a, 148b, 148c, 148d, 148e, and 148f) is different from the target pixel determination unit 45 and the peripheral pixel determination unit 48 of the first embodiment. Therefore, the pixel-of-interest determination unit 145 and the surrounding pixel determination unit 148 will be described. Note that the surrounding pixel determination unit 148 has the same determination mechanism as that of the target pixel determination unit 145, and therefore the description will be given only for the target pixel determination unit 145.
[0113]
As illustrated in FIG. 18, the target pixel determination unit 145 includes an adjacent pixel density difference calculation unit 51, an inversion number calculation unit 53, a pixel determination unit 154, and a solid pixel determination threshold that are the same as the target pixel determination unit 45 of the first embodiment. In addition to the setting unit 55, the rising / falling determination threshold setting unit 56, and the inversion number threshold setting unit 57, a comparison threshold setting unit 61 is provided. The rising / falling determination unit 52 is not provided.
[0114]
The comparison threshold value setting unit 61 creates a three-dimensional frequency distribution diagram composed of the inversion number, adjacent pixel density difference, and frequency, which are image feature amounts, and in order to accurately determine the type of document, for each document to be read Set an appropriate threshold. The pixel determination unit 154 uses the threshold set by the comparison threshold setting unit 61 to (1) compare and determine the inversion number threshold and the inversion number, and (2) absolute rise / fall determination threshold and the adjacent pixel density difference. (3) A comparison determination between the solid pixel determination threshold value and the absolute value of the adjacent pixel density difference is performed for each pixel.
[0115]
Here, the relationship between the adjacent pixel density difference, the inversion number, and the frequency of each document type (base / printing paper, characters, halftone dots) will be described with reference to FIGS. 19 and 20. In these drawings, the X axis indicates the number of inversions, the Y axis indicates the adjacent pixel density difference, and the Z axis indicates the frequency, and the frequency distribution of each normal region is shown. In FIG. 19 and FIG. 20, for the sake of simplification, the distribution on the XY plane excluding the frequency distribution on the Z axis is shown.
[0116]
As shown in FIG. 19, a base / printing paper (printing paper photograph), characters, and halftone dots usually appear. In the background / photographic paper photograph, the difference between the number of inversions and the adjacent pixel density tends to appear in a small area. For characters and halftone dots, the adjacent pixel density difference appears over a wide range, but the inversion number tends to appear more in the halftone dots.
[0117]
By the way, as shown in this figure, there is a region where characters and halftone dots intersect. Therefore, as shown in FIG. 20, a document is determined by providing a threshold at a location where characters / halftone dots appear prominently. For example, a three-dimensional frequency distribution diagram composed of the inversion number, the adjacent pixel density difference, and the frequency is created, and the threshold value is determined so that the character and halftone dot regions do not overlap.
[0118]
Specifically, a threshold value is set at which the frequency of the character area / halftone dot area is equal to or greater than a predetermined value.
[0119]
The character area is defined by a rising / falling determination threshold 1, a rising / falling determination threshold 2, an inversion number threshold 1, and an inversion number threshold 2. The rising / falling determination threshold 1 and the rising / falling determination threshold 2 are determined based on the adjacent pixel density difference. As shown in FIG. 19, since a part where a character appears to some extent can be specified by the adjacent pixel density difference, an upper limit and a lower limit of the part are set as threshold values. The inversion number threshold value 1 and the inversion number threshold value 2 are the upper limit (inversion number threshold value 2) and lower limit (inversion number) of the inversion number frequently appearing in the rising / falling determination threshold value 1 and rising / falling determination threshold value 2 described above. It is defined as the number threshold 1).
[0120]
The halftone dot region is defined by an inversion number threshold 3, an inversion number threshold 4, a rising / falling determination threshold 3, and a rising / falling determination threshold 4. As shown in FIG. 19, the reversal number threshold value 3 and the reversal number threshold value 4 can specify a portion where a halftone dot appears to some extent from the reversal number, so the upper limit and the lower limit of the portion are set as threshold values. The rising / falling determination threshold 3 and the rising / falling determination threshold 4 are the upper limit (rising / falling determination threshold 4) of adjacent pixel density differences that frequently occur within the range of the inversion number threshold 3 and the inversion number threshold 4. It is determined as the lower limit (rising / falling judgment threshold 3).
As described above, the present invention extracts only the pixels with high accuracy determined to belong to the character area or the dot area, and improves the accuracy of document type discrimination.
[0121]
In addition, as shown in FIG. 21, in order to reduce the memory area, an area to be counted for characters / halftone dots may be determined. That is, for characters, the number of inversions changes for one original, but the adjacent pixel density difference does not change much. For this reason, the setting is made so that the count width of the inversion number is narrow and the adjacent pixel density difference is widely counted. On the other hand, in the halftone dot, the adjacent pixel density difference changes with respect to one original, but the inversion number does not change so much.
For this reason, the count width of the inversion number is set to be wide and the adjacent pixel density difference is set to be narrowly counted.
[0122]
Next, a processing method by the pixel-of-interest determination unit 145 shown in FIGS. 22 and 23 will be described with reference to flowcharts.
First, the signal conversion unit 21 converts an RGB reflectance signal into a density signal and converts the RGB density signal into a complementary CMY signal (S21). Next, the inversion number calculation unit 53 calculates the inversion number (S22), and the adjacent pixel density difference calculation unit 51 calculates the density difference between adjacent pixels in the main scanning direction (S23).
[0123]
Then, the comparison threshold setting unit 61 creates a three-dimensional frequency distribution diagram including the inversion number, the adjacent pixel density difference, and the frequency (S24). Then, from the distribution diagram, the rising / falling determination threshold 1, the rising / falling determination threshold 2, the inversion number threshold 1, the inversion number threshold 2, and the halftone dot are reliably detected. The falling judgment threshold 3, rising / falling judgment threshold 4, inversion number threshold 3, and inversion number threshold 4 are set (S25). The rising / falling determination thresholds 1 to 4 are stored in the rising / falling determination threshold setting unit 56, and the inversion number thresholds 1 to 4 are stored in the inversion number threshold setting unit 57. The processing so far is performed only by the pixel-of-interest determination unit 145 of the automatic document type determination unit 13-2 shown in FIG. 17, and in the processing described below, all the processing units of the automatic document type determination unit 13-2. Works.
[0124]
Next, the original is read again, the signal conversion unit 21 converts the RGB reflectance signal into a density signal and converts the RGB density signal into a complementary CMY signal (S26), and the inversion number calculation unit 53 calculates the inversion number. Calculate (S27). The adjacent pixel density difference calculation unit 51 calculates the adjacent pixel density difference (S28).
[0125]
Thereafter, the pixel determination unit 154 determines a target pixel using the inversion number / adjacent pixel density difference calculated in S27 and S28 and each threshold value set so far.
First, the pixel determination unit 154 determines that “inversion number threshold 3 <calculated inversion number <inversion number threshold 4 and rise / fall determination threshold 3 <absolute value of calculated adjacent pixel density difference <rise / fall determination”. It is determined whether or not the relationship of “threshold value 4” is satisfied (S29). If it is satisfied, it is regarded as a halftone dot (S30).
[0126]
On the other hand, when the relationship in S29 is not satisfied, the pixel determination unit 154 determines that “the inversion number threshold 1 <the calculated inversion number <the inversion number threshold 2 and the rising / falling determination threshold 1 <the calculated adjacent pixel density difference calculation”. It is determined whether or not the relationship of absolute value <rising / falling threshold value 2 ”is satisfied (S31). If it is satisfied, it is regarded as a character (S32).
[0127]
On the other hand, when the relationship in S31 is not satisfied, the pixel determination unit 154 determines whether or not the relationship of “absolute pixel density difference <absolute value <solid pixel determination threshold” is satisfied (S33). If it is satisfied, it is regarded as a ground (S34). If not, it is regarded as photographic paper (S35).
[0128]
As in the case of the first embodiment, the determination result is determined in consideration of the priority order, and the result for the target pixel is determined. The determination result for each pixel is counted by the comprehensive determination unit 47 and determined in advance. The document type is determined by comparing with a threshold value.
As described above, the process of setting an appropriate threshold value from S21 to S25, that is, the feature amount of the inversion number and the adjacent pixel density difference in order to extract pixels that are determined to belong to the character area or the halftone dot area reliably. A process for setting an appropriate threshold based on this and a process from S26 to S35 for determining the document type using these thresholds each scan the document once (pre-scan twice before performing the main scan). However, the threshold value is set during the forward path (feed) when the document image is pre-scanned by the image input device 2, and the document type is determined using the threshold value during the return path (return). It is desirable to do. By doing so, it is possible to effectively use the pre-scan return path and to improve the document type discrimination accuracy.
As described above, the image processing apparatus can perform document type determination even using only the second determination unit 41.
[0129]
<Embodiment 3>
Next, the document type automatic discrimination unit 13-3 according to the third embodiment of the present invention will be described.
FIG. 24 is a block diagram illustrating the document type automatic determination unit 13-3 according to the third embodiment. In addition, about the part which has the same function as the part used in 1st Embodiment, the same code | symbol is attached and the description is abbreviate | omitted. Note that the present invention is not limited to this.
[0130]
First, as shown in FIG. 24, the automatic document type discrimination unit 13-3 includes a signal conversion unit 21, a judgment block unit 71, a main scanning direction judgment unit 72 (72c, 72m, 72y; area judgment unit), and a sub scanning direction. The determination unit 73 (73c / 73m / 73y; area determination unit), the signal-specific determination unit 74 (74c / 74m / 74y), and the comprehensive determination unit (original determination unit) 75 are configured. Note that the main scanning direction determination unit 72, the sub-scanning direction determination unit 73, and the signal-specific determination unit 74 are arranged for each CMY signal.
[0131]
The signal conversion unit 21 converts the RGB reflectance signal input from the shading correction unit 12 into a density signal, converts the RGB density signal into a complementary CMY signal, and outputs the converted signal to the determination block unit 71. .
[0132]
The determination block unit 71 is for storing image data of a block composed of a plurality of n × m pixels such as 15 × 7 for the converted CMY signal. The main scanning direction determination unit 72 extracts, from the image data of the determination block unit 71, image data in the main scanning direction including the target pixel, that is, in the direction orthogonal to the scanning direction of the scanner (image input device). Each pixel is separated into a character, halftone dot, character or halftone dot, background, photographic paper photograph, background or photographic paper photograph area.
[0133]
The sub-scanning direction determining unit 73 extracts image data in the sub-scanning direction including the target pixel, that is, the same direction as the scanning direction of the scanner, from each image data of the determination block unit 71, , Character or halftone dot, background, photographic paper photograph, background or photographic paper photograph area.
[0134]
The signal discriminating unit 74 discriminates each signal based on the determination result and priority of the main scanning direction determination unit 72 and the sub-scanning direction determination unit 73 (priority with respect to the results in the main scanning direction and the sub-scanning direction). It is.
[0135]
The overall determination unit 75 further performs final pixel determination based on the result of the signal-specific determination unit for each signal. Priorities are determined for the signal (region identification signal) of each pixel that enters the signal-specific determination unit and the comprehensive determination unit. If the pixel determination results that enter the respective determination units differ, the priority order is determined. Make a decision.
[0136]
As for the priority order, the data size of the image in the main scanning direction and the sub scanning direction stored in the determination block unit 71 (because the data (number of pixels) in the main scanning direction and the sub scanning direction differs depending on the block size) Since the reliability of the determination result varies depending on the threshold value used in the resolution and area separation processing, it is desirable to determine the priority order based on the reliability of the determination result. For example, if even one image area is included, it is validated. In the case of a color manuscript, all black characters have a characteristic amount as a character having the same color component signal. For example, in a red character, the MY signal has a characteristic amount as a character, but does not have a C signal. In this way, it is possible to cope with a case where the pixel density value largely changes depending on the color component signal.
[0137]
Next, specific configurations of the main scanning direction determination unit 72 and the sub scanning direction determination unit 73 will be described with reference to FIG. That is, both the main scanning direction determination unit 72 and the sub scanning direction determination unit 73 have the same configuration. Further, the pixels used in the main scanning direction determination unit 72 are pixels only in the main scanning direction of the n × m determination block including the target pixel stored in the determination block unit 71, while the sub scanning direction determination unit 73 The pixels to be used are pixels only in the sub-scanning direction of the n × m determination block including the target pixel.
[0138]
First, as shown in FIG. 25, the main scanning direction determination unit 72 or the sub scanning direction determination unit 73 includes a minimum density value calculation unit 81, a maximum density value calculation unit 82, a maximum density difference calculation unit 83, and a total difference value calculation. A section 84, a determination area setting section 85, a character / halftone determination section 86, and a background / photographic paper determination section 87.
[0139]
The minimum density value calculation unit 81 and the maximum density value calculation unit 82 are for calculating the minimum density value and the maximum density value in the pixel in the main scanning direction or the sub scanning direction.
The maximum density difference calculator 83 is for calculating the maximum density difference using the minimum density value and the maximum density value calculated by the minimum density value calculator 81 and the maximum density value calculator 82.
The sum difference value calculation unit 84 is for calculating the sum of absolute values of density differences between adjacent pixels.
[0140]
The determination area setting unit 85 compares the maximum density difference calculated by the maximum density difference calculation unit 83 and the total difference value calculated by the total difference value calculation unit 84 with each threshold value, thereby comparing the background area. -It is for separating into a photographic paper (photo) area and a character area / halftone dot area.
[0141]
The character / halftone dot determination unit 86 determines that the pixel of interest is a character region, a halftone dot region, a character, or a halftone dot region (which is unknown) with respect to the pixels determined as the character / halftone dot region by the determination region setting unit 85. It is for determining to which one of these.
[0142]
The background / photographic paper determination unit 87 selects a pixel of interest as a background region, a photographic paper region, a background, or a photographic paper region (which is unknown) with respect to the pixels determined as the background / photographic paper region by the determination region setting unit 85. It is for determining to which one of these.
[0143]
The determination area setting unit 85 separates the result calculated by the maximum density difference calculation unit 83 of the target pixel into a background / printing paper (photo) area and a character / halftone dot area. A maximum density difference threshold value setting unit 88 for setting a maximum density difference threshold value as a threshold value of the image, and a background / printing paper region and a character / halftone dot region for the result calculated by the total difference value calculation unit 84 of the target pixel And a total difference value setting unit 89 for setting a total difference value threshold value as a second threshold value.
[0144]
Further, the character / halftone dot determination unit 86 includes a character determination threshold value setting unit 90 for setting a character determination threshold value as a fifth threshold value for determining that the target pixel belongs to the character region, and the target pixel is a halftone dot. And a halftone dot threshold value setting unit 91 for setting a halftone dot threshold value as a sixth threshold value for determining that the image belongs to the area. Further, the background / photographic paper determination unit 87 determines a photographic paper determination threshold value setting unit 92 as a third threshold value for determining that the target pixel belongs to the photographic paper region, and determines that the target pixel belongs to the background region. A background determination threshold value setting unit 93 serving as a fourth threshold value;
[0145]
Here, an example of pixel density distribution in the character / halftone dot region and the photographic paper photograph / background region will be described with reference to FIGS. Further, a distribution diagram based on the maximum density difference and the total difference value for each region will be described with reference to FIGS. 30 and 31 (FIG. 30 shows an actual distribution of each pixel, and FIG. 31 shows this distribution. ) And a threshold value for separating each pixel is entered). An area where the maximum density difference is equal to or less than the total difference value indicates an area where the total difference value does not become less than the maximum density difference and no pixel exists.
[0146]
First, as shown in FIG. 26, the density distribution of the base region is usually very small because the change in density is small, and both the maximum density difference and the total difference value are very small and are distributed in the region A shown in FIG. That is, as shown in FIG. 31, when the maximum density difference is smaller than the background determination threshold for the pixel determined as the background / printing paper area, it can be determined as the background pixel.
[0147]
Next, as shown in FIG. 27, the density distribution of the photographic paper region normally changes smoothly and the maximum density difference and the total difference value are both small and slightly larger than the background area. , Distributed in a region B shown in FIG. Therefore, as shown in FIG. 31, when the maximum density difference is larger than the photographic paper determination threshold for the pixels determined to be the background area and the photographic paper area, it can be determined to be the photographic paper area.
[0148]
Furthermore, for a pixel determined to be a background / photographic paper area, if the maximum density difference is larger than the background determination threshold value but smaller than the photographic paper determination threshold value, it is unclear to which area it belongs. It can be determined that it belongs to the area.
[0149]
In addition, as shown in FIG. 28, the density distribution in the halftone dot region varies depending on the halftone dot, but the total difference value has a density change corresponding to the number of halftone dots. The ratio of the difference value increases. For this reason, it becomes distribution like the area | region D shown in FIG. Therefore, as shown in FIG. 31, if the sum difference value is larger than the product of the maximum density difference and the halftone dot determination threshold for the pixel determined as the character / halftone dot region, it can be determined that the pixel belongs to the halftone dot region. .
[0150]
Next, as shown in FIG. 29, the density distribution of the character area has a maximum density difference and a total difference value that increases. However, since the density change is smaller than that of the halftone area, the summation is smaller than that of the halftone area. The difference value becomes smaller. In particular, since the ratio of the total difference value with respect to the maximum density difference is small, the distribution is as in region C shown in FIG. Therefore, as shown in FIG. 31, when a pixel determined to be a character / halftone dot region has a total difference value smaller than the product of the maximum density difference and the character determination threshold, it can be determined that the pixel belongs to the character region.
[0151]
Furthermore, for pixels determined to be a character / halftone area, if the sum total difference value is smaller than the product of the maximum density difference and the halftone dot determination threshold, but greater than the product of the maximum density difference and the character determination threshold, Therefore, it can be determined that it belongs to the character or halftone dot region.
[0152]
Next, the document type discrimination operation will be described below. In this embodiment, the document type is determined based on image data obtained by pre-scanning. As a result, it is possible to automatically determine the document type, and when the document type is uncertain, it is possible to easily determine the document type by the user by setting the priority order. Strategy can be achieved.
[0153]
First, the main scanning direction determination unit 72 and the sub-scanning direction determination unit 73 determine in which region each pixel belongs to the image data read from the document to be determined. This determination procedure will be described based on the flowchart shown in FIG.
[0154]
First, it is automatically detected that a document is placed on the document table, and pre-scanning is started. Then, as shown in the figure, the maximum density value in the n × m block including the target pixel is calculated from the image data obtained by the prescan (S41), and the minimum density value is calculated (S42). Next, the maximum density difference is calculated using the calculated maximum density value and minimum density value (S43), and the sum of absolute values of density differences between adjacent pixels, that is, the total difference value is calculated (S44).
[0155]
Next, the calculated maximum density difference and the maximum density difference threshold value are compared, and the calculated total difference value and the supply sum difference value threshold value are compared (S45). When it is determined that the maximum density difference is smaller than the maximum density difference threshold value and the total difference value is smaller than the total difference value threshold value, it is determined that the target pixel belongs to the background / printing paper region (S46). .
On the other hand, when the above condition is not satisfied in S45, it is determined that the target pixel belongs to the character / halftone dot region (S52).
[0156]
In the background / printing paper area shown in S46, the calculated maximum density difference is compared with the background determination threshold (S47). If the maximum density difference is smaller, the target pixel belongs to the background area. It is determined (S48). If the maximum density difference is larger in S47, the maximum density difference is compared with the photographic paper determination threshold value (S49). Here, when the maximum density difference is larger, it is determined that the target pixel belongs to the photographic paper area, but when the maximum density difference is smaller, it is determined to belong to the background or the photographic paper area (which is unknown). (S51).
[0157]
On the other hand, in the character / halftone dot area shown in S52, the calculated sum difference value is compared with the value obtained by multiplying the maximum density difference by the character determination threshold value (S53), and if the sum difference value is smaller. The target pixel is determined to belong to the character area (S54). If the sum difference value is larger in S53, a comparison is further made between the sum difference value and a value obtained by multiplying the maximum density difference by a halftone threshold value (S55). Here, when the total difference value is larger, it is determined that the target pixel belongs to the halftone dot region (S56), and when the maximum density difference is smaller, it is determined that it belongs to the character or halftone dot region (which is unknown). (S57).
[0158]
After determining which region each pixel belongs to, the following calculation is performed in the signal determining unit 74. First, the number of pixels classified into each region is counted. Then, the count value of each area is compared with a threshold value set in advance for each area, and the document type is determined.
[0159]
If the determination results are different between the main scanning direction and the sub-scanning direction, the data size of the image in the main scanning direction and the sub-scanning direction stored in the determination block unit 71 (the main scanning direction / sub-scanning depends on the block size). Because the reliability of the determination result varies depending on the direction data (number of pixels)), the resolution, and the threshold value used in each scanning direction determination unit, the reliability of the determination result (the larger the block, the more pixels used for the determination) Therefore, the amount of information increases, and when the threshold value used for the determination is determined to be strict, the reliability is higher), and the determination result is adopted based on that. .
[0160]
Further, when image data in the sub-scanning direction is thinned out during pre-scanning, only the image data in the main scanning direction is used.
For example, when the count value of the character area exceeds a predetermined threshold value of the character area, it is determined that the document is a character document. If the count value of the area other than the character area is close to the threshold value that does not exceed the threshold value of the area, it is determined that the document type is unknown, and the user's own determination is prompted by the following procedure.
[0161]
First, the count value of each area is defined as follows. The count values of these areas may be displayed to the user via the operation panel 4.
Ct: Count value of character area Ch: Count value of halftone dot area
Cth: Count value of character or halftone dot area
Cb: Count value of background area Cp: Count value of photographic paper photograph area
Cbp: Count value of the background or photographic paper photographic area
[0162]
Further, the threshold value is also defined as follows. These threshold values may also be displayed to the user via the display means.
THt: threshold value for the count value of the character area
THt1: Threshold value for the count value of the character area and the character or halftone dot area
THh1: threshold for halftone dot area and count value of character or halftone dot area
THb1: Threshold value for the count value of the background area and the background or photographic paper photographic area
THp1: Threshold value for the count value of the photographic paper simple area and the background or photographic paper photographic area
These threshold values are determined in advance so that a preferable result can be obtained based on a large number of documents.
[0163]
Here, a case where Ct> THt will be described. In this case, although it is confirmed that the document includes a character area, it is unknown whether it is a character document, a character / photo document, or a character / photographic paper photo document. Therefore, according to the present invention, when the count value of the other area is close to the threshold value even if it does not exceed the threshold value, the document type is predicted, and the priority order of the document type is determined and displayed as follows. Yes.
[0164]
1) When Ct> THt, Ct + Cth> THt1, and Ch + Cth <THh1
(1) Text manuscript
(2) Text / photo (printed photo) manuscript
(Numbers in circles are priorities)
2) When Ct> THt and Ct + Cth <THt1, Ch + Cth> THh1, or when Ct> THt and Ct + Cth <THt1, Ch + Cth <THh1
(1) Text / Photo manuscript
(2) Text manuscript
3) When Ct> THt, Cb + Cbp> THb1, and Cp + Cbp <THp1
(1) Text manuscript
(2) Text / photographic paper photo manuscript
4) When Ct> THt and Cb + Cbp <THb1, Cp + Cbp> THp1, or when Ct> THt and Cb + Cbp <THb1, Cp + Cbp <THp1
(1) Text / photographic paper photo manuscript
(2) Text manuscript
[0165]
As described above, for example, when the count value of the area other than the character area does not exceed the threshold value but is close to the threshold value, the user can be prompted to select the document type by determining that the document type is unknown. Thereby, erroneous determination of the document type can be prevented. Also, misprinting can be reduced because various correction processes are performed in a processing mode corresponding to the document type.
[0166]
Furthermore, even when the document type is unknown, the user can easily determine the document type by displaying the expected document types with priorities, and select a processing mode according to the priority. Can do.
[0167]
Further, the image processing apparatus 1 includes a CPU (control means) and a storage means (not shown), and this CPU stores the document type discrimination result, the total number of pixels, and the count value of each area in a storage means (not shown). Thereby, the user can know the determination result at the time of previous output when the output image is not preferable and the image is output again. In other words, in order to know the determination result of the previous document type, place the document on the document table, perform a pre-scan, obtain the total number of pixels and the count value of each area, and compare the result with the stored data. Is done. Then, by providing display means for displaying the determination result for the user and input means for allowing the user to select and input the processing mode, the user can select and input the processing mode according to the determination result. In this case, the display means and the input means can be substituted by the operation panel 4.
The document type determination result thus performed is fed back to each processing unit after the document type automatic determination unit 13-3 as described above.
[0168]
In this way, the image processing apparatus 1 can switch the processing mode corresponding to the type of document automatically or by the user's own selection.
[0169]
Note that the image processing apparatus 1 of the present invention can also be applied only to the image reading apparatus (image input apparatus) 2. In this case, the image processing apparatus 1 includes the A / D conversion unit 11, the shading correction unit 12, the document type automatic determination unit 13, and the input tone correction unit 14 illustrated in FIG. 1.
[0170]
<Fourth embodiment>
Next, the automatic document type discrimination unit 13-4 according to the fourth embodiment of the present invention will be described.
FIG. 33 is a block diagram illustrating the document type automatic determination unit 13-4 according to the fourth embodiment. In addition, about the member which has the same function as the member used in 3rd Embodiment, the same code | symbol is attached and the description is abbreviate | omitted. Note that the present invention is not limited to this.
[0171]
The document type automatic determination unit 13-4 is different from the third embodiment in a main scanning direction determination unit 172 (172c, 172m, 172y) and a sub-scanning direction determination unit 173 (173c, 173m, 173y). Both the main scanning direction determination unit 172 and the sub-scanning direction determination unit 173 have the same configuration. FIG. 34 is a block diagram of the main scanning direction determination unit 172. The same parts as those in the main scanning direction determination unit 72 of the third embodiment shown in FIG.
[0172]
The pixels used in the main scanning direction determination unit 172 are pixels only in the main scanning direction of the n × m determination block including the target pixel stored in the determination block unit 71, and are used in the sub-scanning direction determination unit 173. The pixel is a pixel only in the sub-scanning direction of the n × m determination block including the target pixel.
[0173]
The main scanning direction determination unit 172 and the sub scanning direction determination unit 173 include a minimum density value calculation unit 81 that calculates a minimum density value, a maximum density value calculation unit 82 that calculates a maximum density value, and the calculated minimum density value and The maximum density difference calculation unit 83 that calculates the maximum density difference using the maximum density value, the total difference value calculation unit 84 that calculates the sum of absolute values of the density differences of adjacent pixels, and the maximum density difference calculation unit The maximum density difference and the calculated total difference value are compared with respective predetermined thresholds, a background determination unit 101 that determines a background pixel, a photographic paper determination unit 102 that determines a photographic paper pixel, and a character pixel A character determination unit 103 and a halftone dot determination unit 104 that determines halftone pixels are configured.
[0174]
Further, the background determination unit 101 includes a background maximum density difference threshold setting unit 111 for setting a threshold for determining a background pixel for the result calculated by the maximum density difference calculation unit 83, and a total difference value calculation unit. A background total difference value threshold setting unit 112 for setting a threshold for determining a background pixel with respect to the total difference value calculated in 84, and the photographic paper determination unit 102 includes a maximum density difference calculation unit 83. Is calculated by the photographic paper minimum density difference threshold value setting unit 113, the photographic paper maximum density difference threshold value setting unit 114, and the total difference value calculating unit 84 for setting a threshold value for determining a photographic paper pixel. The photographic paper determination threshold value setting unit 115 for setting a threshold value for determining the photographic paper pixel as a result of the determination, and the character determination unit 103 perform the character calculation for the result calculated by the maximum density difference calculation unit 83. Picture A character determination threshold for setting a threshold for determining a character pixel for the result calculated by the character minimum density difference threshold setting unit 116 and the sum difference value calculation unit 84. Similarly to the setting unit 117, the halftone dot determination unit 104 is a halftone dot total difference value threshold setting unit for setting a threshold for determining a halftone pixel for the result calculated by the total difference calculation unit 84. 118 and a halftone dot determination threshold value setting unit 119.
[0175]
FIG. 35 is a flowchart showing the flow of region separation processing for performing document type determination in each of the main scanning direction determination unit 72 and the sub-scanning direction determination unit 73 in the n × m block including the target pixel in the present invention. It is.
[0176]
First, at step 61 (S61), the maximum density value is calculated, and at S62, the minimum density value is calculated. Then, the maximum density difference is calculated using the minimum density value and the maximum density value calculated in S61 and S62 (S63). Further, in S64, the sum of absolute values of density differences between adjacent pixels is calculated. In S65, the maximum density difference calculated in S63 and the background maximum density difference threshold value are compared, and the total difference value calculated in S63 and the background total difference value threshold value are compared. When it is determined that the maximum density difference is smaller than the background maximum density difference threshold and the total difference value calculated in S64 is smaller than the background total difference value threshold (“YES” in S65), the target pixel is the background pixel. It is determined that there is (S73).
[0177]
On the other hand, when the above condition is not satisfied in S65, it is determined in S66 whether the pixel is a photographic paper pixel. The maximum density difference calculated in S63 is larger than the photographic paper minimum density difference threshold and smaller than the photographic paper maximum density difference threshold, and the product of the maximum density difference calculated in S63 and the photographic paper determination threshold is calculated in S64. If it is greater than the sum total difference value, it is determined that the pixel is a photographic paper photographic pixel (S72). Further, when the above condition is not satisfied in S66, the maximum density difference calculated in S63 in S67 is larger than the character minimum density difference threshold, and the product of the maximum density difference calculated in S63 and the character determination threshold is S64. If it is larger than the total difference value calculated in step S1, it is determined that the target pixel is a character pixel (S71).
[0178]
Next, when the above condition is not satisfied in S67, in S68, the total sum difference value calculated in S64 is larger than the halftone dot total difference value threshold value, and the maximum density difference calculated in S63 and the halftone dot determination threshold value are calculated. Is larger than the sum difference value calculated in S64, it is determined that the pixel is a halftone dot pixel (S70), and otherwise, it is determined that it is an indeterminate pixel (S69).
[0179]
In this way, the determination process is performed, and the final determination result for the target pixel is obtained. The determination result for each pixel is counted by the comprehensive determination unit 75 and compared with a predetermined threshold value to determine the document type. For example, if the characters and halftone dots are equal to or greater than the threshold, the document is determined to be a character / printed photo document.
[0180]
Here, an example of pixel density distribution in the character / halftone dot region, photographic paper photograph / background region will be described with reference to FIGS. 26 to 29 of the third embodiment. In addition, a distribution diagram based on the maximum density difference and the total difference value for each region will be described with reference to FIGS. 36 and 37. FIG. (FIG. 36 shows an actual distribution of each pixel, and FIG. 37 shows this distribution in a simulated manner and a threshold value for separating each pixel is entered. Maximum density difference = total difference The region below the value indicates a region where the sum difference value does not become the maximum density difference or less and no pixel exists.
[0181]
First, as shown in FIG. 26, the density distribution of the base region is usually very small because the density change is small, and both the maximum density difference and the total difference value are very small and are distributed in the region A shown in FIG. That is, as shown in FIG. 37, when the maximum density difference is smaller than the background maximum density difference threshold and the total difference value is smaller than the background total difference value threshold, it can be determined that the pixel is a background pixel.
[0182]
Next, as shown in FIG. 27, the density distribution of the photographic paper region normally changes smoothly, and the maximum density difference is small but slightly larger than the background region. In addition, since the density change is smooth, the density change of adjacent pixels is also small, and the maximum density difference and the total difference value are very close to each other, and are therefore distributed in the region B shown in FIG. Therefore, as shown in FIG. 37, the maximum density difference is larger than the photographic paper minimum density difference threshold, the maximum density difference is smaller than the photographic paper maximum density difference threshold, and the product of the maximum density difference and the photographic paper determination threshold. If the total difference value is small, it can be determined that the area is a photographic paper photograph area.
[0183]
In addition, as shown in FIG. 28, the density distribution in the halftone dot region varies depending on the halftone dot, but the total difference value has a density change corresponding to the number of halftone dots. The ratio of the difference value increases. For this reason, it becomes distribution like the area | region D shown in FIG. Therefore, as shown in FIG. 37, when the total sum difference value is larger than the halftone dot total difference value threshold value and the total sum difference value is larger than the product of the maximum density difference and the halftone dot determination threshold value, it belongs to the halftone dot region. Can be determined.
[0184]
Next, as shown in FIG. 29, the density distribution of the character area has a maximum density difference and a total difference value that increases. However, since the density change is smaller than that of the halftone area, the summation is smaller than that of the halftone area. The difference value becomes smaller. In particular, since the ratio of the total difference value with respect to the maximum density difference is small, the distribution is as in region C shown in FIG. Therefore, as shown in FIG. 37, when the maximum density difference is larger than the character minimum density difference threshold and the total difference value is smaller than the product of the maximum density difference and the character determination threshold, it is determined to belong to the character area. it can.
[0185]
Further, since it is not clear which areas other than those determined as the background area, the photographic paper photograph area, the halftone dot area, and the text area belong to the indeterminate area.
As described above, in the present embodiment, except for pixels having uncertain elements, only the pixels that are clear to which region belong are extracted and the document type is determined. Can be raised. Further, when determining the area of the input image data, only a specific feature amount is extracted, so that the circuit can be small.
[0186]
Note that a wider range of processing can be performed by arbitrarily adjusting the threshold values set above. For these threshold values, a plurality of expected values are stored in advance in a ROM (Read Only Memory) or the like, and values stored in a storage means (not shown) such as a memory are set by a switch or the like as necessary. You should be able to do it.
[0187]
By the processing operation described above, the document type (pixel type) is determined, and based on the result, as described above, the subsequent input tone correction, color correction, black generation and under color removal processing, and spatial filter processing are performed.・ Tone reproduction processing and area separation processing are switched.
[0188]
In the present invention, the image processing method may be recorded on a computer-readable recording medium in which a program to be executed by a computer is recorded. As a result, it is possible to provide a portable recording medium on which a program for performing the image processing method is recorded.
In the present embodiment, as the recording medium, a memory (not shown) such as a ROM itself may be a program medium because processing is performed by a microcomputer. However, it may be a program medium provided with a program reading device as an external storage device and readable by inserting a recording medium therein.
[0189]
In any case, the stored program may be configured to be accessed and executed by the microprocessor, or in any case, the program is read and the read program is illustrated in the microcomputer. The program may be downloaded to a non-program storage area and executed. It is assumed that this download program is stored in the main device in advance.
[0190]
Here, the program medium is a recording medium configured to be separable from the main body, such as a tape system such as a magnetic tape or a cassette tape, a magnetic disk such as a floppy (R) disk or a hard disk, or a CD-ROM / MO / MD. / Disk system of optical disks such as DVD, IC card (including memory card) / card system such as optical card, or mask ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory) flash It may be a medium that carries a fixed program including a semiconductor memory.
[0191]
Further, in the present embodiment, since it is a system configuration capable of connecting a communication network including the Internet, it may be a medium that fluidly carries the program so as to download the program from the communication network. When the program is downloaded from the communication network in this way, the download program may be stored in the main device in advance or may be installed from another recording medium.
[0192]
The recording medium is read by a program reading device provided in the digital color image forming apparatus, whereby the above-described image processing method is executed.
[0193]
In the above, a digital copying machine using an electrophotographic process has been described as an example. However, the present invention is not limited to the above example, and predetermined image processing is performed by inputting information from an image input device. Needless to say, the present invention can be applied to an image forming apparatus that performs and outputs the result, for example, an image forming apparatus that uses an ink jet recording method or a sublimation recording method.
[0194]
【The invention's effect】
According to the present invention, the document type determining means for automatically determining the document type from the input image data first determines the presence or absence of the background, and determines the document type based on the result. Therefore, the accuracy of determining the document type is improved.
[0195]
According to the present invention, when the first maximum numerical value ≧ the first threshold, for example, the first maximum power density classification (so-called white background) in a solid text document is higher than other density values. Can be used to determine whether or not there is a groundwork.
In the case of the first maximum frequency value + the second maximum frequency value ≧ the second threshold value, for example, in a text document composed of solid and halftone dots, the first maximum frequency density classification indicating a white background and the first background indicating a halftone dot background. It is possible to determine whether or not there is a ground by utilizing the fact that the 2 maximum power density categories are higher than other density values.
In the case of the first maximum power value ≦ the first threshold value, for example, in the case of a photographic document composed of a photographic paper photograph, the first maximum power power density classification is utilized which is not significantly higher than other density values. , It can be determined whether there is a ground. Therefore, the document type determination accuracy is further improved.
[0196]
According to the present invention, since the histogram creation unit creates a histogram based on the average value of the density values of a plurality of input image data, the extraction accuracy of the background (halftone dot) can be improved.
[0197]
According to the present invention, based on the determination result of the upper pixel determination and the lower line determination based on the determination result of the target pixel and the determination result of the peripheral pixel in the front stage in the sub-scanning direction and the rear stage in the sub-scanning direction, It is determined whether it belongs to a photographic paper photograph, a character or a halftone dot. For this reason, information on peripheral pixels before and after the target pixel is used as line information, and thus the amount of information increases. Therefore, it is possible to obtain an accurate determination result.
In addition, since the determination process is performed using the image data in the main scanning direction for the target pixel, the upper line, and the lower line, for example, the waste of the image data deteriorated in the sub-scanning direction, which is data read by the prescan, It is easy to remove the determination result of the image data in the sub-scanning direction, which is a simple information, and the determination result of the image data in the main scanning direction, which is effective information, can be extracted and applied to the type determination. .
Therefore, when determining the image area and image type of an input image, an image processing apparatus capable of accurately determining the image type by a simple method regardless of black and white or color originals and preventing an increase in circuit scale is provided. be able to.
[0198]
According to the present invention, the determination by the first determination unit is performed during the forward pass when reading the document with the image input unit, and the determination by the second determination unit is performed during the return pass when reading the document with the image input unit. The accuracy of document type discrimination can be improved by effectively utilizing the prescan return path.
[0199]
According to the present invention, instead of fixing the threshold value, the threshold value is set according to the type of each document, and only specific image data of a predetermined frequency or more is extracted when determining the document type. Therefore, the discrimination accuracy can be improved.
Further, by extracting image data of a specific area with respect to the inversion number and adjacent pixel density difference, which is a feature amount of the type of document (image), it is possible to reduce a memory area for storing image data.
[0200]
According to the present invention, the optimum threshold value is set during the forward pass when reading the document with the image input unit, and the document type is determined during the return pass when reading the document with the image input unit. By making effective use of the return path, the document type discrimination accuracy can be increased.
[0201]
According to the present invention, except for pixels having uncertain elements, only the pixels that are clear to which region belong are extracted and the document type is determined, so that the accuracy of determining the document type can be improved. Further, when determining the area of the input image data, only a specific feature amount is extracted, so that the circuit can be small.
[0202]
According to the present invention, the document discriminating unit counts the number of pixels separated into each area by the area discriminating unit, and compares the count number with a predetermined threshold value to discriminate the document. The scale can be reduced, and the document type can be determined by a simple method. Since uncertain elements are excluded, it is possible to determine the document type using a simple method, and the accuracy does not deteriorate much.
[0203]
According to the present invention, when the document type determination unit cannot determine the document (when the document type is uncertain), the display unit displays that the document type is uncertain rather than performing processing in the default image mode. The user can be prompted to enter the processing mode. Thus, even when the document type determination unit cannot determine the document, the user selects the processing mode via the input unit, so that image processing according to the original document type can be executed. Therefore, misprinting can be suppressed and wasteful use of paper can be reduced. Further, it is possible to avoid a situation in which the determination result of the document type is unknown.
[0204]
According to the present invention, since the control unit prioritizes candidate document types and displays them on the display unit, the user can refer to the priorities and easily select an image mode (processing mode). it can.
[0205]
According to the present invention, when the determination result of the document type determination unit is uncertain, the control unit stores the document type selected by the user in the storage unit. Therefore, when the output image is not preferable, the process is performed again. In addition, since the previous result can be referred to, the operation mode can be easily switched.
[0206]
According to the present invention, since the control unit stores at least a part of the processing result of the document type determination unit together with the document type in the storage unit, if the output image is not preferable, the processing result of the document type determination unit (for example, The previous image mode can be found based on the total number of pixels and the count value of each area), and can be easily redone even when the time has elapsed after the image is output.
[0207]
According to the present invention, since the image forming apparatus includes these image processing apparatuses, the accuracy of document type discrimination is improved, image processing according to the accuracy can be performed, and an image of high quality is output. Can be provided.
[0208]
According to the present invention, since the program is a program for causing a computer to execute the image processing method, the computer can read and execute the image processing method for accurately determining the type of document, which can be general purpose. it can.
[0209]
According to the present invention, since these programs are stored in a computer-executable manner, an image processing method for accurately determining the document type can be easily supplied to the computer.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating an image forming apparatus according to the present invention.
FIG. 2 is a block diagram illustrating a document type automatic determination unit in the first embodiment.
FIG. 3 is a diagram illustrating an example of image data of a halftone dot region and a density histogram created based on the image data.
4 is a diagram showing a density histogram created by using an average value of a plurality of pixels obtained from the image data shown in FIG. 3; FIG.
FIG. 5 is a diagram illustrating an example of a density histogram of a character document including a solid background.
FIG. 6 is a diagram showing an example of a density histogram of a character document composed of solid and halftone backgrounds.
FIG. 7 is a diagram showing an example of a density histogram of a photographic paper photographic document.
FIG. 8 is a block diagram showing a target pixel determination unit in the first embodiment.
FIG. 9 is a flowchart showing a processing procedure from step 1 to step 6 of image determination in the first embodiment.
FIG. 10 is a flowchart showing a processing procedure from step 7 to step 17 of image determination in the first embodiment following FIG. 9;
FIG. 11 is an explanatory diagram illustrating calculation of the number of inversions of rising pixels and falling pixels in a fixed area composed of M pixels.
FIG. 12 is an explanatory diagram showing calculation of inversion numbers of rising pixels and falling pixels in a fixed region composed of M pixels for each of n × n pixels.
FIG. 13 is a density distribution diagram of a solid image.
FIG. 14 is a density distribution diagram of a photographic paper photograph.
FIG. 15 is a density distribution diagram of a halftone image.
FIG. 16 is a density distribution diagram of a character image.
FIG. 17 is a block diagram illustrating a document type automatic determination unit according to the second embodiment.
FIG. 18 is a block diagram illustrating a pixel-of-interest determination unit in the second embodiment.
FIG. 19 is a diagram showing the relationship between the adjacent pixel density difference, the inversion number, and the frequency in a character area, a halftone dot area, and a background / photographic paper photograph area.
FIG. 20 is a diagram illustrating a relationship among adjacent pixel density difference, inversion number, frequency, and threshold value in a character area, a dot area, and a background / photographic paper photograph area.
FIG. 21 is a diagram showing areas for counting in adjacent pixel density difference, inversion number, and frequency with respect to characters and halftone dots;
FIG. 22 is a flowchart showing a processing procedure from step 21 to step 28 of image determination in the second embodiment.
FIG. 23 is a flowchart showing a processing procedure from step 29 to step 35 of image determination in the second embodiment following FIG. 22;
FIG. 24 is a block diagram illustrating a document type automatic determination unit according to a third embodiment.
FIG. 25 is a block diagram illustrating a scanning direction determination unit and a sub-scanning direction determination unit in the third embodiment.
FIG. 26 is a density distribution diagram of a base region.
FIG. 27 is a density distribution diagram of a photographic paper photograph region.
FIG. 28 is a density distribution diagram of a halftone dot region.
FIG. 29 is a density distribution diagram of a character region.
30 is a diagram showing a distribution of a character area, a character area or a halftone dot area, a halftone dot area, a photographic paper photograph area, a ground or photographic paper photograph area, and a ground area with respect to the maximum density difference and the total difference value.
31 is a diagram showing thresholds for separating each region based on FIG. 30. FIG.
FIG. 32 is a flowchart illustrating an image determination processing procedure according to the third embodiment.
FIG. 33 is a block diagram illustrating a document type automatic determination unit according to a fourth embodiment.
FIG. 34 is a block diagram illustrating a main scanning direction determination unit in the fourth embodiment.
FIG. 35 is a flowchart illustrating an image determination processing procedure according to the fourth embodiment.
FIG. 36 is a diagram showing a distribution of a character area, a halftone dot area, a photographic paper photograph area, and a background area with respect to the maximum density difference and the total difference value.
FIG. 37 is a diagram showing threshold values for separating each region including an indeterminate region based on FIG.
[Explanation of symbols]
1 Image processing device
2 Image input device
3 Image output device
4 Operation panel
10 Image forming apparatus
11 A / D converter
12 Shading correction part
13 Document type automatic discrimination section
14 Input tone correction unit
15 color correction section
16 Black generation under color removal part
17 Spatial filter processing section
18 Output tone correction unit
19 Tone reproduction processing section
20 Region separation processing unit
21 Signal converter
31 1st determination part
32 Histogram creation part
33 Maximum frequency concentration classification extraction unit
34 Threshold setting unit
35 Ground determination unit
41 Second determination unit
42 Signal processor
43 Upper line judgment part
44 Lower line judgment part
45 Target pixel determination unit
46 Signal-specific judgment section
47 Comprehensive judgment part
48 Peripheral pixel determination unit
51 Adjacent pixel density difference calculation unit
52 Rising / falling judgment part
53 Inversion number calculation unit
54 Pixel determination unit
55 Solid Pixel Determination Threshold Setting Unit
56 Rising / falling threshold setting unit
57 Inversion number threshold value setting unit
61 Comparison threshold setting unit
71 Judgment block
72 Main scanning direction determination unit
73 Sub-scanning direction determination unit
74 Signal-specific judgment section
75 Comprehensive judgment part
81 Minimum density value calculator
82 Maximum concentration value calculator
83 Maximum density difference calculator
84 Total difference calculation unit
85 Judgment area setting section
86 Character / half-tone dot decision part
87 Substrate / photographic paper judgment section
88 Maximum density difference threshold setting section
89 Sum total difference value threshold setting section
90 character judgment threshold setting part
91 Halftone determination threshold setting unit
92 photographic paper determination threshold value setting section
93 Background judgment threshold value setting unit
101 Background judgment unit
102 Photographic paper judgment unit
103 Character judgment part
104 Halftone determination unit
111 Base maximum density difference threshold setting unit
112 Background total difference value threshold value setting unit
113 photographic paper minimum density difference threshold setting section
114 Maximum density difference threshold setting section for photographic paper
115 photographic paper determination threshold value setting unit
116 character minimum density difference threshold setting section
117 Character judgment threshold setting part
118 Halftone dot total difference value threshold value setting unit
119 Halftone dot threshold setting unit
145 Attention pixel determination unit
148 Peripheral pixel determination unit
154 Pixel determination unit
172 Main scanning direction determination unit
173 Sub-scanning direction determination unit

Claims (3)

画像入力手段により原稿を走査して読み込まれた入力画像データより原稿の種別を判定する原稿種別判別手段を備え、この判定結果に基づいて画像処理を施す画像処理装置において、
前記原稿種別判別手段は、
入力画像データの濃度ヒストグラムデータと、前記濃度ヒストグラムデータから画像データとして入力された原稿の下地を判別するための閾値データにより原稿の下地の有無を判定する第1判定手段と、
前記第1判定手段により判定された原稿の下地の判定結果と、入力画像データの画素単位で判定することにより得られた入力画像の種類から画像データとして入力された原稿の種別を判定する第2判定手段と、
を備えており、
前記第1判定手段は、
入力画像データから各画素の濃度と、その度数との関係を示す濃度ヒストグラムを作成するヒストグラム作成手段と、
上記濃度ヒストグラムにおける最大度数値を第1最大度数値として抽出するとともに、第1最大度数値が属する濃度区分を第1最大度数濃度区分として抽出し、さらに上記の第1最大度数濃度区分に隣接する濃度区分以外で、第2最大度数値を抽出するとともに、第2最大度数値が属する濃度区分を第2最大度数濃度区分として抽出する最大度数濃度区分抽出手段と、
べたからなる下地と判別するための第1閾値と、べたおよび網点からなる下地と判別するための第2閾値とを設定する閾値設定手段と、
上記の第1最大度数値・第2最大度数値と上記の第1・第2閾値とを比較して、第1最大度数値<第1閾値の場合または第1最大度数値+第2最大度数値<第2閾値の場合、下地なしと判定し、第1最大度数値≧第1閾値の場合または第1最大度数値+第2最大度数値≧第2閾値の場合、下地ありと判定し、その上、下地濃度を算出する下地判定手段と、
を有することを特徴とする画像処理装置。
In an image processing apparatus that includes a document type determination unit that determines a document type from input image data read by scanning a document with an image input unit, and performs image processing based on the determination result.
The document type determining means includes
First determination means for determining the presence or absence of the background of the document based on density histogram data of the input image data and threshold data for determining the background of the document input as image data from the density histogram data;
A second type for determining the type of document input as image data from the determination result of the background of the document determined by the first determination unit and the type of input image obtained by determining in units of pixels of the input image data. A determination means;
With
The first determination means includes
Histogram creation means for creating a density histogram showing the relationship between the density of each pixel and its frequency from input image data;
The maximum frequency value in the density histogram is extracted as the first maximum frequency value, the density category to which the first maximum frequency value belongs is extracted as the first maximum frequency density category, and further adjacent to the first maximum frequency density category. A maximum frequency density category extracting means for extracting the second maximum power value other than the density zone and extracting the density zone to which the second maximum power value belongs as the second maximum power density zone;
Threshold setting means for setting a first threshold value for determining a solid background and a second threshold value for determining a solid and halftone background;
The first maximum power value / second maximum power value and the first / second threshold values are compared, and if the first maximum power value <the first threshold value or the first maximum power value + the second maximum power If numerical value <second threshold, it is determined that there is no background, and if first maximum numerical value ≧ first threshold or if first maximum numerical value + second maximum numerical value ≧ second threshold, it is determined that there is background. In addition, background determination means for calculating the background density,
An image processing apparatus comprising:
画像入力手段により原稿を走査して読み込まれた入力画像データより原稿の種別を判定する原稿種別判別手段を備え、この判定結果に基づいて画像処理を施す画像処理装置において、  In an image processing apparatus that includes a document type determination unit that determines the type of a document from input image data read by scanning the document with an image input unit, and performs image processing based on the determination result.
前記原稿種別判別手段は、  The document type determining means includes
入力画像データの濃度ヒストグラムデータと、前記濃度ヒストグラムデータから画像データとして入力された原稿の下地を判別するための閾値データにより原稿の下地の有無を判定する第1判定手段と、  First determination means for determining presence / absence of a document background based on density histogram data of input image data and threshold data for determining a document background input as image data from the density histogram data;
前記第1判定手段により判定された原稿の下地の判定結果と、入力画像データの画素単位で判定することにより得られた入力画像の種類から画像データとして入力された原稿の種別を判定する第2判定手段と、  A second type for determining the type of document input as image data from the determination result of the background of the document determined by the first determination unit and the type of input image obtained by determining in units of pixels of the input image data. A determination means;
を備えており、  With
前記第2判定手段は、  The second determination means includes
入力画像データから抽出された複数の画素にてなるブロックのある注目画素に対して、主走査方向の画像データと、前記第1判定手段により判定された原稿の下地の判定結果から特徴量を抽出し、該注目画素がべた、写真、文字または網点のいずれの種類に属するかの判定を行う注目画素判定手段と、  For a target pixel having a block composed of a plurality of pixels extracted from input image data, feature amounts are extracted from the image data in the main scanning direction and the background determination result of the document determined by the first determination unit. Pixel-of-interest determination means for determining whether the pixel of interest belongs to a solid, photo, character, or halftone dot;
注目画素の周辺に存在する周辺画素に対して、主走査方向の画像データと、前記第1判定手段により判定された原稿の下地の判定結果から特徴量を抽出し、該周辺画素がべた、写真、文字または網点のいずれの領域に属するかの判定を行う周辺画素判定手段と、  For a peripheral pixel existing around the pixel of interest, a feature amount is extracted from the image data in the main scanning direction and the determination result of the background of the document determined by the first determination unit, and the peripheral pixel is solid. Peripheral pixel determination means for determining whether the region belongs to a character or a halftone dot;
前記注目画素の副走査方向前段に存在する同じラインの周辺画素判定手段の判定結果に基づいて、該副走査方向前段に存在するラインがべた、写真、文字または網点のいずれの  Based on the determination result of the peripheral pixel determination means for the same line existing in the previous stage of the target pixel in the sub-scanning direction, any line of the photograph, text, or halftone dot in the previous stage in the sub-scanning direction is solid 種類に属するかの判定を行う上ライン判定手段と、Upper line determination means for determining whether it belongs to a type,
前記注目画素の副走査方向後段に存在する同じラインの周辺画素判定手段の判定結果に基づいて、該副走査方向後段に存在するラインがべた、写真、文字または網点のいずれの種類に属するかの判定を行う下ライン判定手段と、を有し、  Based on the determination result of the surrounding pixel determination means for the same line existing in the subsequent stage of the target pixel in the sub-scanning direction, whether the line existing in the subsequent stage in the sub-scanning direction belongs to a solid, photograph, character, or halftone dot type A lower line determining means for determining
前記注目画素判定手段、前記上ライン判定手段及び前記下ライン判定手段の判定結果に基づいて、注目画素がべた、写真、文字または網点のいずれの種類に属するかの判定を行うことを特徴とする画像処理装置。  Based on the determination results of the target pixel determination unit, the upper line determination unit, and the lower line determination unit, it is determined whether the target pixel belongs to a solid, photo, character, or halftone dot type. An image processing apparatus.
画像入力手段により原稿を走査して読み込まれた入力画像データより原稿の種別を判定する原稿種別判別手段を備え、この判定結果に基づいて画像処理を施す画像処理装置において、  In an image processing apparatus that includes a document type determination unit that determines the type of a document from input image data read by scanning the document with an image input unit, and performs image processing based on the determination result.
前記原稿種別判別手段は、  The document type determining means includes
入力画像データの濃度ヒストグラムデータと、前記濃度ヒストグラムデータから画像データとして入力された原稿の下地を判別するための閾値データにより原稿の下地の有無を判定する第1判定手段と、  First determination means for determining presence / absence of a document background based on density histogram data of input image data and threshold data for determining a document background input as image data from the density histogram data;
前記第1判定手段により判定された原稿の下地の判定結果と、入力画像データの画素単位で判定することにより得られた入力画像の種類から画像データとして入力された原稿の種別を判定する第2判定手段と、  A second type for determining the type of document input as image data from the determination result of the background of the document determined by the first determination unit and the type of input image obtained by determining in units of pixels of the input image data. A determination means;
を備えており、  With
前記第1判定手段は、  The first determination means includes
入力画像データから各画素の濃度と、その度数との関係を示す濃度ヒストグラムを作成するヒストグラム作成手段と、  Histogram creation means for creating a density histogram showing the relationship between the density of each pixel and its frequency from input image data;
上記濃度ヒストグラムにおける最大度数値を第1最大度数値として抽出するとともに、第1最大度数値が属する濃度区分を第1最大度数濃度区分として抽出し、さらに上記の第1最大度数濃度区分に隣接する濃度区分以外で、第2最大度数値を抽出するとともに、第2最大度数値が属する濃度区分を第2最大度数濃度区分として抽出する最大度数濃度区分抽出手段と、  The maximum frequency value in the density histogram is extracted as the first maximum frequency value, the density category to which the first maximum frequency value belongs is extracted as the first maximum frequency density category, and further adjacent to the first maximum frequency density category. A maximum frequency density category extracting means for extracting the second maximum power value other than the density zone and extracting the density zone to which the second maximum power value belongs as the second maximum power density zone;
べたからなる下地と判別するための第1閾値と、べたおよび網点からなる下地と判別するための第2閾値とを設定する閾値設定手段と、  Threshold setting means for setting a first threshold value for discriminating from a solid background and a second threshold value for discriminating from a solid and halftone background;
上記の第1最大度数値・第2最大度数値と上記の第1・第2閾値とを比較して、第1最大度数値<第1閾値の場合または第1最大度数値+第2最大度数値<第2閾値の場合、下地なしと判定し、第1最大度数値≧第1閾値の場合または第1最大度数値+第2最大度数値≧第2閾値の場合、下地ありと判定し、その上、下地濃度を算出する下地判定手段と、  The first maximum power value / second maximum power value and the first / second threshold values are compared, and the first maximum power value <the first threshold value or the first maximum power value + the second maximum power If numerical value <second threshold, it is determined that there is no background, and if first maximum numerical value ≧ first threshold or if first maximum numerical value + second maximum numerical value ≧ second threshold, it is determined that there is background. In addition, background determination means for calculating the background density,
を有し、  Have
前記第2判定手段は、  The second determination means includes
入力画像データから抽出された複数の画素にてなるブロックのある注目画素に対して、主走査方向の画像データと、前記第1判定手段により判定された原稿の下地の判定結果から特徴量を抽出し、該注目画素がべた、写真、文字または網点のいずれの種類に属するかの判定を行う注目画素判定手段と、  For a target pixel having a block composed of a plurality of pixels extracted from input image data, feature amounts are extracted from the image data in the main scanning direction and the background determination result of the document determined by the first determination unit. Pixel-of-interest determination means for determining whether the pixel of interest belongs to a solid, photo, character, or halftone dot;
注目画素の周辺に存在する周辺画素に対して、主走査方向の画像データと、前記第1判定手段により判定された原稿の下地の判定結果から特徴量を抽出し、該周辺画素がべた、写真、文字または網点のいずれの領域に属するかの判定を行う周辺画素判定手段と、  For a peripheral pixel existing around the pixel of interest, a feature amount is extracted from the image data in the main scanning direction and the determination result of the background of the document determined by the first determination unit, and the peripheral pixel is solid. Peripheral pixel determination means for determining whether the region belongs to a character or a halftone dot;
前記注目画素の副走査方向前段に存在する同じラインの周辺画素判定手段の判定結果に基づいて、該副走査方向前段に存在するラインがべた、写真、文字または網点のいずれの種類に属するかの判定を行う上ライン判定手段と、  Whether the line existing in the preceding stage in the sub-scanning direction belongs to the solid, photograph, character, or halftone dot type based on the determination result of the surrounding pixel determining means for the same line existing in the preceding stage in the sub-scanning direction Upper line determination means for determining
前記注目画素の副走査方向後段に存在する同じラインの周辺画素判定手段の判定結果に基づいて、該副走査方向後段に存在するラインがべた、写真、文字または網点のいずれの種類に属するかの判定を行う下ライン判定手段と、を有し、  Based on the determination result of the surrounding pixel determination means for the same line existing in the subsequent stage of the target pixel in the sub-scanning direction, whether the line existing in the subsequent stage in the sub-scanning direction belongs to solid, photograph, character, or halftone dot A lower line determining means for determining
前記注目画素判定手段、前記上ライン判定手段及び前記下ライン判定手段の判定結果に基づいて、注目画素がべた、写真、文字または網点のいずれの種類に属するかの判定を行  Based on the determination results of the target pixel determination unit, the upper line determination unit, and the lower line determination unit, a determination is made as to whether the target pixel belongs to a solid, photo, character, or halftone dot type. うことを特徴とする画像処理装置。An image processing apparatus characterized by that.
JP2002221656A 2002-07-30 2002-07-30 Image processing apparatus and image processing method Expired - Lifetime JP4039911B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002221656A JP4039911B2 (en) 2002-07-30 2002-07-30 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002221656A JP4039911B2 (en) 2002-07-30 2002-07-30 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2004064532A JP2004064532A (en) 2004-02-26
JP4039911B2 true JP4039911B2 (en) 2008-01-30

Family

ID=31941906

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002221656A Expired - Lifetime JP4039911B2 (en) 2002-07-30 2002-07-30 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP4039911B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5549836B2 (en) * 2009-06-02 2014-07-16 株式会社リコー Image processing apparatus and image processing method
JP2011172101A (en) 2010-02-19 2011-09-01 Panasonic Corp Image encoding method, image encoding device, and imaging system
JP6834639B2 (en) * 2017-03-17 2021-02-24 ブラザー工業株式会社 Image processing equipment and computer programs
JP7377435B2 (en) * 2020-01-24 2023-11-10 京セラドキュメントソリューションズ株式会社 Image processing device
JP2021040348A (en) * 2020-12-08 2021-03-11 ブラザー工業株式会社 Image processing apparatus and computer program

Also Published As

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

Similar Documents

Publication Publication Date Title
JP4166744B2 (en) Image processing apparatus, image forming apparatus, image processing method, computer program, and recording medium
US7742194B2 (en) Image processing device, image processing method, image forming apparatus, image processing program, and storage medium
US8041112B2 (en) Image processing apparatus, image forming apparatus, image reading apparatus, image processing method, image processing program, computer-readable storage medium for storing the image processing program with segmentation and density correction optimization
JP4495197B2 (en) Image processing apparatus, image forming apparatus, image processing program, and recording medium for recording image processing program
US8305645B2 (en) Image processing and/or forming apparatus for performing black generation and under color removal processes on selected pixels, image processing and/or forming method for the same, and computer-readable storage medium for storing program for causing computer to function as image processing and/or forming apparatus for the same
JP3784649B2 (en) Image processing apparatus, image forming apparatus including the same, and image processing method
JP4496239B2 (en) Image processing method, image processing apparatus, image forming apparatus, image reading apparatus, computer program, and recording medium
JP4402090B2 (en) Image forming apparatus, image forming method, program, and recording medium
JP2006279329A (en) Image processing apparatus, image forming apparatus, and method of processing image
JP4105539B2 (en) Image processing apparatus, image forming apparatus including the same, image processing method, image processing program, and recording medium
JP4039911B2 (en) Image processing apparatus and image processing method
JP2005286571A (en) Image processing apparatus, image forming apparatus provided with image processing apparatus, image processing method, image processing program, and recording medium with image processing program recorded thereon
JP2002218232A (en) Image processor, image formation device provided with the same and image processing method
JP4545766B2 (en) Image processing apparatus, image forming apparatus, image reading apparatus, image processing program, and recording medium
JP3847565B2 (en) Image processing apparatus, image forming apparatus including the same, and image processing method
JP4522978B2 (en) Image processing apparatus, image processing method, image forming apparatus, image processing program, and recording medium
JP7123752B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP4043982B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and computer-readable recording medium recording the same
JP4188039B2 (en) Image processing apparatus, image processing method, and image reading apparatus, image forming apparatus, program, and recording medium including the same
JP4080252B2 (en) Image processing apparatus, image forming apparatus, image processing method, program, and recording medium
JP4958626B2 (en) Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium
JP2004248103A (en) Image processing device, image reading device, image forming device, image processing method, image processing program, and computer readable record medium recording the same
JP3767210B2 (en) Document type determination device and image processing device
JP4086537B2 (en) Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium
JP4498316B2 (en) Image processing apparatus, image processing method, image forming apparatus, and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050525

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061212

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070213

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070731

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070925

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20071009

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071106

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

Free format text: PAYMENT UNTIL: 20101116

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4039911

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111116

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111116

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121116

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121116

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20131116

Year of fee payment: 6

EXPY Cancellation because of completion of term