JP4112413B2 - Image processing apparatus, image forming apparatus, image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded - Google Patents

Image processing apparatus, image forming apparatus, image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded Download PDF

Info

Publication number
JP4112413B2
JP4112413B2 JP2003089331A JP2003089331A JP4112413B2 JP 4112413 B2 JP4112413 B2 JP 4112413B2 JP 2003089331 A JP2003089331 A JP 2003089331A JP 2003089331 A JP2003089331 A JP 2003089331A JP 4112413 B2 JP4112413 B2 JP 4112413B2
Authority
JP
Japan
Prior art keywords
correction
color
image
specific color
image processing
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
JP2003089331A
Other languages
Japanese (ja)
Other versions
JP2004297617A (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 JP2003089331A priority Critical patent/JP4112413B2/en
Publication of JP2004297617A publication Critical patent/JP2004297617A/en
Application granted granted Critical
Publication of JP4112413B2 publication Critical patent/JP4112413B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、カラー画像における各画素の色を示す画素データを補正して補正データを生成する画像処理装置、画像形成装置、画像処理方法、画像処理プログラム、及び画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体に関するものであり、特に、特定色に対して適正な補正を行うためのものである。
【0002】
【従来の技術】
近年、OA機器のデジタル化が急速に進展し、またカラー画像出力の需要が増してきたことにより、電子写真方式のデジタルカラー複写機やインクジェット方式、熱転写方式のカラープリンタ等の出力機器が広く一般に普及してきている。そして、例えば、デジタルカメラやスキャナ等の入力機器より入力された画像データや、コンピュータ上で作成された画像データが、これらの出力機器を用いて出力されている。このような入出力機器においては、入力された画像データに対して、常に色再現の安定した画像を出力することが必要であり、デジタル画像処理技術の色変換(色補正)処理が重要な役割を果たしている。
【0003】
色変換処理の方法としては、入力画像データを均等色空間データに変換するための色座標変換方法を含めて、従来から数多くの提案がなされている。このような方法として、非特許文献1や2に記載されているテーブル参照(Look Up Table:ルックアップテーブル、以下「LUT」と記す)法やマスキング法がある。以下では、そのままでは出力として不適切な信号になってしまう色信号の補正を行う処理、色自体を変化させるために色信号を変換する処理、及び色自体が変化しなくても色信号の座標系を変換する処理を全て色変換と呼ぶことにする。
【0004】
LUT法の1つである直接変換法は、全ての入力画像データの組合せに対して色変換データを予め計算し、その結果を色変換テーブルに格納しておき、入力画像データに対応するテーブル値を参照して、出力画像データとして出力する方法である。この直接変換法は、色変換テーブルにアクセスするものであり、回路構成も簡単で比較的高速に処理することが可能で、どのような非線形特性であっても適用することができる。
【0005】
また、別のLUT法である3次元補間法は、選択された一部の入力画像データについての組合せに対応するテーブル値を予め計算し、その結果を色変換テーブルに格納しておき、色変換テーブルにテーブル値が格納されている入力画像データ近傍の入力画像データについては、色変換テーブルに格納されているテーブル値を用いて3次元補間演算により出力画像データを算出するものである。この3次元補間法は、予めテーブル値を算出しておくべき入力画像データ数を限定した場合でも、全ての入力画像データの組合せに対して色変換値を求めることができ、色変換テーブルのサイズを直接変換法の場合よりも小型化することができる。
【0006】
ここで、色変換処理の1つとして、色変換の際に人の肌色、空の青色、草木の緑色等の記憶色(つまり、視覚経験によって人間の記憶の中に残されている色、以下「特定色」と記す)と呼ばれる色の領域に対して、他の領域とは異なる特別な処理を行うことで、出力画像を見る人にとってより好ましい色に再現する記憶色処理がある。このような処理は、例えば、特許文献1〜3に開示されている。
【0007】
このうち特許文献1に開示の技術では、プレスキャン時に特定色の画素数をカウントし、カウント値が閾値より大きい場合は特定色に対して他とは異なる色補正マトリクスを使用することによって、特定色を含む画像の画質向上を図っている。
【0008】
また、特許文献2に開示の技術では、カラー原画から所望数のサンプル画素を抽出し、サンプル画素の色が特定色に含まれるか否かを判定し、カラー原画において特定色が占める割合を検出する。そして、その割合が、所定の閾値以上の場合に、その特定色に対応する所定の規則にしたがって色分解条件を設定する。これにより、色分解条件の自動設定を実現している。
【0009】
また、特許文献3に開示の技術では、入力画像から特定色を含む特定領域を抽出し、入力画像に占める特定領域の割合と入力画像中における特定領域の位置とに基づき、その特定領域に対して色補正をするか否かを決定する。
【0010】
【特許文献1】
特開平6−169395号公報(公開日1994年6月14日)
【0011】
【特許文献2】
特公平5−54756号公報(公開日1993年8月13日)
【0012】
【特許文献3】
特開2001−309193号公報(公開日2001年11月2日)
【0013】
【非特許文献1】
日本色彩学会編「色彩科学ハンドブック新編」東京大学出版会、p.1137−1149
【0014】
【非特許文献1】
大根田章吾「電子写真記録における色再現の理想と現実」日本画像学会誌第37巻、第4号(1998)、p.555−559
【0015】
【発明が解決しようとする課題】
ところで、同種の画像であっても、特定色領域の大きさやその画像中に占める割合によって、色変換処理による画質が大きく異なることになる。例えば、風景画像の中に非常に小さな人物が写っている場合、肌色に対して好ましい処理(特定色再現処理)をその画像に対して行ってもほとんど効果がないばかりか、逆に不自然さを生じてしまう。この場合は、忠実な色再現となる処理(忠実色再現処理)が最適である。
【0016】
画像中に占める人肌の割合が大きくなるにつれて、忠実色再現処理では人肌の領域の画質が急激に低下する。これは、顔などの肌色領域をはっきりと認識できるようになるにつれて、特定色再現処理が必要となってくるためである。ただし、肌色領域そのものが小さい場合には、通常の特定色再現処理でも最適な好ましさを感じることはできない。この場合は、強調ぎみの特定色再現処理を行うことが最適となる。
【0017】
ポートレートや顔のアップ画像のように、さらに画像中に占める人肌の割合が大きくなると、徐々に忠実色再現処理の方が画質は良いと感じるようになる。この場合、通常の特定色再現処理よりも弱めの特定色再現処理、つまり忠実色再現処理の比率を大きくする処理が最適となる。
【0018】
ところが、上記特許文献1〜3に開示の技術では、上記のような要求に応えることができず、入力画像に応じた最適な色補正を行うことができないという問題を有している。
【0019】
本発明は、上記の課題に鑑みてなされたものであり、その目的は、画像全体として特定色を違和感なく好適に再現できるように補正することができる画像処理装置等を提供することにある。
【0020】
【課題を解決するための手段】
本発明の画像処理装置は、入力画像における各画素の色を示す画素データのうち、特定色を示す画素データに対して補正を施す画像処理装置であって、上記の課題を解決するために、入力画像の画素データに基づいて、各画素が特定色であるか否かを判定する判定手段と、入力画像における特定色の画素からなる特定色領域が、その大きさに応じて観察者に対して与える影響の大きさを示す特性値を、前記判定手段の判定結果に基づいて予め定めた方法で設定する特性値設定手段と、前記特性値に応じて補正度合いが変化し、かつ、前記特性値の最小値から予め定めた中間値までの範囲では、前記特性値が大きくなるにつれて補正度合いが大きくなり、前記中間値から最大値までの範囲では、前記特性値が大きくなるにつれて補正度合いが小さくなる補正特性に基づき、前記設定した特性値に応じた補正を入力画像の画素データに対して、施す補正手段とを備えることを特徴としている。
【0021】
上記の画像処理装置は、肌色、空の青色、草木の緑色等の特定色の画素の画素データに対して補正を施すことにより、入力画像を好適に再現する。この補正としては、好ましい色再現を実現するための周知の補正を用いることになるが、上記の構成では、その補正の度合いを入力画像に応じて調整するようにしている。
【0022】
そのために、上記の構成では、判定手段によって入力画像の各画素が特定色であるか否かを判定し、その判定結果に基づいて、特性値設定手段がその入力画像の特性値を設定する。
【0023】
特性値は、入力画像における特定色の画素からなる特定色領域が、その大きさに応じて観察者に対して与える影響の大きさを示す値である。したがって、人物の肌色からなる特定色領域を例にとると、風景画像の中に非常に小さな人物が写っている入力画像では特性値は小さい値となり、入力画像に占める人物の割合が大きくなるにつれて特性値が大きい値となり、ポートレートや人物の顔のアップ画像のように、さらに入力画像に占める人物の割合が大きくなると特性値もさらに大きい値となる。
【0024】
そして、補正手段は、特性値のある値に対して補正度合いが極大となるように予め設定された補正特性に基づいて入力画像の画素データに対して補正処理を施す。上記補正特性とは、例えば、特性値の最小値から予め定めた中間値までの範囲では、特性値が大きくなるにつれて補正度合いが大きくなり、特性値の中間値から最大値までの範囲では、特性値が大きくなるにつれて補正度合いが小さくなる特性をいう。
【0025】
したがって、上記人物の肌色からなる特定色領域の例では、風景画像の中に非常に小さな人物が写っている入力画像では、補正度合いを抑えて不自然さが生じることを防止し、入力画像に占める人物の割合が大きくなり、特定色領域をはっきりと認識できるようになるにつれて、補正度合いを大きくして好ましい色再現を実現し、ポートレートや顔のアップ画像のように、さらに画像中に占める人物の割合が大きくなると、逆に補正度合いを小さくして忠実な色再現に近付けるようにできる。
【0026】
このように補正度合いに基づいた補正を実行することにより、補正後の入力画像を観察する観察者にとって、画像全体として特定色を違和感なく好適に再現できるように補正することができる。
【0027】
実際に補正を行うには、前記補正手段は、特定色を示す画素データを補正する場合に、画素データの色の忠実な色再現のための補正として予め定めた第1補正の効果と、画素データの色が特定色である場合に好ましい色再現のための補正として予め定めた第2補正の効果とを、前記補正特性に基づいて調整すればよい。
【0028】
本発明の画像処理装置は、上記の画像処理装置において、前記補正手段は、特定色を示す画素データを補正する場合に、画素データに対して前記第1補正を施した結果である第1補正データと、画素データに対して前記第2補正を施した結果である第2補正データとを生成するとともに、前記生成した第1補正データと第2補正データとを、前記補正特性に基づいて重み付け加算することにより補正結果としての補正データを生成することが望ましい。
【0029】
上記の構成では、補正度合いに基づいて、第1補正データと第2補正データとを重み付け加算することにより、簡単な演算で補正データを生成することができる。
【0030】
本発明の画像処理装置は、上記の画像処理装置において、前記特性値設定手段は、特性値を設定するために、入力画像に含まれる特定色領域ごとにその特定色領域に含まれる特定色の画素をカウントして、最大の特定色領域の画素数を求めることが望ましい。
【0031】
上記の構成では、特性値設定手段が、入力画像における最大の特定色領域の画素数を求める。この画素数により、入力画像における特定色領域が、その大きさに応じて、観察者に対して与える影響の大きさを示す特性値を適切に設定することができる。
【0032】
本発明の画像処理装置は、上記の画像処理装置において、特定色は色空間における予め定められた特定範囲に含まれる色であり、前記特性値設定手段は、特定色の画素をカウントする場合に、各画素の色の前記特定範囲における位置に応じて重み付けした値をカウントすることが望ましい。
【0033】
特定色が色空間における予め定められた特定範囲として設定されている場合、その領域の中央付近の色は最も特定色らしい色であり、その領域の外周付近の色は非特定色に近い色となり、同じ特定範囲に含まれる色でも特定色らしさが異なることになる。そこで、上記の構成では、各画素の色の特定範囲における位置に応じて、特定色らしさに応じた重み付けをして特定色の画素をカウントすることができる。これにより、より適切な画素のカウントが可能になる。
【0034】
本発明の画像処理装置は、上記の画像処理装置において、前記特性値設定手段は、予め定めた関数に基づいて、前記特性値を、前記補正度合いを示す値に変換することが望ましい。
【0035】
上記の構成では、補正度合いを、特性値の変化に応じて連続的あるいは多段階に変化する値として設定することができる。これにより、様々な入力画像に対してより適切な補正を行うことができるようになる。
【0036】
本発明の画像形成装置は、上記何れかの画像処理装置と、その画像処理装置にて補正が施された画素データに基づいて画像記録媒体に対して画像を記録する画像記録装置とを備える構成である。
【0037】
上記の構成では、上記画像処理装置によって入力画像全体として特定色を違和感なく好適に再現できるように補正することができるので、これに基づいて高品質の画像を画像記録媒体に形成することができる。
【0038】
本発明の画像処理方法は、入力画像における各画素の色を示す画素データのうち、特定色を示す画素データに対して補正を施す画像処理方法であって、上記の課題を解決するために、入力画像の画素データに基づいて、各画素が特定色であるか否かを判定する判定処理と、入力画像における特定色の画素からなる特定色領域が、その大きさに応じて観察者に対して与える影響の大きさを示す特性値を、前記判定処理の判定結果に基づいて予め定めた方法で設定する特性値設定処理と、前記特性値に応じて補正度合いが変化し、かつ、前記特性値の最小値から予め定めた中間値までの範囲では、前記特性値が大きくなるにつれて補正度合いが大きくなり、前記中間値から最大値までの範囲では、前記特性値が大きくなるにつれて補正度合いが小さくなる補正特性に基づき、前記設定した特性値に応じた補正を入力画像の画素データに対して施す補正処理とを含むことを特徴としている。
【0039】
上記の方法では、上記画像処理装置と同様に、入力画像全体として特定色を違和感なく好適に再現できるように補正することができるようになる。
【0040】
本発明の画像処理プログラムは、上記の画像処理方法を実行するための画像処理プログラムであって、コンピュータに前記各処理を実行させるための画像処理プログラムである。また、本発明のコンピュータ読み取り可能な記録媒体は、上記の画像処理プログラムを記録したものである。
【0041】
これらによっても、上記画像処理装置と同様に、カラー画像全体として特定色を違和感なく好適に再現できるように補正することができるようになる。
【0042】
【発明の実施の形態】
本発明の実施の一形態について図1から図10に基づいて説明すれば、以下の通りである。
【0043】
1.画像処理装置の全体構成
本実施形態の画像処理装置1のブロック構成を図1に示す。画像処理装置1は、特定色判定部2及び色補正部3を備えて構成されている。なお、色補正部3は、本発明の補正手段として機能する。
【0044】
画像処理装置1に入力画像データが入力されると、その入力画像データは特定色判定部2及び色補正部3にそれぞれ入力される。なお、入力画像データは、入力画像における各が素の色を示す画素データである。そして、特定色判定部2では、特定色判定信号及び調整信号が生成される。また、色補正部3では、第1色補正及び第2色補正の2種類の補正を行い、さらに、特定色判定部2で生成された特定色判定信号及び調整信号に基づいて、画素ごとに、上記2種類の補正を調整して補正結果としての補正データである出力画像データを生成する。
【0045】
以下では、特定色判定部2及び色補正部3の構成や処理について詳細に説明する。
【0046】
2.特定色判定部の構成
図1に示すように、特定色判定部2は、判定部21、カウント部22、閉領域処理部23、メモリ24、決定部25、調整信号設定部26、及び関数格納部27を備えている。なお、判定部21は本発明の判定手段として機能し、カウント部22、閉領域処理部23、メモリ24、決定部25、調整信号設定部26及び関数格納部27は本発明の特性値設定手段として機能する。
【0047】
この特定色判定部2には、カラー画像入力装置から入力される画像データや、コンピュータにて生成された画像データ、あるいは、これらに対して所定の画像処理が施された画像データが入力される。ここでは、入力画像データとして、RGB信号(R:赤、G:緑、B:青)からなるデータを想定するが、これに限らず入力画像データは他の信号からなる画像データであってもよい。
【0048】
入力画像データ(R,G,B)は、まず判定部21に入力される。判定部21は、入力画像データの示す色が予め定められた範囲内のものであるか否かを画素ごとに判断することにより、各画素が特定色の画素であるか、非特定色の画素であるかを判定する。そして、判定部21は、特定色であるか否かの判定結果を画素ごとに示す特定色判定信号を出力する。
【0049】
ここで、特定色とは、人の肌色、空の青色、草木の緑色等の記憶色(つまり、視覚経験によって人間の記憶の中に残されている色)を意味し、非特定色とは、特定色以外の色を意味する。
【0050】
カウント部22は、判定部21からの特定色判定信号に基づいて、特定色と判定された画素の数や画像の総画素数などをカウントする。なお、判定部21及びカウント部22における具体的な処理については下記4−1.において詳しく説明する。
【0051】
閉領域処理部23は、画像上での特定色の画素の連結成分、すなわち、特定色の閉領域(特定色領域)を求める。これは、特定色の画素数がほぼ同じ画像であっても、ポートレートのように人物の顔が大きく写し出された画像の場合と、多数の人物が写し出された画像の場合とでは、画像処理量を変える必要があるので、特定色の閉領域に関する情報が後に必要になるからである。なお、以下、では「特定色の閉領域」を単に「閉領域」という。
【0052】
閉領域処理部23は、2値化部23a、ラベリング部23b、ラベルカウント部23c、及び最大値選択部23dを備えて構成されている。また、閉領域処理部23は、メモリ24を利用して処理を行う。そして、閉領域処理部23は、最大閉領域画素数を出力する。なお、特定色判定部2における具体的な処理については、下記4−2.において詳しく説明する。
【0053】
決定部25は、調整信号設定部26における調整信号の設定のために用いる入力パラメータを決定するものである。ここで、入力パラメータは、入力画像データにおける特定色領域が、その大きさに応じて、その画像の観察者に対して与える影響の大きさを示す特性値である。このとき、決定部25は、判定部21の判定結果に基づき、予め定めた方法で特性値を設定する。本実施形態においては、判定部21は、カウント部22によるカウント結果を用いるのか、閉領域処理部23による処理結果を用いるのかを判別し、何れかの結果を用いて入力パラメータを決定するものとする。
【0054】
調整信号設定部26は、予め設定されて関数格納部27に格納されている関数を用いて、決定部25で決定した入力パラメータを調整信号に変換する。ここで、調整信号は、好ましい色再現のための第2色補正の補正度合いを示す信号である。したがって、調整信号設定部26は、入力パラメータに基づいて第2色補正の補正度合いを調整することになる。
【0055】
なお、決定部25及び調整信号設定部26における具体的な処理については、下記4−3.において詳しく説明する。
【0056】
3.色補正部の構成
図1に示すように、色補正部3は、第1色補正処理部31、第2色補正処理部32、及び信号処理部33を備えている。
【0057】
この色補正部3には、特定色判定部2に入力されるものと同一の入力画像データが入力され、この入力画像データは第1色補正処理部31及び第2色補正処理部32にそれぞれ入力される。
【0058】
第1色補正処理部31及び第2色補正処理部32は、入力画像データに対して、予め定めた互いに異なる補正を施すものであり、補正後の補正データとして、それぞれ第1色補正データ(C1,M1,Y1)及び第2色補正データ(C2,M2,Y2)を出力するようになっている。
【0059】
ここで、第1色補正処理部31は、入力画像データに対して、原稿に忠実な色再現を実現するための補正として予め定めた第1色補正(第1補正)を行うものであり、そのための第1色補正値を格納している。また、第2色補正処理部32は、入力画像データに対して、その入力画像データの示す色が特定色(人の肌色、空の青色、草木の緑色等)であった場合に好ましい色再現を実現するための補正として予め定めた第2色補正(第2補正)を行うものであり、そのための第2色補正値を格納している。ここでは仮に、第1色補正処理部31の処理を「忠実色再現処理」、第2色補正処理部32の処理を「特定色再現処理」あるいは「記憶色再現処理」と称する。
【0060】
この第1色補正処理部31及び第2色補正処理部32は、例えば、LUT法によって入力画像データを補正データに変換するようになっている。第1色補正処理部31及び第2色補正処理部32での処理は、前述の忠実な色再現を実現するための処理、及び特定色について好ましい色再現を実現するための処理を用いる。
【0061】
なお、ここでは、第1色補正処理部31及び第2色補正処理部32は、上記補正を行う際に、第1表色系の信号であるRGB信号からなる入力画像データを、第2表色系の信号であるCMY信号(C:シアン、M:マゼンタ、Y:イエロー)からなる補正データに変換する色変換処理部であるものとしている。しかし、第2の表色系の信号はCMY信号である必要はなく、標準色空間の信号であるCIE1976L***信号(CIE:Commission Internationale de l'Eclairage:国際照明委員会。L*:明度、a*・b*:色度)やsRGB信号であってもよい。このような場合、信号処理部33で処理された上記信号はCMY信号などの出力画像データに変換する変換処理がなされる。
【0062】
信号処理部33には、第1色補正処理部31及び第2色補正処理部32の出力した第1色補正データ及び第2色補正データが入力される。信号処理部33では、特定色の画素について、入力された第1色補正データと第2色補正データとを、調整信号に基づいて重み付け加算し、その結果を出力画像データ(Cout,Mout,Yout)として出力する。これにより、信号処理部33は、第1色補正の効果と、第2色補正の効果とを、調整信号に基づいて調整する。
【0063】
なお、非特定色の画素については、信号処理部33は、第1色補正データを出力画像データとして出力する。特定色の画素であるか、非特定色の画素であるかは、特定色判定信号に基づいて判定する。信号処理部33における具体的な処理については、下記5.において詳しく説明する。
【0064】
4.特定色判定部での処理
上述した構成の特定色判定部2における処理の流れを図2のフローチャートに基づいて説明する。
【0065】
図2では、原稿を読み込んで画像データを生成するスキャナなどの画像読取装置における処理を想定し、画像読取装置における原稿種別判別処理の結果に基づいて特定色判定部2で行う処理について説明する。すなわち、プレスキャンにより原稿種別判別処理を行い、写真領域が含まれる原稿種別の場合に、さらに特定色画素のカウント処理などを行って調整信号aを求めるようになる。そして、本スキャンでは、この調整信号aを用いて色補正部3による色補正処理が行われる。なお、ここでは、網点領域と印画紙写真領域を区別せず、まとめて「写真領域」と記している(以下、同様)。また、上記のように、スキャナで原稿種別判別処理を実現する場合、色補正処理は、スキャナと接続されるコンピュータやプリンタで行われる。すなわち、コンピュータやプリンタではスキャナから出力される画像データ、及び特定色判定信号・調整信号aに基づいて色補正処理がなされる。
【0066】
この処理では、まず、原稿種別判別処理が行われ(S1)、写真領域が含まれる原稿種別か否かが判別され(S2)、写真領域が含まれる場合に特定色判定部2による処理(S3〜S12)が行われる。
【0067】
写真領域が含まれると判別されると、入力画像データの各画素について順次、S3〜S6の処理を行う。すなわち、判定部21によりその画素が特定色の画素か否かを判定し(S3)、特定色の画素である場合にカウント部22により特定色の画素としてカウントする(S4)。また、カウント部22により、総画素数をカウントする(S5)。そして、全ての画素に対する処理が終了したか否かを判別し(S6)、終了していない場合には次の画素についてS3からの処理を行う。
【0068】
その後、閉領域処理部23による閉領域処理を行う(S7)。閉領域処理では、特定色の画素からなる閉領域のうち、画素数が最大となる閉領域の画素数(閉領域の画素数の最大値)を求める。なお、閉領域処理の具体的内容については、下記4−2.において詳しく説明する。
【0069】
そして、カウント部22によるカウント結果と、閉領域処理部23による処理結果に基づいて、決定部25による決定を行う。決定部25は、調整信号設定部26における調整信号の設定のために用いる入力パラメータkの決定を行う。決定部25は、まず、入力パラメータkの決定に、カウント部22によるカウント結果を用いるのか、閉領域処理部23による処理結果を用いるのかを判別する。この判別は、特定色画素のカウント値から、閉領域の画素数の最大値(最大閉領域画素数)を差し引いた値が、予め定めた閾値を超えるか否かにより行う(S8)。越えない場合には、特定色画素のカウント結果を用いるものとし(S9)、越える場合には閉領域処理の結果を用いるものとする(S10)。そして、何れかの結果に基づいて入力パラメータkを決定する(S11)。なお、S8の判別は、特定色画素のカウント値と最大閉領域画素数とを比較して判別してもよい。
【0070】
そして、調整信号設定部26により、決定部25で決定された入力パラメータkに応じた調整信号aを設定する(S12)。
【0071】
この処理において、S6の後に、カウントされた特定色画素の数を閾値(例えば、総画素数の5%)と比較し、この閾値を超える場合にS7以降の処理を行うようにしてもよい。このようにすることにより、特定色の画素がある程度含まれる場合に限ってS7以降の処理を行うことになるので、効率のよい処理を行うことができる。あるいは、特定色画素数及び総画素のカウント処理と、閉領域処理とを並列して行うようにしてもよい。
【0072】
また、本発明は、上記の処理に限定されるものではなく、例えば、シェーディング補正処理後の画像データを画像メモリに格納しておき、プレスキャンを行わずに、この画像データを用いて原稿種別判別処理及び特定色画素のカウント処理などを行うようにしてもよい。
【0073】
原稿種別判別処理としては、上記のように、原稿を読み込んで自動的に判別するのではなく、コンピュータの設定画面にて選択される画像モードにより判別するようにしてもよい。画像モードには、文字モード、印刷写真モード、印画紙写真モード、文字/写真モード等があり、スキャナで原稿を読み込む際、これらのうち、後者の3つのモードが選択された場合に、S3以降の処理を行うようにすればよい。
【0074】
また、領域分離処理結果に基づいて特定色画素のカウント処理を行うようにしてもよい。この場合、S2とS3との間に、S2’として、網点領域又は印画紙写真領域であるか否かを判別する処理が付加される。すなわち、網点領域又は印画紙写真領域に対して、特定色画素のカウント処理が行われる。
【0075】
次に、上述した特定色画素のカウント処理(S3,S4)、閉領域処理(S7)、調整信号の設定処理(S11,S12)について、より具体的に説明する。
【0076】
4−1.特定色画素のカウント処理
ここでは、特定色として肌色を想定し、特定色画素のカウント処理(S3,S4)の具体例(a)〜(c)について説明する。
【0077】
(a)入力画像データの特定色画素のカウント
この処理は、プレスキャンなどによって生成された入力画像データの全ての画素に対して、特定色の画素をカウントするものである。各画素が特定色であるか否かの判定は、次のようにして行うことができる。入力画像データの各画素の値を(Rin,Gin,Bin)としたとき、予め定めた閾値Rth1,Rth2,Gth1,Gth2,Bth1,Bth2を用いて、Rth1<Rin<Rth2、かつ、Gth1<Gin<Gth2、かつ、Bth1<Bin<Bth2である場合には、その画素が特定色であると判定し、それ以外の場合には、その画素が非特定色であると判定する。上記閾値の具体的な数値の例としては、特定色としての肌色を判定する場合には、(Rth1,Gth1,Bth1)=(210,135,120),(Rth2,Gth2,Bth2)=(225,170,155)のように選ぶことができる。
【0078】
(b)写真領域の特定色画素のカウント
上記(a)では、入力画像データの全ての画素に対して特定色の画素をカウントする処理について説明したが、入力画像データについて領域分離処理が行われる場合には、その処理の結果として写真領域と判定された領域内で特定色の画素をカウントするようにしてもよい。写真領域内の各画素が特定色であるか否かの判定は、上記(a)の場合と同様に行うことができる。
【0079】
(c)重み付けカウント
重み付けカウントの概念を図3に基づいて説明する。入力画像データの各画素の値を(Rin,Gin,Bin)とし、上記(a)で例示した(Rth1,Gth1,Bth1)=(210,135,120)及び(Rth2,Gth2,Bth2)=(225,170,155)にそれぞれ対応する色空間上の点をP1及びP2とする。そして、線分P1C=線分P2C間の距離をL、中点Cの座標を(Rc,Gc,Bc)とする。そして、式(1)で表されるアルゴリズムによってカウント値を求める。
【0080】
【数1】

Figure 0004112413
【0081】
このアルゴリズムは、色空間において中点Cを中心とする球状の範囲(特定範囲)における位置に応じて重み付けした値をカウントするものであり、中点Cからの距離が小さい値を有する画素ほどカウント数が多くなることを意味している。なお、上記に限らず、楕円球のような計算式で算出してもよいし、演算を行うのではなく、LUTを用いた変換を行うようにしてもよい。このように重み付けを行うことにより、より精度良く調整信号を求めることができる。上記のように重み付けを行うと、数式としての自由度が上がるため、より複雑な現象、例えば補正量を中心からの距離に反比例する関数とする、といったことが可能になる。また、閾値付近でのトーンギャップ(濃度が不連続に変化すること)の発生を抑制し、滑らかな階調性を維持できる。
【0082】
なお、この重み付けカウントは、上記(a)のように入力画像データの特定色画素のカウントに用いることもでき、上記(b)のように写真領域の特定色画素のカウントに用いることもできる。
【0083】
4−2.閉領域処理
閉領域処理(図2のS7)の具体例として、連結成分へのラベル付けを使用した例を図4及び図5のフローチャートに基づいて説明する。なを、このような処理は、例えば、画像処理標準テキストブック編集委員会監修「画像処理標準テキストブック」財団法人画像情報教育振興協会、p.262−268などに紹介されている。
【0084】
連結成分へのラベル付けでは、入力画像データを2値化し、2値化した画像データに基づいて閉領域を認識していく。ここでは、画像の左上の画素からラスタスキャンするものとする。
【0085】
まず、2値化部23aにより、入力画像データの各画素に対して、その画素が特定色であるか否かの条件で2値化を行う(S21)。この2値化は、判定部21から出力される特定色判定信号が示す判定結果を利用することができる。すなわち、特定色の画素には1が、それ以外の画素には0が付与され、2値画像が生成される。この2値画像は、メモリ24に格納される。
【0086】
この2値画像に対してラベリング部23bによりラベル付けを行う(S22〜S30)。ラベル付けの方法について、図4及び図6(a)〜(d)を用いて説明する。まず、1つの画素を注目画素とし、この注目画素が1か否かを判別する(S22)。ここで、注目画素が0の場合、次の画素(注目画素の右隣の画素、あるいは、注目画素があるラインの最後の画素である場合は、次のラインの最初の画素)に移ってS22からの処理を繰り返す。
【0087】
S22が真(Yes)の場合、注目画素の上隣の画素が1、かつ、注目画素の左隣の画素が0であるか否かを判別する(S23)。S23が真の場合、図6(a)に示すように注目画素に対して上隣の画素と同じラベル(ここではA)をつける(S24)。
【0088】
S23が偽(No)の場合、注目画素の上隣の画素が0、かつ、注目画素の左隣の画素が1であるか否かを判別する(S25)。S25が真の場合、図6(b)に示すように注目画素に対して左隣の画素と同じラベル(ここではA)をつける(S26)。
【0089】
S25が偽の場合、注目画素の上隣の画素が1、かつ、注目画素の左隣の画素が1であるか否かを判別する(S27)。S27が真の場合、図6(c)に示すように注目画素に対して上隣及び左隣の両方の画素のラベル(ここではA,B)をつける(S28)。
【0090】
S27が偽の場合、図6(d)に示すように注目画素に対して新しいラベル(ここではC)をつける(S29)。
【0091】
上記の処理が全画素について完了するまで、各画素について順次上記の処理を繰り返す(S30)。なお、上記のようにして付けられたラベルは、メモリ24に格納される。このとき、既に格納されている2値画像にラベルを上書きしてもよい。
【0092】
全画素についてラベル付けが終了すると、ラベル付けされた画像に基づいて閉領域に関する処理を行う。まず、ラベルカウント部23cにより複数の閉領域があるか否かを判別する(S31)。この方法としては、ラベル付けされた画像におけるラベルの数(種類)が0又は1であるか否かを判定する方法が挙げられる。ラベルの数が0とは、何れの画素にもラベルが付けられなかったことを意味し、ラベルの数が1とは、上記の例ではラベルAのみが付けられ、ラベルBは付けられなかったことを意味する。そして、ラベルの数が0又は1ならば閉領域は無い又は1つであるので、以降の閉領域に対する処理(S32〜S40)は行わない。ラベルの数が2以上、つまり、複数の閉領域がある場合はS32以降の処理を行う。
【0093】
ラベルの数が2以上である場合、まず、1つの閉領域を選択し(S32)、その閉領域に複数種類のラベルが記録されているか否かを判別する(S33)。複数種類のラベルが記録されている場合には、その閉領域のラベルをその閉領域で最初に用いたラベルに統一する(S34)。なお、必ずしも最初に用いたラベルに統一する必要は無く、各閉領域でラベルが区別できるようになっておればよい。この処理(S32〜S34)を各閉領域について繰り返す(S35)。
【0094】
そして、ラベルの種類ごとの画素数をカウントし、その最大値Vを閉領域の画素数の最大値とする。具体的には、先ず最大値Vを初期化して0に設定しておき(S36)、ある1種類のラベルが付けられた画素数をカウントする(S37)。そして、最大値Vとカウント値とを比較し(S38)、カウント値の方が大きい場合には、最大値Vをカウント値で置き換える(S39)。この処理(S37〜S39)を全ラベルについて繰り返す(S40)。これにより、最終的に最大値Vに設定されている値が閉領域の画素数の最大値となる。
【0095】
なお、メモリ24には、画像全体又は写真領域に関する2値画像やラベル付けされた画像を格納するのが好ましい。格納するデータは2値又はラベルの情報であるので、メモリ容量はさほど大きくはならない。
【0096】
上記ラベル付けの処理を、複数の画素よりなるブロックに分割して行うことも可能であるが、ポートレートなどの画像において特定色の領域がブロックに分割された場合、処理済みの画素と新たに処理を行う画素との座標位置の関係を明確にしてラベル付けを行う必要や、同一閉領域内に複数のラベルが記録されている場合、ラベルを統一してカウントする際の処理が複雑になる。
【0097】
4−3.調整信号の設定処理
調整信号の設定処理(図2のS11,S12)の具体例について説明する。最終的に設定する調整信号aを求めるためには、まず、入力パラメータkを求める。この入力パラメータkを求める際には、上述したように、特定色画素のカウント結果を用いる場合(図2のS9)と、閉領域処理の結果を用いる場合(図2のS10)とがある。
【0098】
まず、特定色画素のカウント結果を用いる場合(図2のS9)について説明する。この場合の入力パラメータkを求める方法には、具体例(1)〜(3)が考えられる。
【0099】
(1)特定色の画素数に応じて設定する方法
カウント数の上位ビット信号を入力パラメータk1として用いることができる。この上位ビット信号のビット数は、4〜8ビット程度である。
【0100】
画像の見え方は画像を見る距離に依存する。基本的には、特定色の占める大きさ(面積)によって最適な補正量は異なり、このように面積によって補正量を制御するためには、割合でなく画素数により制御する必要がある。
【0101】
画像を見る場合、画像サイズが小さい場合は画像を近付けて見ようとし、逆に大きい場合は画像全体を見ようとして離れて見ようする。この場合は、特定色の占める面積(画素数)ではなく、全体に占める割合に依存することになる。
【0102】
一方、必ずしも全ての人が画像を近付けたり離したりして見ようとするわけではなく、ある想定される距離で見る場合もあり得る。このように、画像を見る距離がほぼ一定と見なされる場合は、画素数により制御を行うと最適となる。
【0103】
画素数と比率のどちらを用いるかは、例えば、仕様に応じて決定すればよい。また、画素数と比率の両方を用いて入力パラメータkを求めるようにしてもよい。
【0104】
(2)総画素数に対する特定色の画素数の割合に応じて設定する方法
入力画像データの総画素数に対する、特定色の画素数の割合を求め、これを入力パラメータk2としてもよい。つまり、(特定色の画素数)/(入力画像データの総画素数)を算出して入力パラメータk2とする。この場合の入力パラメータk2は、解像度によらず一定である。なお、k2 n(nは2程度)を入力パラメータとしてもよい。
【0105】
(3)写真領域内で特定色が占める割合に応じて設定する方法
入力画像データについて領域分離処理が行われる場合には、その処理の結果として写真領域と判定された領域内での総画素数に対する、特定色の画素数の割合を求め、これを入力パラメータk3としてもよい。つまり、(写真領域内の特定色の画素数)/(写真領域内の総画素数)を算出して入力パラメータk3とする。なお、k3 n(nは2程度)を入力パラメータとしてもよい。
【0106】
次に、閉領域処理の結果を用いる場合(図2のS10)について説明する。この場合の入力パラメータkを求める方法には、具体例(4),(5)が考えられる。
【0107】
(4)総画素数に対する閉領域の画素数の最大値に応じて設定する方法
入力画像データの総画素数に対する、閉領域の画素数の最大値の割合を求め、これを入力パラメータk4としてもよい。つまり、(閉領域の画素数の最大値)/(入力画像データの総画素数)をk4とする。
【0108】
(5)写真領域内の総画素数に対する閉領域の画素数の最大値に応じて設定する方法
入力画像データについて領域分離処理が行われる場合には、その処理の結果として写真領域と判定された領域内での総画素数に対する、閉領域の画素数の最大値の割合を求め、これを入力パラメータk5としてもよい。つまり、(閉領域の画素数の最大値)/(写真領域内の総画素数)をk5とする。
【0109】
このように、特定色画素のカウント結果を用いる場合には上記(1)、(2)又は(3)の例のようにして入力パラメータk(入力パラメータk1,k2,k3)を求め、閉領域処理の結果を用いる場合には上記(4)又は(5)の例のようにして入力パラメータk(入力パラメータk4,k5)を求める。
【0110】
このようにして求めた入力パラメータkは、入力画像データ応じて形成される入力画像における特定色領域が、その大きさに応じて、その入力画像の観察者に対して与える影響の大きさを示す値となる。この値は、入力画像の特性を表す特性値となる。
【0111】
なお、ここでは、上記図2のS8において、特定色画素のカウント結果を用いる場合と、閉領域処理の結果を用いる場合とに場合分けして入力パラメータkを求めるようにしているが、必ずしもこのような場合分けを行う必要はない。例えば、場合分けすることなく、常に閉領域処理の結果を用いて入力パラメータを求めるようにしてもよい。
【0112】
このようにして求めた入力パラメータkに基づいて調整信号aを設定する。入力パラメータkに基づいて調整信号aを設定するには、例えば、図7又は図8に示すような、入力パラメータkと調整信号aとの対応関係を定めた関数による変換を行えばよい。この関数は、予め定めて関数格納部27に格納しておく。なお、図7及び図8の入力パラメータkとしては、上記k2〜k5を想定している。図7及び図8の入力パラメータkが上記k1の場合は、横軸が画素数の上位ビットとなる。
【0113】
この変換方法としては、LUTを用いて入力パラメータkに対応する調整信号aを求めるようにしてもよく、予め定めた関数式に入力パラメータkを入力して調整信号aを求めるようにしてもよく(特に、図7の場合)、入力パラメータkに対する閾値処理により調整信号aを求めるようにしてもよい(特に、図8の場合)。
【0114】
なお、調整信号aは、下記5.で説明するように、第1色補正データと第2色補正データとを重み付け加算して出力画像データを算出する際における、第2色補正データの比率である。
【0115】
図7又は図8に示す関数について説明する。領域A、つまり、入力パラメータkの値が非常に小さい範囲(例えば、上記入力パラメータk3が、0<k3≦0.05を満たす場合)は、例えば、風景中に小さく人物が写っている画像の場合のように、画像中に占める特定色の割合が非常に小さい場合である。そのため、このような画像の特定色の画素に対して、特定色に好ましい色再現を実現するための補正(第2色補正)の影響を強くすると、その部分だけ強調された状態になり、不自然な画像となってしまう。そこで、領域Aでは、調整信号aの値を小さく(例えば、a=0.05)、又は0にすることで、第2色補正の影響を小さく、又は第2色補正の影響をなくすようにする。
【0116】
領域B、つまり、入力パラメータkの値がある程度大きい範囲(例えば、0.05<k3≦0.3の場合)では、画像中に占める特定色の割合がある程度大きくなっている。この場合、特定色を補正することによる不自然さよりも、特定色の色再現が適切でないことによる不自然さを感じるようになる。そのため、第2色補正の影響を大きくする必要がある。ただし、画像中に占める特定色の割合があまり大きくないため、第2色補正の影響を強めに設定しなければ、十分好ましい画質として感じられないという特性があるそこで、領域Bでは、調整信号aの値を大きくする(例えば、a=0.8〜1.2)ことで、第2色補正の影響を大きくするようにする。
【0117】
なお、調整信号aの値は1以上となってもかまわない。この場合、出力画像データ(Cout,Mout,Yout)は、第1色補正データ(C1,M1,Y1)と第2色補正データ(C2,M2,Y2)とを内分する点ではなく、外分する点になる。この場合も下記式(2)と同一の式で計算することができる。
【0118】
領域C、つまり、入力パラメータkの値がかなり大きい範囲(例えば、k3>0.3の場合)では、人物の顔のアップの写真のように、さらに画像に占める特定色の割合が大きくなる。この場合、第2色補正の影響を大きくすると、実際の肌の色とのギャップを感じるようになってしまう。そこで、領域Cでは、調整信号aの値を小さくする(例えば、a=0.1〜0.8)ことで、第2色補正の影響を小さくするようにする。
【0119】
このように、調整信号設定部26は、入力パラメータkの最小値から予め定めた中間値までの範囲では、入力パラメータkの値が大きくなるにしたがって調整信号aの値も大きくなるように調整信号aを設定し、入力パラメータkの上記中間値から最大値までの範囲では、入力パラメータkの値が大きくなるにしたがって調整信号aの値が小さくなるように調整信号aを設定する。このように調整信号aを設定し、その調整信号aに基づいて好ましい色再現のための第2色補正の補正度合いを調整することにより、画像全体として特定色を違和感なく好適に再現することができる。
【0120】
なお、上述した処理は、入力画像データを拡大または縮小したデータに対して行うことも可能である。この場合、総画素数を用いる上記(1)の場合、拡大・縮小の倍率を考慮すればよい。
【0121】
5.色補正部での処理
色補正部3における処理の流れを図9のフローチャートに基づいて説明する。
【0122】
この処理では、まず、調整信号設定部26から送られてくる調整信号aに応じて、信号処理部33が第1色補正データと第2色補正データとを重み付け加算するための比率を設定する(S51)。比率としては、調整信号aの示す値をそのまま用いることができるため、ここで設定する比率をaとする。
【0123】
なお、比率を設定する際には、判定部21から送られてくる特定色判定信号に基づくことにより、対象となる画素が特定色の場合には上記のように調整信号aの示す値を比率として設定し、対象となる画素が非特定色の場合には比率を0に設定する。
【0124】
そして、第1色補正処理部31及び第2色補正処理部32において、それぞれ忠実色再現処理及び特定色再現処理を行い、それぞれ第1色補正データ(C1,M1,Y1)及び第2色補正データ(C2,M2,Y2)を信号処理部33に出力する。
【0125】
そして、信号処理部33により、式2を用いて、色空間上の点(C1,M1,Y1)と(C2,M2,Y2)とを比率aに基づいて内分又は外分する点(Cout,Mout,Yout)を算出し、この(Cout,Mout,Yout)を出力画像データとして出力する(S54)。
【0126】
【数2】
Figure 0004112413
【0127】
このように、特定色の画素について、第1色補正データと第2色補正データとを、比率aに基づいて重み付け加算し、その結果を出力画像データとして出力する。これにより、簡単な演算で出力画像データを生成することができる。
【0128】
6.領域分離処理及び原稿種別判定処理
画像処理装置1に入力される入力画像データには、領域分離処理や原稿種別判定処理を施す場合がある。以下、これらの処理について説明しておく。
【0129】
6−1.領域分離処理
入力画像データを、文字、網点(印刷写真)、写真(印画紙写真)の各領域に分離する方法としては、例えば、高橋利至他「文字/網点/写真混在画像の適応2値化方式」画像電子学会研究会予稿90−06−04で紹介されている方法を用いることができる。この方法について以下に詳細を説明する。
【0130】
注目画素を中心としたM×N(M,Nは自然数)画素のブロック内で以下のような判定を行い、その判定結果をその注目画素の領域識別信号とする。
【0131】
(1)ブロック内の中央の9画素に対して、信号レベルの平均値(Dave)を求め、その平均値を用いてブロック内の各画素を2値化する。また、最大画素信号レベル(Dmax)、最小画素信号レベル(Dmin)も同時に求める。
【0132】
(2)網点領域では、小領域における画像信号の変動が大きいことや、背景に比べて濃度が高いことを利用し、網点領域を識別する。すなわち、2値化されたデータに対して主走査方向及び副走査方向でそれぞれ0から1への変化点数、1から0への変化点数を求めて、それぞれ、KH,KVとし、閾値TH,TVと比較して両者がともに閾値を上回った場合に、網点領域と判定する。また、背景との誤判定を防ぐために、Dmax,Dmin,Daveを閾値B1,B2と比較する。そして、Dmax−Dave>B1、かつ、Dave−Dmin>B2、かつ、KH>TH、かつ、KV>TVを満たす場合に網点領域と判定し、満たさない場合に非網点領域と判定する。
【0133】
(3)文字領域では、最大信号レベルと最小信号レベルとの差が大きく、濃度も高いと考えられることから、文字領域の識別を以下のように行う。非網点領域において、先に求めておいた最大画素信号レベル及び最小画素信号レベル、並びにそれらの差分(Dsub)を、それぞれ閾値PA,PB,PCと比較する。そして、Dmax>PA、又は、Dmin<PB、又は、Dsub>PCを満たす場合に文字領域と判定し、満たさない場合にその他領域と判定する。
【0134】
(4)その他領域に対して、画素データR,G,Bのそれぞれの信号レベルをDR,DG,DBとし、閾値THBACKと比較する。そして、DR>THBACK、かつ、DG>THBACK、かつ、DB>THBACKを満たす場合に下地領域と判定し、満たさない場合に印画紙写真領域と判定する。
【0135】
6−2.原稿種別判定処理
上記の領域分離処理方法は、原稿の種別を判定する方法に適用することも可能である。原稿の種別を判定する際には、プレスキャンを行った低解像度のデータを用いることが多いため、例えば、解像度が劣化する副走査方向における情報を無効にし(プレスキャンを行う場合は、本スキャンの場合よりもスキャン速度を速くするので副走査方向のデータが劣化するため)、主走査方向の判別結果を用いて画素の判別を行い、判別された画素数をカウントし、あらかじめ用意されている写真領域、網点領域、文字領域に対する閾値と比較することにより原稿全体の種別の判定を行うことができる(例えば、特開2002−232709号公報参照)。
【0136】
例えば、入力画像(原稿)より読み込まれた総画素数に対し、文字と判別された画素数のカウント数が所定割合(閾値)以上あれば文字原稿であるといった具合である。また、写真領域、網点領域、文字領域に対する閾値は、領域分離処理で用いる閾値により、カウント数も大きく変わってくるため、前記領域分離処理で用いる閾値に対応させて設定しておくことが好ましい。例えば、領域分離処理で用いられる閾値が、きびしい値に設定される場合、カウント数に対する閾値は低い値に設定される。文字領域及び網点領域ともにそれぞれの閾値を満たせば、入力された画像(原稿)は文字・網点画像(印刷写真)であると判定される。このときに使用した網点領域の画素数又は印画紙写真領域の画素数を、調整信号aの設定の際に使用してもよい。画素数の絶対値を用いる場合は、解像度の低下分を考慮して調整信号aを設定するようにすればよい。
【0137】
なお、原稿種別判定後の各処理においては、各領域が混在しないと判定された場合は、判定結果に基づいて処理を行う。例えば、文字原稿と判定された場合は、画像全体に対して文字用の処理(例えば、空間フィルタ処理おいてエッジを強調する処理)を行う。複数の領域が混在すると判定された場合は、それぞれの領域処理の中間パラメータを使用する。例えば、文字・網点画像と判定された場合は文字領域と網点領域の中間的な処理(例えば、空間フィルタ処理において、文字の鮮鋭性の低下を抑制し網点領域に生じるモアレを低減する適応化混合フィルタ)を行う。
【0138】
7.画像処理装置の適用例
上述した画像処理装置1を適用した装置の例について説明する。画像処理装置1を画像形成装置としてのデジタルカラー複写機100に適用したときのブロック構成を図10に示す。デジタルカラー複写機100は、カラー画像入力装置110、カラー画像出力装置120、カラー画像処理装置130、及びこれらに対する操作入力のための操作パネル101を備えて構成される。なお、カラー画像出力装置120は、本発明の画像記録装置として機能する。
【0139】
カラー画像処理装置130は、A/D(アナログ/デジタル)変換部131、シェーディング補正部132、原稿種別自動判別部133、入力階調補正部134、領域分離処理部135、拡大縮小処理部136、特定色判定部2、色補正部3、黒生成下色除去部137、空間フィルタ処理部138、出力階調補正部139、及び階調再現処理部140を備えて構成されている。カラー画像処理装置130における特定色判定部2及び色補正部3が、上記画像処理装置1となる。
【0140】
カラー画像入力装置110は、例えば、CCD(Charge Coupled Device)を備えたスキャナ部を備えて構成されている。カラー画像入力装置110は、原稿からの反射光像を、RGBのアナログ信号としてCCDにて読み取り、カラー画像処理装置130に入力するものである。
【0141】
カラー画像入力装置110にて読み取られたアナログ信号は、カラー画像処理装置130内を、A/D変換部131から階調再現処理部140まで上記の順で送られ、CMYKのデジタルカラー信号として、カラー画像出力装置120へ出力される。
【0142】
A/D変換部131は、RGBのアナログ信号をデジタル信号に変換するものである。シェーディング補正部132は、A/D変換部131より送られてきたデジタルのRGB信号に対して、カラー画像入力装置110の照明系、結像系、撮像系などで生じる各種の歪みを取り除く処理を施すものである。また、シェーディング補正部132は、カラーバランスを整える処理を行う。
【0143】
原稿種別自動判別部133では、シェーディング補正部132にて各種の歪みが取り除かれ、カラーバランスの調整がなされたRGB信号(RGBの反射率信号)を、濃度信号などのカラー画像処理装置130に採用されている画像処理システムの扱いやすい信号に変換するとともに、入力された原稿が、文字原稿、印刷写真原稿、印画紙写真であるか、あるいは、それらが混在する文字/印刷写真原稿であるかなどの判定を行う。
【0144】
入力階調補正部134は、下地濃度の除去やコントラストなどの画質調整処理を行う。
【0145】
領域分離処理部135は、RGB信号に基づき、入力画像中の各画素を文字領域、網点領域、写真領域の何れかに分離するものである。領域分離処理部135は、分離結果に基づき、各画素がどの領域に属しているかを示す領域識別信号を、色補正部3、黒生成下色除去部137、空間フィルタ処理部138、及び階調再現処理部140へ出力するとともに、入力階調補正部134の出力した入力信号をそのまま後段の拡大縮小処理部136に出力する。拡大縮小処理部136は、デジタルカラー複写機100に備えられる操作パネル101より入力される信号に基づいて画像の拡大や縮小の処理を行う。
【0146】
特定色判定部2及び色補正部3は、上述した処理を行うものである。すなわち、特定色判定部2は、入力画像データが予め定められた色範囲内にあるか否か判断し、各画素が特定色であるか非特定色かを判定し、特定色である場合、その旨を示す特定色判定信号を出力するとともに、特定色と判定された画素の数のカウントなどを行う。また、特定色の閉領域について、その閉領域の画素数のカウントなどを行う。色補正部3は、色再現の忠実化実現のために、不要吸収成分を含むCMY色材の分光特性に基づいた色濁りを取り除く処理を行うものである。
【0147】
黒生成下色除去部137は、色補正後のCMYの3色信号から黒(K)信号を生成する黒生成処理、もとのCMY信号から黒生成処理で得たK信号を差し引いて新たなCMY信号を生成する処理を行うものである。これにより、CMYの3色信号はCMYKの4色信号に変換される。
【0148】
黒生成処理の一例として、スケルトンブラックによる黒生成を行う一般的方法がある。この方法では、スケルトンカーブの入出力特性をy=f(x)、入力されるデータをC,M,Y、出力されるデータをC’,M’,Y’,K’、UCR(Under Color Removal)率をα(0<α<1)とすると、黒生成下色除去処理は以下の式(3)で表わされる。
【0149】
【数3】
Figure 0004112413
【0150】
空間フィルタ処理部138は、黒生成下色除去部137より入力されるCMYK信号の画像データに対して、領域識別信号に基づいてデジタルフィルタによる空間フィルタ処理を行い、空間周波数特性を補正することによって出力画像のぼやけや粒状性劣化を防ぐように処理するものである。また、階調再現処理部140も、空間フィルタ処理部138と同様に、CMYK信号の画像データに対して、領域識別信号に基づいて所定の処理を施すものである。
【0151】
例えば、領域分離処理部135にて文字領域に分離された領域は、特に黒文字又は色文字の再現性を高めるために、空間フィルタ処理部138による空間フィルタ処理における鮮鋭強調処理で高周波数の強調量が大きくされる。同時に、階調再現処理部140においては、高域周波数の再現に適した高解像度のスクリーンでの2値化または多値化処理が選択される。
【0152】
また、領域分離処理部135にて網点領域に分離された領域に関しては、空間フィルタ処理部138において、入力網点成分を除去するためのローパス・フィルタ処理が施される。そして、出力階調補正部139では、濃度信号などの信号をカラー画像出力装置120の特性値である網点面積率に変換する出力階調補正処理を行った後、階調再現処理部140で、最終的に画像を画素に分離してそれぞれの階調を再現できるように処理する階調再現処理(中間調生成)が施される。領域分離処理部135にて写真領域に分離された領域に関しては、階調再現性を重視したスクリーンでの2値化または多値化処理が行われる。
【0153】
操作パネル101は、例えば、設定ボタンや液晶ディスプレイ等の表示手段により構成され、上記した画像の拡大や縮小を行う時の設定や画像モードをマニュアルで設定する際に操作される。
【0154】
上述した各処理が施された画像データは、一旦メモリなどの記憶手段に記憶され、所定のタイミングで読み出されてカラー画像出力装置120に入力される。このカラー画像出力装置120は、画像データを紙などの画像記録媒体上に出力するもので、例えば、電子写真方式やインクジェット方式を用いたカラー画像出力装置120を挙げることができるが、特に限定されるものではない。なお、以上の各処理は図示しないCPU(Central Processing Unit)により制御される。
【0155】
また、本発明は、図11に示すようなスキャナシステム200に適用することもできる。スキャナシステム200は、スキャナ読取部210a及びスキャナドライバ210bからなるスキャナ210、スキャナ210が接続されているコンピュータ230、コンピュータ230に接続されているディスプレイ240などを備えて構成される。
【0156】
ここで、スキャナドライバbには、A/D変換部131、シェーディング補正部132、原稿種別自動判別部133、入力階調補正部134、領域分離処理部135、及び特定色判定部2が備わっている。これらは、上記デジタルカラー複写機100について説明したものと同等の機能を有するものである。
【0157】
また、コンピュータ230上で実行されるアプリケーションソフトウェア230aにおいて、色補正部3やγ補正処理部150が実現される。色補正部3では、RGB信号をディスプレイ用のRGB信号に変換し、γ補正処理部150でディスプレイのγ特性に応じた処理が施される。
【0158】
このスキャナシステム200では、スキャナ読取部210aで原稿画像を読み取り、スキャナドライバ210bで特定色の判定・カウント処理等を行い、読み込まれた画像データ及び特定色判定信号・調整信号が、コンピュータ230に出力される。コンピュータ230では、これらのデータに基づいて、アプリケーションソフトウェア230aが色補正処理やγ補正処理を行い、これらの処理後のデータに基づいてディスプレイ240に画像を表示する。
【0159】
また、図12に示すような他のスキャナシステム200aに適用することもできる。スキャナシステム200aは、スキャナドライバ210bからの画像データ及び特定色判定信号・調整信号を、コンピュータではなくプリンタ250に出力する。
【0160】
プリンタ250には、カラー画像処理部250a及びカラー画像出力部250bが備わっている。このカラー画像処理部250aには、色補正部3、黒生成下色除去部137、空間フィルタ処理部138、及び出力階調補正部139が備わっている。これらは、上記デジタルカラー複写機100について説明したものと同等の機能を有するものである。
【0161】
このスキャナシステム200aでは、スキャナ読取部210aで原稿画像を読み取り、スキャナドライバ210bで特定色の判定・カウント処理等を行い、読み込まれた画像データ及び特定色判定信号・調整信号が、プリンタ250に出力される。プリンタ250では、これらのデータに基づいて、カラー画像処理部250aにおいて色補正処理等を行い、これらの処理後のデータに基づいてカラー画像出力部250bにて画像を記録媒体(紙など)上に出力する。
【0162】
さらに、本発明は、図13に示すようなデジタルカメラシステム300に適用することもできる。デジタルカメラシステム300は、CCD310a、カラー画像処理部310b及び液晶表示部310cからなるデジタルカメラ310、デジタルカメラ310が接続されるコンピュータ330、コンピュータ330に接続されているディスプレイ340などを備えて構成される。
【0163】
カラー画像処理部310bには、A/D変換部311、入力補正部312、特定色判定部2、圧縮処理部313及び記憶部314が備わっている。そして、デジタルカメラ310では、CCD310aで撮影されたアナログのRGB信号からなる画像データが、A/D変換部311でデジタルのRGB信号に変換され、入力補正部312で入力補正が施され、図1で説明した特定色判定部2により特定色判定信号・調整信号を生成する。また、圧縮処理部313によりRGB信号をYCrCb信号(Y:輝度、Cr・Cb:色差)に変換した後、データを圧縮処理する。そして、圧縮されたYCrCb信号が記憶部314に記憶される。なお、撮影した画像を、液晶表示部310cに表示することもできる。
【0164】
記憶部314に記憶されたYCrCb信号は、デジタルカメラ310がコンピュータ330と接続されることにより、コンピュータ330に出力される。コンピュータ330上で実行されるアプリケーションソフトウェア330aでは、復号処理部331、色空間変換部332、色補正部3及びγ補正処理部150が実現される。圧縮されたYCrCb信号は、復号処理部331において、復号、逆量子化、逆直交変換され、画像データに変換される。そして、色空間変換部332においてRGB信号に変換される。そして、図1で説明した色補正部3による色補正処理や、図11で説明したγ補正処理部150による処理が施されてディスプレイ340に表示される。
【0165】
8.プログラム・記録媒体での実施例
本発明は、コンピュータを画像処理装置1の各部として機能させ、上述した画像処理方法をコンピュータに実行させるための画像処理プログラム、及びこの画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体として実現することもできる。これにより、画像処理プログラム自体、又は画像処理プログラムを記録した記録媒体を持ち運び自在に提供することができる。
【0166】
なお、この記録媒体としては、コンピュータが処理を行うために使用するメモリ、例えばROMのようなものであってもよく、コンピュータの外部記憶装置としてプログラム読み取り装置が設けられ、そこに挿入すべき記録媒体であってもよい。
【0167】
いずれの場合においても、画像処理プログラムは、コンピュータにて直接アクセスして実行させる方式であってもよく、コンピュータによって読み出され、読み出された画像処理プログラムがコンピュータのプログラム記憶エリアにダウンロードされて、そのダウンロードされた画像処理プログラムが実行される方式であってもよい。
【0168】
ここで、記録媒体としては、磁気テープやカセットテープ等のテープ系、フレキシブルディスクやハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD等の光ディスクのディスク系、IDカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM、EPROM(Erasable Programmable Read Only Memory)、EEPROM(Electrically Erasable Programmable Read Only Memory)、フラッシュROM等による半導体メモリを含めた固定的にプログラムを担持する媒体であってもよい。
【0169】
また、インターネットを含む通信ネットワークと接続可能なシステム構成において、通信ネットワークから画像処理プログラムをダウンロードすることにより画像処理プログラムが利用されてもよい。なお、このように通信ネットワークから画像処理プログラムをダウンロードする場合には、そのダウンロード用のプログラムは予めコンピュータに格納しておくか、あるいは別な記録媒体からインストールされるものであってもよい。
【0170】
上記記録媒体は、デジタルカラー画像形成装置やコンピュータシステムに備えられるプログラム読み取り装置により読み取られることで上述した画像処理方法が実行される。
【0171】
コンピュータシステムは、フラットベッドスキャナ・フィルムスキャナ・デジタルカメラなどの画像入力装置、所定のプログラムがロードされることにより上記画像処理方法など様々な処理が行われるコンピュータ、コンピュータの処理結果を表示するCRTディスプレイ・液晶ディスプレイなどの画像表示装置およびコンピュータの処理結果を紙などに出力するプリンタより構成される。さらには、ネットワークを介してサーバーなどに接続するための通信手段としてのモデムなどが備えられる。
【0172】
【発明の効果】
本発明の画像処理装置は、各画素が特定色であるか否かを判定する判定手段と、判定手段の判定結果に基づいて入力画像の特性値を予め定めた方法で設定する特性値設定手段と、特性値の最小値から予め定めた中間値までの範囲では、特性値が大きくなるにつれて補正度合いが大きくなり、中間値から最大値までの範囲では、特性値が大きくなるにつれて補正度合いが小さくなる補正特性に基づいて、入力画像の画素データに対して補正を施す補正手段とを備える構成である。
【0173】
上記の構成では、人物の肌色からなる特定色領域を例にとると、風景画像の中に非常に小さな人物が写っている入力画像では、補正度合いを抑えて不自然さが生じることを防止し、入力画像に占める人物の割合が大きくなり、特定色領域をはっきりと認識できるようになるにつれて、補正度合いを大きくして好ましい色再現を実現し、ポートレートや顔のアップ画像のように、さらに画像中に占める人物の割合が大きくなると、逆に補正度合いを小さくして忠実な色再現に近付けるようにできる。
【0174】
このように、その補正度合いに基づいた補正を実行することにより、補正後の入力画像を観察する観察者にとって、画像全体として特定色を違和感なく好適に再現できるように補正することができる。
【0175】
実際に補正を行うには、補正手段は、特定色を示す画素データを補正する場合に、画素データの色の忠実な色再現のための補正として予め定めた第1補正の効果と、画素データの色が特定色である場合にその特定色に好ましい色再現のための補正として予め定めた第2補正の効果とを、補正特性に基づいて調整すればよい。
【0176】
本発明の画像処理装置は、上記の画像処理装置において、補正手段は、特定色を示す画素データを補正する場合に、画素データに対して第1補正を施した結果である第1補正データと、画素データに対して第2補正を施した結果である第2補正データとを生成するとともに、生成した第1補正データと第2補正データとを、補正特性に基づいて重み付け加算することにより補正結果としての補正データを生成することが望ましい。
【0177】
上記の構成では、補正特性に基づいて、第1補正データと第2補正データとを重み付け加算することにより、簡単な演算で補正データを生成することができる。
【0178】
本発明の画像処理装置は、上記の画像処理装置において、特性値設定手段は、特性値を設定するために、入力画像に含まれる特定色領域ごとにその特定色領域に含まれる特定色の画素をカウントして、最大の特定色領域の画素数を求めることが望ましい。
【0179】
上記の構成では、特性値設定手段が、入力画像における最大の特定色領域の画素数を求める。この画素数により、入力画像における特定色領域が、その大きさに応じて観察者に対して与える影響の大きさを示す特性値を適切に設定することができる。
【0180】
本発明の画像処理装置は、上記の画像処理装置において、特定色は色空間における予め定められた特定範囲に含まれる色であり、特性値設定手段は、特定色の画素をカウントする場合に、各画素の色の特定範囲における位置に応じて重み付けした値をカウントすることが望ましい。
【0181】
上記の構成では、各画素の色の特定範囲における位置に応じて、特定色らしさに応じた重み付けをして特定色の画素をカウントすることができる。これにより、より適切な画素のカウントが可能になる。
【0182】
本発明の画像処理装置は、上記の画像処理装置において、特性値設定手段は、予め定めた関数に基づいて、特性値を、補正度合いを示す値に変換することが望ましい。
【0183】
上記の構成では、補正度合いを、特性値の変化に応じて連続的あるいは多段階に変化する値として設定することができる。これにより、様々な入力画像に対してより適切な補正を行うことができるようになる。
【0184】
本発明の画像形成装置は、上記何れかの画像処理装置と、その画像処理装置にて補正が施された画素データに基づいて画像記録媒体に対して画像を記録する画像記録装置とを備える構成である。
【0185】
上記の構成では、上記画像処理装置によって入力画像全体として特定色を違和感なく好適に再現できるように補正することができるので、これに基づいて高品質の画像を画像記録媒体に形成することができる。
【0186】
本発明の画像処理方法は、各画素が特定色であるか否かを判定する判定処理と、判定処理の判定結果に基づいて入力画像の特性値を予め定めた方法で設定する特性値設定処理と、特性値の最小値から予め定めた中間値までの範囲では、特性値が大きくなるにつれて補正度合いが大きくなり、中間値から最大値までの範囲では、特性値が大きくなるにつれて補正度合いが小さくなる補正特性に基づいて、入力画像の画素データに対して補正を施す補正処理とを含む方法である。
【0187】
上記の方法では、上記画像処理装置と同様に、入力画像全体として特定色を違和感なく好適に再現できるように補正することができるようになる。
【0188】
本発明の画像処理プログラムは、上記の画像処理方法を実行するための画像処理プログラムであって、コンピュータに各処理を実行させるための画像処理プログラムである。また、本発明のコンピュータ読み取り可能な記録媒体は、上記の画像処理プログラムを記録したものである。
【0189】
これらによっても、上記画像処理装置と同様に、カラー画像全体として特定色を違和感なく好適に再現できるように補正することができるようになる。
【図面の簡単な説明】
【図1】本発明の実施の一形態に係る画像処理装置の構成を示すブロック図である。
【図2】図1の画像処理装置における特定色判定部の処理の流れを示すフローチャートである。
【図3】図2のフローチャートにおける特定色画素のカウント処理において、特定色の画素数を重み付けによりカウントする場合の重み付けの概念を説明するための概念図である。
【図4】図2のフローチャートにおける閉領域処理の流れを示すフローチャートである。
【図5】図2のフローチャートにおける閉領域処理の流れを示すフローチャートである。
【図6】(a)〜(d)は、図2のフローチャートにおける閉領域処理において、閉領域ごとの画素数をカウントするためのラベル付けを説明する図面である。
【図7】図2のフローチャートにおける調整信号の算出処理に用いる関数の一例を示すグラフである。
【図8】図2のフローチャートにおける調整信号の算出処理に用いる関数の他の例を示すグラフである。
【図9】図1の画像処理装置における色補正部の処理の流れを示すフローチャートである。
【図10】本発明の画像処理装置を適用したデジタルカラー複写機の構成を示すブロック図である。
【図11】本発明の画像処理装置を適用したスキャナシステムの構成を示すブロック図である。
【図12】本発明の画像処理装置を適用した他のスキャナシステムの構成を示すブロック図である。
【図13】本発明の画像処理装置を適用したデジタルカメラシステムの構成を示すブロック図である。
【符号の説明】
1 画像処理装置
2 特定色判定部
3 色補正部(補正手段)
21 判定部(判定手段)
22 カウント部(特性値設定手段)
23 閉領域処理部(特性値設定手段)
24 メモリ(特性値設定手段)
25 決定部(特性値設定手段)
26 調整信号設定部(特性値設定手段)
27 関数格納部(特性値設定手段)
31 第1色補正処理部
32 第2色補正処理部
33 信号処理部
100 デジタルカラー複写機(画像形成装置)
110 カラー画像入力装置
120 カラー画像出力装置(画像記録装置)
130 カラー画像処理装置[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus, an image forming apparatus, an image processing method, an image processing program, and a computer readable recording of an image processing program, which correct pixel data indicating the color of each pixel in a color image to generate correction data. In particular, the present invention relates to an appropriate recording medium, and is intended to perform an appropriate correction for a specific color.
[0002]
[Prior art]
In recent years, digitalization of office automation equipment has rapidly progressed, and the demand for color image output has increased. As a result, output devices such as electrophotographic digital color copiers, ink jet systems, and thermal transfer color printers have become widely available. It has become widespread. For example, image data input from an input device such as a digital camera or a scanner, or image data created on a computer is output using these output devices. In such an input / output device, it is necessary to always output an image with stable color reproduction for input image data, and color conversion (color correction) processing of digital image processing technology plays an important role. Plays.
[0003]
As a method of color conversion processing, many proposals have conventionally been made including a color coordinate conversion method for converting input image data into uniform color space data. As such a method, there are a table reference (Look Up Table: hereinafter referred to as “LUT”) method and a masking method described in Non-Patent Documents 1 and 2. In the following, processing for correcting a color signal that will be an inappropriate signal as an output as it is, processing for converting a color signal to change the color itself, and coordinates of the color signal even if the color itself does not change All processing for converting the system is called color conversion.
[0004]
The direct conversion method, which is one of the LUT methods, calculates color conversion data for all combinations of input image data in advance, stores the result in a color conversion table, and stores a table value corresponding to the input image data. And outputting as output image data. This direct conversion method accesses the color conversion table, has a simple circuit configuration, can be processed at a relatively high speed, and can be applied to any nonlinear characteristic.
[0005]
Another LUT method, three-dimensional interpolation, calculates in advance a table value corresponding to a combination of selected part of input image data, stores the result in a color conversion table, and performs color conversion. For input image data in the vicinity of input image data whose table values are stored in the table, output image data is calculated by three-dimensional interpolation using the table values stored in the color conversion table. This three-dimensional interpolation method can obtain color conversion values for all combinations of input image data even when the number of input image data for which table values should be calculated in advance is limited. Can be made smaller than in the case of the direct conversion method.
[0006]
Here, as one of the color conversion processes, memory colors such as human skin color, sky blue, and green of plants during color conversion (that is, colors left in human memory by visual experience, below) There is a memory color process that reproduces a color more preferable for a person viewing an output image by performing a special process different from the other areas on a color area called “specific color”). Such processing is disclosed in, for example, Patent Documents 1 to 3.
[0007]
Among them, the technique disclosed in Patent Document 1 counts the number of pixels of a specific color at the time of pre-scanning, and if the count value is larger than a threshold value, it uses a color correction matrix different from the others for the specific color. The image quality of images containing colors is improved.
[0008]
In the technique disclosed in Patent Document 2, a desired number of sample pixels are extracted from a color original image, it is determined whether the color of the sample pixel is included in the specific color, and the proportion of the specific color in the color original image is detected. To do. When the ratio is equal to or higher than a predetermined threshold, color separation conditions are set according to a predetermined rule corresponding to the specific color. Thereby, automatic setting of color separation conditions is realized.
[0009]
In the technique disclosed in Patent Document 3, a specific area including a specific color is extracted from the input image, and the specific area is determined based on the ratio of the specific area in the input image and the position of the specific area in the input image. To determine whether or not to perform color correction.
[0010]
[Patent Document 1]
JP-A-6-169395 (publication date: June 14, 1994)
[0011]
[Patent Document 2]
Japanese Examined Patent Publication No. 5-54756 (Publication date: August 13, 1993)
[0012]
[Patent Document 3]
JP 2001-309193 A (publication date November 2, 2001)
[0013]
[Non-Patent Document 1]
“Color Science Handbook New Edition” edited by the Japan Color Society, University of Tokyo Press, p. 1137-1149
[0014]
[Non-Patent Document 1]
Akane Daida, “Ideal and Reality of Color Reproduction in Electrophotographic Recording” Journal of the Imaging Society of Japan, Vol. 37, No. 4 (1998), p. 555-559
[0015]
[Problems to be solved by the invention]
By the way, even in the case of the same kind of image, the image quality by the color conversion processing varies greatly depending on the size of the specific color region and the ratio of the specific color region. For example, when a very small person is captured in a landscape image, a favorable process (specific color reproduction process) for the skin color has little effect, and conversely, it is unnatural. Will occur. In this case, the process that achieves faithful color reproduction (faithful color reproduction process) is optimal.
[0016]
As the proportion of human skin in the image increases, the image quality of the human skin region rapidly decreases in the faithful color reproduction process. This is because the specific color reproduction process becomes necessary as the skin color region such as the face can be clearly recognized. However, when the skin color area itself is small, it is not possible to feel the optimal preference even with the normal specific color reproduction process. In this case, it is optimal to perform a specific color reproduction process for emphasis.
[0017]
As the proportion of human skin in the image increases, as in portraits and face-up images, the image quality is gradually felt better in the faithful color reproduction process. In this case, the specific color reproduction process that is weaker than the normal specific color reproduction process, that is, the process of increasing the ratio of the faithful color reproduction process is optimal.
[0018]
However, the techniques disclosed in Patent Documents 1 to 3 have a problem that it is impossible to meet the above-mentioned demands and it is impossible to perform optimal color correction according to the input image.
[0019]
The present invention has been made in view of the above problems, and an object of the present invention is to provide an image processing apparatus and the like that can correct a specific color as an entire image so that it can be suitably reproduced without a sense of incongruity.
[0020]
[Means for Solving the Problems]
  An image processing apparatus of the present invention is an image processing apparatus that corrects pixel data indicating a specific color among pixel data indicating the color of each pixel in an input image, and in order to solve the above problems, Based on the pixel data of the input image, determination means for determining whether or not each pixel has a specific color, and a specific color region composed of pixels of the specific color in the input image And a characteristic value setting means for setting a characteristic value indicating the magnitude of the influence exerted by a predetermined method based on a determination result of the determination means; a correction degree is changed according to the characteristic value; andIn the range from the minimum value of the characteristic value to the predetermined intermediate value, the degree of correction increases as the characteristic value increases, and in the range from the intermediate value to the maximum value, the correction degree increases as the characteristic value increases. Correction characteristics that reduceAnd correction means for performing correction according to the set characteristic value on the pixel data of the input image.
[0021]
The image processing apparatus preferably reproduces an input image by correcting pixel data of pixels of a specific color such as skin color, sky blue, or green of plants. As this correction, a known correction for realizing preferable color reproduction is used. In the above configuration, the degree of correction is adjusted according to the input image.
[0022]
Therefore, in the above configuration, the determination unit determines whether each pixel of the input image has a specific color, and the characteristic value setting unit sets the characteristic value of the input image based on the determination result.
[0023]
The characteristic value is a value indicating the magnitude of the influence that the specific color area formed of the pixels of the specific color in the input image has on the observer according to the size. Therefore, taking a specific color region consisting of a person's skin color as an example, the characteristic value becomes small in an input image in which a very small person is reflected in a landscape image, and the proportion of the person in the input image increases. The characteristic value becomes a large value, and the characteristic value becomes a larger value when the ratio of the person in the input image becomes larger as in the portrait and the face image of the person.
[0024]
Then, the correction unit performs a correction process on the pixel data of the input image based on a correction characteristic set in advance so that the correction degree is maximized with respect to a certain characteristic value. For example, in the range from the minimum value of the characteristic value to the predetermined intermediate value, the degree of correction increases as the characteristic value increases, and in the range from the intermediate value of the characteristic value to the maximum value, A characteristic that the degree of correction decreases as the value increases.
[0025]
Therefore, in the example of the specific color region composed of the skin color of the person described above, in the input image in which a very small person is reflected in the landscape image, the degree of correction is suppressed to prevent the occurrence of unnaturalness. As the percentage of the person occupies increases and the specific color area can be clearly recognized, the degree of correction is increased to achieve a preferable color reproduction, and further occupy the image like a portrait or a face-up image. When the proportion of people increases, the correction degree can be reduced to approach faithful color reproduction.
[0026]
By executing the correction based on the correction degree as described above, it is possible for the observer who observes the input image after correction so that the specific color can be appropriately reproduced as a whole image without a sense of incongruity.
[0027]
In order to actually perform correction, the correction means, when correcting pixel data indicating a specific color, and the effect of the first correction predetermined as correction for faithful color reproduction of the color of the pixel data, What is necessary is just to adjust the effect of the 2nd correction predetermined as correction for preferable color reproduction when the color of data is a specific color based on the said correction characteristic.
[0028]
In the image processing apparatus according to the present invention, in the above image processing apparatus, the correction unit is a result of performing the first correction on pixel data when correcting pixel data indicating a specific color. Data and second correction data obtained by applying the second correction to the pixel data, and weighting the generated first correction data and second correction data based on the correction characteristics It is desirable to generate correction data as a correction result by adding.
[0029]
In the above configuration, the correction data can be generated by a simple calculation by weighting and adding the first correction data and the second correction data based on the correction degree.
[0030]
In the image processing apparatus according to the aspect of the invention, in the image processing apparatus, the characteristic value setting unit may set a specific color included in the specific color area for each specific color area included in the input image in order to set the characteristic value. It is desirable to count the pixels to obtain the maximum number of pixels in the specific color area.
[0031]
In the above configuration, the characteristic value setting unit obtains the maximum number of pixels in the specific color area in the input image. Depending on the number of pixels, the characteristic value indicating the magnitude of the influence of the specific color area in the input image on the observer can be appropriately set according to the size.
[0032]
In the image processing apparatus of the present invention, in the above image processing apparatus, the specific color is a color included in a predetermined specific range in a color space, and the characteristic value setting unit counts pixels of the specific color. It is desirable to count a weighted value according to the position of the color of each pixel in the specific range.
[0033]
When the specific color is set as a predetermined specific range in the color space, the color near the center of the area is the color that seems to be the most specific color, and the color near the outer periphery of the area is a color close to the non-specific color. Therefore, even if the colors are included in the same specific range, the specific colors are different. Therefore, in the above configuration, it is possible to count the pixels of a specific color by weighting according to the specific color likeness according to the position in the specific range of the color of each pixel. Thereby, more appropriate pixel counting becomes possible.
[0034]
In the image processing apparatus according to the aspect of the invention, it is preferable that the characteristic value setting unit converts the characteristic value into a value indicating the degree of correction based on a predetermined function.
[0035]
In the above configuration, the correction degree can be set as a value that changes continuously or in multiple stages according to the change in the characteristic value. As a result, more appropriate correction can be performed on various input images.
[0036]
An image forming apparatus of the present invention includes any one of the image processing apparatuses described above and an image recording apparatus that records an image on an image recording medium based on pixel data corrected by the image processing apparatus. It is.
[0037]
In the above configuration, the image processing apparatus can correct the specific color as a whole so that the specific color can be suitably reproduced without any sense of incongruity, and based on this, a high-quality image can be formed on the image recording medium. .
[0038]
  An image processing method of the present invention is an image processing method for correcting pixel data indicating a specific color among pixel data indicating the color of each pixel in an input image, and in order to solve the above problem, Based on the pixel data of the input image, a determination process for determining whether or not each pixel has a specific color, and a specific color area composed of pixels of the specific color in the input image And a characteristic value setting process for setting a characteristic value indicating the magnitude of the influence exerted by a predetermined method based on a determination result of the determination process, a correction degree is changed according to the characteristic value, andIn the range from the minimum value of the characteristic value to the predetermined intermediate value, the degree of correction increases as the characteristic value increases, and in the range from the intermediate value to the maximum value, the correction degree increases as the characteristic value increases. Correction characteristics that reduceAnd a correction process for correcting the pixel data of the input image according to the set characteristic value.
[0039]
In the above method, as in the case of the image processing apparatus, it is possible to perform correction so that a specific color can be suitably reproduced as a whole input image without a sense of incongruity.
[0040]
An image processing program of the present invention is an image processing program for executing the above-described image processing method, and is an image processing program for causing a computer to execute each of the processes. A computer-readable recording medium of the present invention records the above-described image processing program.
[0041]
These also make it possible to perform correction so that a specific color can be suitably reproduced as a whole color image without a sense of incongruity as in the case of the image processing apparatus.
[0042]
DETAILED DESCRIPTION OF THE INVENTION
An embodiment of the present invention will be described with reference to FIGS. 1 to 10 as follows.
[0043]
1. Overall configuration of image processing apparatus
FIG. 1 shows a block configuration of the image processing apparatus 1 of the present embodiment. The image processing apparatus 1 includes a specific color determination unit 2 and a color correction unit 3. The color correction unit 3 functions as a correction unit of the present invention.
[0044]
When input image data is input to the image processing apparatus 1, the input image data is input to the specific color determination unit 2 and the color correction unit 3, respectively. Note that the input image data is pixel data that indicates a prime color in the input image. The specific color determination unit 2 generates a specific color determination signal and an adjustment signal. Further, the color correction unit 3 performs two types of corrections of the first color correction and the second color correction, and further, for each pixel based on the specific color determination signal and the adjustment signal generated by the specific color determination unit 2. The two types of corrections are adjusted to generate output image data that is correction data as a correction result.
[0045]
Hereinafter, the configuration and processing of the specific color determination unit 2 and the color correction unit 3 will be described in detail.
[0046]
2. Configuration of specific color judgment unit
As shown in FIG. 1, the specific color determination unit 2 includes a determination unit 21, a count unit 22, a closed region processing unit 23, a memory 24, a determination unit 25, an adjustment signal setting unit 26, and a function storage unit 27. . The determination unit 21 functions as the determination unit of the present invention. The count unit 22, the closed region processing unit 23, the memory 24, the determination unit 25, the adjustment signal setting unit 26, and the function storage unit 27 are the characteristic value setting unit of the present invention. Function as.
[0047]
The specific color determination unit 2 receives image data input from a color image input device, image data generated by a computer, or image data that has been subjected to predetermined image processing. . Here, as input image data, data composed of RGB signals (R: red, G: green, B: blue) is assumed. However, the present invention is not limited to this, and the input image data may be image data composed of other signals. Good.
[0048]
Input image data (R, G, B) is first input to the determination unit 21. The determination unit 21 determines for each pixel whether the color indicated by the input image data is within a predetermined range, so that each pixel is a specific color pixel or a non-specific color pixel. It is determined whether it is. And the determination part 21 outputs the specific color determination signal which shows the determination result whether it is a specific color for every pixel.
[0049]
Here, the specific color means a memory color such as human skin color, sky blue, green plant color, etc. (that is, a color left in human memory by visual experience). Means a color other than a specific color.
[0050]
The count unit 22 counts the number of pixels determined to be the specific color, the total number of pixels of the image, and the like based on the specific color determination signal from the determination unit 21. In addition, about the specific process in the determination part 21 and the count part 22, the following 4-1. Will be described in detail.
[0051]
The closed region processing unit 23 obtains a connected component of pixels of a specific color on the image, that is, a specific color closed region (specific color region). This is because even if the number of pixels of a specific color is almost the same, the image processing is different between an image in which a person's face is greatly projected like a portrait and an image in which a large number of people are projected. This is because it is necessary to change the amount, and information regarding the closed region of the specific color is required later. Hereinafter, the “closed region of a specific color” is simply referred to as “closed region”.
[0052]
The closed region processing unit 23 includes a binarization unit 23a, a labeling unit 23b, a label count unit 23c, and a maximum value selection unit 23d. The closed region processing unit 23 performs processing using the memory 24. Then, the closed region processing unit 23 outputs the maximum number of closed region pixels. In addition, about the specific process in the specific color determination part 2, the following 4-2. Will be described in detail.
[0053]
The determination unit 25 determines input parameters used for setting the adjustment signal in the adjustment signal setting unit 26. Here, the input parameter is a characteristic value indicating the magnitude of the influence of the specific color area in the input image data on the viewer of the image according to the size. At this time, the determination unit 25 sets the characteristic value by a predetermined method based on the determination result of the determination unit 21. In the present embodiment, the determination unit 21 determines whether to use the count result by the count unit 22 or the processing result by the closed region processing unit 23, and determines an input parameter using one of the results. To do.
[0054]
The adjustment signal setting unit 26 converts the input parameter determined by the determination unit 25 into an adjustment signal using a function set in advance and stored in the function storage unit 27. Here, the adjustment signal is a signal indicating the correction degree of the second color correction for preferable color reproduction. Therefore, the adjustment signal setting unit 26 adjusts the correction degree of the second color correction based on the input parameter.
[0055]
In addition, about the specific process in the determination part 25 and the adjustment signal setting part 26, the following 4-3. Will be described in detail.
[0056]
3. Color correction unit configuration
As shown in FIG. 1, the color correction unit 3 includes a first color correction processing unit 31, a second color correction processing unit 32, and a signal processing unit 33.
[0057]
The same input image data as that input to the specific color determination unit 2 is input to the color correction unit 3, and the input image data is input to the first color correction processing unit 31 and the second color correction processing unit 32, respectively. Entered.
[0058]
The first color correction processing unit 31 and the second color correction processing unit 32 perform predetermined different corrections on the input image data, and the first color correction data ( C1, M1, Y1) And second color correction data (C2, M2, Y2) Is output.
[0059]
Here, the first color correction processing unit 31 performs predetermined first color correction (first correction) on the input image data as correction for realizing color reproduction faithful to the original. For this purpose, the first color correction value is stored. Further, the second color correction processing unit 32 performs color reproduction that is preferable when the color indicated by the input image data is a specific color (human skin color, blue sky, green vegetation, etc.) for the input image data. The second color correction (second correction) determined in advance as a correction for realizing the above is performed, and a second color correction value for that purpose is stored. Here, the processing of the first color correction processing unit 31 is referred to as “faithful color reproduction processing”, and the processing of the second color correction processing unit 32 is referred to as “specific color reproduction processing” or “memory color reproduction processing”.
[0060]
The first color correction processing unit 31 and the second color correction processing unit 32 convert input image data into correction data by, for example, the LUT method. The processing in the first color correction processing unit 31 and the second color correction processing unit 32 uses the processing for realizing the above-described faithful color reproduction and the processing for realizing preferable color reproduction for a specific color.
[0061]
Here, the first color correction processing unit 31 and the second color correction processing unit 32, when performing the correction, input image data composed of RGB signals, which are signals of the first color system, in the second table. It is assumed that the color conversion processing unit converts the correction data to CMY signals (C: cyan, M: magenta, Y: yellow) which are color signals. However, the second color system signal does not need to be a CMY signal, and CIE 1976L, which is a standard color space signal.*a*b*Signal (CIE: Commission Internationale de l'Eclairage: International Lighting Commission. L*: Brightness, a*・ B*: Chromaticity) or sRGB signals. In such a case, the signal processed by the signal processing unit 33 is subjected to conversion processing for converting it into output image data such as a CMY signal.
[0062]
The signal processing unit 33 receives the first color correction data and the second color correction data output from the first color correction processing unit 31 and the second color correction processing unit 32. The signal processing unit 33 weights and adds the input first color correction data and second color correction data for the pixel of a specific color based on the adjustment signal, and outputs the result as output image data (Cout, Mout, Yout). Thereby, the signal processing unit 33 adjusts the effect of the first color correction and the effect of the second color correction based on the adjustment signal.
[0063]
For non-specific color pixels, the signal processing unit 33 outputs the first color correction data as output image data. Whether the pixel is a specific color pixel or a non-specific color pixel is determined based on a specific color determination signal. Specific processing in the signal processing unit 33 is described in the following 5. Will be described in detail.
[0064]
4). Processing in the specific color judgment unit
The flow of processing in the specific color determination unit 2 having the above-described configuration will be described based on the flowchart of FIG.
[0065]
In FIG. 2, assuming that processing is performed in an image reading apparatus such as a scanner that reads a document and generates image data, processing performed by the specific color determination unit 2 based on the result of document type determination processing in the image reading apparatus will be described. That is, the document type determination process is performed by pre-scanning, and in the case of the document type including the photo area, the adjustment signal a is obtained by further performing the counting process of the specific color pixel. In the main scan, color correction processing by the color correction unit 3 is performed using the adjustment signal a. Here, the halftone dot area and the photographic paper photograph area are not distinguished from each other and are collectively referred to as “photograph area” (hereinafter the same). Further, as described above, when the document type determination process is realized by the scanner, the color correction process is performed by a computer or printer connected to the scanner. That is, in a computer or printer, color correction processing is performed based on the image data output from the scanner and the specific color determination signal / adjustment signal a.
[0066]
In this process, first, a document type determination process is performed (S1), and it is determined whether or not the document type includes a photo area (S2). If a photo area is included, the process by the specific color determination unit 2 (S3) To S12).
[0067]
If it is determined that the photograph area is included, the processes of S3 to S6 are sequentially performed for each pixel of the input image data. That is, the determination unit 21 determines whether or not the pixel is a specific color pixel (S3), and if the pixel is a specific color pixel, the counting unit 22 counts it as a specific color pixel (S4). Further, the total number of pixels is counted by the counting unit 22 (S5). Then, it is determined whether or not the processing for all the pixels has been completed (S6). If the processing has not been completed, the processing from S3 is performed for the next pixel.
[0068]
Thereafter, the closed region processing unit 23 performs closed region processing (S7). In the closed region processing, the number of pixels in the closed region where the number of pixels is the maximum (the maximum value of the number of pixels in the closed region) among the closed regions made up of pixels of a specific color is obtained. In addition, about the specific content of a closed area | region process, the following 4-2. Will be described in detail.
[0069]
Then, based on the count result by the count unit 22 and the processing result by the closed region processing unit 23, the determination by the determination unit 25 is performed. The determination unit 25 determines an input parameter k used for setting the adjustment signal in the adjustment signal setting unit 26. The determination unit 25 first determines whether the count result from the count unit 22 or the processing result from the closed region processing unit 23 is used to determine the input parameter k. This determination is made based on whether or not the value obtained by subtracting the maximum number of pixels in the closed region (maximum number of closed region pixels) from the count value of the specific color pixel exceeds a predetermined threshold (S8). If it does not exceed, the count result of the specific color pixel is used (S9), and if it exceeds, the result of the closed region processing is used (S10). Then, the input parameter k is determined based on any result (S11). Note that the determination in S8 may be performed by comparing the count value of the specific color pixel and the maximum number of closed region pixels.
[0070]
Then, the adjustment signal setting unit 26 sets the adjustment signal a corresponding to the input parameter k determined by the determination unit 25 (S12).
[0071]
In this process, after S6, the counted number of specific color pixels may be compared with a threshold (for example, 5% of the total number of pixels), and if this threshold is exceeded, the processes after S7 may be performed. By doing in this way, since the process after S7 is performed only when the pixel of a specific color is included to some extent, an efficient process can be performed. Alternatively, the number of specific color pixels and the total pixel counting process and the closed area process may be performed in parallel.
[0072]
The present invention is not limited to the above processing. For example, image data after shading correction processing is stored in an image memory, and the original type is used by using this image data without performing pre-scanning. A discrimination process, a specific color pixel count process, and the like may be performed.
[0073]
As described above, the document type determination process may be performed according to the image mode selected on the setting screen of the computer, instead of automatically determining by reading the document as described above. The image mode includes a character mode, a print photo mode, a photographic paper photo mode, a character / photo mode, and the like. When reading the original with the scanner, when the latter three modes are selected, the steps after S3 are performed. It is sufficient to perform the process.
[0074]
Further, the specific color pixel count process may be performed based on the region separation process result. In this case, between S2 and S3, a process of determining whether the area is a halftone dot area or a photographic paper photograph area is added as S2 '. That is, a specific color pixel count process is performed on the halftone dot area or the photographic paper photograph area.
[0075]
Next, the specific color pixel counting process (S3, S4), the closed area process (S7), and the adjustment signal setting process (S11, S12) will be described in more detail.
[0076]
4-1. Count processing of specific color pixels
Here, specific examples (a) to (c) of the counting process (S3, S4) of the specific color pixel will be described assuming that the specific color is skin color.
[0077]
(A) Count of specific color pixels of input image data
In this process, pixels of a specific color are counted for all the pixels of the input image data generated by pre-scanning or the like. Determination of whether each pixel is a specific color can be performed as follows. The value of each pixel of the input image data is set to (Rin, Gin, Bin), A predetermined threshold value Rth1, Rth2, Gth1, Gth2, Bth1, Bth2Rth1<Rin<Rth2And Gth1<Gin<Gth2And Bth1<Bin<Bth2If it is, it is determined that the pixel is a specific color, and otherwise, it is determined that the pixel is a non-specific color. As an example of a specific numerical value of the threshold value, when determining the skin color as the specific color, (Rth1, Gth1, Bth1) = (210, 135, 120), (Rth2, Gth2, Bth2) = (225, 170, 155).
[0078]
(B) Counting specific color pixels in the photo area
In the above (a), the process of counting pixels of a specific color for all the pixels of the input image data has been described. However, when the area separation process is performed on the input image data, the photographic region is obtained as a result of the process. It is also possible to count pixels of a specific color within the area determined as. The determination as to whether or not each pixel in the photographic area has a specific color can be made in the same manner as in the case of (a) above.
[0079]
(C) Weighting count
The concept of the weighting count will be described with reference to FIG. The value of each pixel of the input image data is set to (Rin, Gin, Bin) And (R) illustrated in (a) above.th1, Gth1, Bth1) = (210, 135, 120) and (Rth2, Gth2, Bth2) = (225, 170, 155) points on the color space respectively corresponding to P1And P2And And line segment P1C = Line segment P2The distance between C is L, and the coordinate of midpoint C is (Rc, Gc, Bc). And a count value is calculated | required with the algorithm represented by Formula (1).
[0080]
[Expression 1]
Figure 0004112413
[0081]
This algorithm counts a weighted value according to the position in a spherical range (specific range) centered on the middle point C in the color space, and counts pixels having a smaller value from the middle point C. It means that the number will increase. Note that the present invention is not limited to the above, and it may be calculated by a calculation formula such as an elliptical sphere, or a conversion using an LUT may be performed instead of performing an operation. By performing weighting in this way, the adjustment signal can be obtained with higher accuracy. When weighting is performed as described above, the degree of freedom as a mathematical formula is increased, so that a more complicated phenomenon, for example, a correction amount can be a function that is inversely proportional to the distance from the center. In addition, it is possible to suppress the occurrence of a tone gap in the vicinity of the threshold (the density changes discontinuously) and maintain smooth gradation.
[0082]
This weighting count can also be used for counting specific color pixels of the input image data as in (a) above, and can also be used for counting specific color pixels in the photographic area as in (b) above.
[0083]
4-2. Closed area processing
As a specific example of the closed region processing (S7 in FIG. 2), an example in which labeling to connected components is used will be described based on the flowcharts in FIGS. Such processing is performed by, for example, “Image Processing Standard Text Book” supervised by the Image Processing Standard Text Book Editorial Committee, Image Information Education Promotion Association, p. 262-268, etc.
[0084]
In labeling connected components, the input image data is binarized, and the closed region is recognized based on the binarized image data. Here, it is assumed that raster scanning is performed from the upper left pixel of the image.
[0085]
First, the binarization unit 23a binarizes each pixel of the input image data under the condition whether the pixel is a specific color (S21). This binarization can use the determination result indicated by the specific color determination signal output from the determination unit 21. That is, a binary image is generated by assigning 1 to pixels of a specific color and 0 to other pixels. This binary image is stored in the memory 24.
[0086]
The binary image is labeled by the labeling unit 23b (S22 to S30). A labeling method will be described with reference to FIGS. 4 and 6A to 6D. First, one pixel is set as a target pixel, and it is determined whether or not the target pixel is 1 (S22). Here, when the target pixel is 0, the process proceeds to the next pixel (the pixel adjacent to the right of the target pixel, or the first pixel of the next line when the target pixel is the last pixel of a certain line). Repeat the process from.
[0087]
When S22 is true (Yes), it is determined whether or not the pixel adjacent to the target pixel is 1 and the pixel adjacent to the left of the target pixel is 0 (S23). When S23 is true, as shown in FIG. 6A, the same label (A in this case) as the adjacent pixel is attached to the target pixel (S24).
[0088]
When S23 is false (No), it is determined whether or not the pixel adjacent to the target pixel is 0 and the pixel adjacent to the left of the target pixel is 1 (S25). When S25 is true, as shown in FIG. 6B, the same label (A here) as the pixel on the left is attached to the target pixel (S26).
[0089]
When S25 is false, it is determined whether or not the pixel adjacent to the pixel of interest is 1 and the pixel adjacent to the left of the pixel of interest is 1 (S27). When S27 is true, as shown in FIG. 6C, labels (A, B in this case) are attached to the pixel of interest both on the upper and left sides (S28).
[0090]
If S27 is false, a new label (C in this case) is attached to the target pixel as shown in FIG. 6D (S29).
[0091]
Until the above process is completed for all the pixels, the above process is sequentially repeated for each pixel (S30). Note that the label attached as described above is stored in the memory 24. At this time, the label may be overwritten on the already stored binary image.
[0092]
When labeling is completed for all the pixels, processing related to the closed region is performed based on the labeled image. First, it is determined by the label count unit 23c whether there are a plurality of closed regions (S31). As this method, there is a method for determining whether the number (type) of labels in the labeled image is 0 or 1. The number of labels of 0 means that none of the pixels was labeled, and the number of labels of 1 means that only the label A was attached and the label B was not attached in the above example. Means that. Then, if the number of labels is 0 or 1, there is no closed region or one, so the subsequent processing (S32 to S40) for the closed region is not performed. When the number of labels is 2 or more, that is, when there are a plurality of closed regions, the processing after S32 is performed.
[0093]
When the number of labels is 2 or more, first, one closed area is selected (S32), and it is determined whether or not a plurality of types of labels are recorded in the closed area (S33). If a plurality of types of labels are recorded, the label of the closed area is unified with the label used first in the closed area (S34). Note that it is not always necessary to unify the label used first, and it is sufficient that the label can be distinguished in each closed region. This process (S32 to S34) is repeated for each closed region (S35).
[0094]
Then, the number of pixels for each label type is counted, and the maximum value V is set as the maximum value of the number of pixels in the closed region. Specifically, first, the maximum value V is initialized and set to 0 (S36), and the number of pixels with one kind of label is counted (S37). Then, the maximum value V is compared with the count value (S38). If the count value is larger, the maximum value V is replaced with the count value (S39). This process (S37 to S39) is repeated for all labels (S40). Thereby, the value finally set to the maximum value V becomes the maximum value of the number of pixels in the closed region.
[0095]
The memory 24 preferably stores a binary image or a labeled image relating to the entire image or the photographic area. Since the data to be stored is binary or label information, the memory capacity is not so large.
[0096]
It is possible to perform the labeling process by dividing it into blocks made up of a plurality of pixels. However, when a specific color area is divided into blocks in an image such as a portrait, the processed pixels are newly added. When it is necessary to label with a clear relationship between the coordinate position and the pixel to be processed, or when multiple labels are recorded in the same closed area, the processing when counting the labels in a unified manner becomes complicated .
[0097]
4-3. Adjustment signal setting process
A specific example of the adjustment signal setting process (S11 and S12 in FIG. 2) will be described. In order to obtain the adjustment signal a to be finally set, first, the input parameter k is obtained. When obtaining the input parameter k, as described above, there are a case where the count result of the specific color pixel is used (S9 in FIG. 2) and a case where the result of the closed region process is used (S10 in FIG. 2).
[0098]
First, the case where the count result of the specific color pixel is used (S9 in FIG. 2) will be described. Specific examples (1) to (3) are conceivable as a method for obtaining the input parameter k in this case.
[0099]
(1) A method of setting according to the number of pixels of a specific color
The upper bit signal of the count number is input parameter k1Can be used as The number of bits of the upper bit signal is about 4 to 8 bits.
[0100]
The appearance of the image depends on the distance at which the image is viewed. Basically, the optimum correction amount differs depending on the size (area) occupied by the specific color. In order to control the correction amount based on the area as described above, it is necessary to control based on the number of pixels instead of the ratio.
[0101]
When viewing an image, when the image size is small, the user tries to see the image closer, and conversely, when the image size is large, the user tries to see the entire image and looks away. In this case, it depends not on the area (number of pixels) occupied by the specific color but on the ratio occupied by the whole.
[0102]
On the other hand, not all people try to view images close to or apart from each other, and there may be cases where the images are viewed at a certain assumed distance. In this way, when the viewing distance of the image is considered to be substantially constant, it is optimal to perform control based on the number of pixels.
[0103]
Whether to use the number of pixels or the ratio may be determined according to specifications, for example. Further, the input parameter k may be obtained using both the number of pixels and the ratio.
[0104]
(2) A method of setting according to the ratio of the number of pixels of a specific color to the total number of pixels
The ratio of the number of pixels of a specific color to the total number of pixels of the input image data is obtained, and this is calculated as the input parameter k2It is good. That is, (input pixel k) is calculated by calculating (number of pixels of a specific color) / (total number of pixels of input image data).2And Input parameter k in this case2Is constant regardless of the resolution. K2 n(N is about 2) may be used as an input parameter.
[0105]
(3) A method of setting according to the proportion of the specific color in the photo area
When the area separation process is performed on the input image data, the ratio of the number of pixels of a specific color to the total number of pixels in the area determined as the photograph area as a result of the process is obtained, and this is obtained as an input parameter k.ThreeIt is good. That is, the input parameter k is calculated by calculating (number of pixels of a specific color in the photo area) / (total number of pixels in the photo area).ThreeAnd KThree n(N is about 2) may be used as an input parameter.
[0106]
Next, the case where the result of the closed region process is used (S10 in FIG. 2) will be described. Specific examples (4) and (5) can be considered as a method for obtaining the input parameter k in this case.
[0107]
(4) A method of setting according to the maximum value of the number of pixels in the closed region with respect to the total number of pixels
The ratio of the maximum value of the number of pixels in the closed region to the total number of pixels in the input image data is obtained, and this is calculated as the input parameter kFourIt is good. That is, (maximum number of pixels in the closed region) / (total number of pixels of input image data) is k.FourAnd
[0108]
(5) A method of setting according to the maximum value of the number of pixels in the closed region with respect to the total number of pixels in the photo region
When region separation processing is performed on the input image data, the ratio of the maximum number of pixels in the closed region to the total number of pixels in the region determined as the photo region as a result of the processing is obtained and input. Parameter kFiveIt is good. In other words, (maximum number of pixels in the closed area) / (total number of pixels in the photo area) is kFiveAnd
[0109]
As described above, when the count result of the specific color pixel is used, the input parameter k (input parameter k) is used as in the above example (1), (2) or (3).1, K2, KThree) And the result of the closed region processing is used, the input parameter k (input parameter k) as in the example (4) or (5) above.Four, KFive)
[0110]
The input parameter k thus obtained indicates the magnitude of the influence of the specific color region in the input image formed according to the input image data on the observer of the input image according to the size. Value. This value is a characteristic value representing the characteristic of the input image.
[0111]
Here, in S8 of FIG. 2, the input parameter k is obtained separately for the case where the count result of the specific color pixel is used and the case where the result of the closed region process is used. There is no need to separate the cases. For example, the input parameter may always be obtained using the result of the closed region processing without dividing the case.
[0112]
The adjustment signal a is set based on the input parameter k thus obtained. In order to set the adjustment signal a based on the input parameter k, for example, conversion using a function that defines the correspondence between the input parameter k and the adjustment signal a as shown in FIG. 7 or FIG. 8 may be performed. This function is predetermined and stored in the function storage unit 27. The input parameter k in FIGS. 7 and 8 is the above k.2~ KFiveIs assumed. The input parameter k in FIG. 7 and FIG.1In this case, the horizontal axis is the upper bits of the number of pixels.
[0113]
As this conversion method, the adjustment signal a corresponding to the input parameter k may be obtained using an LUT, or the adjustment signal a may be obtained by inputting the input parameter k into a predetermined function equation. (In particular, in the case of FIG. 7) The adjustment signal a may be obtained by threshold processing for the input parameter k (particularly in the case of FIG. 8).
[0114]
The adjustment signal a is the following 5. As described below, the ratio of the second color correction data when the output image data is calculated by weighted addition of the first color correction data and the second color correction data.
[0115]
The function shown in FIG. 7 or FIG. 8 will be described. Region A, that is, a range in which the value of the input parameter k is very small (for example, the input parameter kThreeIs 0 <kThreeThe case where ≦ 0.05 is satisfied, for example, when the proportion of the specific color in the image is very small, as in the case of an image in which a small person is captured in the landscape. For this reason, if the effect of correction (second color correction) for realizing color reproduction preferable for a specific color is strengthened for a pixel of a specific color in such an image, only that portion is emphasized, and the pixel is not It becomes a natural image. Therefore, in the region A, the value of the adjustment signal a is reduced (for example, a = 0.05) or 0, so that the influence of the second color correction is reduced or the influence of the second color correction is eliminated. To do.
[0116]
Region B, that is, a range in which the value of the input parameter k is somewhat large (for example, 0.05 <kThreeIn the case of ≦ 0.3), the ratio of the specific color in the image is increased to some extent. In this case, the unnaturalness caused by the inappropriate color reproduction of the specific color is felt rather than the unnaturalness caused by correcting the specific color. Therefore, it is necessary to increase the influence of the second color correction. However, since the ratio of the specific color in the image is not so large, there is a characteristic that it cannot be felt as a preferable image quality unless the influence of the second color correction is set to be strong. By increasing the value of (for example, a = 0.8 to 1.2), the influence of the second color correction is increased.
[0117]
The value of the adjustment signal a may be 1 or more. In this case, the output image data (Cout, Mout, Yout) Is the first color correction data (C1, M1, Y1) And second color correction data (C2, M2, Y2) Is not a point that internally divides, but a point that divides externally. In this case, it can be calculated by the same formula as the following formula (2).
[0118]
Region C, that is, a range in which the value of the input parameter k is quite large (for example, kThreeIn the case of> 0.3), the proportion of the specific color in the image is further increased as in the case of a close-up photograph of a person's face. In this case, if the influence of the second color correction is increased, a gap with the actual skin color will be felt. Therefore, in the area C, the influence of the second color correction is reduced by reducing the value of the adjustment signal a (for example, a = 0.1 to 0.8).
[0119]
As described above, the adjustment signal setting unit 26 adjusts the adjustment signal a so that the value of the adjustment signal a increases as the value of the input parameter k increases in the range from the minimum value of the input parameter k to the predetermined intermediate value. In the range from the intermediate value to the maximum value of the input parameter k, the adjustment signal a is set such that the value of the adjustment signal a decreases as the value of the input parameter k increases. By setting the adjustment signal a in this way and adjusting the correction degree of the second color correction for preferable color reproduction based on the adjustment signal a, the specific color can be suitably reproduced as a whole image without a sense of incongruity. it can.
[0120]
Note that the above-described processing can also be performed on data obtained by enlarging or reducing input image data. In this case, in the case of the above (1) using the total number of pixels, the enlargement / reduction magnification may be considered.
[0121]
5. Processing in the color correction unit
The flow of processing in the color correction unit 3 will be described based on the flowchart of FIG.
[0122]
In this process, first, in accordance with the adjustment signal a sent from the adjustment signal setting unit 26, the signal processing unit 33 sets a ratio for weighted addition of the first color correction data and the second color correction data. (S51). Since the value indicated by the adjustment signal a can be used as it is as the ratio, the ratio set here is a.
[0123]
When the ratio is set, based on the specific color determination signal sent from the determination unit 21, when the target pixel is a specific color, the value indicated by the adjustment signal a is set as described above. If the target pixel is a non-specific color, the ratio is set to 0.
[0124]
Then, the first color correction processing unit 31 and the second color correction processing unit 32 perform the faithful color reproduction process and the specific color reproduction process, respectively, and the first color correction data (C1, M1, Y1) And second color correction data (C2, M2, Y2) Is output to the signal processing unit 33.
[0125]
Then, the signal processing unit 33 uses Equation 2 to express a point (C1, M1, Y1) And (C2, M2, Y2) And internal or external points based on the ratio a (Cout, Mout, Yout) Is calculated and this (Cout, Mout, Yout) As output image data (S54).
[0126]
[Expression 2]
Figure 0004112413
[0127]
As described above, the first color correction data and the second color correction data are weighted and added based on the ratio a for the pixel of the specific color, and the result is output as output image data. Thereby, output image data can be generated by a simple calculation.
[0128]
6). Region separation processing and document type determination processing
The input image data input to the image processing apparatus 1 may be subjected to region separation processing and document type determination processing. Hereinafter, these processes will be described.
[0129]
6-1. Region separation processing
As a method for separating input image data into each region of characters, halftone dots (printed photographs), and photographs (photographic paper photographs), for example, Toshitaka Takahashi et al. “Adaptive binarization of mixed characters / halftone dots / photographs” Method ”The method introduced in the IEICE Technical Committee Proceedings 90-06-04 can be used. This method will be described in detail below.
[0130]
The following determination is performed within a block of M × N (M and N are natural numbers) pixels centered on the target pixel, and the determination result is used as a region identification signal of the target pixel.
[0131]
(1) The average signal level (D) for the central nine pixels in the blockave) And binarize each pixel in the block using the average value. The maximum pixel signal level (Dmax), Minimum pixel signal level (Dmin) At the same time.
[0132]
(2) In the halftone dot area, the halftone dot area is identified by utilizing the fact that the fluctuation of the image signal in the small area is large and the density is higher than the background. That is, the number of changing points from 0 to 1 in the main scanning direction and the sub-scanning direction is obtained for the binarized data, and the number of changing points from 1 to 0 is obtained.H, KVAnd threshold TH, TVWhen both of them exceed the threshold value as compared with the above, it is determined as a halftone dot region. In order to prevent misjudgment with the background, Dmax, Dmin, DaveTo threshold B1, B2Compare with And Dmax-Dave> B1And Dave-Dmin> B2And KH> THAnd KV> TVWhen the condition is satisfied, it is determined as a halftone dot region, and when it is not satisfied, it is determined as a non-halftone dot region.
[0133]
(3) In the character area, since the difference between the maximum signal level and the minimum signal level is large and the density is considered high, the character area is identified as follows. In the non-halftone area, the maximum pixel signal level and the minimum pixel signal level obtained in advance and the difference (Dsub) For each threshold PA, PB, PCCompare with And Dmax> PAOr Dmin<PBOr Dsub> PCIf it is satisfied, it is determined as a character area, and if it is not satisfied, it is determined as another area.
[0134]
(4) The signal levels of the pixel data R, G, and B are set to D with respect to the other areas.R, DG, DBAnd threshold THBACKCompare with And DR> THBACKAnd DG> THBACKAnd DB> THBACKIf it satisfies the condition, it is determined as a background area, and if it is not satisfied, it is determined as a photographic paper photograph area.
[0135]
6-2. Document type determination processing
The region separation processing method described above can also be applied to a method for determining the type of document. When determining the type of document, low-resolution data that has been pre-scanned is often used. For example, information in the sub-scanning direction in which resolution deteriorates is invalidated (if pre-scanning is performed, the main scan is performed). Since the data in the sub-scanning direction is deteriorated because the scanning speed is faster than in the case of (1), pixels are discriminated using the discrimination result in the main scanning direction, and the number of discriminated pixels is counted and prepared in advance. The type of the entire document can be determined by comparing with the threshold values for the photographic area, halftone dot area, and character area (see, for example, JP-A-2002-232232).
[0136]
For example, if the count of the number of pixels determined to be a character is greater than or equal to a predetermined ratio (threshold) with respect to the total number of pixels read from the input image (document), the document is a character document. In addition, the threshold values for the photo area, halftone dot area, and character area vary depending on the threshold value used in the area separation process, so it is preferable to set the threshold value corresponding to the threshold value used in the area separation process. . For example, when the threshold used in the region separation process is set to a severe value, the threshold for the count number is set to a low value. If both the character area and the halftone dot area satisfy the respective threshold values, it is determined that the input image (original) is a character / halftone dot image (printed photograph). The number of pixels in the halftone dot region or the number of pixels in the photographic paper photograph region used at this time may be used when setting the adjustment signal a. When the absolute value of the number of pixels is used, the adjustment signal a may be set in consideration of the decrease in resolution.
[0137]
In each process after the document type determination, if it is determined that the areas are not mixed, the process is performed based on the determination result. For example, when it is determined that the document is a text document, text processing (for example, processing for emphasizing an edge in spatial filtering) is performed on the entire image. When it is determined that a plurality of areas are mixed, the intermediate parameters of the respective area processes are used. For example, when the image is determined to be a character / halftone image, an intermediate process between the character area and the halftone dot area (for example, in spatial filtering, a reduction in character sharpness is suppressed and moire generated in the halftone area is reduced. Adaptive mixing filter).
[0138]
7. Application example of image processing device
An example of an apparatus to which the above-described image processing apparatus 1 is applied will be described. FIG. 10 shows a block configuration when the image processing apparatus 1 is applied to a digital color copying machine 100 as an image forming apparatus. The digital color copying machine 100 includes a color image input device 110, a color image output device 120, a color image processing device 130, and an operation panel 101 for inputting operations to these. The color image output device 120 functions as the image recording device of the present invention.
[0139]
The color image processing apparatus 130 includes an A / D (analog / digital) conversion unit 131, a shading correction unit 132, a document type automatic discrimination unit 133, an input tone correction unit 134, an area separation processing unit 135, an enlargement / reduction processing unit 136, A specific color determination unit 2, a color correction unit 3, a black generation and under color removal unit 137, a spatial filter processing unit 138, an output tone correction unit 139, and a tone reproduction processing unit 140 are configured. The specific color determination unit 2 and the color correction unit 3 in the color image processing device 130 are the image processing device 1.
[0140]
The color image input device 110 includes, for example, a scanner unit including a CCD (Charge Coupled Device). The color image input device 110 reads a reflected light image from a document as an RGB analog signal by a CCD and inputs the read image to the color image processing device 130.
[0141]
The analog signal read by the color image input device 110 is sent in the above order from the A / D conversion unit 131 to the gradation reproduction processing unit 140 in the color image processing device 130, and as a CMYK digital color signal, The image is output to the color image output device 120.
[0142]
The A / D converter 131 converts RGB analog signals into digital signals. The shading correction unit 132 performs processing for removing various distortions generated in the illumination system, imaging system, imaging system, and the like of the color image input device 110 from the digital RGB signal sent from the A / D conversion unit 131. It is something to apply. Further, the shading correction unit 132 performs a process for adjusting the color balance.
[0143]
In the document type automatic discrimination unit 133, the RGB signal (RGB reflectance signal) from which various distortions have been removed by the shading correction unit 132 and the color balance has been adjusted is adopted in the color image processing device 130 such as a density signal. The input image is converted to a signal that can be handled easily by the image processing system, and whether the input document is a character document, a printed photograph document, a photographic paper photograph, or a mixed character / printed photograph document. Judgment is made.
[0144]
The input tone correction unit 134 performs image quality adjustment processing such as background density removal and contrast.
[0145]
The region separation processing unit 135 separates each pixel in the input image into one of a character region, a halftone dot region, and a photographic region based on the RGB signal. Based on the separation result, the region separation processing unit 135 generates a region identification signal indicating which region each pixel belongs to, the color correction unit 3, the black generation and under color removal unit 137, the spatial filter processing unit 138, and the gradation. In addition to outputting to the reproduction processing unit 140, the input signal output from the input tone correction unit 134 is output to the subsequent enlargement / reduction processing unit 136 as it is. The enlargement / reduction processing unit 136 performs image enlargement / reduction processing based on a signal input from the operation panel 101 provided in the digital color copying machine 100.
[0146]
The specific color determination unit 2 and the color correction unit 3 perform the above-described processing. That is, the specific color determination unit 2 determines whether or not the input image data is within a predetermined color range, determines whether each pixel is a specific color or a non-specific color, and if it is a specific color, A specific color determination signal indicating that is output, and the number of pixels determined to be the specific color is counted. In addition, for the closed area of a specific color, the number of pixels in the closed area is counted. The color correction unit 3 performs a process of removing color turbidity based on the spectral characteristics of the CMY color material including unnecessary absorption components in order to realize faithful color reproduction.
[0147]
The black generation and under color removal unit 137 generates a black (K) signal from the CMY three-color signal after color correction, and subtracts the K signal obtained by the black generation process from the original CMY signal to obtain a new one. A process for generating a CMY signal is performed. As a result, the CMY three-color signal is converted into a CMYK four-color signal.
[0148]
As an example of the black generation process, there is a general method for generating black with skeleton black. In this method, the input / output characteristic of the skeleton curve is y = f (x), the input data is C, M, Y, the output data is C ′, M ′, Y ′, K ′, UCR (Under Color When the removal rate is α (0 <α <1), the black generation and under color removal processing is expressed by the following equation (3).
[0149]
[Equation 3]
Figure 0004112413
[0150]
The spatial filter processing unit 138 performs spatial filter processing using a digital filter on the image data of the CMYK signal input from the black generation and under color removal unit 137 based on the region identification signal, thereby correcting the spatial frequency characteristics. Processing is performed to prevent blurring of the output image and deterioration of graininess. The gradation reproduction processing unit 140 also performs predetermined processing on the image data of the CMYK signal based on the region identification signal, similarly to the spatial filter processing unit 138.
[0151]
For example, a region separated into character regions by the region separation processing unit 135 is a high-frequency enhancement amount by sharp enhancement processing in the spatial filter processing by the spatial filter processing unit 138, in particular, in order to improve the reproducibility of black characters or color characters. Is increased. At the same time, the gradation reproduction processing unit 140 selects binarization or multi-value processing on a high-resolution screen suitable for high-frequency reproduction.
[0152]
Further, with respect to the region separated into halftone dot regions by the region separation processing unit 135, the spatial filter processing unit 138 performs low-pass filter processing for removing the input halftone dot component. The output tone correction unit 139 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 color image output device 120, and then the tone reproduction processing unit 140. Then, gradation reproduction processing (halftone generation) is performed so that the image is finally separated into pixels and each gradation is reproduced. For the region separated into the photographic regions by the region separation processing unit 135, the binarization or multi-value processing on the screen is performed with emphasis on gradation reproducibility.
[0153]
The operation panel 101 is configured by display means such as a setting button and a liquid crystal display, for example, and is operated when manually setting the above-described setting and image mode when enlarging or reducing the image.
[0154]
The image data subjected to the above-described processes is temporarily stored in a storage unit such as a memory, read out at a predetermined timing, and input to the color image output device 120. The color image output device 120 outputs image data onto an image recording medium such as paper. Examples of the color image output device 120 include a color image output device 120 using an electrophotographic method or an inkjet method, but are not particularly limited. It is not something. The above processes are controlled by a CPU (Central Processing Unit) (not shown).
[0155]
The present invention can also be applied to a scanner system 200 as shown in FIG. The scanner system 200 includes a scanner 210 including a scanner reading unit 210a and a scanner driver 210b, a computer 230 to which the scanner 210 is connected, a display 240 connected to the computer 230, and the like.
[0156]
Here, the scanner driver b includes an A / D conversion unit 131, a shading correction unit 132, a document type automatic determination unit 133, an input tone correction unit 134, a region separation processing unit 135, and a specific color determination unit 2. Yes. These have functions equivalent to those described for the digital color copying machine 100.
[0157]
In addition, in the application software 230a executed on the computer 230, the color correction unit 3 and the γ correction processing unit 150 are realized. The color correction unit 3 converts the RGB signal into an RGB signal for display, and the γ correction processing unit 150 performs processing according to the γ characteristic of the display.
[0158]
In this scanner system 200, a document image is read by a scanner reading unit 210 a, a specific color is determined / counted by a scanner driver 210 b, and the read image data and a specific color determination signal / adjustment signal are output to a computer 230. Is done. In the computer 230, the application software 230a performs color correction processing and γ correction processing based on these data, and displays an image on the display 240 based on the data after these processing.
[0159]
Further, the present invention can be applied to another scanner system 200a as shown in FIG. The scanner system 200a outputs the image data and the specific color determination signal / adjustment signal from the scanner driver 210b to the printer 250 instead of the computer.
[0160]
The printer 250 includes a color image processing unit 250a and a color image output unit 250b. The color image processing unit 250a includes a color correction unit 3, a black generation and under color removal unit 137, a spatial filter processing unit 138, and an output tone correction unit 139. These have functions equivalent to those described for the digital color copying machine 100.
[0161]
In the scanner system 200a, a scanner reading unit 210a reads a document image, a scanner driver 210b performs a specific color determination / counting process, and the like, and the read image data and a specific color determination signal / adjustment signal are output to the printer 250. Is done. In the printer 250, the color image processing unit 250a performs color correction processing or the like based on these data, and the color image output unit 250b generates an image on a recording medium (paper or the like) based on these processed data. Output.
[0162]
Furthermore, the present invention can also be applied to a digital camera system 300 as shown in FIG. The digital camera system 300 includes a digital camera 310 including a CCD 310a, a color image processing unit 310b, and a liquid crystal display unit 310c, a computer 330 to which the digital camera 310 is connected, a display 340 connected to the computer 330, and the like. .
[0163]
The color image processing unit 310b includes an A / D conversion unit 311, an input correction unit 312, a specific color determination unit 2, a compression processing unit 313, and a storage unit 314. In the digital camera 310, image data composed of analog RGB signals photographed by the CCD 310a is converted into digital RGB signals by the A / D conversion unit 311 and input correction is performed by the input correction unit 312. FIG. A specific color determination signal / adjustment signal is generated by the specific color determination unit 2 described above. The compression processing unit 313 converts the RGB signal into a YCrCb signal (Y: luminance, Cr · Cb: color difference), and then compresses the data. Then, the compressed YCrCb signal is stored in the storage unit 314. The captured image can also be displayed on the liquid crystal display unit 310c.
[0164]
The YCrCb signal stored in the storage unit 314 is output to the computer 330 when the digital camera 310 is connected to the computer 330. In the application software 330a executed on the computer 330, a decoding processing unit 331, a color space conversion unit 332, a color correction unit 3, and a γ correction processing unit 150 are realized. The compressed YCrCb signal is decoded, inversely quantized, and inversely orthogonal transformed by the decoding processing unit 331, and converted to image data. Then, the color space conversion unit 332 converts the signals into RGB signals. Then, the color correction processing by the color correction unit 3 described in FIG. 1 and the processing by the γ correction processing unit 150 described in FIG. 11 are performed and displayed on the display 340.
[0165]
8). Examples of programs and recording media
The present invention is realized as an image processing program for causing a computer to function as each unit of the image processing apparatus 1 and causing the computer to execute the above-described image processing method, and a computer-readable recording medium on which the image processing program is recorded. You can also. Accordingly, the image processing program itself or a recording medium on which the image processing program is recorded can be provided in a portable manner.
[0166]
This recording medium may be a memory used by the computer for processing, such as a ROM, and a program reading device is provided as an external storage device of the computer, and a recording to be inserted therein. It may be a medium.
[0167]
In any case, the image processing program may be a method that is directly accessed and executed by a computer. The image processing program is read by the computer, and the read image processing program is downloaded to a program storage area of the computer. The downloaded image processing program may be executed.
[0168]
Here, the recording medium includes a tape system such as a magnetic tape and a cassette tape, a magnetic disk such as a flexible disk and a hard disk, an optical disk such as a CD-ROM / MO / MD / DVD, and an ID card (including a memory card). ) / A medium that carries a fixed program including a semiconductor memory such as a card system such as an optical card or mask ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash ROM, etc. There may be.
[0169]
Further, in a system configuration that can be connected to a communication network including the Internet, the image processing program may be used by downloading the image processing program from the communication network. When the image processing program is downloaded from the communication network in this way, the download program may be stored in advance in a computer or installed from another recording medium.
[0170]
The recording medium is read by a program reading device provided in a digital color image forming apparatus or a computer system, whereby the above-described image processing method is executed.
[0171]
The computer system includes an image input device such as a flatbed scanner, a film scanner, and a digital camera, a computer that performs various processes such as the above image processing method by loading a predetermined program, and a CRT display that displays the processing results of the computer. An image display device such as a liquid crystal display and a printer that outputs the processing results of the computer to paper or the like. Furthermore, a modem as a communication means for connecting to a server or the like via a network is provided.
[0172]
【The invention's effect】
  An image processing apparatus according to the present invention includes a determination unit that determines whether each pixel has a specific color, and a characteristic value setting unit that sets a characteristic value of an input image based on a determination result of the determination unit using a predetermined method. When,In the range from the minimum value of the characteristic value to the predetermined intermediate value, the correction degree increases as the characteristic value increases, and in the range from the intermediate value to the maximum value, the correction degree decreases as the characteristic value increases. CharacteristicAnd a correction means for correcting the pixel data of the input image.
[0173]
In the above configuration, taking a specific color region consisting of the skin color of a person as an example, an input image in which a very small person is reflected in a landscape image is suppressed by suppressing the degree of correction to prevent unnaturalness. As the percentage of people in the input image increases and the specific color area can be clearly recognized, the degree of correction is increased to achieve a preferable color reproduction. When the proportion of the person in the image increases, the degree of correction can be reduced to bring it closer to faithful color reproduction.
[0174]
As described above, by executing the correction based on the correction degree, it is possible for the observer who observes the input image after correction so that the specific color can be suitably reproduced as a whole image without a sense of incongruity.
[0175]
In order to actually perform correction, the correction means corrects pixel data indicating a specific color, the first correction effect predetermined as correction for faithful color reproduction of the color of the pixel data, and the pixel data. When the color is a specific color, the effect of the second correction that is predetermined as correction for color reproduction that is preferable for the specific color may be adjusted based on the correction characteristics.
[0176]
In the image processing apparatus of the present invention, in the above image processing apparatus, when the correction unit corrects pixel data indicating a specific color, the correction data is obtained by performing first correction on the pixel data. The second correction data that is the result of applying the second correction to the pixel data is generated, and the generated first correction data and the second correction data are weighted and added based on the correction characteristics. It is desirable to generate the resulting correction data.
[0177]
In the above configuration, the correction data can be generated by a simple calculation by weighting and adding the first correction data and the second correction data based on the correction characteristics.
[0178]
In the image processing apparatus of the present invention, in the image processing apparatus described above, the characteristic value setting means includes a pixel of a specific color included in the specific color area for each specific color area included in the input image in order to set the characteristic value. It is desirable to calculate the maximum number of pixels in the specific color area.
[0179]
In the above configuration, the characteristic value setting unit obtains the maximum number of pixels in the specific color area in the input image. With this number of pixels, it is possible to appropriately set a characteristic value indicating the magnitude of the influence that the specific color area in the input image has on the observer according to the size.
[0180]
In the image processing apparatus of the present invention, in the above image processing apparatus, the specific color is a color included in a predetermined specific range in the color space, and the characteristic value setting unit counts the pixels of the specific color. It is desirable to count a weighted value according to the position in the specific range of the color of each pixel.
[0181]
In the above configuration, it is possible to count pixels of a specific color by weighting according to the specific color likelihood according to the position of each pixel in the specific range of colors. Thereby, more appropriate pixel counting becomes possible.
[0182]
In the image processing apparatus of the present invention, in the above-described image processing apparatus, it is preferable that the characteristic value setting unit converts the characteristic value into a value indicating a correction degree based on a predetermined function.
[0183]
In the above configuration, the correction degree can be set as a value that changes continuously or in multiple stages according to the change in the characteristic value. As a result, more appropriate correction can be performed on various input images.
[0184]
An image forming apparatus of the present invention includes any one of the image processing apparatuses described above and an image recording apparatus that records an image on an image recording medium based on pixel data corrected by the image processing apparatus. It is.
[0185]
In the above configuration, the image processing apparatus can correct the specific color as a whole so that the specific color can be suitably reproduced without any sense of incongruity, and based on this, a high-quality image can be formed on the image recording medium. .
[0186]
  The image processing method of the present invention includes a determination process for determining whether or not each pixel has a specific color, and a characteristic value setting process for setting a characteristic value of an input image based on a determination result of the determination process by a predetermined method When,In the range from the minimum value of the characteristic value to the predetermined intermediate value, the correction degree increases as the characteristic value increases, and in the range from the intermediate value to the maximum value, the correction degree decreases as the characteristic value increases. CharacteristicAnd a correction process for correcting the pixel data of the input image based on the above.
[0187]
In the above method, as in the case of the image processing apparatus, it is possible to perform correction so that a specific color can be suitably reproduced as a whole input image without a sense of incongruity.
[0188]
The image processing program of the present invention is an image processing program for executing the above-described image processing method, and is an image processing program for causing a computer to execute each process. A computer-readable recording medium of the present invention records the above-described image processing program.
[0189]
These also make it possible to perform correction so that a specific color can be suitably reproduced as a whole color image without a sense of incongruity as in the case of the image processing apparatus.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to an embodiment of the present invention.
2 is a flowchart showing a flow of processing of a specific color determination unit in the image processing apparatus of FIG. 1;
FIG. 3 is a conceptual diagram for explaining the concept of weighting when the number of pixels of a specific color is counted by weighting in the specific color pixel counting process in the flowchart of FIG. 2;
4 is a flowchart showing a flow of closed region processing in the flowchart of FIG. 2. FIG.
FIG. 5 is a flowchart showing a flow of closed region processing in the flowchart of FIG. 2;
6A to 6D are diagrams for explaining labeling for counting the number of pixels for each closed region in the closed region processing in the flowchart of FIG. 2;
7 is a graph showing an example of a function used for adjustment signal calculation processing in the flowchart of FIG. 2; FIG.
FIG. 8 is a graph showing another example of a function used for adjustment signal calculation processing in the flowchart of FIG. 2;
FIG. 9 is a flowchart showing a processing flow of a color correction unit in the image processing apparatus of FIG. 1;
FIG. 10 is a block diagram showing a configuration of a digital color copying machine to which the image processing apparatus of the present invention is applied.
FIG. 11 is a block diagram showing a configuration of a scanner system to which the image processing apparatus of the present invention is applied.
FIG. 12 is a block diagram showing the configuration of another scanner system to which the image processing apparatus of the present invention is applied.
FIG. 13 is a block diagram showing a configuration of a digital camera system to which the image processing apparatus of the present invention is applied.
[Explanation of symbols]
1 Image processing device
2 Specific color judgment part
3 color correction part (correction means)
21 determination part (determination means)
22 Count section (characteristic value setting means)
23 Closed area processing unit (characteristic value setting means)
24 memory (characteristic value setting means)
25 Determination unit (characteristic value setting means)
26 Adjustment signal setting section (characteristic value setting means)
27 Function storage (characteristic value setting means)
31 First color correction processing unit
32 Second color correction processing unit
33 Signal processor
100 Digital color copier (image forming device)
110 Color image input device
120 color image output device (image recording device)
130 color image processing apparatus

Claims (10)

入力画像における各画素の色を示す画素データのうち、特定色を示す画素データに対して補正を施す画像処理装置において、
入力画像の画素データに基づいて、各画素が特定色であるか否かを判定する判定手段と、
入力画像における特定色の画素からなる特定色領域が、その大きさに応じて観察者に対して与える影響の大きさを示す特性値を、前記判定手段の判定結果に基づいて予め定めた方法で設定する特性値設定手段と、
前記特性値に応じて補正度合いが変化し、かつ、前記特性値の最小値から予め定めた中間値までの範囲では、前記特性値が大きくなるにつれて補正度合いが大きくなり、前記中間値から最大値までの範囲では、前記特性値が大きくなるにつれて補正度合いが小さくなる補正特性に基づき、前記設定した特性値に応じた補正を入力画像の画素データに対して施す補正手段とを備えることを特徴とする画像処理装置。
Among image data indicating the color of each pixel in the input image, in an image processing apparatus that corrects pixel data indicating a specific color,
Determination means for determining whether each pixel is a specific color based on pixel data of an input image;
A characteristic value indicating the magnitude of the influence of the specific color region made up of the pixels of the specific color in the input image on the observer according to the size is determined in a predetermined method based on the determination result of the determination unit. Characteristic value setting means to be set;
In the range from the minimum value of the characteristic value to a predetermined intermediate value, the correction degree increases as the characteristic value increases, and the correction value increases from the intermediate value to the maximum value. In the range described above, the image processing apparatus includes correction means for performing correction according to the set characteristic value on the pixel data of the input image based on the correction characteristic that decreases as the characteristic value increases. An image processing apparatus.
前記補正手段は、特定色を示す画素データを補正する場合に、画素データの色の忠実な色再現のための補正として予め定めた第1補正の効果と、画素データの色が特定色である場合にその特定色に好ましい色再現のための補正として予め定めた第2補正の効果とを、前記補正特性に基づいて調整することを特徴とする請求項1に記載の画像処理装置。  The correction means corrects the pixel data indicating the specific color, and the effect of the first correction that is predetermined as correction for faithful color reproduction of the color of the pixel data and the color of the pixel data are the specific color. 2. The image processing apparatus according to claim 1, wherein a second correction effect predetermined as correction for color reproduction preferable for the specific color is adjusted based on the correction characteristic. 前記補正手段は、特定色を示す画素データを補正する場合に、画素データに対して前記第1補正を施した結果である第1補正データと、画素データに対して前記第2補正を施した結果である第2補正データとを生成するとともに、前記生成した第1補正データと第2補正データとを、前記補正特性に基づいて重み付け加算することにより補正結果としての補正データを生成することを特徴とする請求項2に記載の画像処理装置。  When correcting the pixel data indicating a specific color, the correction unit performs the first correction data obtained by performing the first correction on the pixel data and the second correction on the pixel data. Generating second correction data as a result, and generating correction data as a correction result by weighting and adding the generated first correction data and second correction data based on the correction characteristics; The image processing apparatus according to claim 2. 前記特性値設定手段は、特性値を設定するために、入力画像に含まれる特定色領域ごとにその特定色領域に含まれる特定色の画素をカウントして、最大の特定色領域の画素数を求めることを特徴とする請求項1に記載の画像処理装置。  The characteristic value setting means counts the pixels of the specific color included in the specific color area for each specific color area included in the input image and sets the maximum number of pixels in the specific color area in order to set the characteristic value. The image processing apparatus according to claim 1, wherein the image processing apparatus is obtained. 特定色は色空間における予め定められた特定範囲に含まれる色であり、
前記特性値設定手段は、特定色の画素をカウントする場合に、各画素の色の前記特定範囲における位置に応じて重み付けした値をカウントすることを特徴とする請求項4に記載の画像処理装置。
The specific color is a color included in a predetermined specific range in the color space,
The image processing apparatus according to claim 4, wherein the characteristic value setting unit counts a weighted value according to a position of each pixel color in the specific range when counting pixels of a specific color. .
前記特性値設定手段は、予め定めた関数に基づいて、前記特性値を、前記補正度合いを示す値に変換することを特徴とする請求項1に記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the characteristic value setting unit converts the characteristic value into a value indicating the correction degree based on a predetermined function. 請求項1から6の何れか1項に記載の画像処理装置と、
前記画像処理装置にて補正が施された画素データに基づいて画像記録媒体に対して画像を記録する画像記録装置とを備えることを特徴とする画像形成装置。
The image processing apparatus according to any one of claims 1 to 6,
An image forming apparatus comprising: an image recording apparatus that records an image on an image recording medium based on pixel data corrected by the image processing apparatus.
入力画像における各画素の色を示す画素データのうち、特定色を示す画素データに対して補正を施す画像処理方法において、
入力画像の画素データに基づいて、各画素が特定色であるか否かを判定する判定処理と、
入力画像における特定色の画素からなる特定色領域が、その大きさに応じて観察者に対して与える影響の大きさを示す特性値を、前記判定処理の判定結果に基づいて予め定めた方法で設定する特性値設定処理と、
前記特性値に応じて補正度合いが変化し、かつ、前記特性値の最小値から予め定めた中 間値までの範囲では、前記特性値が大きくなるにつれて補正度合いが大きくなり、前記中間値から最大値までの範囲では、前記特性値が大きくなるにつれて補正度合いが小さくなる補正特性に基づき、前記設定した特性値に応じた補正を入力画像の画素データに対して施す補正処理とを含むことを特徴とする画像処理方法。
In the image processing method for correcting pixel data indicating a specific color among pixel data indicating the color of each pixel in the input image,
A determination process for determining whether each pixel has a specific color based on pixel data of the input image;
A characteristic value indicating the magnitude of the influence of the specific color region composed of pixels of the specific color in the input image on the observer according to the size is determined in a predetermined method based on the determination result of the determination process. The characteristic value setting process to be set,
Correction degree is changed in accordance with the characteristic value, and the range to between values in which predetermined minimum value of the characteristic value, the correction degree becomes larger as the characteristic value increases, the maximum from the intermediate value A correction process for performing correction according to the set characteristic value on the pixel data of the input image based on a correction characteristic whose degree of correction decreases as the characteristic value increases. An image processing method.
請求項8に記載の画像処理方法を実行するための画像処理プログラムであって、コンピュータに前記各処理を実行させるための画像処理プログラム。  The image processing program for performing the image processing method of Claim 8, Comprising: The image processing program for making a computer perform each said process. 請求項9に記載の画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体。  A computer-readable recording medium on which the image processing program according to claim 9 is recorded.
JP2003089331A 2003-03-27 2003-03-27 Image processing apparatus, image forming apparatus, image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded Expired - Lifetime JP4112413B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003089331A JP4112413B2 (en) 2003-03-27 2003-03-27 Image processing apparatus, image forming apparatus, image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003089331A JP4112413B2 (en) 2003-03-27 2003-03-27 Image processing apparatus, image forming apparatus, image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded

Publications (2)

Publication Number Publication Date
JP2004297617A JP2004297617A (en) 2004-10-21
JP4112413B2 true JP4112413B2 (en) 2008-07-02

Family

ID=33403200

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003089331A Expired - Lifetime JP4112413B2 (en) 2003-03-27 2003-03-27 Image processing apparatus, image forming apparatus, image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded

Country Status (1)

Country Link
JP (1) JP4112413B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4334504B2 (en) * 2005-05-20 2009-09-30 シャープ株式会社 Image processing apparatus, image forming apparatus, image processing method, computer program, and recording medium
JP4635920B2 (en) * 2006-03-15 2011-02-23 セイコーエプソン株式会社 Image data color correction
JP4958626B2 (en) * 2006-07-04 2012-06-20 シャープ株式会社 Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium
JP4793648B2 (en) * 2006-09-21 2011-10-12 Nkワークス株式会社 Image correction unit and image correction program
JP4900039B2 (en) * 2007-05-24 2012-03-21 富士ゼロックス株式会社 Color adjustment apparatus and program
JP4960897B2 (en) * 2008-01-30 2012-06-27 株式会社リコー Image processing apparatus, image processing method, program, and storage medium
JP6489302B2 (en) * 2015-01-07 2019-03-27 コニカミノルタ株式会社 Image forming apparatus and data transmission method

Also Published As

Publication number Publication date
JP2004297617A (en) 2004-10-21

Similar Documents

Publication Publication Date Title
US7940434B2 (en) Image processing apparatus, image forming apparatus, method of image processing, and a computer-readable storage medium storing an image processing program
JP4067532B2 (en) Color conversion apparatus, image forming apparatus, color conversion method, computer program, and recording medium
JP4331159B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium therefor
JP3989738B2 (en) Image forming method, image forming apparatus, program, and recording medium
JPH07193719A (en) Method and apparatus for changing sharpness
JP4079814B2 (en) Image processing method, image processing apparatus, image forming apparatus, imaging apparatus, and computer program
JP4731595B2 (en) Image processing apparatus, image forming apparatus, computer program, recording medium, and image processing method
JP4226278B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium recording the same
JP4112413B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded
JP2003219191A (en) Image processor and image forming apparatus comprising it
WO2009093294A1 (en) Image signal processing device and image signal processing program
JP4107812B2 (en) Image processing apparatus, image processing method, and recording medium
JP2010278933A (en) Image processing device, image forming device, image processing method, program and recording medium
JP2008092541A (en) Image processing method, image processor, image forming apparatus, computer program, and recording medium
JP4099366B2 (en) Image processing apparatus, image reading apparatus, image forming apparatus, and image processing method
JP2004112494A (en) Image processor, image processing method and recording medium
JP4024735B2 (en) Image processing method, image processing apparatus, image forming apparatus, imaging apparatus, and computer program
JP4149368B2 (en) Image processing method, image processing apparatus and image forming apparatus, computer program, and computer-readable recording medium
JP2002094826A (en) Image processing unit, image forming unit and method for processing image
JP4101741B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP4176656B2 (en) Image processing apparatus, image processing method, image forming apparatus, image processing program, and recording medium recording the program
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
JP5122507B2 (en) Image processing apparatus, image forming apparatus, image processing method, program, and recording medium
JP4266002B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP4118823B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050810

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070402

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070807

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071004

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20071004

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080409

R150 Certificate of patent or registration of utility model

Ref document number: 4112413

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120418

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120418

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130418

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130418

Year of fee payment: 5

EXPY Cancellation because of completion of term