JP4219577B2 - Image processing apparatus, image output apparatus, image processing method, and storage medium - Google Patents

Image processing apparatus, image output apparatus, image processing method, and storage medium Download PDF

Info

Publication number
JP4219577B2
JP4219577B2 JP2001176455A JP2001176455A JP4219577B2 JP 4219577 B2 JP4219577 B2 JP 4219577B2 JP 2001176455 A JP2001176455 A JP 2001176455A JP 2001176455 A JP2001176455 A JP 2001176455A JP 4219577 B2 JP4219577 B2 JP 4219577B2
Authority
JP
Japan
Prior art keywords
saturation
gradation correction
degree
image
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2001176455A
Other languages
Japanese (ja)
Other versions
JP2002369004A (en
JP2002369004A5 (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2001176455A priority Critical patent/JP4219577B2/en
Priority to US10/163,305 priority patent/US7251056B2/en
Publication of JP2002369004A publication Critical patent/JP2002369004A/en
Publication of JP2002369004A5 publication Critical patent/JP2002369004A5/ja
Priority to US11/812,631 priority patent/US7525688B2/en
Application granted granted Critical
Publication of JP4219577B2 publication Critical patent/JP4219577B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Color, Gradation (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、例えばスキャナやデジタルカメラ等から入力した画像をプリンタやディスプレイ等に出力するときの画像処理装置と画像出力装置と画像処理方法及び記憶媒体に関するものである。
【0002】
【従来の技術】
近年、パソコンやインターネットや家庭用プリンタの普及とともにハードディスクなどの記憶媒体の記録容量の増大により、デジタルデータで写真画像を扱う機会が増えている。それに伴いデジタル写真画像データ(以下、画像データという)の入力手段としてデジタルカメラやフィルムスキャナなどが一般に使用されている。例えばデジタルカメラには、撮影時の露出を常に最適に保つための自動露出制御装置が設けられている。この露出制御方法には種々の方法があるが、光量検出のため画面を複数の適当な領域に分割し、各領域毎に重み付けを行い、加重平均を取って絞りやシャッタスピードなどを調節する方法が一般的である。
【0003】
しかしながら、この露出制御方式はデジタルカメラのメーカ毎に様々であり、撮影条件によって適正に作動しない場合もあるため完全なものは存在しない。特に、主被写体の真後ろに光源が存在し、背景と主被写体との輝度差が大きい逆光状態では、被写体に露出があわないと背景の明るさに引っ張られて露出がマイナスに補正されるため、被写体が暗く写ってしまう。また、夜間のストロボ撮影では、被写体にストロボ光が当たることが前提になるため、絞りやシャッタスピードは既定値に固定される。すなわち、ストロボと被写体の距離が遠すぎると光が届かず、この場合も被写体は暗く写ってしまう。
【0004】
ここで露出補正とは、シーンに対して不適切な明るさを持つ被写体を、シーンに適した明るさに調節することを意味する。例えば露出不足で全体に暗い被写体や、逆光で暗くなっている被写体を明るくしたり、露出オーバな被写体を暗くしたりすることである。カメラでの露出補正はレンズに入る入射光量を調節するために絞りやシャッタスピードを変える方法が一般的である。また、プリンタやディスプレイでは入出力変換関数(階調補正カーブ)等を用い、入力信号の明るさに対して出力信号の明るさを最適化するための処理等を意味する。この露出を補正して画像データの明るさを調節することと、この発明における階調補正処理とは目的が同等なため、以後、階調補正処理と記す。
【0005】
このようなデジタル画像の撮影時における不適切な露出状態に対応するため、画像データを自動的に階調補正する処理方法が多数開示され、例えば特開平7−301867号公報に示された露光量決定方法は、原稿画像の主要部分を抽出して特徴量を算出し、算出した特徴量から所定濃度範囲を決定し、原稿画像全体から所定濃度範囲の画素のみを抽出して画像特徴量を決定し、決定した画像特徴量から露光量を決定することにより、逆光画像など背景と被写体の濃度差が大きい画像を適切に補正するようにいる。
【0006】
また、特開平10―79885号公報に示された画像処理方法は、入力における低輝度部分に屈折指示値を設定し、設定した屈折指示値に対する出力値として輝度の最大値、例えば「255」から少し小さくした値、例えば「220」を選び、この点を屈曲点とし、入力された輝度値が屈曲指示値に達するまでは入力と出力の関係は原点の座標と屈曲点の座標の間を結ぶ直線で表され、入力値が屈曲点以降は入力と出力の関係は屈曲点の座標と入出力の最大座標(255,255)の間を結ぶ直線で表されるような変換テーブルを作成し、作成した変換テーブルを用い入力輝度を変換して出力することにより、逆光において影になる部分を明るくするとともに明るい部分のつぶれを少なくするようにしている。
【0007】
また、特開2000―134467号公報に示された画像処理方法は、対象画像を示す画像データを入力し、この対象画像のヒストグラムを作成し、作成したヒストグラムに基づき対象画像が逆光画像であるか否を判定し、この判定結果に基づき画像処理条件を設定して、逆光シーンに適した画像処理を行うことができるようにしている。
【0008】
【発明が解決しようとする課題】
この階調補正処理を行う上で最も困難なのは、被写体の明るさを適切に補正しながら画像全体において過補正を起こさないことである。すなわち、前記特開平7−301867号公報等に示すように、被写体部分のみから補正量を得ると、補正処理後の画像において背景の階調がつぶれたり、高彩度色において階調つぶれや色相ずれが起こったりする。また、特開平10―79885号公報に示すように、輝度情報だけで階調補正カーブを作成し、その階調補正カーブで色処理を行うと、輝度成分は飽和しなくても、色成分が飽和してしまう場合があり、高彩度色の階調つぶれや色相ずれの原因となる。また、画像全域に飽和が起こらないように階調補正カーブを設定すると、補正が充分にかからない場合がある。
【0009】
この発明は、このような問題を解消し、不適切な露出状態で撮影された画像の主被写体の明るさを、背景の階調つぶれや色相ずれを起こすことなく、最大限の効果で適切に補正し、かつ適切な露出状態で撮影された画像に対しては過補正をしない画像処理装置と画像出力装置と画像処理方法及び画像処理プログラムを格納した記録媒体を提供することを目的とするものである。
【0010】
【課題を解決するための手段】
この発明に係る画像処理装置は、入力した画像データにおいて明るさの範囲を少なくとも2段階以上に区分し、最も明るい区分に属する領域を制御候補領域とし、高輝度で無彩色の領域とエッジ及びエッジ付近の領域を前記制御候補領域から除いた領域を制御領域として抽出する制御領域抽出手段と、前記抽出した制御領域の画像データに対して階調補正カーブにより階調補正処理を行ったデータに対して飽和度合いを評価する飽和判断手段と、該飽和判断手段で飽和度合いが許容されないと判定された場合に、前記階調補正カーブを新たな階調補正カーブに更新する更新手段とを備えた階調補正調節手段とを有することを特徴とする。
【0011】
前記制御領域抽出手段は、さらに高彩度の色成分の領域を前記制御候補領域から除いた領域を制御領域として抽出することを特徴とする。
【0013】
飽和判断手段は、制御領域に属する画素の持つ成分のうち、少なくとも一つがある基準値を超える場合に飽和とし、飽和の目立ちやすさが許容されるか否かを判断して、階調つぶれの程度が許容されるか否かを判定する。
【0014】
さらに、飽和判断手段は、制御領域に属する画素の持つ成分のうち、少なくとも一つがある基準値を超える場合に飽和とし、制御領域の面積に対する飽和と判定された領域の面積の値を用いて算出される飽和度がある閾値以下の場合に飽和度合いが許容されると判断したり、制御領域に属する画素の持つ成分のうち、少なくとも一つがある基準値を超える場合に飽和とし、画像全領域の面積に対する飽和と判定された領域の面積の値を用いて算出される飽和度がある閾値以下の場合に飽和度合いが許容されると判断して、階調つぶれの程度が許容されるか否かを正確に判定する。
【0015】
また、飽和判断手段は、制御領域に属する画素の持つ成分のうち、少なくとも一つがある基準値を超える場合に飽和とし、制御領域もしくは飽和と判定された領域の少なくとも一方の集中度合いで算出される飽和度がある閾値以下の場合に飽和度合いが許容されると判断したり、制御領域に属する画素の持つ成分のうち少なくとも一つがある基準値を超える場合に飽和とし、飽和と判定された領域に属する画素(以下、飽和画素という)の重心位置と各飽和画素との平均距離から飽和と判定された領域の分散度合いを判定し、該分散度合いに基づいてある閾値を可変し、飽和度が閾値以下の場合に飽和度合いが許容されると判断して、階調つぶれの程度が許容されるか否かを正確に判定する。
【0016】
また、更新手段は階調補正の程度を小さく調節して前記階調補正カーブを新たな階調補正カーブに更新したり、階調補正の程度を大きく調節して階調補正カーブを新たな階調補正カーブに更新して、補正後の画像品質を最適化する。
【0018】
また、階調補正調節手段は、飽和判断手段で飽和度合いが許容されないと判定された場合に、前記階調補正カーブを更新する前に前記制御領域を更新する制御領域更新手段を有し、階調補正処理の高速化を図る。
【0019】
また、前記階調補正処理を行う画像処理装置を有する画像出力制御装置と、画像出力制御装置で階調補正処理した画像データを出力する画像形成装置とで画像出力装置を構成し、入力した画像データを画像形成装置に応じて階調補正処理して出力し、階調つぶれのない画像を出力する。
【0020】
この画像出力装置の画像処理装置の飽和判断手段における飽和度合いの評価基準と飽和度合いの許容基準とを接続された画像形成装置に応じて設定し、画像形成装置の最も適した階調補正処理を行う。
【0021】
この発明の画像処理方法は、入力した画像データにおいて明るさの範囲を少なくとも2段階以上に区分し、最も明るい区分に属する領域を制御候補領域とし、高輝度で無彩色の領域とエッジ及びエッジ付近の領域を前記制御候補領域から除いた領域を制御領域として抽出する制御領域抽出ステップと、前記抽出した制御領域の画像データに対して階調補正カーブにより階調補正処理を行ったデータに対して飽和度合いを評価する飽和判断ステップと、前記飽和度合いが許容されないと判定された場合に、前記階調補正カーブを新たな階調補正カーブに更新する階調補正調節ステップとを有することを特徴とする。
【0022】
この発明の記憶媒体は、前記画像処理方法を実行するプログラムを格納し、コンピュータで読取可能なことを特徴とする。
【0023】
【発明の実施の形態】
図1はこの発明の画像出力装置の構成を示すブロック図である。図に示すように、画像出力装置は画像入力装置1と画像処理装置2と画像形成装置3を有する。画像入力装置1は、例えばスキャナ4とデジタルカメラ5あるいはビデオカメラ6などを有し、写真などのカラー画像をマトリックス状の画素として表した実写の画像データを画像処理装置2に出力する。画像処理装置2は、コンピュータ7とハードディスク8とキーボード9とCD−ROMドライブ10とフロッピディスクドライブ11とモデム12及びサーバ13を有する。画像形成装置3はディスプレイ14とプリンタ15を有する。画像処理装置2のコンピュータ7はオペレーションシステム16と、階調補正手段17を有する画像処理アプリケーション18と、ディスプレイドライバ19及びプリンタドライバ20を有する。画像処理アプリケーション18はオペレーティングシステム16により処理の実行が制御され、必要に応じてディスプレイドライバ19と連携し所定の画像処理を実行する。この画像処理アプリケーション18で画像処理を行うとき、階調補正手段17は、RGBの階調データを入力して最適な評価値を用いて階調補正処理を施したRGBの階調データを作成し、ディスプレイドライバ19を介してディスプレイ14に表示したり、プリンタドライバ20を介してプリンタ15へ出力させる。
【0024】
階調補正手段17は、図2のブロック図に示すように、制御領域抽出手段21と階調補正調節手段22及び階調補正処理手段23を有する。制御領域抽出手段21は、入力した画像データに対して階調補正処理を行ったときに階調つぶれが目立つ制御領域を抽出する。階調補正調節手段22は、階調補正カーブ取得手段24とデータ処理手段25と飽和判断手段26と更新手段27を有する。階調補正カーブ取得手段24は入力した画像データ全体から階調補正カーブf0(x)を取得したり、あるいは画像から人物領域などの被写体抽出を行い、その中央値等から補正量を決めて階調補正カーブf0(x)を得る。ここでxは画像データの入力輝度値である。データ処理手段25は制御領域抽出手段21で抽出した制御領域の画像データを階調補正カーブで階調補正処理を行う。飽和判断手段26は階調補正処理後の画像データの階調つぶれを評価する。更新手段27は補正量調節手段28と階調補正カーブ更新手段29を有し、飽和判断手段26で階調つぶれが許容されないと判定された場合、補正量調節手段28で階調補正量の調節を行い、階調補正カーブ更新手段29で新たな階調長補正カーブfi(x)を得る。ここでiは階調補正カーブの更新回数を示す。この階調補正カーブfi(x)の更新は飽和判断手段26で階調つぶれが許容されると判断されるまで繰り返す。階調補正処理手段23は飽和判断手段26で階調つぶれが許容されると判定された階調補正カーブにより入力した画像データに対してカラー画像の階調補正処理を行う。
【0025】
上記のように構成した階調補正手段17で画像入力装置1から入力したRGBのカラー画像データに対して階調補正を行うときの処理を図3のフローチャートを参照して説明する。
【0026】
入力した画像データが階調補正手段17に送られると、まず、制御領域抽出手段21は、入力した画像データに対して階調補正処理を行ったときに階調つぶれが目立つ制御領域を抽出し、抽出した制御領域の画像データを階調補正調節手段22に送る(ステップS1)。
【0027】
一方、階調補正調節手段22の階調補正カーブ取得手段24は入力した画像データから階調補正カーブf0(x)を取得する(ステップS2)。この取得した階調補正カーブf0(x)によりデータ処理手段25は制御領域抽出手段21で抽出した制御領域の画像データを階調補正処理する(ステップS3)。この階調補正カーブf0(x)を用いてRGBのカラー画像データの階調補正処理を行うときの処理を詳細に説明する。
【0028】
入力した画像データの画素数をj=(1,2,・・N−1,N)とし、画像データの入力輝度値をYin(j)、階調補正カーブf0(x)による補正後の出力輝度値をY1(j)と定義する。入力した画像データのj番目の画素の入力輝度値Yin(j)は、カラー画像信号(Rin(j),Gin(j),Bin(j))を用いて下記(1)式で表せる。
Yin(j)=0.299Rin(j)+0.587Gin(j)+0.114Bin(j)・・・(1)
この入力輝度値Yin(j)に対して階調補正カーブf0(x)による階調補正処理後の出力輝度値Y1(j)を算出し、階調補正係数CO(j)を下記(2)式で算出する。
CO(j)=Y1(j)/Yin(j)=f0(Yin(j))/Yin(j)・・・・(2)
この階調補正係数CO(j)を用いて入力カラー画像信号(Rin(j),Gin(j),Bin(j))を下記(3)式で変換することにより階調補正カラー信号(R1(j),G1(j),B1(j))を得る。
(R1(j),G1(j),B1(j))=CO(j)・(Rin(j),Gin(j),Bin(j))・・・・・(3)
また、入力画像信号がグレーの場合、グレーレベルYin(j)を入力値とし、階調補正処理後の出力は、出力グレーレベルY1(j)=f0(Yin(j))を得れば良い。
ここで通常の画像処理では、例えばディスプレイ14等の出力デバイスの再現範囲0〜255を超えた場合クリッピングを行う。すなわち0未満の値は0へ、255以上の値は強制的に255に置き換える。これに対して、この発明の場合は最終的な階調補正カーブを得て階調補正処理を行うまでクリッピングを行わないでおく。
【0029】
この階調補正カーブf0(x)を用いてRGBのカラー画像データの階調補正処理後の画像データの飽和度を飽和判断手段26で算出し、算出した飽和度により階調つぶれを評価する(ステップS4,S5)。例えばj番目の画素の階調補正後の色成分(R1(j),G1(j),B1(j))のうち、少なくとも1つが出力デバイスであるディスプレイ14の再現範囲である0から255値を超えた場合、j番目の画素は飽和しているとみなす。そして階調つぶれがあるか否かを飽和を用いて判定し、飽和度合いを評価することによって階調つぶれが許容されるか否かを判定する。
この階調つぶれを評価する飽和度合いは次の方法により算出する。例えばディスプレイ14の再現範囲を超えて飽和しているとみなす画素に対して平均的な超越値を算出する。すなわち、K個の飽和画素に対して各画素ごとに飽和した色成分の最大レベルLj(j=1,2,・・K)を求め、下記(4)式に示すように、最大レベルLjと再現範囲上限255との差分の平均値Oaveを飽和度として算出する。
Oave=Σ(Lj−255)/K・・・・・(4)
但し、ΣはJ=1,2,・・・Kについてとる。
また、例えば制御領域に属すM個の画素に対してK/Mを飽和度としたり、画像の全領域に属するN個の画素に対してK/Nで飽和度を定義しても良い。
【0030】
飽和判断手段26は算出した飽和度がある閾値Th1以上の場合、飽和度合い、すなわち階調つぶれが許容されないと判断する。この閾値Th1は、K/Mを飽和度とした場合、実験によるとTh1=0.03であった。また、入力画像信号がグレーの場合、階調補正後のグレーレベルY1(j)がディスプレイ14の再現範囲を超えた場合、j番目の画素は飽和しているとみなせばよい。
【0031】
この飽和度合いが許容されるか否は入力した画像により異なり、例えば図4(a)に示すように制御領域もしくは飽和領域40が分散している場合と、図4(b)に示すように制御領域もしくは飽和領域40が集中している場合とでは、成分的には同様の飽和が起こっていても目立ち度合いが異なる。このため制御領域もしくは飽和領域40の分散度合いに応じて飽和度合いの許容も異なる。そこで、飽和画素の分散度合いに応じて飽和度合いを許容するかどうかの閾値を可変すると良い。すなわち、飽和領域に属する画素に対し番号付けを行い、重心位置を算出し、重心位置と各飽和画素との平均距離を算出し、その値を用いて飽和領域の分散度合いを判定し、この分散度合いに応じて閾値を可変する。具体的には、図4(c)に示すように、画像データの幅と高さを大きさ「1」に正規化し、次に、番号づけされたK個の飽和画素40に対して重心位置C(Xc,Yc)を下記(5)式で算出する。
Xc=(Σxj)/K
Yc=(Σyj)/K・・・・・・・(5)
この算出した重心位置C(Xc,Yc)から飽和画素40までの平均距離Raveを下記(6)式で算出する。
Rave=Σ{(xc−Xc)+(yj−Yc)}( 1/2 )}/K・・(6)
但し、(5),(6)式において、Σはj=1,2,・・・Kについてとる。
この平均距離Rave(<1)が大きければ飽和画素40が分散していることを示しており、飽和度合いは目立たない。そこで算出した平均距離Raveに応じて許容範囲を判定する閾値Th1を下記(7)式により閾値Th1(Rave)に可変する。
Th1(Rave)=Rave*α+β・・・・(7)
ここでα,βは正の自然数である。
この分散度合いの算出方法は上記方法に限らず、他の標本分散を使用しても良い。また、デジタルカメラ5などで撮影された画像データは、画像の中心領域が被写体である可能性が高く、中心領域の重要性は大きい。そこで飽和画素の重心位置に応じて閾値に重み付けを行っても良い。例えば、重心位置が画像の中心部に近いほど重要領域であり、飽和は目立つと予想されるため、閾値を低く設定すればよい。
【0032】
この飽和判断手段26による飽和度合いの評価の結果、階調つぶれが許容されないと判定された場合、更新手段27の補正量調節手段28で階調補正量の調節を行い(ステップS6)、この調節結果により新たな階調長補正カーブf1(x)を階調補正カーブ更新手段29で得る(ステップS7)。例えば階調補正カーブf0(x)が、図5に示すように、xを入力信号の輝度値として、
f0(x)=255*F0(x)
F0(x)=xγ 但しγ=0.4・・・・(8)
と定義される場合、階調補正カーブf0(x)の調節と更新を行い階調補正カーブf1(x)を得るために、γの値を0.4から0.5へと0.1だけステップし、
f1(x)=255*F1(x)
F1(x)=xγ 但しγ=0.5・・・・(9)
で示す新たな階調補正カーブf1(x)を得る。この階調補正カーブの変更には、fi(x)が直線で表されるときは、その傾きを変更するなど各種の方法がある。
【0033】
この新たな階調長補正カーブf1(x)によりデータ処理手段25は制御領域抽出手段21で抽出した制御領域の画像データを階調補正処理し(ステップS3)、階調補正処理後の画像データの階調つぶれを飽和判断手段26で評価する(ステップS4)。この階調補正カーブの更新と制御領域の画像データの階調補正処理及び階調つぶれの評価を階調つぶれが許容されると判断されるまで繰り返し、階調つぶれが許容されると判定されると、そのときの階調補正カーブfi(x)を階調補正処理手段23に出力し、階調補正処理手段23は入力した階調補正カーブfi(x)により画像データの全てに対してカラー画像の階調補正処理を行う(ステップS8)。
【0034】
次に、入力した画像データに対して階調補正処理を行ったときに階調つぶれが目立つ制御領域を制御領域抽出手段21で抽出するときの処理を説明する。
制御領域抽出手段21は入力した画像データの明るさ、例えば輝度レベルを2段階以上、例えば4段階に区分し、階調補正によって飽和しそうな領域を制御領域の候補すなわち制御候補領域として定義する。例えば図6(a)に示すように逆光シーンの輝度画像41に対して、図7(a)に示すように、横軸に輝度レベルをとり、縦軸にその頻度をとった輝度ヒストグラムを作成する。この作成した輝度ヒストグラムの輝度値に応じて例えば4段階に区分し、次のように新しくレベル付けを行い、新たな頻度分布H(i)、但しi=(0,1,2,3)を作成する。
元々の輝度レベルが0以上63未満のとき、頻度H(0)でレベル0とし、
元々の輝度レベルが64以上127未満のとき、頻度H(1)でレベル1とし、
元々の輝度レベルが128以上191未満のとき、頻度H(2)でレベル2とし、
元々の輝度レベルが192以上255未満のとき、頻度H(3)でレベル3とする。
この4段階に区分した後の輝度ヒストグラムを図7(b)に示し、区分後の輝度画像41を図6(b)に示す。図6(b)に示すように、区分後の輝度画像42はポスタリゼーションされて画像のコントラストが明確になっている。そして例えば区分後の最明部であるレベル3に属する領域を制御候補領域とすると、図6(c)に示す画像43の白抜けの部分が抽出された制御候補領域となる。ここで明るさに対する情報として輝度を用いたが、明度やG信号を用いても良い。頻度分布のコントラスト調節を行った後に区分化を行っても良い。
【0035】
この制御候補領域から、階調補正を行っても階調つぶれが目立たないと予測される領域を除いて制御領域とすると良い。例えば、デジタルカメラにおいて、光源を背景に撮影された逆光画像の場合は、高輝度で無彩色の領域が背景として存在する。このような領域は元々階調が少ないため、階調補正処理の結果、飽和が起こっても目立たないので、それらを予め除去する。
ここで高輝度、無彩色の画素は以下の式で表される。注目画素の色成分を(Rin(j),Gin(j),Bin(j))、閾値をTh2,Th3とすると、
Rin(j)<Th2andGin(j)<Th2andBin(j)<Th2
and|Rin(j)−Gin(j)|<Th3
and|Gin(j)−Bin(j)|<Th3
and|Bin(j)−Rin(j)|<Th3・・・・・・・(10)
上記閾値は、実験の結果、閾値Th2=220、閾値Th3=20が適切な値であったが、この閾値Th2,Th3はこの値にこだわらない。また、入力画像信号がグレーの場合、高輝度で元々階調が少なく、階調補正処理の結果、階調つぶれが目立たないと予測される領域を除去すれば良い。
【0036】
また、デジタルカメラで撮影されたデータはカメラ内の画像出力システムにおいてエッジ強調処理を行うため、エッジ付近の画素は強調され、白抜け等が起こる場合がある。これらを飽和しそうな領域だと誤判定されないために、予め削除する必要がある。このエッジ領域か否かは例えば以下の方法で判定する。
【0037】
図8に示すように、注目画素の画素輝度値をXとする。この注目画素の画素輝度値Xに対して水平方向4近傍画素の画素輝度値をそれぞれa,b,c,dとし、垂直方向4近傍画素をそれぞれs,t,u,vとする。エッジを抽出するために例えば水平方向と垂直方向に対し高域と中域の差分和をとる。
水平方向高域差分和Lhh(X)=|X−c|+|X−b|
水平方向中域差分和Lhm(X)=|X−a|+|X−d|
垂直方向高域差分和Lvh(X)=|X−t|+|X−u|
垂直方向中域差分和Lvm(X)=|X−s|+|X−v|・・・・(11)
式11では注目画素の値から上下、もしくは左右の周囲2画素の差分和を求めている。すなわち、周辺画素に対し注目画素の値が異なっている場合、算出値は大きくなり、逆に、周辺画素と注目画素の値が同等の場合は算出値は小さくなる。したがって差分和をとることで注目画素の孤立点の度合い、すなわちエッジ部である可能性を検討する。この差分和により評価値を算出する。水平方向の評価値をEh(X)、垂直方向の評価値をEv(X)とし、Eh(X)とEv(X)のうち大きい値を注目画素の評価値E(X)とする。
Eh(X)=(Lhh(X)+Lhm(X))/2
Ev(X)=(Lvh(X)+Lvm(X))/2
E(X)=max(Eh(X),Ev(X)) ・・・・・・・(12)
さらに、輝度の高い方がノイズ等を感じやすいと言う人間の視覚特性を考慮して、注目画素の輝度値Xに応じて、エッジか否かの判定閾値Th4(X)を変化させる。この判定閾値Th4(X)は実験の結果、次のように設定すると良好な結果を得ることができた。
Th4(X)=100 (0≦X<50)
Th4(X)=−(3/5)X+130 (50≦X<200)
Th4(X)=10 (200≦X<255)・・・(13)
そして評価値E(X)>Th4(X)の場合、注目画素はエッジもしくはエッジ強調された部分であると判定して制御領域から削除する。ここで閾値Th4(X)は(13)式にこだわらない。また、エッジもしくはエッジ強調された部分か否かの判定方法にはこのほかにも種々考えられるがそれらを用いても良い。また、入力画像信号がグレーの場合、グレーレベルの値をXとみなし、エッジ領域か否かを判定すればよい。
【0038】
また、デジタルカメラで撮影されたデータは、元々被写体が高彩度な上に、カメラ内の画像出力システムにおいて彩度強調処理を行っている。このような領域は元々階調が少ないため、階調補正処理の結果、飽和が目立たないのでこれらを予め排除すると良い。例えばGの信号レベルが人間の感じる輝度に近いという視覚特性を考慮して、G信号とそのほかの色成分との差分を閾値Th5と比較することによって高彩色の画素か否かを評価する。
注目画素の色成分を(R1(j),G1(j),B1(j))とすると、下記(14)式に示す条件を満たすときに高彩色の画素と判定して制御領域から除去する。
|Rin(j)−Gin(j)|>Th5
and|Gin(j)−Bin(j)|>Th5・・・・・(14)
ここで閾値Th5は実験の結果Th5=100が適切な値であったが、特にこの値にはこだわらない。また、高彩度色か否かの判定方法にはこのほかにも種々考えられるが、それらを用いても良い。
【0039】
このようにして制御領域抽出手段21で抽出された制御領域の画像データにより階調補正調節手段22で階調つぶれが許容されないと判断された場合、階調補正カーブfi(x)を更新するとともに制御領域を新たに更新すると処理の高速化を実現することができる。この階調補正調節手段22で階調補正カーブfi(x)を更新するとともに制御領域を新たに更新する場合について説明する。
【0040】
階調補正調節手段22には、図9のブロック図に示すように、飽和判断手段26による飽和度合いの評価の結果、階調つぶれが許容されないと判定された場合に制御領域抽出手段21で抽出した制御領域を新たに取り直して制御領域を更新する制御領域更新手段30を有する。そして入力された画像データに対して制御領域抽出手段21より例えば図10(a)に示す第1の制御領域51が抽出され、この第1の制御領域51の画像データに対して階調補正カーブ取得手段24で取得した階調補正カーブf0(x)により階調補正処理を行ったデータに対して飽和判断手段26で1回目の飽和度合いの評価が行われ、階調つぶれが許容されないと判定された場合、制御領域更新手段30は、図10(b)に示すように第1の制御領域51と飽和度合いの評価から第2の制御領域52を得る。このとき第2の制御領域52は、第1の制御領域51に属し、階調補正カーブf0(x)を用いて階調補正処理を行った際に飽和しなかった画素は排除する。何故なら、更新手段27において新たに得る階調補正カーブf1(x)を用いた階調補正処理は、階調補正カーブf0(x)を用いた場合よりも飽和が起こりにくいように調節され、したがって階調補正カーブf0(x)を用いて飽和しなかった領域は次からは飽和判定を行う必要が無いためである。
【0041】
その後、補正量調節手段28により補正量が調節され、階調補正カーブ更新手段29で新たな階調補正カーブf1(x)を得る。この階調補正カーブf1(x)を用いて第2の制御領域52の画像データに対して階調補正処理を行い、飽和判断手段26で階調つぶれが許容されるか否を判定し、階調つぶれが許容される場合は、階調補正カーブfi(x)の更新は行われず、階調補正カーブf1(x)を出力し階調補正処理手段23で全画像データに対して階調補正処理を行う。
【0042】
次に、前記階調補正手段17を有する画像出力制御装置(プリンタドライバ)を有する画像出力システムについて説明する。画像出力システムは、図11のブロック図に示すように、複数のパソコン(PC)31a、31bと、各パソコン31a,31bにプリンタドライバ32a,32bを介して接続さレたプリンタ15a,15bとを有する。プリンタドライバ32a,32bは色変換手段33と中間調処理等を実施する描画手段34と、描画手段34で描画された1ページ分の印刷画像を一時的に格納しておく画像記憶手段35を有する。色変換手段33は、図12のブロック図に示すように、階調補正手段17と補間演算部36と色変換テーブル記憶部37を有する。
【0043】
この画像出力システムにおいて、例えばパソコン31aでオペレータがプリンタ15aを選択して出力指令を入力すると、パソコン31aは、画像を撮像するなどして取り込まれた画像データや各種DTPソフトで作成したモノクロとカラーの両方の写真等の画像データをプリンタドライバ32aに送る。プリンタドライバ32aは送られた画像データの階調補正処理を行ってから複数の出力色成分C(シアン)、M(マゼンタ)、Y(イエロー)、K(ブラック)への色変換処理を行い印刷データをプリンタ15aに送る。プリンタ15aは送られた印刷データにより画像を印刷する。
【0044】
この画像データを印刷して出力するときのプリンタドライバ32a,32bの色変換手段33における階調補正処理とRGBの画像データからCMYBの印刷データに変換する処理を説明する。パソコン31aからRGBの画像データがプリンタドライバ32aに送られると、プリンタドライバ32aの制御領域抽出手段21より第1の制御領域51が抽出され、この第1の制御領域51の画像データに対してデータ処理手段25は階調補正カーブ取得手段24で取得した階調補正カーブf0(x)により階調補正処理を行う。この階調補正処理がされたデータに対して飽和判断手段26で1回目の飽和度合いの評価が行われる。ここで各プリンタ15a,15bの再現範囲が異なるため飽和の基準もプリンタ15a,15b毎に異なる。そこで階調補正手段17には接続されたプリンタ15aに関する飽和の基準情報を格納した飽和基準テーブル38を有する。また、各プリンタ15a,15bのインク特性やこの後に行われる中間調処理に応じて飽和度合いの基準も異なる。これに対応するために、階調補正手段17には接続されたプリンタ15aに関する飽和度合いの許容基準情報を格納した飽和度合許容テーブル39も有する。飽和判断手段26は飽和基準テーブル38と飽和度合許容基準テーブル39に格納された情報を読みこんで階調つぶれの度合いが許容されるか否かを判定する。階調つぶれが許容されないと判定された場合、制御領域更新手段30は第1の制御領域51と飽和度合いの評価から第2の制御領域52を得る。その後、補正量調節手段28により補正量が調節され、階調補正カーブ更新手段29で新たな階調補正カーブf1(x)を得る。この階調補正カーブf1(x)を用いて第2の制御領域52の画像データに対して階調補正処理を行い、飽和判断手段26で階調つぶれが許容されるか否を判定し、階調つぶれが許容される場合は、階調補正カーブfi(x)の更新は行われず、階調補正カーブf1(x)を出力し階調補正処理手段23で全画像データに対して階調補正処理を行い、補間演算部36に出力する。
【0045】
補間演算部36は送られたRGBの画像データを、色変換テーブル記憶部37に格納された色変換テーブルのなかから選択された色変換テーブルを参照してメモリマップ補間によりCMYに色変換する。このメモリマップ補間は、図13に示すように、RGB空間を入力色空間とした場合、RGB空間を同種類の立体図形に分割し、入力の座標(RGB)おける出力値Pを求めるために、入力の座標(RGB)を含む立方体を選択し、選択された立方体の8点の予め設定した頂点上の出力値と立体図形の中における位置すなわち各頂点からの距離に基づいて線形補間を実施する。ここで出力値Pは、C、M、Y値にそれぞれ相当し、補間演算に使用される入力空間上の座標(RGB)には、実際の入出力(L*a*b*−CMY)の関係を測定して、このデータを使用して最小2乗法等により算出したRGB(L*a*b*)に対するC、M、Yの値が予め設定してある。また、CMY信号は、例えば下記(15)式の演算によってCMYK信号に変換される。
K=α・min(C,M,Y)
C1=C−β・K
M1=M−β・K
Y1=Y−β・K (15)
なお、色変換法はこの方法だけに限らず、例えばプリンタ15aの特性をパソコン31aが画像データのヘッダ情報に記録して送信するようにしても良いし、プリンタドライバ32をパソコン31a内部に実装する場合には、例えばICC(Inter Color Consortium)で標準化されているデバイス・プロファイルを読み出して用いてよい。
【0046】
補間演算部36でメモリマップ補間されてCMYKに変換された印刷データは描画手段34に送られ中間調処理等が行われ、印刷画像が1ページ分ずつ画像記憶手段35に一時的に格納され、この印刷画像がプリンタ15aで印刷される。
【0047】
前記説明では階調補正手段17で入力した画像データの階調補正処理を行った場合について説明したが、この階調補正手段17で実行した階調補正処理プログラムを例えばフロッピディスクやハードディスク、光ディスク、光磁気ディスク、メモリカード等の記憶媒体に格納しておき、図14のブロック図に示すように、CPUとRAMとROMやディスクハード等を有する演算処理装置61と、記録媒体62に格納したプログラムを読み取るプログラム読取装置63と、ディスプレイやマウスやキーボード等を有するパソコン60で記憶媒体62に格納した階調補正処理プログラムを読み取り、読み取った階調補正処理プログラムにより、デジタルカメラ5等から入力した画像データの階調補正処理を行っても良い。
【0048】
この場合、記憶媒体62に記憶されているブログラムコードはプログラム読取装置63で読みとってハードディスクなどに格納され、この格納されたブログラムコードをCPUによって実行することにより、階調補正処理などを実現することができる。また、パソコン60が読み出したブログラムコードを実行することにより、そのブログラムコードの指示に基づき、パソコン60上で稼動しているOS(オペレーティングシステム)やデパイス・ドライパなどが実際の処理の一部または全部を行い、その処理によって前記機能が達成される場合も含まれる。
【0049】
【発明の効果】
この発明は以上説明したように、入力した画像データを階調補正したときに階調つぶれが目立つ候補領域を制御領域として抽出する制御領域抽出手段と、制御領域の情報を用いて階調補正カーブを更新する階調補正調節手段とを有し、補正によって階調つぶれが目立つ領域の情報を用いて階調補正を調節することにより、階調つぶれを起こすことなく階調補正を行うことができ、良質な画像を安定して出力することができる。
【0050】
また、階調補正カーブを用いて制御領域の画像データを階調補正処理したときに飽和度合いを評価し、飽和度合いが許容されないと判定された場合に、階調補正カーブを新たな階調補正カーブに更新することにより、補正によって起こる階調つぶれを飽和度合いを用いて算出して階調つぶれの程度を把握することができる。
【0051】
また、制御領域に属する画素の持つ成分のうち、少なくとも一つがある基準値を超える場合に飽和とし、飽和の目立ちやすさが許容されるか否かを判断することにより、階調つぶれの程度が許容されるか否かを安定して判定することができる。
【0052】
さらに、制御領域に属する画素の持つ成分のうち、少なくとも一つがある基準値を超える場合に飽和とし、制御領域の面積に対する飽和領域の面積の値を用いて算出される飽和度がある閾値以下の場合に飽和度合いが許容されると判断したり、制御領域に属する画素の持つ成分のうち、少なくとも一つがある基準値を超える場合に飽和とし、画像全領域の面積に対す飽和領域の面積の値を用いて算出される飽和度がある閾値以下の場合に飽和度合いが許容されると判断することにより、階調つぶれの程度が許容されるか否かを正確に判定することができる。
【0053】
また、制御領域に属する画素の持つ成分のうち、少なくとも一つがある基準値を超える場合に飽和とし、制御領域もしくは飽和領域の少なくとも一方の集中度合いで算出される飽和度がある閾値以下の場合に飽和度合いが許容されると判断することにより、階調つぶれの程度が許容されるか否かを正確に判定することができる。
【0054】
また、階調補正の程度を小さく調節して階調補正カーブを新たな階調補正カーブに更新したり、階調補正の程度を大きく調節して階調補正カーブを新たな階調補正カーブに更新することにより、階調補正後の画像品質を最適化することができる。
【0055】
また、入力した画像データにおいて明るさの範囲を少なくとも2段階以上に区分した最明部に属する領域を制御領域として抽出することにより、階調補正後の画像品質を最適化することができる。
【0056】
さらに、入力した画像データにおいて高輝度で無彩色の領域や、エッジ及びエッジ付近の領域や、高彩度の領域など、補正によって階調つぶれが目立たない領域は制御領域に属さないとして、制御領域として不適切な領域であるとして除くことにより、階調補正後の画像品質を最適化することができる。
【0057】
また、飽和度合いが許容されない場合に、制御領域更新手段で制御領域を更新することにより、階調補正処理の高速化を図ることができる。
【0058】
また、上記階調補正処理を行う画像処理装置を有する画像出力制御装置と、画像出力制御装置で階調補正処理した画像データを出力する画像形成装置とで画像出力装置を構成し、入力した画像データを画像形成装置に応じて階調補正処理して出力することにより、階調つぶれのない良質な画像を安定して出力することができる。
【0059】
この画像出力装置の画像処理装置の飽和判断手段における飽和度合いの評価基準と飽和度合いの許容基準とを接続された画像形成装置に応じて設定することにより、画像形成装置に対して最も適した階調補正処理を行うことができる。
【0060】
また、入力した画像データを階調補正したときに階調つぶれが目立つ候補領域を制御領域として抽出し、抽出した制御領域の情報を用いて階調補正カーブを更新して階調補正処理を行うプログラムをコンピュータで読取可能な記録媒体に格納することにより、階調つぶれを起こすことなしに良質な画像を出力する階調補正処理プログラムを容易に提供することができる。
【図面の簡単な説明】
【図1】この発明の画像出力装置の構成を示すブロック図である。
【図2】階調補正手段の構成を示すブロック図である。
【図3】階調補正処理を示すフローチャートである。
【図4】飽和度合いの許容を判定する閾値の算出を示す説明図である。
【図5】階調補正カーブの更新を示す輝度特性図である。
【図6】制御候補領域の抽出処理を示す画像図である。
【図7】制御候補領域の抽出処理を示す輝度ヒストグラムである。
【図8】制御領域を抽出するときのエッジ抽出処理を示す輝度分布図である。
【図9】制御領域更新手段を有する階調補正手段の構成を示すブロック図である。
【図10】制御領域更新処理を示す説明図である。
【図11】画像出力システムの構成を示すブロック図である。
【図12】プリンタドライバの色変換手段の構成を示すブロック図である。
【図13】色変換処理を行うときのRGB空間を示す説明図である。
【図14】階調補正処理プログラムを記憶媒体から読み取り階調補正処理を行うコンピュータの構成を示すブロック図である。
【符号の説明】
1;画像入力装置、2;画像処理装置、3;画像形成装置、4;スキャナ、
5;デジタルカメラ、7;コンピュータ、14;ディスプレイ、
15;プリンタ、16;オペレーションシステム、17;階調補正手段、
18;画像処理アプリケーション、21;制御領域抽出手段、
22;階調補正調節手段、23;階調補正処理手段、
24;階調補正カーブ取得手段、25;データ処理手段、
26;飽和判断手段、27;更新手段、28;補正量調節手段、
29;階調補正カーブ更新手段、30;制御領域更新手段。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus, an image output apparatus, an image processing method, and a storage medium when an image input from, for example, a scanner or a digital camera is output to a printer, a display, or the like.
[0002]
[Prior art]
In recent years, with the widespread use of personal computers, the Internet, and household printers, the opportunity to handle photographic images with digital data has increased due to the increase in recording capacity of storage media such as hard disks. Accordingly, digital cameras and film scanners are generally used as input means for digital photographic image data (hereinafter referred to as image data). For example, a digital camera is provided with an automatic exposure control device for always maintaining an optimum exposure during shooting. There are various exposure control methods, but the screen is divided into a plurality of appropriate areas for light quantity detection, each area is weighted, and a weighted average is taken to adjust the aperture, shutter speed, etc. Is common.
[0003]
However, there are various exposure control methods depending on the manufacturer of the digital camera, and there is a case where the exposure control method does not operate properly depending on photographing conditions. In particular, if there is a light source directly behind the main subject and the backlight is in a large backlight, the subject will not be exposed, and if the subject is not exposed, the background will be pulled and the exposure will be corrected to minus. The subject appears dark. Also, in night strobe shooting, since it is assumed that the subject is exposed to strobe light, the aperture and shutter speed are fixed to default values. That is, if the distance between the strobe and the subject is too far, the light does not reach, and in this case, the subject appears dark.
[0004]
Here, exposure correction means adjusting a subject having brightness inappropriate for the scene to brightness suitable for the scene. For example, a subject that is dark due to underexposure, a subject that is dark due to backlighting, or a subject that is overexposed is darkened. For exposure correction in a camera, a method of changing the aperture and shutter speed in order to adjust the amount of incident light entering the lens is generally used. In addition, in a printer or a display, an input / output conversion function (gradation correction curve) or the like is used to mean processing for optimizing the brightness of the output signal with respect to the brightness of the input signal. The purpose of correcting the exposure to adjust the brightness of the image data is the same as that of the gradation correction process according to the present invention.
[0005]
In order to cope with such an inappropriate exposure state at the time of taking a digital image, many processing methods for automatically correcting the gradation of image data have been disclosed. For example, an exposure amount disclosed in Japanese Patent Laid-Open No. 7-301867 is disclosed. The determination method is to extract a main part of a document image and calculate a feature amount, determine a predetermined density range from the calculated feature amount, and extract only pixels in the predetermined density range from the entire document image to determine the image feature amount Then, by determining the exposure amount from the determined image feature amount, an image having a large density difference between the background and the subject, such as a backlight image, is appropriately corrected.
[0006]
Further, the image processing method disclosed in Japanese Patent Application Laid-Open No. 10-79885 sets a refraction instruction value in a low-luminance portion at the input, and outputs a maximum luminance value, for example, “255” as an output value for the set refraction instruction value. Select a slightly smaller value, for example, “220”, and use this point as the inflection point. Until the input brightness value reaches the inflection command value, the relationship between input and output is between the coordinates of the origin and the inflection point. Created by creating a conversion table that is represented by a straight line and the input value after the inflection point is represented by a straight line connecting the coordinates of the inflection point and the maximum input / output coordinates (255, 255). By converting and outputting the input luminance using the conversion table, the shadowed portion in the backlight is brightened and the bright portion is not crushed.
[0007]
In addition, the image processing method disclosed in Japanese Patent Application Laid-Open No. 2000-134467 inputs image data indicating a target image, creates a histogram of the target image, and determines whether the target image is a backlight image based on the created histogram. It is determined whether or not, and image processing conditions are set based on the determination result so that image processing suitable for a backlight scene can be performed.
[0008]
[Problems to be solved by the invention]
The most difficult thing in performing this gradation correction processing is to avoid overcorrection of the entire image while appropriately correcting the brightness of the subject. That is, as shown in the above Japanese Patent Application Laid-Open No. 7-301867 and the like, when the correction amount is obtained only from the subject portion, the gradation of the background is crushed in the image after the correction process, or the gradation is crushed and the hue is shifted in the high chroma color. It happens. Further, as shown in Japanese Patent Laid-Open No. 10-79885, when a gradation correction curve is created only with luminance information and color processing is performed with the gradation correction curve, the color component is not saturated even if the luminance component is not saturated. In some cases, the saturation may occur, resulting in a gradation loss or hue shift of a highly saturated color. Further, if a gradation correction curve is set so that saturation does not occur in the entire image area, correction may not be sufficiently performed.
[0009]
The present invention solves such a problem, and appropriately adjusts the brightness of the main subject of an image shot in an inappropriate exposure state with the maximum effect without causing gradation deterioration or hue shift of the background. An object of the present invention is to provide an image processing apparatus, an image output apparatus, an image processing method, and a recording medium storing an image processing program, which are corrected and do not overcorrect an image taken in an appropriate exposure state. It is.
[0010]
[Means for Solving the Problems]
  The image processing apparatus according to the present invention divides a range of brightness in input image data into at least two stages, sets a region belonging to the brightest category as a control candidate region, a high-luminance, achromatic region, an edge and an edge Control region extraction means for extracting a region obtained by removing a nearby region from the control candidate region as a control region;Saturation determining means for evaluating the degree of saturation with respect to data obtained by performing gradation correction processing on the extracted image data of the control area using a gradation correction curve, and the saturation determining means determines that the saturation degree is not allowed. Update means for updating the gradation correction curve to a new gradation correction curve.Gradation correction adjusting means.
[0011]
  The control region extracting means further extracts a region obtained by removing a region of a high-saturation color component from the control candidate region as a control region.
[0013]
  Saturation judgment means is the control areaSaturation occurs when at least one of the components of a pixel belonging to the pixel exceeds a certain reference value,It is determined whether or not saturation is conspicuous, and it is determined whether or not the degree of gradation collapse is allowed.
[0014]
  Further, the saturation determination means is saturated when at least one of the components of the pixels belonging to the control region exceeds a certain reference value, and is calculated using the value of the area of the region determined to be saturated relative to the area of the control region. When the saturation level is less than a certain threshold, it is determined that the saturation level is allowed, or when at least one of the components of the pixels belonging to the control area exceeds a certain reference value, the saturation is set. Whether the saturation level is acceptable when the degree of saturation calculated using the area value of the area determined to be saturated with respect to the area is equal to or less than a certain threshold value Is accurately determined.
[0015]
  In addition, the saturation determination means is saturated when at least one of the components of the pixels belonging to the control region exceeds a certain reference value, and is calculated based on the concentration degree of at least one of the control region or the region determined to be saturated. When the saturation level is below a certain threshold, it is determined that the saturation level is allowed, or when at least one of the components of the pixel belonging to the control area exceeds a certain reference value, the saturation is determined. The dispersion degree of the area determined to be saturated is determined from the center-of-gravity position of the pixel to which the pixel belongs (hereinafter referred to as a saturated pixel) and the average distance between each saturated pixel, and a threshold value is varied based on the dispersion degree. In the following cases, it is determined that the degree of saturation is allowed, and it is accurately determined whether or not the degree of gradation collapse is allowed.
[0016]
  In addition, the updating means updates the gradation correction curve to a new gradation correction curve by adjusting the degree of gradation correction to be small, or adjusts the gradation correction curve to a new level by adjusting the degree of gradation correction to a large degree. Update the tone correction curve to optimize the corrected image quality.
[0018]
  The gradation correction adjusting meansA control region updating unit that updates the control region before updating the gradation correction curve when the saturation determination unit determines that the saturation degree is not allowed;To increase the speed of gradation correction processing.
[0019]
  Also,AboveAn image output control apparatus having an image processing apparatus that performs gradation correction processing and an image forming apparatus that outputs image data subjected to gradation correction processing by the image output control apparatus constitute an image output apparatus, and the input image data is converted into an image. According to the forming apparatus, gradation correction processing is performed and output, and an image with no gradation collapse is output.
[0020]
The evaluation criterion for the saturation degree and the acceptance criterion for the saturation degree in the saturation determination means of the image processing apparatus of the image output apparatus are set according to the connected image forming apparatus, and the most suitable gradation correction processing of the image forming apparatus is performed. Do.
[0021]
  In the image processing method of the present invention, the brightness range is divided into at least two stages in the input image data, the area belonging to the brightest section is set as a control candidate area, a high-luminance achromatic area, an edge and the vicinity of the edge A control region extraction step for extracting a region obtained by removing the region from the control candidate region as a control region;A saturation determination step for evaluating the degree of saturation with respect to data obtained by performing gradation correction processing on the image data of the extracted control region using a gradation correction curve, and when it is determined that the saturation degree is not allowed, A gradation correction adjustment step of updating the gradation correction curve to a new gradation correction curve.
[0022]
  The storage medium of this invention isAboveA program for executing the image processing method is stored and can be read by a computer.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing the configuration of the image output apparatus of the present invention. As shown in the figure, the image output apparatus includes an image input apparatus 1, an image processing apparatus 2, and an image forming apparatus 3. The image input device 1 includes, for example, a scanner 4 and a digital camera 5 or a video camera 6, and outputs real image data representing a color image such as a photograph as a matrix pixel to the image processing device 2. The image processing apparatus 2 includes a computer 7, a hard disk 8, a keyboard 9, a CD-ROM drive 10, a floppy disk drive 11, a modem 12, and a server 13. The image forming apparatus 3 includes a display 14 and a printer 15. The computer 7 of the image processing apparatus 2 includes an operation system 16, an image processing application 18 having gradation correction means 17, a display driver 19 and a printer driver 20. The image processing application 18 is controlled by the operating system 16 and executes predetermined image processing in cooperation with the display driver 19 as necessary. When image processing is performed by the image processing application 18, the gradation correction unit 17 inputs RGB gradation data and creates RGB gradation data subjected to gradation correction processing using an optimum evaluation value. The image is displayed on the display 14 via the display driver 19 or output to the printer 15 via the printer driver 20.
[0024]
As shown in the block diagram of FIG. 2, the gradation correction unit 17 includes a control region extraction unit 21, a gradation correction adjustment unit 22, and a gradation correction processing unit 23. The control area extraction unit 21 extracts a control area where gradation collapse is noticeable when gradation correction processing is performed on the input image data. The gradation correction adjustment unit 22 includes a gradation correction curve acquisition unit 24, a data processing unit 25, a saturation determination unit 26, and an update unit 27. The gradation correction curve acquisition means 24 acquires the gradation correction curve f0 (x) from the entire input image data, or extracts a subject such as a person area from the image, determines the correction amount from the median, etc., and determines the level. A tone correction curve f0 (x) is obtained. Here, x is an input luminance value of image data. The data processing means 25 performs gradation correction processing on the image data of the control area extracted by the control area extraction means 21 using a gradation correction curve. The saturation judgment unit 26 evaluates the gradation collapse of the image data after the gradation correction process. The updating unit 27 includes a correction amount adjusting unit 28 and a gradation correction curve updating unit 29. When the saturation determining unit 26 determines that gradation collapse is not permitted, the correction amount adjusting unit 28 adjusts the gradation correction amount. And a new gradation length correction curve fi (x) is obtained by the gradation correction curve updating means 29. Here, i indicates the number of times the gradation correction curve is updated. The update of the gradation correction curve fi (x) is repeated until it is determined by the saturation determination means 26 that gradation collapse is allowed. The tone correction processing unit 23 performs tone correction processing of a color image on the image data input by the tone correction curve that is determined by the saturation determination unit 26 to be allowed to be crushed.
[0025]
Processing when the tone correction unit 17 configured as described above performs tone correction on RGB color image data input from the image input apparatus 1 will be described with reference to the flowchart of FIG.
[0026]
When the input image data is sent to the gradation correction means 17, first, the control area extraction means 21 extracts a control area where gradation collapse is conspicuous when gradation correction processing is performed on the input image data. The extracted image data of the control area is sent to the gradation correction adjusting means 22 (step S1).
[0027]
On the other hand, the gradation correction curve acquisition means 24 of the gradation correction adjustment means 22 acquires a gradation correction curve f0 (x) from the input image data (step S2). Based on the acquired gradation correction curve f0 (x), the data processing means 25 performs gradation correction processing on the image data of the control area extracted by the control area extracting means 21 (step S3). Processing when performing gradation correction processing of RGB color image data using the gradation correction curve f0 (x) will be described in detail.
[0028]
The number of pixels of the input image data is j = (1, 2,... N−1, N), the input luminance value of the image data is Yin (j), and the output after correction by the gradation correction curve f0 (x) The luminance value is defined as Y1 (j). The input luminance value Yin (j) of the jth pixel of the input image data can be expressed by the following equation (1) using color image signals (Rin (j), Gin (j), Bin (j)).
Yin (j) = 0.299Rin (j) + 0.587Gin (j) + 0.114Bin (j) (1)
For this input luminance value Yin (j), an output luminance value Y1 (j) after gradation correction processing by the gradation correction curve f0 (x) is calculated, and the gradation correction coefficient CO (j) Calculate with the formula.
CO (j) = Y1 (j) / Yin (j) = f0 (Yin (j)) / Yin (j) (2)
By using this gradation correction coefficient CO (j), the input color image signal (Rin (j), Gin (j), Bin (j)) is converted by the following equation (3) to obtain the gradation correction color signal (R1). (j), G1 (j), B1 (j)) are obtained.
(R1 (j), G1 (j), B1 (j)) = CO (j) ・ (Rin (j), Gin (j), Bin (j)) (3)
Further, when the input image signal is gray, the gray level Yin (j) is used as an input value, and the output after the gradation correction processing is obtained as the output gray level Y1 (j) = f0 (Yin (j)). .
Here, in normal image processing, for example, clipping is performed when the reproduction range of an output device such as the display 14 exceeds 0 to 255. That is, a value less than 0 is replaced with 0, and a value greater than 255 is forcibly replaced with 255. On the other hand, in the case of the present invention, clipping is not performed until the final gradation correction curve is obtained and gradation correction processing is performed.
[0029]
Using this gradation correction curve f0 (x), the saturation degree of the image data after gradation correction processing of RGB color image data is calculated by the saturation determination means 26, and gradation collapse is evaluated based on the calculated saturation degree ( Steps S4 and S5). For example, among the color components (R1 (j), G1 (j), B1 (j)) after gradation correction of the j-th pixel, 0 to 255 values that are the reproduction range of the display 14 in which at least one is the output device. Is exceeded, it is considered that the jth pixel is saturated. Then, it is determined whether or not there is gradation collapse using saturation, and it is determined whether or not gradation gradation is allowed by evaluating the degree of saturation.
The degree of saturation for evaluating the gradation loss is calculated by the following method. For example, an average transcendental value is calculated for pixels that are considered to be saturated beyond the reproduction range of the display 14. That is, the maximum level Lj (j = 1, 2,... K) of the saturated color component for each pixel is obtained for K saturated pixels, and the maximum level Lj is calculated as shown in the following equation (4). The average value Oave of the difference from the reproduction range upper limit 255 is calculated as the degree of saturation.
Oave = Σ (Lj−255) / K (4)
However, Σ is taken for J = 1, 2,.
Further, for example, K / M may be set as the saturation level for M pixels belonging to the control area, or the saturation level may be defined as K / N for N pixels belonging to the entire area of the image.
[0030]
When the calculated saturation is equal to or greater than a threshold value Th1, the saturation determination unit 26 determines that the saturation level, that is, gradation collapse is not allowed. This threshold value Th1 is Th1 = 0.03 according to the experiment when K / M is the saturation. If the input image signal is gray and the gray level Y1 (j) after gradation correction exceeds the reproduction range of the display 14, the jth pixel may be regarded as saturated.
[0031]
Whether or not the saturation level is allowed depends on the input image. For example, the control region or the saturation region 40 is dispersed as shown in FIG. 4A and the control as shown in FIG. 4B. When the region or the saturated region 40 is concentrated, the degree of conspicuousness is different even if the same saturation occurs in terms of components. For this reason, the tolerance of the degree of saturation varies depending on the degree of dispersion of the control region or the saturation region 40. Therefore, it is preferable to vary the threshold value as to whether or not to allow the saturation degree according to the dispersion degree of the saturated pixels. That is, number the pixels belonging to the saturated region, calculate the centroid position, calculate the average distance between the centroid position and each saturated pixel, and use that value to determine the degree of dispersion in the saturated region. The threshold value is varied according to the degree. Specifically, as shown in FIG. 4C, the width and height of the image data are normalized to the size “1”, and then the centroid position with respect to the K saturated pixels 40 that are numbered. C (Xc, Yc) is calculated by the following equation (5).
Xc = (Σxj) / K
Yc = (Σyj) / K (5)
The average distance Rave from the calculated gravity center position C (Xc, Yc) to the saturated pixel 40 is calculated by the following equation (6).
Rave = Σ {(xc−Xc)2+ (Yj-Yc)2}( 1/2 )} / K (6)
However, in formulas (5) and (6), Σ is taken for j = 1, 2,.
If the average distance Rave (<1) is large, it indicates that the saturated pixels 40 are dispersed, and the degree of saturation is not conspicuous. Therefore, the threshold value Th1 for determining the allowable range according to the calculated average distance Rave is changed to the threshold value Th1 (Rave) by the following equation (7).
Th1 (Rave) = Rave * α + β (7)
Here, α and β are positive natural numbers.
The method for calculating the degree of dispersion is not limited to the above method, and other sample dispersion may be used. In addition, in image data captured by the digital camera 5 or the like, there is a high possibility that the center area of the image is a subject, and the importance of the center area is great. Therefore, the threshold value may be weighted according to the gravity center position of the saturated pixel. For example, the closer the center of gravity position is to the center of the image, the more important the region is, and saturation is expected to stand out. Therefore, the threshold value may be set low.
[0032]
As a result of the evaluation of the degree of saturation by the saturation determining means 26, if it is determined that gradation collapse is not allowed, the gradation correction amount is adjusted by the correction amount adjusting means 28 of the updating means 27 (step S6). As a result, a new gradation length correction curve f1 (x) is obtained by the gradation correction curve updating means 29 (step S7). For example, the gradation correction curve f0 (x) has a luminance value of an input signal as shown in FIG.
f0 (x) = 255 * F0 (x)
F0 (x) = xγ  However, γ = 0.4 (8)
In order to adjust and update the gradation correction curve f0 (x) to obtain the gradation correction curve f1 (x), the value of γ is stepped by 0.1 from 0.4 to 0.5,
f1 (x) = 255 * F1 (x)
F1 (x) = xγ  However, γ = 0.5 (9)
A new gradation correction curve f1 (x) shown in FIG. There are various methods for changing the gradation correction curve, such as changing the slope when fi (x) is represented by a straight line.
[0033]
Based on the new tone length correction curve f1 (x), the data processing unit 25 performs tone correction processing on the image data of the control region extracted by the control region extracting unit 21 (step S3), and the image data after the tone correction processing. Is evaluated by the saturation judging means 26 (step S4). The update of the gradation correction curve, the gradation correction processing of the image data in the control area, and the evaluation of the gradation collapse are repeated until it is determined that the gradation collapse is allowed, and it is determined that the gradation collapse is allowed. And the gradation correction curve fi (x) at that time is output to the gradation correction processing means 23, and the gradation correction processing means 23 applies color to all of the image data by the input gradation correction curve fi (x). Image gradation correction processing is performed (step S8).
[0034]
Next, a process when the control area extraction unit 21 extracts a control area where gradation collapse is conspicuous when gradation correction processing is performed on input image data will be described.
The control area extraction unit 21 divides the brightness of the input image data, for example, the luminance level into two or more levels, for example, four levels, and defines an area that is likely to be saturated by gradation correction as a control area candidate, that is, a control candidate area. For example, as shown in FIG. 6A, a luminance histogram is created for the luminance image 41 of the backlight scene as shown in FIG. 7A with the horizontal axis indicating the luminance level and the vertical axis indicating the frequency. To do. According to the brightness value of the created brightness histogram, for example, it is divided into four stages, and a new leveling is performed as follows, and a new frequency distribution H (i), i = (0, 1, 2, 3) is set. create.
When the original luminance level is 0 or more and less than 63, it is set to level 0 with frequency H (0).
When the original luminance level is 64 or more and less than 127, it is set to level 1 with frequency H (1).
When the original luminance level is 128 or more and less than 191, it is set to level 2 with frequency H (2).
When the original luminance level is 192 or more and less than 255, it is set to level 3 with frequency H (3).
FIG. 7B shows a luminance histogram after the division into four stages, and FIG. 6B shows a luminance image 41 after the division. As shown in FIG. 6B, the divided luminance image 42 is posterized so that the contrast of the image is clear. For example, if a region belonging to level 3 which is the brightest part after division is set as a control candidate region, a white-out portion of the image 43 shown in FIG. 6C is extracted as a control candidate region. Here, luminance is used as information on brightness, but brightness or a G signal may be used. The segmentation may be performed after adjusting the contrast of the frequency distribution.
[0035]
From this control candidate area, it is preferable to use a control area excluding an area where gradation collapse is not expected to be noticeable even when gradation correction is performed. For example, in a digital camera, in the case of a backlight image taken with a light source as a background, a high-luminance and achromatic region exists as the background. Since such a region originally has few gradations, it is not noticeable even if saturation occurs as a result of the gradation correction process.
Here, the high luminance and achromatic pixel is expressed by the following equation. If the color component of the pixel of interest is (Rin (j), Gin (j), Bin (j)) and the threshold values are Th2 and Th3,
Rin (j) <Th2andGin (j) <Th2andBin (j) <Th2
and | Rin (j) -Gin (j) | <Th3
and | Gin (j) -Bin (j) | <Th3
and | Bin (j) -Rin (j) | <Th3 (10)
As a result of the experiment, the threshold values Th2 = 220 and the threshold value Th3 = 20 are appropriate values, but the threshold values Th2 and Th3 are not limited to these values. In addition, when the input image signal is gray, it is only necessary to remove a region that is high in luminance and originally has little gradation, and is predicted to be inconspicuous as a result of gradation correction processing.
[0036]
In addition, since data captured by a digital camera is subjected to edge enhancement processing in an image output system in the camera, pixels near the edge are emphasized, and white spots may occur. Since these are not erroneously determined to be saturated areas, it is necessary to delete them in advance. Whether or not this is an edge region is determined by the following method, for example.
[0037]
As shown in FIG. 8, let X be the pixel luminance value of the pixel of interest. With respect to the pixel luminance value X of the target pixel, the pixel luminance values of the four neighboring pixels in the horizontal direction are a, b, c, and d, respectively, and the four neighboring pixels in the vertical direction are s, t, u, and v, respectively. In order to extract the edge, for example, the sum of the differences between the high range and the mid range is taken in the horizontal and vertical directions.
Horizontal high-frequency difference sum Lhh (X) = | X−c | + | X−b |
Horizontal mid-range difference sum Lhm (X) = | X−a | + | X−d |
Vertical high-frequency difference sum Lvh (X) = | X−t | + | X−u |
Vertical direction mid-region difference sum Lvm (X) = | X−s | + | X−v | (11)
In Expression 11, a sum of differences between two pixels around the top and bottom or left and right is obtained from the value of the target pixel. That is, when the value of the target pixel is different from that of the surrounding pixel, the calculated value increases. Conversely, when the value of the peripheral pixel and the target pixel is equal, the calculated value decreases. Therefore, the degree of the isolated point of the target pixel, that is, the possibility of being an edge portion is examined by calculating the difference sum. An evaluation value is calculated from the difference sum. The evaluation value in the horizontal direction is Eh (X), the evaluation value in the vertical direction is Ev (X), and the larger value of Eh (X) and Ev (X) is the evaluation value E (X) of the target pixel.
Eh (X) = (Lhh (X) + Lhm (X)) / 2
Ev (X) = (Lvh (X) + Lvm (X)) / 2
E (X) = max (Eh (X), Ev (X)) (12)
Further, considering the human visual characteristic that the higher the brightness is, the easier it is to feel noise or the like, the threshold value Th4 (X) for determining whether or not it is an edge is changed according to the brightness value X of the target pixel. As a result of the experiment, the determination threshold Th4 (X) was set as follows, and a satisfactory result could be obtained.
Th4 (X) = 100 (0 ≦ X <50)
Th4 (X) =-(3/5) X + 130 (50 ≦ X <200)
Th4 (X) = 10 (200 ≦ X <255) (13)
When the evaluation value E (X)> Th4 (X), it is determined that the target pixel is an edge or an edge-enhanced portion, and is deleted from the control region. Here, the threshold Th4 (X) does not stick to the equation (13). Various other methods for determining whether or not an edge or an edge-enhanced portion can be used, but they may be used. Further, when the input image signal is gray, the gray level value is regarded as X, and it may be determined whether or not it is an edge region.
[0038]
Further, data captured by a digital camera is originally subject to high saturation, and saturation enhancement processing is performed in an image output system in the camera. Since such a region originally has few gradations, saturation is not conspicuous as a result of the gradation correction process. For example, considering the visual characteristic that the signal level of G is close to the brightness perceived by humans, the difference between the G signal and other color components is compared with a threshold Th5 to evaluate whether or not the pixel is a high color pixel.
Assuming that the color component of the pixel of interest is (R1 (j), G1 (j), B1 (j)), it is determined as a high-color pixel when the condition shown in the following equation (14) is satisfied, and is removed from the control region. .
| Rin (j) -Gin (j) |> Th5
and | Gin (j) -Bin (j) |> Th5 (14)
Here, the threshold value Th5 is an appropriate value of Th5 = 100 as a result of the experiment, but is not particularly limited to this value. There are various other methods for determining whether or not the color is a high saturation color, but these may be used.
[0039]
When the gradation correction adjusting means 22 determines that the gradation correction is not permitted by the image data of the control area extracted by the control area extracting means 21 in this way, the gradation correction curve fi (x) is updated. If the control area is newly updated, the processing speed can be increased. The case where the gradation correction curve fi (x) is updated by the gradation correction adjusting means 22 and the control area is newly updated will be described.
[0040]
As shown in the block diagram of FIG. 9, the gradation correction adjusting means 22 is extracted by the control area extracting means 21 when it is determined that gradation collapse is not allowed as a result of the saturation degree evaluation by the saturation determining means 26. The control area updating means 30 is provided for renewing the control area and updating the control area. Then, for example, a first control region 51 shown in FIG. 10A is extracted from the input image data by the control region extraction means 21, and a gradation correction curve is obtained for the image data in the first control region 51. The saturation determination unit 26 evaluates the degree of saturation for the first time for the data subjected to the gradation correction process using the gradation correction curve f0 (x) acquired by the acquisition unit 24, and determines that gradation collapse is not allowed. If so, the control area update means 30 obtains the second control area 52 from the first control area 51 and the evaluation of the saturation degree, as shown in FIG. At this time, the second control area 52 belongs to the first control area 51 and excludes pixels that are not saturated when the gradation correction process is performed using the gradation correction curve f0 (x). This is because the gradation correction process using the gradation correction curve f1 (x) newly obtained by the updating means 27 is adjusted so that saturation is less likely to occur than when the gradation correction curve f0 (x) is used. Therefore, the region that is not saturated using the gradation correction curve f0 (x) does not need to be subjected to saturation determination from the next time.
[0041]
Thereafter, the correction amount is adjusted by the correction amount adjusting means 28, and a new gradation correction curve f1 (x) is obtained by the gradation correction curve updating means 29. Using this gradation correction curve f1 (x), gradation correction processing is performed on the image data in the second control region 52, and it is determined whether or not gradation collapse is allowed by the saturation determination means 26, and When the gradation is allowed, the gradation correction curve fi (x) is not updated, the gradation correction curve f1 (x) is output, and the gradation correction processing unit 23 performs gradation correction on all image data. Process.
[0042]
Next, an image output system having an image output control device (printer driver) having the gradation correcting means 17 will be described. As shown in the block diagram of FIG. 11, the image output system includes a plurality of personal computers (PCs) 31a and 31b and printers 15a and 15b connected to the personal computers 31a and 31b via printer drivers 32a and 32b. Have. The printer drivers 32a and 32b have color conversion means 33, drawing means 34 for performing halftone processing, and the like, and image storage means 35 for temporarily storing a print image for one page drawn by the drawing means 34. . As shown in the block diagram of FIG. 12, the color conversion unit 33 includes a gradation correction unit 17, an interpolation calculation unit 36, and a color conversion table storage unit 37.
[0043]
In this image output system, for example, when an operator selects the printer 15a and inputs an output command on the personal computer 31a, the personal computer 31a captures an image and captures image data and monochrome and color created with various DTP software. Both image data such as photos are sent to the printer driver 32a. The printer driver 32a performs tone correction processing on the sent image data, and then performs color conversion processing to a plurality of output color components C (cyan), M (magenta), Y (yellow), and K (black) to perform printing. Data is sent to the printer 15a. The printer 15a prints an image using the sent print data.
[0044]
A gradation correction process in the color conversion unit 33 of the printer drivers 32a and 32b and a process of converting RGB image data into CMYB print data when printing and outputting the image data will be described. When the RGB image data is sent from the personal computer 31a to the printer driver 32a, the first control area 51 is extracted by the control area extraction means 21 of the printer driver 32a, and the data for the image data in the first control area 51 is extracted. The processing means 25 performs gradation correction processing using the gradation correction curve f0 (x) acquired by the gradation correction curve acquisition means 24. The saturation determination means 26 evaluates the degree of saturation for the first time for the data subjected to the gradation correction processing. Here, since the reproduction ranges of the printers 15a and 15b are different, the saturation reference is also different for each printer 15a and 15b. Therefore, the gradation correction means 17 has a saturation reference table 38 that stores saturation reference information related to the connected printer 15a. Further, the standard for the degree of saturation varies depending on the ink characteristics of the printers 15a and 15b and the halftone process performed thereafter. In order to cope with this, the gradation correction unit 17 also has a saturation degree tolerance table 39 that stores saturation degree tolerance reference information regarding the connected printer 15a. The saturation determination means 26 reads information stored in the saturation reference table 38 and the saturation degree allowable reference table 39 and determines whether or not the degree of gradation collapse is allowed. When it is determined that gradation collapse is not allowed, the control area update unit 30 obtains the second control area 52 from the first control area 51 and the evaluation of the saturation degree. Thereafter, the correction amount is adjusted by the correction amount adjusting means 28, and a new gradation correction curve f1 (x) is obtained by the gradation correction curve updating means 29. Using this gradation correction curve f1 (x), gradation correction processing is performed on the image data in the second control region 52, and it is determined whether or not gradation collapse is allowed by the saturation determination means 26, and When the gradation is allowed, the gradation correction curve fi (x) is not updated, the gradation correction curve f1 (x) is output, and the gradation correction processing unit 23 performs gradation correction on all image data. Processing is performed and output to the interpolation calculation unit 36.
[0045]
The interpolation calculation unit 36 performs color conversion of the received RGB image data into CMY by memory map interpolation with reference to a color conversion table selected from the color conversion tables stored in the color conversion table storage unit 37. As shown in FIG. 13, in this memory map interpolation, when the RGB space is set as an input color space, the RGB space is divided into three-dimensional figures of the same type, and an output value P at input coordinates (RGB) is obtained. A cube including the input coordinates (RGB) is selected, and linear interpolation is performed based on the output values on the preset vertices of the selected cube and the positions in the solid figure, that is, the distance from each vertex. . Here, the output value P corresponds to the C, M, and Y values, respectively, and the actual input / output (L * a * b * −CMY) is input to the coordinates (RGB) on the input space used for the interpolation calculation. The relationship is measured, and C, M, and Y values for RGB (L * a * b *) calculated by the least square method or the like using this data are preset. Further, the CMY signal is converted into a CMYK signal, for example, by the calculation of the following equation (15).
K = α · min (C, M, Y)
C1 = C−β · K
M1 = M−β · K
Y1 = Y−β · K (15)
The color conversion method is not limited to this method. For example, the personal computer 31a may record and transmit the characteristics of the printer 15a in the header information of the image data, or the printer driver 32 may be mounted inside the personal computer 31a. In this case, for example, a device profile standardized by ICC (Inter Color Consortium) may be read and used.
[0046]
The print data subjected to memory map interpolation and converted to CMYK by the interpolation calculation unit 36 is sent to the drawing unit 34, subjected to halftone processing, etc., and the print image is temporarily stored in the image storage unit 35 one page at a time. This print image is printed by the printer 15a.
[0047]
In the above description, the case where the gradation correction processing of the image data input by the gradation correction means 17 has been described, but the gradation correction processing program executed by the gradation correction means 17 is, for example, a floppy disk, a hard disk, an optical disk, A program stored in a storage medium such as a magneto-optical disk or a memory card, and stored in a recording medium 62, as shown in the block diagram of FIG. Is read by the program reading device 63 and a personal computer 60 having a display, a mouse, a keyboard, etc., and the gradation correction processing program stored in the storage medium 62 is read, and the image input from the digital camera 5 or the like by the read gradation correction processing program Data gradation correction processing may be performed.
[0048]
In this case, the program code stored in the storage medium 62 is read by the program reading device 63 and stored in a hard disk or the like, and the stored program code is executed by the CPU, thereby realizing gradation correction processing and the like. can do. Further, by executing the program code read by the personal computer 60, an OS (operating system) or a device / driver running on the personal computer 60 is part of the actual processing based on the program code instruction. Alternatively, the case where all the functions are performed and the above functions are achieved by the processing is also included.
[0049]
【The invention's effect】
As described above, according to the present invention, the control area extracting means for extracting a candidate area where gradation collapse is conspicuous when the input image data is subjected to gradation correction, and the gradation correction curve using the control area information. Gradation correction adjustment means that updates the image, and by adjusting the gradation correction using information on the area where gradation collapse is noticeable by correction, gradation correction can be performed without causing gradation collapse High quality images can be output stably.
[0050]
In addition, when the gradation correction processing is performed on the image data of the control area using the gradation correction curve, the degree of saturation is evaluated, and if it is determined that the degree of saturation is not allowed, the gradation correction curve is changed to a new gradation correction. By updating to a curve, it is possible to grasp the degree of gradation crushing by calculating gradation crushing caused by correction using the saturation degree.
[0051]
In addition, when at least one of the components of pixels belonging to the control region exceeds a certain reference value, saturation is performed, and by determining whether saturation is conspicuous, the degree of gradation collapse can be determined. It can be determined stably whether or not it is allowed.
[0052]
Further, the saturation is calculated when at least one of the components of the pixels belonging to the control region exceeds a certain reference value, and the saturation calculated using the value of the area of the saturation region with respect to the area of the control region is below a certain threshold value. In this case, it is determined that the degree of saturation is allowed, or when at least one of the components of the pixels belonging to the control region exceeds a certain reference value, saturation is determined, and the value of the area of the saturation region relative to the area of the entire image region By determining that the degree of saturation is allowed when the degree of saturation calculated using is less than or equal to a certain threshold value, it is possible to accurately determine whether or not the degree of gradation collapse is allowed.
[0053]
In addition, when at least one of the components of the pixels belonging to the control region exceeds a certain reference value, it is saturated, and when the saturation calculated by the degree of concentration of at least one of the control region or the saturation region is below a certain threshold value By determining that the degree of saturation is allowed, it is possible to accurately determine whether or not the degree of gradation collapse is allowed.
[0054]
Also, the gradation correction curve can be updated to a new gradation correction curve by adjusting the degree of gradation correction to a small level, or the gradation correction curve can be changed to a new gradation correction curve by adjusting the degree of gradation correction to a large level. By updating, the image quality after gradation correction can be optimized.
[0055]
Further, by extracting, as a control area, an area belonging to the brightest part obtained by dividing the brightness range into at least two stages in the input image data, the image quality after gradation correction can be optimized.
[0056]
Furthermore, in the input image data, areas where gradation is not conspicuous by correction, such as areas with high luminance and achromatic colors, areas near edges and areas with high saturation, do not belong to the control area and are not considered as control areas. By removing it as an appropriate area, the image quality after gradation correction can be optimized.
[0057]
In addition, when the saturation degree is not allowed, the gradation correction processing can be speeded up by updating the control region by the control region updating unit.
[0058]
An image output apparatus comprising the image processing apparatus that performs the gradation correction process and an image forming apparatus that outputs image data subjected to the gradation correction process by the image output control apparatus constitute an image input apparatus. By outputting the data after performing gradation correction processing according to the image forming apparatus, it is possible to stably output a high-quality image with no gradation collapse.
[0059]
By setting the evaluation criterion for the saturation degree and the acceptance criterion for the saturation degree in the saturation determination unit of the image processing apparatus of the image output apparatus according to the connected image forming apparatus, the level most suitable for the image forming apparatus is set. Tone correction processing can be performed.
[0060]
In addition, a candidate area where gradation collapse is conspicuous when the input image data is subjected to gradation correction is extracted as a control area, and the gradation correction curve is updated using information on the extracted control area to perform gradation correction processing. By storing the program in a computer-readable recording medium, it is possible to easily provide a gradation correction processing program that outputs a high-quality image without causing gradation collapse.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an image output apparatus according to the present invention.
FIG. 2 is a block diagram showing a configuration of gradation correction means.
FIG. 3 is a flowchart showing tone correction processing;
FIG. 4 is an explanatory diagram illustrating calculation of a threshold value for determining whether the saturation degree is acceptable.
FIG. 5 is a luminance characteristic diagram showing the update of the gradation correction curve.
FIG. 6 is an image diagram showing extraction processing of a control candidate area.
FIG. 7 is a luminance histogram showing control candidate region extraction processing;
FIG. 8 is a luminance distribution diagram showing edge extraction processing when a control region is extracted.
FIG. 9 is a block diagram illustrating a configuration of a gradation correction unit having a control area update unit.
FIG. 10 is an explanatory diagram showing a control area update process.
FIG. 11 is a block diagram illustrating a configuration of an image output system.
FIG. 12 is a block diagram illustrating a configuration of color conversion means of a printer driver.
FIG. 13 is an explanatory diagram showing an RGB space when color conversion processing is performed.
FIG. 14 is a block diagram illustrating a configuration of a computer that reads a gradation correction processing program from a storage medium and performs gradation correction processing.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1; Image input apparatus, 2; Image processing apparatus, 3; Image forming apparatus, 4; Scanner,
5; Digital camera, 7; Computer, 14; Display,
15; printer, 16; operation system, 17; gradation correction means,
18; Image processing application, 21; Control region extraction means,
22; gradation correction adjusting means; 23; gradation correction processing means;
24; gradation correction curve acquisition means; 25; data processing means;
26; saturation determination means; 27; update means; 28; correction amount adjustment means;
29; gradation correction curve updating means; 30; control area updating means.

Claims (15)

入力した画像データにおいて明るさの範囲を少なくとも2段階以上に区分し、最も明るい区分に属する領域を制御候補領域とし、高輝度で無彩色の領域とエッジ及びエッジ付近の領域を前記制御候補領域から除いた領域を制御領域として抽出する制御領域抽出手段と、
前記抽出した制御領域の画像データに対して階調補正カーブにより階調補正処理を行ったデータに対して飽和度合いを評価する飽和判断手段と、該飽和判断手段で飽和度合いが許容されないと判定された場合に、前記階調補正カーブを新たな階調補正カーブに更新する更新手段とを備えた階調補正調節手段とを有することを特徴とする画像処理装置。
In the input image data, the brightness range is divided into at least two stages, the area belonging to the brightest section is set as the control candidate area, and the high brightness, achromatic area and the edge and the area near the edge are determined from the control candidate area. Control region extraction means for extracting the excluded region as a control region;
Saturation determining means for evaluating the degree of saturation with respect to data obtained by performing gradation correction processing on the extracted image data of the control area using a gradation correction curve, and the saturation determining means determines that the saturation degree is not allowed. An image processing apparatus comprising: a gradation correction adjusting means provided with an updating means for updating the gradation correction curve to a new gradation correction curve .
前記制御領域抽出手段は、さらに高彩度の色成分の領域を前記制御候補領域から除いた領域を制御領域として抽出することを特徴とする請求項1記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the control area extracting unit further extracts, as a control area, an area obtained by removing a color component area having a high saturation from the control candidate area. 前記飽和判断手段は、前記制御領域に属する画素の持つ成分のうち、少なくとも一つがある基準値を超える場合に飽和とし、飽和の目立ちやすさが許容されるか否かを判断する請求項1又は2記載の画像処理装置。The saturation determination means determines whether saturation is acceptable when at least one of the components of the pixels belonging to the control region exceeds a certain reference value, and whether or not the saturation is conspicuous is allowed. 2. The image processing apparatus according to 2. 前記飽和判断手段は、前記制御領域に属する画素の持つ成分のうち、少なくとも一つがある基準値を超える場合に飽和とし、前記制御領域の面積に対する飽和と判定された領域の面積の値を用いて算出される飽和度がある閾値以下の場合に飽和度合いが許容されると判断する請求項1又は2記載の画像処理装置。The saturation determination means is saturated when at least one of the components of the pixels belonging to the control region exceeds a certain reference value, and uses the value of the area of the region determined to be saturated with respect to the area of the control region. The image processing apparatus according to claim 1, wherein when the calculated degree of saturation is equal to or less than a threshold value, it is determined that the degree of saturation is allowed. 前記飽和判断手段は、前記制御領域に属する画素の持つ成分のうち、少なくとも一つがある基準値を超える場合に飽和とし、画像全領域の面積に対する飽和と判定された領域の面積の値を用いて算出される飽和度がある閾値以下の場合に飽和度合いが許容されると判断する請求項1又は2記載の画像処理装置。The saturation determination means is saturated when at least one of the components of the pixels belonging to the control region exceeds a certain reference value, and uses the value of the area of the region determined to be saturated with respect to the area of the entire image region. The image processing apparatus according to claim 1, wherein when the calculated degree of saturation is equal to or less than a threshold value, it is determined that the degree of saturation is allowed. 前記飽和判断手段は、前記制御領域に属する画素の持つ成分のうち、少なくとも一つがある基準値を超える場合に飽和とし、前記制御領域もしくは飽和と判定された領域の少なくとも一方の集中度合いで算出される飽和度がある閾値以下の場合に飽和度合いが許容されると判断する請求項1又は2記載の画像処理装置。The saturation determination means is saturated when at least one of the components of the pixels belonging to the control region exceeds a certain reference value, and is calculated based on the concentration degree of at least one of the control region or the region determined to be saturated. The image processing apparatus according to claim 1, wherein the image processing apparatus determines that the degree of saturation is allowed when the degree of saturation is equal to or less than a threshold value. 前記飽和判断手段は、前記制御領域に属する画素の持つ成分のうち少なくとも一つがある基準値を超える場合に飽和とし、飽和と判定された領域に属する画素(以下、飽和画素という)の重心位置と各飽和画素との平均距離から飽和と判定された領域の分散度合いを判定し、該分散度合いに基づいてある閾値を可変し、飽和度が前記閾値以下の場合に飽和度合いが許容されると判断する請求項1又は2記載の画像処理装置。The saturation determination means is saturated when at least one of the components of the pixels belonging to the control region exceeds a certain reference value, and the barycentric position of pixels belonging to the region determined to be saturated (hereinafter referred to as a saturated pixel) The degree of dispersion of the area determined to be saturated is determined from the average distance from each saturated pixel, a certain threshold is varied based on the degree of dispersion, and it is determined that the degree of saturation is allowed when the saturation is equal to or less than the threshold. The image processing apparatus according to claim 1 or 2. 前記更新手段は階調補正の程度を小さく調節して前記階調補正カーブを新たな階調補正カーブに更新する請求項1乃至7のいずれかに記載の画像処理装置。The image processing apparatus according to claim 1, wherein the update unit adjusts a degree of gradation correction to be small and updates the gradation correction curve to a new gradation correction curve. 前記更新手段は階調補正の程度を大きく調節して前記階調補正カーブを新たな階調補正カーブに更新する請求項1乃至7のいずれかに記載の画像処理装置。The image processing apparatus according to claim 1, wherein the update unit largely adjusts a degree of gradation correction to update the gradation correction curve to a new gradation correction curve. 前記階調補正調節手段は、前記飽和判断手段で飽和度合いが許容されないと判定された場合に、前記階調補正カーブを更新する前に前記制御領域を更新する制御領域更新手段を有する請求項1乃至9のいずれかに記載の画像処理装置。2. The gradation correction adjusting means includes control area updating means for updating the control area before updating the gradation correction curve when the saturation determination means determines that a saturation degree is not allowed. The image processing apparatus according to any one of Items 9 to 9. 請求項1乃至10のいずれかに記載の画像処理装置を有する画像出力制御装置と、画像出力制御装置で階調補正処理した画像データを出力する画像形成装置とを有することを特徴とする画像出力装置。11. An image output comprising: an image output control apparatus having the image processing apparatus according to claim 1; and an image forming apparatus that outputs image data subjected to gradation correction processing by the image output control apparatus. apparatus. 前記画像処理装置の飽和判断手段における飽和度合いの評価基準は、接続された画像形成装置に応じて設定されている請求項11記載の画像出力装置。The image output apparatus according to claim 11, wherein the evaluation standard of the saturation degree in the saturation determination unit of the image processing apparatus is set according to the connected image forming apparatus. 前記画像処理装置の飽和判断手段における飽和度合いの許容基準は接続された画像形成装置に応じて設定されている請求項12記載の画像出力装置 The image output apparatus according to claim 12, wherein an allowable criterion for the degree of saturation in the saturation determination unit of the image processing apparatus is set according to the connected image forming apparatus . 入力した画像データにおいて明るさの範囲を少なくとも2段階以上に区分し、最も明るい区分に属する領域を制御候補領域とし、高輝度で無彩色の領域とエッジ及びエッジ付近の領域を前記制御候補領域から除いた領域を制御領域として抽出する制御領域抽出ステップと、In the input image data, the brightness range is divided into at least two stages, the area belonging to the brightest section is set as the control candidate area, and the high brightness, achromatic area and the edge and the area near the edge are determined from the control candidate area. A control region extraction step for extracting the excluded region as a control region;
前記抽出した制御領域の画像データに対して階調補正カーブにより階調補正処理を行ったデータに対して飽和度合いを評価する飽和判断ステップと、前記飽和度合いが許容されないと判定された場合に、前記階調補正カーブを新たな階調補正カーブに更新する階調補正調節ステップとを有することを特徴とする画像処理方法。A saturation determination step for evaluating the degree of saturation with respect to data obtained by performing gradation correction processing on the image data of the extracted control region using a gradation correction curve, and when it is determined that the saturation degree is not allowed, And a gradation correction adjusting step of updating the gradation correction curve to a new gradation correction curve.
請求項14記載の画像処理方法を実行するプログラムを格納し、コンピュータで読取可能なことを特徴とする記憶媒体。A storage medium storing a program for executing the image processing method according to claim 14 and readable by a computer.
JP2001176455A 2001-06-11 2001-06-12 Image processing apparatus, image output apparatus, image processing method, and storage medium Expired - Fee Related JP4219577B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2001176455A JP4219577B2 (en) 2001-06-12 2001-06-12 Image processing apparatus, image output apparatus, image processing method, and storage medium
US10/163,305 US7251056B2 (en) 2001-06-11 2002-06-07 Image processing apparatus, image processing method and information recording medium
US11/812,631 US7525688B2 (en) 2001-06-11 2007-06-20 Image processing apparatus, image processing method and information recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001176455A JP4219577B2 (en) 2001-06-12 2001-06-12 Image processing apparatus, image output apparatus, image processing method, and storage medium

Publications (3)

Publication Number Publication Date
JP2002369004A JP2002369004A (en) 2002-12-20
JP2002369004A5 JP2002369004A5 (en) 2006-06-08
JP4219577B2 true JP4219577B2 (en) 2009-02-04

Family

ID=19017437

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001176455A Expired - Fee Related JP4219577B2 (en) 2001-06-11 2001-06-12 Image processing apparatus, image output apparatus, image processing method, and storage medium

Country Status (1)

Country Link
JP (1) JP4219577B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007088650A (en) * 2005-09-21 2007-04-05 Noritsu Koki Co Ltd Image processing device and image processing method
JP2007201655A (en) * 2006-01-25 2007-08-09 Noritsu Koki Co Ltd Image processing apparatus
JP4393491B2 (en) 2006-09-12 2010-01-06 キヤノン株式会社 Image processing apparatus and control method thereof
US8964070B2 (en) 2007-06-21 2015-02-24 Nikon Corporation Image processing method, image processing program, image processing device, image processing system, electronic camera and electronic apparatus
JP5488530B2 (en) * 2011-05-23 2014-05-14 富士ゼロックス株式会社 Image processing apparatus and image processing program
JP6241192B2 (en) 2013-10-18 2017-12-06 株式会社リコー Image processing apparatus, image processing system, image processing method, program, and recording medium
JP7218812B2 (en) * 2019-08-28 2023-02-07 日本電気株式会社 Image processing device, image processing method, and program

Also Published As

Publication number Publication date
JP2002369004A (en) 2002-12-20

Similar Documents

Publication Publication Date Title
US7251056B2 (en) Image processing apparatus, image processing method and information recording medium
US7945109B2 (en) Image processing based on object information
US6608926B1 (en) Image processing method, image processing apparatus and recording medium
JP3992177B2 (en) Image processing apparatus, image processing method, and computer program
KR101309498B1 (en) Histogram adjustment for high dynamic range image mapping
JP3792739B2 (en) Image contrast improvement method
KR101309497B1 (en) Histogram adjustment for high dynamic range image mapping
JP4725057B2 (en) Generation of image quality adjustment information and image quality adjustment using image quality adjustment information
US8041112B2 (en) Image processing apparatus, image forming apparatus, image reading apparatus, image processing method, image processing program, computer-readable storage medium for storing the image processing program with segmentation and density correction optimization
JPH11331596A (en) Image processing method and its device
JP6613697B2 (en) Image processing apparatus, program, and recording medium
US20080062484A1 (en) Image processing device and image processing method
JP4154128B2 (en) Image processing apparatus, image processing method, and recording medium on which program for executing the method is recorded
US20030231856A1 (en) Image processor, host unit for image processing, image processing method, and computer products
JP4367821B2 (en) Image processing apparatus, image processing method, and recording medium
JP4219577B2 (en) Image processing apparatus, image output apparatus, image processing method, and storage medium
JP4107812B2 (en) Image processing apparatus, image processing method, and recording medium
JP4581999B2 (en) Image processing apparatus and image processing method
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
JP2009070099A (en) Image-processing device, image-processing method, program and recording medium
JP2001189863A (en) Image processing method and image processing device
JP3921737B2 (en) Image processing apparatus, image processing method, and medium on which image processing control program is recorded
US7701618B2 (en) Automatic image enhancement using computed predictors
JP2000032287A (en) Image processor and image processing method
JP2004112494A (en) Image processor, image processing method and recording medium

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060417

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060417

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071120

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080603

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080730

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081112

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

Free format text: PAYMENT UNTIL: 20111121

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111121

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121121

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20131121

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees