JP3918257B2 - Image processing apparatus, image processing method, and medium storing image processing program - Google Patents

Image processing apparatus, image processing method, and medium storing image processing program Download PDF

Info

Publication number
JP3918257B2
JP3918257B2 JP31212697A JP31212697A JP3918257B2 JP 3918257 B2 JP3918257 B2 JP 3918257B2 JP 31212697 A JP31212697 A JP 31212697A JP 31212697 A JP31212697 A JP 31212697A JP 3918257 B2 JP3918257 B2 JP 3918257B2
Authority
JP
Japan
Prior art keywords
image processing
image
correspondence
pixel
image data
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
JP31212697A
Other languages
Japanese (ja)
Other versions
JPH11146219A (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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP31212697A priority Critical patent/JP3918257B2/en
Priority to DE69827703T priority patent/DE69827703T2/en
Priority to EP05077482A priority patent/EP1619876A3/en
Priority to EP05077481A priority patent/EP1619875A1/en
Priority to EP98304660A priority patent/EP0886437B1/en
Priority to EP04077594A priority patent/EP1489833A1/en
Priority to US09/097,828 priority patent/US6535301B1/en
Publication of JPH11146219A publication Critical patent/JPH11146219A/en
Priority to US10/270,485 priority patent/US7072074B2/en
Priority to US11/431,753 priority patent/US7286265B2/en
Priority to US11/431,752 priority patent/US7292371B2/en
Application granted granted Critical
Publication of JP3918257B2 publication Critical patent/JP3918257B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像処理装置、画像処理方法および画像処理プログラムを記録した媒体に関し、特に、デジタル写真画像のようなドットマトリクス状の画素からなる実写の画像データを入力して各画素の画像データを所定の対応関係で変換する画像処理装置および画像処理プログラムを記録した媒体に関する。
【0002】
【従来の技術】
デジタル写真画像のような実写の画像データに対して各種の画像処理が行われている。例えば、コントラストを拡大するとか、色度を補正するとか、明るさを補正するといった画像処理である。これらの画像処理は、各画素の画像データを所定の対応関係となるように変換して行われる。色度を補正する例では、色変換テーブルを用意しておき、変換元の画像データを入力データとして同色変換テーブルを参照して出力データを生成する。これにより、肌色補正であれば画像の肌色部分が鮮やかになったりする。
【0003】
【発明が解決しようとする課題】
上述した従来の画像処理装置においては、ある色度の補正を行おうとすると画像全体がそのような補正を施されることになり、必ずしも満足のいく結果が得られるとは限らないという課題があった。例えば、人の顔が青みがかって血色が悪く感じられるような場合に血色を良くさせようとした場合、画面全体が赤みがかってしまうといったことが生じていた。すなわち、ある画像修正を行うことによって本来の効果も得られるものの、副作用的に好ましくない画像修正も行われてしまう。
【0004】
本発明は、上記課題にかんがみてなされたもので、画像データを修正するにあたり、できる限り副作用的な画像処理を行わないようにすることが可能な画像処理装置の提供を目的とする。
【0005】
【課題を解決するための手段】
上記目的を達成するため、本発明の画像処理装置は、複数の画素からなる実写画像の画像データを入力し、各画素の画像データを変換する画像処理装置であって、前記画像データを変換する対応関係を複数保持する第1保持手段と、前記画素が画像処理の適用対象となるか否かを決定する色の範囲を示す色関係情報を、画像処理の内容を表わす処理内容情報と関連付けて組にし、該組を複数保持しており、かつ該各組の前記色の範囲は互いに独立な2つ以上の範囲である第2保持手段と、前記入力された画像データに対応する画素が画像処理の適用対象であるか否かを、前記複数の組のそれぞれの色関係情報を参照して判定する適用対象判定手段と、前記画素が画像処理の適用対象であると判定された場合に、該判定において前記参照した色関係情報に関連付けられた処理内容情報を参照して、前記複数の対応関係のうちから、画像処理の内容を実現する前記対応関係を特定する対応関係特定手段と、該対応関係の特定が行なわれた画素については、該特定した対応関係を参照して、当該画素の画像データを変換することで、前記複数の組の前記各色関係情報により前記画像処理の適用対象であると判断された画素のそれぞれについて、前記複数種類の画像処理内容をそれぞれ実現する画像データ変換手段とを具備する構成としてある。
【0006】
上記のように構成した発明においては、画像を複数の画素として表すとともに各画素を画像データで表現している場合に、各画素の画像データを入力する。この際、適用対象判定手段は、入力された画像データに対応する画素が画像処理の適用対象であるか否かを、画像処理の適用対象とされる色に関する色関係情報を参照して判定し、当該画素が画像処理の適用対象であると判定された場合には、対応関係特定手段が、前記参照した色関係情報に関連付けられた処理内容情報を参照して、画像データを変換する複数の対応関係のうちから、画像処理の内容を実現する対応関係を特定し、該対応関係の特定が行なわれた画素については、画像データ変換手段が、該特定した対応関係を参照して、当該画素の画像データを変換する。
【0007】
すなわち、画像データを変換する対応関係を複数備え、各画素毎にどの対応関係を適用すべきか判断し、各画素毎に適切な対応関係を適用して画像データを変換する。例えば、木々の緑を鮮やかにする対応関係は木々の緑の画素に適用し、肌を血色良く見せる対応関係は肌色の画素に適用するというように、適宜、対応関係を変化させている。
【0008】
画像処理を行う関係上、対象となる画像データは実写画像において特に好適であり、ここにおける実写画像は必ずしも100%実写である必要はなく、半合成であったり、複数の実写画像を混合させたものでも構わない。
【0009】
色関係情報は、着目した画素が画像処理の適用対象となるか否かを決定する色の範囲を示すものであり、色度等によって表わすことができる。こうした場合には、入力された画像データに基づいて画素の色度を検知する手段を設けると共に、上記適用対象判定手段を、検知された色度が色関係情報によって表わされる色度に含まれている場合に、当該画素が画像処理の適用対象であると判定する構成としてもよい。この場合、あくまでも適用すべき対応関係を判断するために色度を利用するのであり、必ずしも色度を修正する必要はない。
【0010】
色範囲を示す条件としての色度を判断するには、入力された画像データをそのまま利用しても構わないし、いわゆる色空間を変更してより色度を判断しやすい画像データに変換してから判断しても良い。さらには、必ずしも狭義の色度にとらわれず、画像データから判断可能な所定の特徴量を利用する場合であっても広義の意味で色度と判断することが可能である。
【0011】
上記の画像処理装置において、前記第2保持手段を、色関係情報および処理内容情報の組を、複数保持する手段とした場合には、前記適用対象判定手段を、前記複数の各色関係情報を参照して、前記判定を行なう手段とし、前記対応関係特定手段を、前記参照した複数の各色関係情報に関連付けられた処理内容情報を参照して、複数種類の画像処理の内容のそれぞれを実現する前記対応関係の特定を行なう手段としてもよい。
【0015】
一方、画像データを変換するための対応関係を備えるための各種の具体的手法を採用可能である。その一例として、上記第1保持手段が、上記の対応関係を、トーンカーブの形態で保持する構成や、上記の対応関係を、変換元の画像データと変換後の画像データの対応関係を表わした色変換テーブルの形態で保持する構成を考えることができる
【0016】
上記の色変換テーブルの形態で保持する成においては、上記第1保持手段の色変換テーブルに変換元の画像データと変換後の画像データとが記憶されており、画像データ変換手段は変換元の画像データを用いて同色変換テーブルを参照することにより、変換後の画像データを得ることになる。すなわち、対応関係をテーブルとして記憶するものである。
【0017】
むろん、これ以外にも演算式であるとか、演算用パラメータといった形で対応関係を保持することも可能であるが、テーブルを利用する場合には参照するだけの手間であるなどのメリットもある。
【0018】
複数の対応関係は必ずしも個別の対応関係が複数ある場合に限るものではなく、実質的に複数の変換結果が得られるようなものでも良い。その一例として、上記第1保持手段複数の対応関係を、一の対応関係と該対応関係を適用する度合いを変化させることによって生成される他の対応関係として保持する構成を考えることができる
【0019】
上記の構成においては、第1保持手段は対応関係を適用する度合いを変化させることにより複数の対応関係を実現する。例えば、同対応関係を適用しない画像データと適用した画像データとの間で適応度合いに応じた値に設定すると入ったことが可能である。この場合、リニアな関連づけであってもよいし非線形的な関連づけをしても構わない。
【0020】
さらには、このような適度合いを利用する場合には、一つの対応関係だけを備えれば、当該対応関係を適用して変換させた状態と、実質的に変換させない状態とが得られ、複数の対応関係を備えたものということができるし、この場合に適応度合いを変化させることによってさらに多くの対応関係を実現できる。
【0021】
第2保持手段が備える対応関係は予め定められたものであってもよいし、適宜定めるものであっても良く、後者の一例として、上記第2保持手段使用者の操作によって入力された色関係情報および処理内容情報を保持する手段とした構成を考えることができる
【0022】
上記の構成においては、上記画像データに適用すべき対応関係が、使用者の操作によって入力された色関係情報および処理内容情報に基づいて特定される。対応関係には変換内容と適用対象の二つの要素があり、上記第2保持手段はいずれを対象とするものであっても構わない。この場合、各画像の部位を指定し、指定された部位における変換内容を選択するといったことも可能である。また、画像処理のオプションとして肌色補正であるとか空色補正といった項目を選択するといったものでも良い。
【0023】
このような対応関係の具体的な一例として、上記第1保持手段対応関係として、画像データに基づいて明るさを変化させる関係を保持する構成を考えることができる
【0024】
上記の構成においては、第1保持手段が画像データに基づいて明るさを変化させる対応関係を保持し、画像データ変換手段はこの対応関係を利用して所定の画素に対して明るさを変化させる変換を行う。例えば、画像のある部分について画素を明るくするといった変換を行う。
【0025】
また、他の一例として、記第1保持手段対応関係として、画像データに基づいて色度を変化させる関係を保持する構成を考えることができる
【0026】
上記の構成においては、第1保持手段が画像データに基づいて色度を変化させる対応関係を保持し、画像データ変換手段はこの対応関係を利用して所定の画素に対して色度を変化させる変換を行う。例えば、画像の中に肌色の画素があれば赤みを強調させる変換を行う。
【0027】
さらに、他の一例として、記第1保持手段対応関係として、画像データに基づいて色の鮮やかさを変化させる関係を保持する構成を考えることができる
【0028】
上記の構成においては、第1保持手段が画像データに基づいて色の鮮やかさを変化させる対応関係を保持し、画像データ変換手段はこの対応関係を利用して画像の鮮やかさを変化させる変換を行う。例えば、色鮮やかな被写体を周りの背景と比べて引き立てたい場合に当該被写体をより鮮やかにする変換を行う。
【0032】
上述したようにして、複数の対応関係を備えて画素に応じて対応関係を変える手法は、実体のある装置に限定される必要はなく、その方法としても機能することは容易に理解できる。このため、本発明の画像処理方法は、複複数の画素からなる実写画像の画像データを入力し、各画素の画像データを変換する方法であって、前記画像データを変換する対応関係を複数保持すると共に、画像処理の適用対象とされる色に関する色関係情報を、画像処理の内容を表わす処理内容情報と関連付けて保持し、前記入力された画像データに対応する画素が画像処理の適用対象であるか否かを、前記色関係情報を参照して判定し、前記画素が画像処理の適用対象であると判定された場合に、前記参照した色関係情報に関連付けられた処理内容情報を参照して、前記複数の対応関係のうちから、画像処理の内容を実現する前記対応関係を特定し、該対応関係の特定が行なわれた画素については、該特定した対応関係を参照して、当該画素の画像データを変換する構成としてある。
【0033】
すなわち、必ずしも実体のある装置に限らず、その方法としても有効であることに相違はない。
【0034】
以上のような手法で画像処理する発明の思想は、各種の態様を含むものである。すなわち、ハードウェアで実現されたり、ソフトウェアで実現されるなど、適宜、変更可能である。発明の思想の具現化例として画像処理するソフトウェアとなる場合には、かかるソフトウェアを記録したソフトウェア記録媒体上においても当然に存在し、利用されるといわざるをえない。その一例として、本発明の記録媒体は、複数の画素からなる実写画像の画像データを変換するプログラムを、コンピュータに読み取り可能に記録した記録媒体であって、前記入力された画像データに対応する画素が画像処理の適用対象であるか否かを、画像処理の適用対象とされる色に関する色関係情報を参照して判定する機能と、前記画素が画像処理の適用対象であると判定された場合に、前記参照した色関係情報に関連付けられた、画像処理の内容を表わす処理内容情報を参照して、前記複数の対応関係のうちから、画像処理の内容を実現する前記対応関係を特定する機能と、該対応関係の特定が行なわれた画素については、該特定した対応関係を参照して、当該画素の画像データを変換する機能とを記録した構成としてある。
【0035】
むろん、その記録媒体は、磁気記録媒体であってもよいし光磁気記録媒体であってもよいし、今後開発されるいかなるソフトウェア記録媒体においても全く同様に考えることができる。また、一次複製品、二次複製品などの複製段階については全く問う余地無く同等である。その他、供給方法として通信回線を利用して行う場合でも本発明が利用されていることには変わりないし、半導体チップに書き込まれたようなものであっても同様である。
【0036】
さらに、一部がソフトウェアであって、一部がハードウェアで実現されている場合においても発明の思想において全く異なるものはなく、一部をソフトウェア記録媒体上に記憶しておいて必要に応じて適宜読み込まれるような形態のものとしてあってもよい。
【0037】
【発明の効果】
以上説明したように本発明の画像処理装置は、画素毎に画像データを変換する対応関係を変化させることができるため、他の部分に悪影響を与えることなく、所望の画像処理を実現することが可能な画像処理装置を提供することができる。また、各画素の画像データに適用すべき対応関係の特定を、複数組の色関係情報および処理内容情報を参照して行なう構成を採れば、画像処理したい画素が複数の部分に存在する場合であっても、他の部分に悪影響を与えない画像処理を比較的容易に実現することができる。
【0040】
さらに、対応関係を色変換テーブルの形態で保持する構成を採れば、画像変換が比較的容易となる。
【0041】
さらに、複数の対応関係を、一の対応関係と該対応関係を適用する度合いを変化させることによって生成される他の対応関係として保持する構成を採れば、適応度合いを変化させることで、一つの対応関係を複数のように利用可能となる。
【0042】
さらに、画像データに適用する対応関係を、使用者の操作によって入力された色関係情報および処理内容情報を用いて特定する構成を備えることで、対応関係の適用に関する自由度が向上する。
【0043】
さらに、画像データに基づいて明るさを変化させる関係を対応関係として保持する構成を採れば、適用すべき対応関係で明るさを変化させることができる。
【0044】
さらに、画像データに基づいて色度を変化させる関係を対応関係として保持する構成を採れば、適用すべき対応関係で色度を変化させることができる。
【0045】
さらに、画像データに基づいて色の鮮やかさを変化させる関係を対応関係として保持する構成を採れば、適用すべき対応関係で鮮やかさを変化させることができる。
【0047】
さらに、発明の画像処理方法によれば、同様の効果を得ることが可能な画像処理方法を提供でき、発明の記録媒体によれば、画像処理プログラムを記録した媒体を提供することができる。
【0048】
【発明の実施の形態】
以下、図面にもとづいて本発明の実施形態を説明する。
【0049】
図1は、本発明の一実施形態にかかる画像処理装置を利用する画像処理システムをブロック図により示しており、図2は具体的ハードウェア構成例を概略ブロック図により示している。
【0050】
図1において、画像入力装置10は写真などをドットマトリクス状の画素として表した実写の画像データを画像処理装置20へ出力し、同画像処理装置20は画像処理の適用対象と内容を指定してから対象となる画素について画像処理を実行する。同画像処理装置20は画像処理した画像データを画像出力装置30へ出力し、画像出力装置は画像処理された画像をドットマトリクス状の画素で出力する。
【0051】
画像入力装置10の具体例は図2におけるスキャナ11やデジタルスチルカメラ12あるいはビデオカメラ14などが該当し、画像処理装置20の具体例はコンピュータ21とハードディスク22とキーボード23とマウス27とCD−ROMドライブ24とフレキシブルディスクドライブ25とモデム26などからなるコンピュータシステムが該当し、画像出力装置30の具体例はプリンタ31やディスプレイ32等が該当する。本実施形態の場合、画像の不具合を修正すべく対象となる画素を指定しつつ所定の対応関係で画像処理を行なうものであるため、画像データとしては写真などの実写データが好適である。なお、モデム26については公衆通信回線に接続され、外部のネットワークに同公衆通信回線を介して接続し、ソフトウェアやデータをダウンロードして導入可能となっている。
【0052】
本実施形態においては、画像入力装置10としてのスキャナ11やデジタルスチルカメラ12が画像データとしてRGB(緑、青、赤)の階調データを出力するとともに、画像出力装置30としてのプリンタ31は階調データとしてCMY(シアン、マゼンダ、イエロー)あるいはこれに黒を加えたCMYKの二値データを入力として必要とするし、ディスプレイ32はRGBの階調データを入力として必要とする。一方、コンピュータ21内ではオペレーティングシステム21aが稼働しており、プリンタ31やディスプレイ32に対応したプリンタドライバ21bやディスプレイドライバ21cが組み込まれている。
【0053】
また、画像処理アプリケーション21dはオペレーティングシステム21aにて処理の実行を制御され、必要に応じてプリンタドライバ21bやディスプレイドライバ21cと連携して所定の画像処理を実行する。従って、画像処理装置20としてのこのコンピュータ21の具体的役割は、RGBの階調データを入力して画像を評価しつつ最適な画像処理を施したRGBの階調データを作成し、ディスプレイドライバ21cを介してディスプレイ32に表示させるとともに、プリンタドライバ21bを介してCMY(あるいはCMYK)の二値データに変換してプリンタ31に印刷させることになる。
【0054】
このように、本実施形態においては、画像の入出力装置の間にコンピュータシステムを組み込んで画像評価と画像処理を行うようにしているが、必ずしもかかるコンピュータシステムを必要とするわけではなく、画像データに対して各種の画像処理を行うシステムに適用可能である。例えば、図3に示すようにデジタルスチルカメラ12a内に所定の適用対象毎に対応する画像処理を実行する画像処理装置を組み込み、変換した画像データを用いてディスプレイ32aに表示させたりプリンタ31aに印字させるようなシステムであっても良い。また、図4に示すように、コンピュータシステムを介することなく画像データを入力して印刷するプリンタ31bにおいては、スキャナ11bやデジタルスチルカメラ12bあるいはモデム26b等を介して入力される画像データから各画素毎に適用対象に属するか否かを判定して対応する画像処理を実行するように構成することも可能である。
【0055】
上述した画像評価とそれに伴う画像処理は、具体的には上記コンピュータ21内にて図5などに示すフローチャートに対応した画像処理プログラムで行っている。処理内容を大まかに説明すると、次のようになる。最初のステップS100では画像処理ごとに適用すべき対象を指定する処理を実施しておき、ステップS110〜S140では図6に示すようにドットマトリクス状の各画素について対象画素を移動させながら所定の画像処理を実行する。この際、ステップS110では対象画素がステップS100にて指定した画像処理の対象であるか否かを判定し、ステップS120ではその判定結果に従って画像データを変換する。むろん、この変換によって実質的に画像処理されたことになる。ステップS130,S140については対象画素を移動させていく処理に該当する。以下、この大きな流れに沿って詳細に説明する。
【0056】
画像処理をどの画素に対して行うべきかは画像処理の内容にも依存するが、本実施形態においては、図7および図8に示すように、処理対象となる画像の部位を指定する。図7に示すように、ウィンドウ40の上辺に沿って当該ウィンドウ枠を操作するための操作エリア41が設けられるとともに、中央部分には画像の表示エリア42を設けてあり、下辺に沿って画像処理を指定する処理メニューエリア43を設けてある。
【0057】
表示エリア42に処理対象となる画像を表示した状態でマウス27で矩形領域を指定するとともに、同マウス27で処理メニューエリア43の中の画像処理を選択する。処理メニューエリア43には実行可能な画像処理として「コントラスト」修正、「明るさ」修正、「シャープネス」修正、「彩度」修正の各領域とともにその程度を指示する矢印を設けてあり、例えば、コントラストの上矢印をマウス27でクリックすればコントラストを強調する画像処理を指定したことになり、下矢印をクリックすればコントラストを弱める画像処理を指定したことになる。
【0058】
各領域について複数の画像処理を選択しても良いし、選択した画像処理は上記処理メニューエリア43の中の「リスト表示・編集」をクリックすれば図9に示すような領域の左上座標と右下座標と画像処理の処理種類とレベルを表示する。レベルは画像処理の程度を示すものであり、上述した上矢印と下矢印のクリック回数によって処理程度を強めたり弱めたりするためのデータである。処理種類は後述するように画像処理の種類を示すものであり、この例では「コントラスト」修正は1で「明るさ」修正は2で、「シャープネス」修正は3で、「彩度」修正は4となってそれぞれ対象を意味する。なお、処理種類とレベルについては画像処理の内容の説明とともに後述する。また、選択した画像処理を削除する場合にはそれぞれの指定をクリックしてハイライトさせ、キーボード23の削除キーを押下すればよい。この他、編集は通常のアプリケーションの操作に準ずればよい。
【0059】
本実施形態においては、画像処理アプリケーション21dがアプリケーションレベルで実行されるため、処理対象となる画像をウィンドウ40内に表示して領域指定することが可能となっている。しかし、同様の画像処理をプリンタドライバ21bのようなドライバレベルで実現する場合もあり、この場合には必ずしも画像をウィンドウ表示できないことがある。
【0060】
図10はウィンドウ表示にかかわらず画像処理対象を指定する一例を示しており、プリンタドライバ21bを起動したときにオプションとして選択するウィンドウ50を示している。図7〜図9が画像の部位を指定しているのに対し、この例では、画像の色度を指定して対象となる画素を選択するものである。ここで、色度について説明する。
【0061】
色度の具体例としてx−y色度を計算する。いま、対象画素のRGB表色系におけるRGB階調データが(R,G,B)であるとするときに、
r=R/(R+G+B) …(1)
g=G/(R+G+B) …(2)
とおくとすると、XYZ表色系における色度座標x,yとの間には、
x=(1.1302+1.6387r+0.6215g)/(6.7846-3.0157r-0.3857g) …(3)
y=(0.0601+0.9399r+4.5306g)/(6.7846-3.0157r-0.3857g) …(4)
なる対応関係が成立する。ここにおいて、色度は明るさに左右されることなく色の刺激値の絶対的な割合を表すものであるから、色度からその画素がどのような対象物かを判断することができるといえる。
【0062】
例えば、人物像を画像のオブジェクトと考えると、肌色の部分の画素を抽出すれば良いと言える。肌色の場合の色度は、
0.35<x<0.40 …(5)
0.33<y<0.36 …(6)
というような範囲に含まれているから、各画素の色度を求めたときにこの範囲内であればその画素は人間の肌を示す画素と考えてもあながち誤っていないと言える。同様に青空の色度や木々の緑の色度といったものも色度として判断すれば明るさに関わらず空の画素や木々の緑の画素を概ね特定できる。図11はx−y色度の分布関係を示しており、肌色の領域であるとか、青空の色の領域であるとか、木々の緑の色の領域がこのような矩形の領域として把握できる様子を示している。なお、図10に示すようにこのx−y色度の分布範囲を直に指定して個別指定できるようにしても良い。
【0063】
一方、図12には同様に領域を決めるにあたって中心点を指定する手法を示している。肌色の場合であれば、(5)(6)式よりその中心点として、
x=0.375 …(7)
y=0.345 …(8)
が得られる。そこで、この中心点を基準として一定半径の円内に入っていれば上記領域に属するものと判定するようにすればよい。
【0064】
プリンタドライバ21bのオプションで表示するウィンドウ50では、色度で対象を指定すべく所定の色度に対する具体例を表示し、操作者が観念的に青空をきれいにしたいとか、木々の緑を鮮やかにしたいといった要望を反映できるようにしている。この場合、それぞれの色度の画素を強調させるのか弱めるのか指示するための矢印ボタンも設けてある。
【0065】
この例では色度で画素の範囲を指定しつつその色度を強調するか否かといった画像処理に利用するようにしているが、色度による画素の選択と実行すべき画像処理が一致する必要はない。例えば、肌色の画素を明るくするとか、緑色の画素のコントラストを強調するといった画像処理でも構わない。すなわち、あくまでも色度は画素を処理対象であるか否かの指標として利用することができるものであり、この例ではさらに画像処理の選択に利用しているに過ぎない。
【0066】
以上のようにして画像処理ごとに適用すべき対象を指定するステップS100の処理が対応関係指定手段を構成するが、むろんこれらに限る必要はなく、部位や色度を指定する手法としても適宜変更可能であるし、これら以外の要素、例えば、明るさとかシャープさなどで指定することも可能である。また、図9に示すようにして所定の領域を指定しつつその画像処理を対応づけて保持する対応表はコンピュータシステム内の記憶領域に保持されるが、後述する画像処理のための色変換テーブルとともに第1,第2保持手段を構成することはいうまでもない。
【0067】
次のステップS110以下では対象画素を移動させながら上述したように指定した画像処理の対象画素であるか否かを判定する。対象画素が画像処理の対象であるか否かは図9に示す領域・テーブル対応表における各欄の左上座標と右下座標を参照して対象画素の座標と比較すればよい。該当する欄があれば画像処理の適用対象画素であると判断するし、いずれの欄の領域にも属しなければ当該対象画素には画像処理しなくても良いと判断する。また、図10に示すように色度で判断する場合には(1)〜(4)式に従って対象画素の色度を計算し、プリンタドライバ21bのオプションで選択された色度の範囲に属するか否かを判定する。
【0068】
画像処理の適用対象であるか否かは部位あるいは色度に基づいて上述したように判定するもののこれらの範囲に属するか属しないかといった二者択一の判定を行うと、隣接領域について何らかの視覚的な段差が生じやすい。例えば、ある矩形領域を明るくしようとしたとき、矩形領域のすぐ外側では明るくしないとすれば、その境界で明るさの段差が生じ、矩形領域がはっきりと分かってしまう。
【0069】
このため、本実施形態においては、画像処理の適用度kのパラメータを利用する。図13に示すように、ステップS111にて所定の領域に属すると判断されればステップS112にて適用度kに「1」をセットするものの、その領域の周縁の遷移領域については適用度kを「0」〜「1」の範囲で変化させる。すなわち、ステップS113にて遷移領域内であると判断された場合、ステップS114では領域に近いならば適用度kを「1」に近づけるし、遠いならば「0」に近づける。そして、所定の領域にも遷移領域にも属しない場合にはステップS115にて適用度kに「0」をセットする。一方、図12に示す例では色度の中心点を指定しているが、図14に示すように半径r0内を画像処理の対象として適用度kに「1」を設定するものとし、遷移領域を半径r0〜半径r1の範囲として周縁部分で徐々に適用度kが「0」に近づくようにすればよい。
【0070】
ステップS110では適用対応関係を判定するとともにステップS111〜S115にてこの適用度kを求めておく。以上のようなステップS110〜S115のソフトウェア処理とこれを実現するハードウェアによって対応関係判断手段を構成する。本実施形態においては、その判定結果を各画像処理の適用度kとして求めるようにしているが、適用するか否かという二者択一の判定が実現可能であることはいうまでもない。
【0071】
次のステップ120では適用度kに注目して対象画素に対して画像処理を実行する。ここで、本実施系において用意されている画像処理の具体的内容についてそれぞれ説明する。
【0072】
コントラストは画像全体としての輝度の幅を示し、コントラストを修正したいと感じる場合、コントラストの幅を広げたいという要望が主である。ある画像の各画素における輝度の分布をヒストグラムとして集計したものを図15で実線にて示している。実線に示す分布を取る場合、明るい画素の輝度と暗い画素の輝度との差が少ないが、輝度の分布が一点鎖線に示すように広がれば明るい画素の輝度と暗い画素の輝度との差が大きくなり、コントラストの幅が広がることになる。ここで、図17はコントラストを拡大するための輝度変換を示している。変換元の輝度yと変換後の輝度Yとの間において、
Y=ay+b …(9)
なる関係で変換させるとすると、a>1において変換元の最大輝度ymaxと最小輝度yminの画素の差は変換後においてより大きくなり、図15に示すように輝度の分布が広がることになる。この場合、輝度の分布に応じて傾きaとオフセットbを決定すればより好適である。例えば、
a=255/(ymax−ymin) …(10)
b=−a・yminあるいは255−a・ymax …(11)
とおくとすると、あるせまい幅を持った輝度分布を再現可能な範囲まで広げることができる。ただし、再現可能な範囲を最大限に利用して輝度分布の拡大を図った場合、ハイライト部分が白く抜けてしまったり、ハイシャドウ部分が黒くつぶれてしまうことが起こる。これを防止するには再現可能な範囲の上端と下端に拡大しない範囲として輝度値で「5」ぐらいを残すようにすればよい。この結果、変換式のパラメータは次式のようになる。
【0073】
a=245/(ymax−ymin) …(12)
b=5−a・yminあるいは250−a・ymax …(13)
そして、この場合にはy<yminと、y>ymaxの範囲においては変換を行わないようにする。
【0074】
画像データを変換するにあたって、毎回計算する必要はない。輝度の範囲が「0」〜「255」という値をとるとすれば、各輝度値について予め変換結果を予めておき、図16に示すように変換テーブルを形成しておく。ただし、この場合はあくまでも輝度の変換であり、画像データが輝度を要素として備えていればこの変換テーブルを利用することができるものの、輝度を間接的な要素としか備えていない場合には同変換テーブルを利用することができない。コンピュータシステムにおいては、画像データとして赤緑青の各要素について明るさを階調で表した階調データ(R,G,B)であることが多い。このような階調データ(R,G,B)では、直接には輝度の値を持っておらず、輝度を求めるためにLuv表色空間に色変換する必要があるが、演算量などの問題から得策ではない。このため、テレビジョンなどの場合に利用されているRGBから輝度を直に求める次式の変換式を利用する。
【0075】
y=0.30R+0.59G+0.11B …(14)
このように階調データと輝度yとの間に線形の変換か可能であることを前提とすれば、変換前の階調データ(R0,G0,B0)と変換後の階調データ(R1,G1,B1)との間には(9)式を適用可能であり、
R1=aR0+b …(15)
G1=aG0+b …(16)
B1=aB0+b …(17)
なる関係で求めることができるから、結果として図16に示す変換テーブルを利用して階調データを変換すればよいことが分かる。
【0076】
次に、明るさを修正する画像処理の手法について説明する。先程と同様に輝度のヒストグラムを想定すると、図18にて実線で示すように輝度分布の山が全体的に暗い側に寄っている場合には破線で示すように全体的に明るい側に山を移動させると良いし、逆に、図19にて実線で示すように輝度分布の山が全体的に明るい側に寄っている場合には破線で示すように全体的に暗い側に山を移動させると良い。このような場合には図17に示すような直線的な輝度の変換を施すのではなく、図20に示すようないわゆるγ曲線を利用した輝度の変換を行えばよい。
【0077】
γ曲線による補正ではγ<1において全体的に明るくなるし、γ>1において全体的に暗くなる。この度合いはステップS100にて図7に示す処理メニューエリア43で明るさ修正の欄の上矢印や下矢印をクリックした回数によって徐々に変化させればよい。
【0078】
また、コントラストの修正の場合と同様に自動的にγの値を設定することも可能である。各種の実験を行った結果、輝度分布におけるメジアンymedを求め、同メジアンymedが「85」未満である場合に暗い画像と判断して以下のγ値に対応するγ補正で明るくする。
【0079】
γ=ymed/85 …(18)
あるいは、
γ=(ymed/85)**(1/2) …(19)
とする。ただし、γ<0.7となっても、γ=0.7とする。このような限界を設けておかないと夜の画像が昼間のようになってしまうからである。なお、明るくしすぎると全体的に白っぽい画像になってコントラストが弱い画像になりやすいため、彩度を合わせて強調するなどの処理が好適である。
【0080】
一方、メジアンymedが「128」より大きい場合に明るい画像と判断して以下のγ値に対応するγ補正で暗くする。
【0081】
γ=ymed/128 …(20)
あるいは、
γ=(ymed/128)**(1/2) …(21)
とする。この場合、γ>1.3となっても、γ=1.3として暗くなり過ぎないように限界を設けておく。
【0082】
なお、このγ補正についても図16に示すような変換テーブルを形成しておけばよい。
【0083】
画像のシャープさを修正するエッジ強調処理は、強調前の各画素の輝度Yに対して強調後の輝度Y’が、
Y’=Y+Eenhance・(Y−Yunsharp) …(22)
として演算される。ここで、Eenhance は、エッジ強調度であるとともに、Yunsharpは各画素の画像データに対してアンシャープマスク処理を施したものであり、ここでアンシャープマスク処理について説明する。図21は一例として5×5画素のアンシャープマスク60を示している。このアンシャープマスク60は、中央の「100」の値をマトリクス状の画像データにおける処理対象画素Y(x,y)の重み付けとし、その周縁画素に対して同マスクの升目における数値に対応した重み付けをして積算するのに利用される。このアンシャープマスク60を利用する場合、
【0084】
【数1】

Figure 0003918257
【0085】
なる演算式に基づいて積算する。(23)式において、「396」とは重み付け係数の合計値であり、サイズの異なるアンシャープマスクにおいては、それぞれ升目の合計値となる。また、Mijはアンシャープマスクの升目に記載されている重み係数であり、Y(x,y)は各画素の画像データである。なお、ijについてはアンシャープマスク41に対して横列と縦列の座標値で示している。
【0086】
(22)式に基づいて演算されるエッジ強調演算の意味するところは次のようになる。Yunsharp(x,y)は注目画素に対して周縁画素の重み付けを低くして加算したものであるから、いわゆる「なまった(アンシャープ)」画像データとしていることになる。このようにしてなまらせたものはいわゆるローパスフィルタをかけたものと同様の意味あいを持つ。従って、「Y(x,y)−Yunsharp(x,y)」とは本来の全成分から低周波成分を引いたことになってハイパスフィルタをかけたものと同様の意味あいを持つ。そして、ハイパスフィルタを通過したこの高周波成分に対してエッジ強調度Eenhanceを乗算して「Y(x,y)」に加えれば同エッジ強調度Eenhanceに比例して高周波成分を増したことになり、エッジが強調される結果となる。なお、エッジ強調が必要になる状況を考えるといわゆる画像のエッジ部分であるから、隣接する画素との間で画像データの差が大きな場合にだけ演算するようにして処理量を激減させることもできる。
【0087】
この場合においてもエッジ強調度EenhanceはステップS100にて図7に示す処理メニューエリア43でシャープさ修正の欄の上矢印や下矢印をクリックした回数によって変化させればよい。また、エッジ強調度Eenhanceを自動設定することも可能である。
【0088】
画像のエッジ部分では隣接する画素間での階調データの差分は大きくなる。この差分は輝度勾配であり、これをエッジ度と呼ぶことにする。画像の輝度の変化度合いは、ベクトルを水平方向成分と垂直方向成分とに分けて求めれば演算可能となる。ドットマトリクス状の画素からなる画像においては、対象画素を中心としたときに八つの画素と隣接しているが、演算を簡易とするために水平方向と垂直方向に隣接する画素との間でのみ変化度合いを求め、ベクトルの長さを当該対象画素のエッジ度gとして積算し、積算されたエッジ度を画素数で除算することにより平均値を算出する。すなわち、このオブジェクト画像のシャープ度合いSLは、画素数をE(I)pixとすると、
【0089】
【数2】
Figure 0003918257
【0090】
のようにして演算することができる。この場合、SLの値が小さい画像ほどシャープネスの度合いが低い(見た目にぼけた)ことになるし、SLの値が大きい画像ほどシャープネスの度合いが高い(見た目にはっきりとしたもの)ことになる。
【0091】
一方、画像のシャープさは感覚的なものであるため、実験的に得られた最適なシャープ度合いの画像データについて同様にしてシャープ度合いSLを求め、その値を理想のシャープ度合いSLoptと設定するとともに、エッジ強調度Eenhanceを、
Eenhance=ks・(SLopt−SL)**(1/2) …(25)
として求める。ここにおいて、係数ksは画像の大きさに基づいて変化するものであり、画像データが縦横方向にそれぞれheightドットとwidthドットからなる場合、
ks=min(height,width)/A …(26)
のようにして求めればよい。ここにおいて、min(height,width)はheightドットとwidthドットのうちのいずれか小さい方を指し、Aは定数で「768」としている。むろん、これらは実験結果から得られたものであり、適宜変更可能であることはいうまでもない。ただし、基本的には画像が大きいものほど強調度を大きくするということで良好な結果を得られている。
【0092】
以上のようにすればマニュアル設定あるいは自動設定でエッジ強調処理を実行できる。
【0093】
彩度の画像処理は次のように実施する。彩度強調パラメータSratio というものを採用して彩度を強調するとした場合、上述したように画像データが彩度のパラメータを備えているものであれば同パラメータを変換すればよいものの、上述したように階調データとしてRGBの成分値しか持っていないため、本来的には彩度値が直接の成分値となっている表色空間への変換を行なわなければ彩度値を得ることができない。しかしながら、RGBの画像データを、一旦、Luv空間内の画像データに変換し、彩度強調後に再びRGBに戻すといった作業が必要となり、演算量が多くならざるを得ない。従って、RGBの階調データをそのまま利用して彩度強調することにする。
【0094】
RGB表色空間のように各成分が概略対等な関係にある色相成分の成分値であるときには、R=G=Bであればグレイであって無彩度となる。従って、RGBの各成分における最小値となる成分については各画素の色相に影響を与えることなく単に彩度を低下させているにすぎないと考えれば、各成分における最小値をすべての成分値から減算し、その差分値を拡大することによって彩度を強調できるといえる。
【0095】
RGB階調データの各成分(R,G,B)における青(B)の成分値が最小値であったとすると、この彩度強調パラメータSratio を使用して次のように変換する。
【0096】
R’=B+(R−B)×Sratio …(27)
G’=B+(G−B)×Sratio …(28)
B’=B …(29)
この結果、RGB表色空間とLuv空間との間で一往復する二度の色変換が不要となるため、演算時間の低減をはかることができる。この実施形態においては、無彩度の成分について単純に最小値の成分を他の成分値から減算する手法を採用しているが、無彩度の成分を減算するにあたっては別の変換式を採用するものであっても構わない。ただし、(27)〜(29)式のように最小値を減算するだけの場合には乗除算が伴わないので演算量が容易となるという効果がある。
【0097】
(27)〜(29)式を採用する場合でも、良好な変換が可能であるものの、この場合には彩度を強調すると輝度も向上して全体的に明るくなるという傾向がある。従って、各成分値から輝度の相当値を減算した差分値を対象として変換を行うことにする。
【0098】
彩度強調が、
R’=R+△R …(30)
G’=G+△G …(31)
B’=B+△B …(32)
となるとすると、この加減値△R,△G,△Bは輝度との差分値に基づいて次式のように求める。すなわち、
△R=(R−Y)×Sratio …(33)
△G=(G−Y)×Sratio …(34)
△B=(B−Y)×Sratio …(35)
となり、この結果、
R’=R+(R−Y)×Sratio …(36)
G’=G+(G−Y)×Sratio …(37)
B’=B+(B−Y)×Sratio …(38)
として変換可能となる。なお、輝度の保存は次式から明らかである。
【0099】
Figure 0003918257
また、入力がグレー(R=G=B)のときには、輝度Y=R=G=Bとなるので、加減値△R=△G=△B=0となり、無彩色に色が付くこともない。(36)式〜(38)式を利用すれば輝度が保存され、彩度を強調しても全体的に明るくなることはない。
【0100】
むろん、この場合の彩度強調指数Sratio は、ステップS100にて図7に示す処理メニューエリア43で彩度修正の欄の上矢印や下矢印をクリックした回数によって変化させればよい。ただし、この彩度強調指数Sratio についても自動設定することが可能である。
【0101】
まず、画素の彩度を簡略化して求める。これには彩度の代替値Xとして次のように演算する。
【0102】
X=|G+B−2×R| …(41)
本来的には彩度は、R=G=Bの場合に「0」となり、RGBの単色あるいはいずれか二色の所定割合による混合時において最大値となる。この性質から直に彩度を適切に表すのは可能であるものの、簡易な(41)式によっても赤の単色および緑と青の混合色である黄であれば最大値の彩度となり、各成分が均一の場合に「0」となる。また、緑や青の単色についても最大値の半分程度には達している。むろん、
X’=|R+B−2×G| …(42)
X”=|G+R−2×B| …(43)
という式にも代替可能である。
【0103】
この彩度の代替値Xについてのヒストグラムの分布を求めるとすると彩度が最低値「0」〜最大値「511」の範囲で分布するので、概略的には図22に示すような分布となる。次に、集計された彩度分布に基づいてこの画像についての彩度指数というものを決定する。この彩度分布から上位の「16%」が占める範囲を求め、この範囲内での最低の彩度「A」がこの画像の彩度を表すものとして、A<92なら
S=−A×(10/92)+50 …(44)
92≦A<184なら
S=−A×(10/46)+60 …(45)
184≦A<230なら
S=−A×(10/23)+100 …(46)
230≦Aなら
S=0 …(47)
というように彩度強調指数Sを決定する。図23はこの彩度「A」と彩度強調指数Sとの関係を示している。図に示すように、彩度指数Sは最大値「50」〜最小値「0」の範囲で彩度「A」が小さいときに大きく、同彩度「A」が大きいときに小さくなるように徐々に変化していくことになる。この彩度指数Sから彩度強調指数Sratio への変換は、
Sratio =(S+100)/100 …(48)
として求めればよい。この場合、彩度強調指数S=0のときに彩度強調パラメータSratio =1となって彩度強調されない。
【0104】
最後に、図10に示すようにして色度で画素の範囲を指定しつつその色度を強調する手法について説明するが、基本的には当該色調を強調するにあたってその画素の輝度を強くする手法を採用する。従って、図20に示すようなγ補正のトーンカーブを利用する。むろん、強調程度に応じてγの値を変化させればよい。なお、自動設定する場合には理想値に近い画像について青空、木々の緑、肌色について平均値(Rs.ideal,Gs.ideal,Bs.ideal)を求めるとともに、その平均値(Rs.ideal,Gs.ideal,Bs.ideal)と当該画像での集計結果に基づく平均値(Rs.ave,Gs.ave,Bs.ave)とのずれを求め、その差を修正量ΔR,ΔG,ΔBとすればよい。
【0105】
以上、本実施形態において用意されている画像処理の手法について説明したが、ステップS110にて対象画素の適用対応関係を判定するとともにステップS111〜S115にて適用度kを求められるので、ステップS120では判定結果に基づいて画像データを変換する。
【0106】
前述したように図7に示す処理メニューエリア43では画像処理の種類を選択するとともに強調レベルも選択している。従って、ステップS100では上述した画像処理を前提としつつそれぞれの強調レベルに応じた変換テーブルを作成し、コンピュータシステムにおける所定の記憶領域に保存しておく。そして、ステップS120ではかかる変換テーブルを参照して次のように変換する。
【0107】
変換前のRGB階調データの各成分(Rpre,Gpre,Bpre)とするとともに、所定の変換テーブルを参照した変換後のRGB階調データの各成分(Rpost,Gpost,Bpost)とするとともに、最終的な画像データを(Rfinl,Gfinl,Bfinl)とすると、
Rfinl=k・Rpost+(1−k)・Rpre …(49)
Gfinl=k・Gpost+(1−k)・Gpre …(50)
Bfinl=k・Bpost+(1−k)・Bpre …(51)
と変換する。この意味するところは、適用度kが「0」〜「1」で変化する遷移領域において徐々に画像処理が重みを持つようになり、段差が生じなくなることである。
【0108】
むろん、対象画素が適用対応となる全ての画像処理の変換テーブルについて、順次、(49)式〜(51)式を適用するし、適用度kが「0」であれば画像データ変換を行わなくてもよい。また、(49)式〜(51)式についてはRGBの各成分についての演算となっているが、対象となる成分が一部であることもある。さらに、適用度kを利用しない場合には単に変換テーブルの種類だけを変えて得られるRGB階調データの各成分(Rpost,Gpost,Bpost)をそのまま利用してもよい。
【0109】
ところで、以上においては画像処理ごとに適用すべき対象を指定していた。すなわち、全体から見れば特定の領域だけが画像処理を実施されている。しかしながら、全体に対してある画像処理をしながらも特定の領域に対してさらに別の画像処理を重ねて実施するといったことも当然に可能となる。
【0110】
ここで、画像全体に対する画像処理の変換結果として各成分(Rtotal,Gtotal,Btotal)が得られるとともに、特定の領域に対する画像処理の変換結果として各成分(Rpart,Gpart,Bpart)が得られるとしたならば、最終的な画像データ(Rfinl,Gfinl,Bfinl)は、同様の適用度k’を利用して、
Rfinl=k’・Rpart+(1−k’)・Rtotal …(52)
Gfinl=k’・Gpart+(1−k’)・Gtotal …(53)
Bfinl=k’・Bpart+(1−k’)・Btotal …(54)
といった重み付け加算で演算すればよい。
【0111】
例えば、図24は図7の写真において全体的に色の鮮やかさを強調させる一方で、逆光気味の人物を明るくさせたい状況での選択態様を概略的に示している。すなわち、画像全体を対象とする左下下がりのハッチング領域に対する変換結果(Rtotal,Gtotal,Btotal)と、人物像を対象とする右下下がりのハッチング領域に対する変換結果(Rpart,Gpart,Bpart)とが、適用度k’を利用して重ね合わされる。この場合、人物像に対して指定した領域内で適用度k’が最大の0.5となるとともに、その周縁の遷移領域で適用度k’が0<k’<0.5の範囲で変化させればよい。これに対して、人物像に対して指定した領域内での適用度k’を最大1.0となるように設定し、その周縁の遷移領域で適用度k’が0<k’<1.0の範囲で変化させるようにすれば、人物像に対して指定した領域内では画像全体に対する変換を適用させないようにすることもできる。むろん、同様にしてさらに多数の画像処理の結果を適用させることもできる。
【0112】
以後、ステップS130で対象画素を移動させるとともにステップS140で全ての対象画素について処理を終了したか判断し、終了していれば本画像処理を終了する。
【0113】
なお、それぞれの画像処理で強調程度を自動設定する手法について説明したが、それらは上述したようにして対象画素を移動させていく前の段階で均等に画像データをサンプリングして必要な集計を行ない、集計結果に基づいて強調程度を自動設定するとともに変換テーブルを作成しておけばよい。
【0114】
プリンタドライバ21bで色度に基づくオプション選択するような場合にはこのような自動設定によって強調レベルを設定することができるので、操作性を向上させることができる。
【0115】
次に、上記構成からなる本実施形態の動作を説明する。
【0116】
写真画像をスキャナ11で読み込み、プリンタ31にて印刷する場合を想定する。すると、まず、コンピュータ21にてオペレーティングシステム21aが稼働しているもとで、画像処理アプリケーション21dを起動させ、スキャナ11に対して写真の読み取りを開始させる。読み取られた画像データが同オペレーティングシステム21aを介して画像処理アプリケーション21dに取り込まれたら、同画像処理アプリケーション21dは図5に示すフローチャートに基づいて画像処理を実行する。
【0117】
先ず、ステップS100にて適用対象を指定すべく、図7に示すように読み込んだ写真画像をウィンドウ40の表示エリア42に表示する。この状態で操作者は図8に示すようにマウス27で空色部分を矩形領域として指定するとともに処理メニューエリア43で彩度を強調させるように上矢印を数回クリックする。また、中央の人物像が入るように矩形領域を選択し、処理メニューエリア43で明るさを強調させるように上矢印を数回クリックする。すなわち、背景のうちの空の領域を指定して彩度を強調する画像処理を指定するとともに、人物の領域を指定して明るさをあげる画像処理を指定したことになる。
【0118】
ウィンドウを閉じることによって指定を終了させると、この指定に基づいて変換テーブルを作成する。すなわち、図9に示す領域テーブル対応表を参照し、処理種類を参照して画像処理の種類を決めるとともにレベルに基づいて強調程度を判断し、変換テーブルを作成する。ここでは彩度強調処理のための変換テーブルと明るさを明るくするための変換テーブルを作成することになる。
【0119】
この後、処理対象画素を初期位置に設定し、ステップS110にて対象画素の座標が図9に示す領域テーブル対応表の各領域に含まれるか否かを判断する。むろん、この場合に遷移領域も考慮し、適用度kを得る。図8に示すように対象画素がハッチングした領域内に入っていれば適用度kとして「1」が設定されるため、ステップS120では対象となる画像処理の変換テーブルを参照し、(49)〜(51)式に基づいて画像データを変換する。また、図8に示す例では背景部分を指定した矩形領域と人物像を指定した矩形領域とが一部で重なっており、重なっている部分では二段階に(49)〜(51)式を適用して画像データを変換する。むろん、遷移領域についても画像データは変換され、指定されなかった周縁部分と段差が生じないようにする。
【0120】
以上の処理をステップS130にて処理対象画素を移動させながらステップS140にて全画素について実行したと判断されるまで繰り返す。これにより、空色部分については彩度を強調して青空らしく鮮やかにする画像処理が行われるし、人物像の部分を明るくして逆光状態であったとしてもフラッシュを点灯させて撮影したような見やすい画像となる。むろん、人物像が明るくなったとしても空の部分が明るくなってしまうことはないし、人物像の部分で特に彩度強調されてしまうこともない。
【0121】
この後、画像処理された画像データをディスプレイドライバ21cを介してディスプレイ32に表示し、良好であればプリンタドライバ21bを介してプリンタ31にて印刷させる。すなわち、同プリンタドライバ21bは指定した領域毎に指定したとおりの画像処理を実行されたRGBの階調データを入力し、所定の解像度変換を経てプリンタ31の印字ヘッド領域に対応したラスタライズを行なうとともに、ラスタライズデータをRGBからCMYKへ色変換し、その後でCMYKの階調データから二値データへ変換してプリンタ31へ出力する。
【0122】
一方、画像処理アプリケーション21dとして画像処理するのではなく、所定のアプリケーションから印刷処理を実行し、プリンタドライバ21bが起動された場合には、ウィンドウ40の表示エリア41に読み込み画像を表示できない場合も多い。この場合、プリンタドライバ21bは図10に示すようなオプション選択の画面を表示することができ、操作者は読み込む前の写真などを見ながら人の肌の部分をきれいにしたいとか、木々の緑を鮮やかにしたいなど、所望の画像処理となる項目を選択しておく。この処理は図5に示すステップS100の適用対象指定の処理に該当する。
【0123】
オプション選択後、同プリンタドライバ21bは内部で変換テーブルを作成しておき、入力される画像データの各画素について色度を判定し、オプション選択された対象の色度であるか判断する。そして、対象となっている場合には、変換テーブルを参照して(49)〜(51)式に基づいて変換を実行し、変換後の画像データをプリンタ31に出力可能なCMYの画像データに変換する。
【0124】
この結果、オリジナルの画像のうち人の肌の画素や木々の緑の画素については明るく修正され、結果として鮮やかに見えるように印刷されることになる。
【0125】
このように、画像処理の中枢をなすコンピュータ21はステップS100で画像処理を適用したい領域を指定しておき、ステップS110〜S140では対象画素を移動させながら指定されている領域に属するかどうかを判定しつつ、属する場合には指定された画像処理を実行することになるため、ある領域の画像データを修正することによって別の領域の画像データに悪影響を与えるといったことが無くなり、全体として美しくすることが容易に実現できるようになる。
【図面の簡単な説明】
【図1】本発明の一実施形態にかかる画像処理装置のブロック図である。
【図2】同画像処理装置の具体的ハードウェアのブロック図である。
【図3】本発明の画像処理装置の他の適用例を示す概略ブロック図である。
【図4】本発明の画像処理装置の他の適用例を示す概略ブロック図である。
【図5】本発明の画像処理装置における画像処理を示すフローチャートである。
【図6】処理対象画素を移動させていく状態を示す図である。
【図7】処理対象エリアと処理内容を指定する表示状態を示す図である。
【図8】二つの処理対象エリアを選択した状態を示す図である。
【図9】指定した領域と画像処理の対象を記憶する領域・テーブル対応表を示す図である。
【図10】処理対象と処理内容をオプション選択する画面の表示状態を示す図である。
【図11】x−y色度で指定される矩形領域を示す図である。
【図12】x−y色度で中心点を指定する状況を示す図である。
【図13】適用度を設定する際のフローチャートである。
【図14】x−y色度で中心点を指定したときの適用度の変化を示すグラフである。
【図15】輝度分布を拡大する場合の分布範囲を示す図である。
【図16】輝度分布を拡大する際の変換テーブルを示す図である。
【図17】輝度分布を拡大させるための変換関係を示す図である。
【図18】γ補正で明るくする概念を示す図である。
【図19】γ補正で暗くする概念を示す図である。
【図20】γ補正で変更される輝度の対応関係を示す図である。
【図21】5×5画素のアンシャープマスクを示す図である。
【図22】彩度分布の集計状態の概略図である。
【図23】彩度Aと彩度強調指数Sとの関係を示す図である。
【図24】全体に適用する画像処理と一部に適用する画像処理とが行わせる場合の処理対象エリアを示す図である。
【符号の説明】
10...画像入力装置
20...画像処理装置
21...コンピュータ
21a...オペレーティングシステム
21b...プリンタドライバ
21c...ディスプレイドライバ
21d...画像処理アプリケーション
22...ハードディスク
23...キーボード
24...CD−ROMドライブ
25...フレキシブルディスクドライブ
26...モデム
30...画像出力装置[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus, an image processing method, and a medium on which an image processing program is recorded. In particular, image data of each pixel is obtained by inputting actual image data composed of pixels in a dot matrix such as a digital photographic image. The present invention relates to an image processing apparatus for converting with a predetermined correspondence relationship and a medium on which an image processing program is recorded.
[0002]
[Prior art]
  DesiVarious types of image processing are performed on real image data such as tall photograph images. For example, image processing such as increasing the contrast, correcting the chromaticity, or correcting the brightness. These image processes are performed by converting the image data of each pixel so as to have a predetermined correspondence relationship. In an example of correcting chromaticity, a color conversion table is prepared, and output data is generated by referring to the same color conversion table with the conversion source image data as input data. Accordingly, if the skin color correction is performed, the skin color portion of the image becomes vivid.
[0003]
[Problems to be solved by the invention]
In the above-described conventional image processing apparatus, if correction of a certain chromaticity is performed, the entire image is subjected to such correction, and there is a problem that a satisfactory result is not always obtained. It was. For example, when an attempt is made to improve the blood color when the human face is bluish and the blood color is felt bad, the entire screen may become reddish. In other words, although an original effect can be obtained by performing certain image correction, image correction that is undesirable in terms of side effects is also performed.
[0004]
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 capable of preventing image processing that is as adverse as possible when correcting image data.
[0005]
[Means for Solving the Problems]
  In order to achieve the above object, an image processing apparatus of the present invention is an image processing apparatus for inputting image data of a real image composed of a plurality of pixels and converting the image data of each pixel, and converts the image data. A first holding unit that holds a plurality of correspondence relationships, and color relationship information that indicates a color range that determines whether or not the pixel is an image processing application target, in association with processing content information that represents the content of the image processing A plurality of sets, and the color range of each set is two or more ranges independent from each other, and a pixel corresponding to the input image data is an image. When it is determined that the pixel is an application target of image processing, and an application target determination unit that determines whether the process is an application target by referring to the color relationship information of each of the plurality of sets. The color referred to in the determination With reference to the processing content information associated with the relation information, correspondence relation specifying means for specifying the correspondence relation for realizing the content of the image processing from among the plurality of correspondence relations, and the correspondence relation are specified. For each pixel, the image data of the pixel is converted with reference to the identified correspondence relationship, and the pixel determined to be the application target of the image processing based on the color relationship information of the plurality of sets. Each is configured to include image data conversion means for realizing the plurality of types of image processing contents.
[0006]
  Configured as aboveBookIn the invention, the imageMultipleWhen each pixel is expressed by image data, the image data of each pixel isinputTo do. On this occasionThe application target determining means determines whether or not the pixel corresponding to the input image data is an image processing application target by referring to the color relationship information regarding the color to be applied to the image processing, and If the pixel is determined to be subject to image processing,CorrespondencespecificMeansThe content of the image processing is realized from among a plurality of correspondence relationships for converting the image data with reference to the processing content information associated with the referenced color relationship information.CorrespondencespecificAndFor the pixels for which the correspondence relationship is specified,Image data conversion meansBut identifiedCorrespondenceSeeShineThe concernedPixel image data is converted.
[0007]
That is, a plurality of correspondence relationships for converting image data are provided, which correspondence relationship is to be applied for each pixel, and image data is converted by applying an appropriate correspondence relationship for each pixel. For example, the correspondence relationship that changes the green of the trees is applied to the green pixel of the trees, and the correspondence relationship that makes the skin look ruddy is applied to the skin-colored pixels.
[0008]
In view of performing image processing, the target image data is particularly suitable for a live-action image, and the real-image image here does not necessarily need to be 100% real-image, but it is semi-synthesized or a plurality of real-image images are mixed. It does n’t matter.
[0009]
  The color-related information indicates a color range that determines whether or not a focused pixel is an application target of image processing, and can be expressed by chromaticity or the like. In such a case, a means for detecting the chromaticity of the pixel based on the input image data is provided, and the application target determining means includes the detected chromaticity included in the chromaticity represented by the color relationship information. In such a case, the pixel may be determined to be an image processing application target. In this case, chromaticity is used only to determine the correspondence to be applied, and it is not always necessary to correct the chromaticity.
[0010]
  In order to determine the chromaticity as a condition indicating the color range, the input image data may be used as it is, or after changing the so-called color space into image data that can be more easily determined. You may judge. Furthermore, it is not necessarily limited to chromaticity in a narrow sense, and even when a predetermined feature amount that can be determined from image data is used, chromaticity can be determined in a broad sense.
[0011]
  In the image processing apparatus, when the second holding unit is a unit that holds a plurality of sets of color relation information and processing content information, the application target determination unit refers to the plurality of pieces of color relation information. Then, as the means for performing the determination, the correspondence relationship specifying means refers to the processing content information associated with each of the plurality of referred color relationship information, and realizes each of the contents of the plurality of types of image processing. It may be a means for specifying the correspondence.
[0015]
  On the other hand, various specific methods for providing a correspondence for converting image data can be employed. As an example, The firstHolding meansHowever, the configuration that holds the above correspondence in the form of a tone curve, and the above correspondenceThe correspondence between the original image data and the converted image dataExpressedColor conversion tableHold in the form ofConstitutionCan think.
[0016]
  aboveStore in the form of a color conversion tableStructureFinallyIn the top1st reportThe conversion source image data and the converted image data are stored in the color conversion table of the holding means, and the image data conversion means refers to the same color conversion table using the conversion source image data, thereby converting the converted image data. Image data will be obtained. That is, the correspondence relationship is stored as a table.
[0017]
Of course, in addition to this, it is also possible to hold the correspondence in the form of an arithmetic expression or a parameter for calculation, but there are also merits such as only having to refer to it when using a table.
[0018]
  The plurality of correspondence relationships are not necessarily limited to the case where there are a plurality of individual correspondence relationships, and may be ones that can substantially obtain a plurality of conversion results. As an example, The firstHolding meansBut,A plurality of correspondence relations, one correspondence relation and the correspondence relationBy changing the degree to which correspondence is appliedRetained as another correspondence that is generatedConfigurationCan think.
[0019]
  the aboveTo the configuration ofIn, No. 1The holding means realizes a plurality of correspondences by changing the degree of application of the correspondences. For example, it can be entered by setting a value corresponding to the degree of adaptation between image data to which the corresponding relationship is not applied and applied image data. In this case, linear association or non-linear association may be used.
[0020]
  Furthermore, such a suitableforIn the case of using the degree, if only one correspondence is provided, a state converted by applying the correspondence and a state substantially not converted are obtained, and a plurality of correspondences are provided. In this case, more correspondences can be realized by changing the adaptation degree.
[0021]
Second insuranceThe correspondence provided by the holding means may be determined in advance or may be determined as appropriate., Second protectionHolding meansThe,A means to retain color-related information and processing content information input by user operationsConstitutionCan think.
[0022]
  the aboveTo the configuration ofIn,UpThe correspondence to be applied to the image data isIdentified based on color relation information and processing content information input by user operation. Correspondence has two elements: conversion contents and application target.2nd reportThe holding means may be any target. In this case, it is also possible to designate a part of each image and select conversion contents in the designated part. Also, as an option for image processing, an item such as skin color correction or sky blue correction may be selected.
[0023]
  As a specific example of such correspondence, The firstHolding meansBut,As correspondence,Change brightness based on image dataRusekiConfiguration to hold the staffCan think.
[0024]
  the aboveTo the configuration ofIn, No. 1The holding unit holds a correspondence relationship for changing the brightness based on the image data, and the image data conversion unit performs conversion for changing the brightness for a predetermined pixel using the correspondence relationship. For example, conversion is performed such that a pixel is brightened for a certain part of the image.
[0025]
  Another exampleAndUp1st reportHolding meansBut,As correspondence,Change chromaticity based on image dataRusekiConfiguration to hold the staffCan think.
[0026]
  the aboveTo the configuration ofIn, No. 1The holding unit holds a correspondence relationship for changing the chromaticity based on the image data, and the image data conversion unit performs conversion for changing the chromaticity for a predetermined pixel by using the correspondence relationship. For example, if there are skin-colored pixels in the image, conversion is performed to enhance redness.
[0027]
  Furthermore, as another exampleAndUp1st reportHolding meansBut,As correspondence,Change color vividness based on image dataRusekiConfiguration to hold the staffCan think.
[0028]
  the aboveTo the configuration ofIn, No. 1The holding unit holds a correspondence that changes the vividness of the color based on the image data, and the image data conversion unit performs conversion that changes the vividness of the image using the correspondence. For example, when it is desired to enhance a colorful subject compared to the surrounding background, conversion is performed to make the subject more vivid.
[0032]
  As described above, it is not necessary to limit the method of providing a plurality of correspondences and changing the correspondences according to pixels, and it can be easily understood that the method also functions as a method. For this reason,Image processing method of the present inventionIsA method for inputting image data of a photographed image composed of a plurality of pixels and converting the image data of each pixel, wherein a plurality of correspondences for converting the image data are held, and the image processing is applied. Color-related information relating to color is stored in association with processing content information representing the content of image processing, and whether the pixel corresponding to the input image data is an application target of image processing, When it is determined with reference and it is determined that the pixel is an application target of image processing, the processing content information associated with the referred color relationship information is referred to, and among the plurality of correspondence relationships, The correspondence relationship that realizes the content of the image processing is specified, and for the pixel for which the correspondence relationship is specified, the image data of the pixel is converted with reference to the specified correspondence relationship.As a configuration.
[0033]
That is, it is not necessarily limited to a substantial apparatus, and there is no difference that the method is also effective.
[0034]
  The idea of the invention for image processing by the above-described method includes various aspects. That is, it can be changed as appropriate, for example, by hardware or by software. In the case of software for image processing as an embodiment of the idea of the invention, it naturally exists on a software recording medium in which such software is recorded, and it must be used. As an example,Recording medium of the present inventionIsWhether or not a pixel corresponding to the input image data is a target for image processing, which is a recording medium in which a program for converting image data of a photographed image consisting of a plurality of pixels is readable by a computer And a function for determining color with reference to color relationship information relating to a color to which image processing is applied, and when the pixel is determined to be an image processing application target, In addition, referring to the processing content information representing the content of the image processing, the function for specifying the correspondence for realizing the content of the image processing from among the plurality of correspondences and the specification of the correspondence were performed. For the pixel, the function for converting the image data of the pixel was recorded with reference to the specified correspondence relationship.As a configuration.
[0035]
Of course, the recording medium may be a magnetic recording medium, a magneto-optical recording medium, or any software recording medium to be developed in the future. In addition, the duplication stages such as the primary duplication product and the secondary duplication product are equivalent without any question. In addition, even when the communication method is used as a supply method, the present invention is not changed, and the same applies to the case where data is written on a semiconductor chip.
[0036]
Furthermore, even when a part is software and a part is realized by hardware, there is no difference in the idea of the invention, and a part is stored on a software recording medium as needed. It may be in a form that is read appropriately.
[0037]
【The invention's effect】
  As described above, the present inventionImage processing equipmentCan change the correspondence for converting the image data for each pixel, so that it is possible to provide an image processing apparatus capable of realizing desired image processing without adversely affecting other parts. .Further, if the configuration in which the correspondence relationship to be applied to the image data of each pixel is specified with reference to a plurality of sets of color relationship information and processing content information, the pixel to be image-processed exists in a plurality of portions. Even in such a case, image processing that does not adversely affect other portions can be realized relatively easily.
[0040]
  further,versusColor conversion tableIn the form ofHoldIf you take the configurationImage conversion is relatively easy.
[0041]
  further,A configuration is adopted in which a plurality of correspondence relationships are held as one correspondence relationship and another correspondence relationship generated by changing the degree of application of the correspondence relationship.Then, by changing the adaptation level, one correspondence can be used as a plurality of correspondences.
[0042]
  further,To image dataApplyDoCorrespondenceBy providing a configuration that uses color relationship information and processing content information input by a user's operation,The degree of freedom is improved.
[0043]
  further,A configuration that maintains the relationship of changing brightness based on image data as a correspondence relationship is adopted.Then, the brightness can be changed depending on the correspondence to be applied.
[0044]
  further,A configuration is adopted in which a relationship that changes chromaticity based on image data is held as a correspondence relationship.Then, it is possible to change the chromaticity depending on the correspondence to be applied.
[0045]
  further,A configuration that maintains the relationship that changes the vividness of colors based on image data as a correspondence relationship is adopted.If so, the vividness can be changed depending on the correspondence to be applied.
[0047]
  further,BookinventionImage processing methodCan provide an image processing method capable of obtaining the same effect,BookinventionRecording mediaAccording to this, it is possible to provide a medium on which an image processing program is recorded.
[0048]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0049]
FIG. 1 is a block diagram showing an image processing system using an image processing apparatus according to an embodiment of the present invention. FIG. 2 is a schematic block diagram showing a specific hardware configuration example.
[0050]
In FIG. 1, an image input device 10 outputs real image data representing a photograph or the like as a pixel in the form of a dot matrix to the image processing device 20, and the image processing device 20 designates the application target and contents of the image processing. To perform image processing on the target pixel. The image processing apparatus 20 outputs image processed image data to the image output apparatus 30, and the image output apparatus outputs the image processed image with dot matrix pixels.
[0051]
  Specific examples of the image input device 10 correspond to the scanner 11, the digital still camera 12, or the video camera 14 in FIG. 2, and specific examples of the image processing device 20 include the computer 21, the hard disk 22, the keyboard 23, the mouse 27, and the CD-ROM. With drive 24flexibleA computer system including a disk drive 25 and a modem 26 is applicable, and a specific example of the image output device 30 is a printer 31, a display 32, or the like. In the case of this embodiment, image processing is performed with a predetermined correspondence while designating a target pixel in order to correct a defect in the image. Therefore, actual image data such as a photograph is preferable as the image data. The modem 26 is connected to a public communication line, connected to an external network via the public communication line, and can be installed by downloading software and data.
[0052]
In the present embodiment, the scanner 11 and the digital still camera 12 as the image input device 10 output RGB (green, blue, red) gradation data as image data, and the printer 31 as the image output device 30 has a floor. As the tone data, CMY (cyan, magenta, yellow) or CMYK binary data obtained by adding black to this is required as input, and the display 32 requires RGB gradation data as input. On the other hand, an operating system 21a operates in the computer 21, and a printer driver 21b and a display driver 21c corresponding to the printer 31 and the display 32 are incorporated.
[0053]
The image processing application 21d is controlled by the operating system 21a to execute processing, and executes predetermined image processing in cooperation with the printer driver 21b and the display driver 21c as necessary. Therefore, the specific role of the computer 21 as the image processing apparatus 20 is to create RGB gradation data that has been subjected to optimum image processing while inputting RGB gradation data and evaluating the image, and the display driver 21c. Is displayed on the display 32 via the printer driver 21b, and is converted into binary data of CMY (or CMYK) via the printer driver 21b and printed on the printer 31.
[0054]
As described above, in this embodiment, a computer system is incorporated between image input / output devices to perform image evaluation and image processing. However, such computer system is not necessarily required, and image data The present invention can be applied to a system that performs various image processing. For example, as shown in FIG. 3, an image processing apparatus that executes image processing corresponding to each predetermined application target is incorporated in the digital still camera 12a, and the converted image data is displayed on the display 32a or printed on the printer 31a. It may be a system that allows As shown in FIG. 4, in a printer 31b that inputs and prints image data without going through a computer system, each pixel is obtained from image data inputted through a scanner 11b, a digital still camera 12b, a modem 26b, or the like. It is also possible to determine whether or not each image belongs to the application target and execute corresponding image processing.
[0055]
The above-described image evaluation and accompanying image processing are specifically performed by the image processing program corresponding to the flowchart shown in FIG. The processing contents are roughly described as follows. In the first step S100, processing for designating a target to be applied for each image processing is performed, and in steps S110 to S140, a predetermined image is moved while moving the target pixel for each pixel in a dot matrix as shown in FIG. Execute the process. At this time, in step S110, it is determined whether or not the target pixel is the target of the image processing specified in step S100. In step S120, the image data is converted according to the determination result. Of course, the image processing is substantially performed by this conversion. Steps S130 and S140 correspond to the process of moving the target pixel. Hereinafter, it demonstrates in detail along this big flow.
[0056]
Although which pixel the image processing should be performed on depends on the contents of the image processing, in the present embodiment, as shown in FIGS. 7 and 8, a part of the image to be processed is designated. As shown in FIG. 7, an operation area 41 for operating the window frame is provided along the upper side of the window 40, and an image display area 42 is provided in the central portion, and image processing is performed along the lower side. A processing menu area 43 for designating is provided.
[0057]
A rectangular area is designated with the mouse 27 while an image to be processed is displayed in the display area 42, and image processing in the processing menu area 43 is selected with the mouse 27. In the processing menu area 43, as the executable image processing, an arrow indicating the degree is provided together with each region of “contrast” correction, “brightness” correction, “sharpness” correction, and “saturation” correction. Clicking on the contrast up arrow with the mouse 27 designates image processing for enhancing the contrast, and clicking on the down arrow designates image processing for reducing the contrast.
[0058]
A plurality of image processes may be selected for each area, and the selected image process can be selected by clicking “list display / edit” in the process menu area 43. Displays the lower coordinate and the processing type and level of image processing. The level indicates the degree of image processing, and is data for increasing or decreasing the degree of processing depending on the number of clicks of the above-described up arrow and down arrow. The processing type indicates the type of image processing as will be described later. In this example, the “contrast” correction is 1, the “brightness” correction is 2, the “sharpness” correction is 3, and the “saturation” correction is 4 means each object. The processing type and level will be described later together with the description of the contents of the image processing. Further, in order to delete the selected image processing, each designation may be clicked to highlight it, and the delete key on the keyboard 23 may be pressed. In addition, editing may be performed in accordance with normal application operations.
[0059]
In the present embodiment, since the image processing application 21d is executed at the application level, it is possible to display an image to be processed in the window 40 and specify a region. However, there are cases where similar image processing is realized at a driver level such as the printer driver 21b. In this case, the image may not always be displayed in a window.
[0060]
FIG. 10 shows an example of designating an image processing target regardless of the window display, and shows a window 50 that is selected as an option when the printer driver 21b is activated. 7 to 9 designate the part of the image, in this example, the target pixel is selected by designating the chromaticity of the image. Here, chromaticity will be described.
[0061]
As a specific example of chromaticity, xy chromaticity is calculated. Now, when the RGB gradation data in the RGB color system of the target pixel is (R, G, B),
r = R / (R + G + B) (1)
g = G / (R + G + B) (2)
Then, between the chromaticity coordinates x and y in the XYZ color system,
x = (1.1302 + 1.6387r + 0.6215g) / (6.7846-3.0157r-0.3857g) (3)
y = (0.0601 + 0.9399r + 4.5306g) / (6.7846-3.0157r-0.3857g) (4)
The corresponding relationship is established. Here, the chromaticity represents the absolute ratio of the stimulus value of the color without being influenced by the brightness, so it can be said that it is possible to determine what kind of object the pixel is based on the chromaticity. .
[0062]
For example, if a human figure is considered as an object of an image, it can be said that it is sufficient to extract pixels of a skin color portion. The chromaticity for skin color is
0.35 <x <0.40 (5)
0.33 <y <0.36 (6)
Therefore, if the chromaticity of each pixel is obtained within this range, it can be said that the pixel is not erroneous even if it is considered as a pixel representing human skin. Similarly, if the chromaticity of the blue sky or the green chromaticity of the trees is also determined as the chromaticity, the sky pixels and the green pixels of the trees can be roughly specified regardless of the brightness. FIG. 11 shows the distribution relationship of the xy chromaticity, and it is possible to grasp a skin color region, a blue sky color region, or a green color region of trees as such a rectangular region. Is shown. Note that, as shown in FIG. 10, the distribution range of the xy chromaticity may be directly designated so as to be individually designated.
[0063]
On the other hand, FIG. 12 shows a method for designating the center point in determining the area similarly. In the case of skin color, as the center point from equations (5) and (6),
x = 0.375 (7)
y = 0.345 (8)
Is obtained. Therefore, if it is within a circle having a constant radius with this center point as a reference, it may be determined that it belongs to the region.
[0064]
In the window 50 displayed as an option of the printer driver 21b, a specific example for a predetermined chromaticity is displayed in order to specify an object by chromaticity, and the operator wants to clean the blue sky intentionally or to make the trees green vividly It is possible to reflect such requests. In this case, an arrow button is also provided for instructing whether to emphasize or weaken each chromaticity pixel.
[0065]
In this example, the pixel range is specified by chromaticity and used for image processing such as whether or not to emphasize the chromaticity. However, the selection of the pixel based on chromaticity and the image processing to be executed must match. There is no. For example, image processing such as brightening skin color pixels or enhancing the contrast of green pixels may be used. In other words, the chromaticity can be used as an index as to whether or not the pixel is a processing target, and in this example, it is only used for selection of image processing.
[0066]
  As described above, the process of step S100 for designating the target to be applied for each image process constitutes the correspondence designation means. However, the present invention is not limited to these, and the technique for designating the part and chromaticity is appropriately changed. It is possible to specify by other elements such as brightness and sharpness. Further, as shown in FIG. 9, a correspondence table for specifying and storing a predetermined area and associating and holding the image processing is held in a storage area in the computer system, but a color conversion table for image processing to be described later With1st and 2ndIt goes without saying that the holding means is configured.
[0067]
In the next step S110 and after, it is determined whether or not the target pixel of the image processing designated as described above is moved while moving the target pixel. Whether or not the target pixel is the target of image processing may be compared with the coordinates of the target pixel with reference to the upper left coordinates and lower right coordinates of each column in the area / table correspondence table shown in FIG. If there is a corresponding column, it is determined that the pixel is an image processing target pixel, and if it does not belong to any column area, it is determined that the target pixel need not be subjected to image processing. Also, as shown in FIG. 10, when judging by chromaticity, the chromaticity of the target pixel is calculated according to the equations (1) to (4), and whether it belongs to the chromaticity range selected by the option of the printer driver 21b. Determine whether or not.
[0068]
Whether or not an image processing target is applied is determined based on the part or chromaticity as described above, but if an alternative determination such as whether or not it belongs to these ranges is performed, some visual perception of the adjacent region will occur. Level differences are likely to occur. For example, if a certain rectangular area is to be brightened, if it is not brightened just outside the rectangular area, a brightness step will occur at the boundary, and the rectangular area will be clearly understood.
[0069]
For this reason, in this embodiment, the parameter of the image processing applicability k is used. As shown in FIG. 13, if it is determined in step S111 that it belongs to a predetermined area, the applicability k is set to “1” in step S112. It is changed in the range of “0” to “1”. That is, if it is determined in step S113 that it is within the transition area, in step S114, the applicability k is brought closer to “1” if close to the area, and close to “0” if far. If it does not belong to either the predetermined area or the transition area, “0” is set to the applicability k in step S115. On the other hand, in the example shown in FIG. 12, the center point of chromaticity is designated, but as shown in FIG. Is set to a range of radius r0 to radius r1 so that the applicability k gradually approaches “0” at the peripheral portion.
[0070]
In step S110, the application correspondence is determined, and the applicability k is obtained in steps S111 to S115. Correspondence determination means is constituted by the software processing in steps S110 to S115 as described above and the hardware that realizes the software processing. In the present embodiment, the determination result is obtained as the applicability k of each image processing, but it goes without saying that an alternative determination as to whether or not to apply can be realized.
[0071]
In the next step 120, image processing is executed on the target pixel while paying attention to the applicability k. Here, the specific contents of the image processing prepared in this embodiment will be described.
[0072]
The contrast indicates the width of the brightness of the entire image, and when it is desired to correct the contrast, there is mainly a desire to increase the width of the contrast. A total line of luminance distribution in each pixel of an image as a histogram is shown by a solid line in FIG. When the distribution shown by the solid line is taken, the difference between the brightness of the bright pixel and the brightness of the dark pixel is small, but if the brightness distribution is widened as shown by the dashed line, the difference between the brightness of the bright pixel and the brightness of the dark pixel is large. As a result, the range of contrast is widened. Here, FIG. 17 shows luminance conversion for increasing the contrast. Between the luminance y after conversion and the luminance Y after conversion,
Y = ay + b (9)
Therefore, when a> 1, the difference between the maximum luminance ymax and the minimum luminance ymin of the conversion source becomes larger after conversion, and the luminance distribution is widened as shown in FIG. In this case, it is more preferable to determine the inclination a and the offset b in accordance with the luminance distribution. For example,
a = 255 / (ymax−ymin) (10)
b = −a · ymin or 255−a · ymax (11)
If this is the case, the luminance distribution having a narrow width can be expanded to a reproducible range. However, when the luminance distribution is expanded by making the maximum use of the reproducible range, the highlight portion may be white and the high shadow portion may be black. In order to prevent this, it is only necessary to leave “5” as a luminance value as a range that does not expand to the upper end and the lower end of the reproducible range. As a result, the parameters of the conversion equation are as follows:
[0073]
a = 245 / (ymax−ymin) (12)
b = 5-a · ymin or 250-a · ymax (13)
In this case, conversion is not performed in the range of y <ymin and y> ymax.
[0074]
It is not necessary to calculate every time image data is converted. If the luminance range takes values “0” to “255”, a conversion result is previously set for each luminance value, and a conversion table is formed as shown in FIG. However, in this case, it is only luminance conversion. If the image data has luminance as an element, this conversion table can be used, but if the luminance is only an indirect element, the conversion is performed. The table cannot be used. In a computer system, image data is often gradation data (R, G, B) in which brightness is expressed by gradation for each element of red, green, and blue. Such gradation data (R, G, B) does not have a luminance value directly, and it is necessary to perform color conversion to the Luv color space in order to obtain the luminance. Is not a good idea. For this reason, the following conversion formula for directly obtaining the luminance from the RGB used in the case of a television or the like is used.
[0075]
y = 0.30R + 0.59G + 0.11B (14)
Assuming that linear conversion is possible between the gradation data and the luminance y in this way, the gradation data before conversion (R0, G0, B0) and the gradation data after conversion (R1, (9) can be applied between G1, B1)
R1 = aR0 + b (15)
G1 = aG0 + b (16)
B1 = aB0 + b (17)
As a result, it is understood that the gradation data should be converted using the conversion table shown in FIG.
[0076]
  Next, an image processing method for correcting brightness will be described. Assuming a luminance histogram as before, if the peaks of the luminance distribution are on the dark side as shown by the solid line in FIG.Broken lineIt is better to move the mountain to the bright side as shown in FIG. 19, and conversely, if the peak of the luminance distribution is closer to the bright side as shown by the solid line in FIG.Broken lineIt is better to move the mountain to the dark side as shown in. In such a case, instead of performing linear luminance conversion as shown in FIG. 17, luminance conversion using a so-called γ curve as shown in FIG. 20 may be performed.
[0077]
In the correction using the γ curve, the entire image becomes bright when γ <1, and the entire image becomes dark when γ> 1. This degree may be gradually changed depending on the number of times the up arrow or down arrow in the brightness correction column is clicked in the process menu area 43 shown in FIG.
[0078]
It is also possible to automatically set the value of γ as in the case of contrast correction. As a result of various experiments, the median ymed in the luminance distribution is obtained, and when the median ymed is less than “85”, the image is determined to be a dark image and brightened by γ correction corresponding to the following γ values.
[0079]
γ = ymed / 85 (18)
Or
γ = (ymed / 85) ** (1/2) (19)
And However, even if γ <0.7, γ = 0.7. This is because if such a limit is not set, the night image becomes like the daytime. Note that if the image is too bright, the overall image becomes whitish and the contrast tends to be low, so that processing such as enhancement of saturation is suitable.
[0080]
On the other hand, when the median ymed is larger than “128”, the image is judged to be a bright image and darkened by γ correction corresponding to the following γ values.
[0081]
γ = ymed / 128 (20)
Or
γ = (ymed / 128) ** (1/2) (21)
And In this case, even if γ> 1.3, a limit is set so that γ = 1.3 so as not to be too dark.
[0082]
For this γ correction, a conversion table as shown in FIG. 16 may be formed.
[0083]
In the edge enhancement processing for correcting the sharpness of the image, the luminance Y ′ after enhancement with respect to the luminance Y of each pixel before enhancement is
Y ′ = Y + Eenhance · (Y−Yunsharp) (22)
Is calculated as Here, Eenhance is the degree of edge enhancement, and Yunsharp is obtained by performing unsharp mask processing on the image data of each pixel. Here, unsharp mask processing will be described. FIG. 21 shows an unsharp mask 60 of 5 × 5 pixels as an example. This unsharp mask 60 uses the value of “100” in the center as the weight of the processing target pixel Y (x, y) in the matrix-like image data, and weights corresponding to the numerical values in the squares of the mask for the peripheral pixels. Used for accumulating. When using this unsharp mask 60,
[0084]
[Expression 1]
Figure 0003918257
[0085]
Is integrated based on the following equation. In Expression (23), “396” is the total value of the weighting coefficients, and in the unsharp masks having different sizes, it is the total value of the cells. Mij is a weighting factor written in the grid of the unsharp mask, and Y (x, y) is image data of each pixel. Note that ij is indicated by the coordinate values of the horizontal and vertical columns with respect to the unsharp mask 41.
[0086]
The meaning of the edge enhancement calculation calculated based on the equation (22) is as follows. Yunsharp (x, y) is obtained by lowering the weight of the peripheral pixel with respect to the target pixel and adding it, so that it is so-called “unsharp” image data. What is smoothed in this way has the same meaning as that obtained by applying a so-called low-pass filter. Therefore, “Y (x, y) −Yunsharp (x, y)” has the same meaning as that obtained by applying the high-pass filter by subtracting the low frequency component from the original all components. Then, by multiplying the high frequency component that has passed through the high pass filter by the edge enhancement degree Eenhance and adding it to “Y (x, y)”, the high frequency component is increased in proportion to the edge enhancement degree Eenhance. The result is an enhanced edge. Considering the situation where edge enhancement is necessary, it is a so-called edge portion of an image, so that the amount of processing can be drastically reduced by calculating only when there is a large difference in image data between adjacent pixels. .
[0087]
Even in this case, the edge emphasis degree Eenhance may be changed according to the number of clicks of the up arrow or down arrow in the sharpness correction column in the processing menu area 43 shown in FIG. It is also possible to automatically set the edge enhancement level Eenhance.
[0088]
In the edge portion of the image, the difference in gradation data between adjacent pixels becomes large. This difference is a luminance gradient, which is referred to as an edge degree. The degree of change in luminance of an image can be calculated by obtaining a vector by dividing it into a horizontal component and a vertical component. In an image composed of pixels in a dot matrix, the pixel is adjacent to the eight pixels when the target pixel is the center, but only between the pixels adjacent in the horizontal and vertical directions to simplify the calculation. The degree of change is obtained, the vector length is integrated as the edge degree g of the target pixel, and the average value is calculated by dividing the integrated edge degree by the number of pixels. That is, the sharpness SL of the object image is defined as E (I) pix when the number of pixels is E (I) pix.
[0089]
[Expression 2]
Figure 0003918257
[0090]
It can be calculated as follows. In this case, the smaller the SL value, the lower the sharpness level (the more blurred), and the higher the SL value, the higher the sharpness (the more apparent).
[0091]
On the other hand, since the sharpness of the image is sensuous, the sharpness SL is similarly determined for the image data having the optimum sharpness obtained experimentally, and the value is set as the ideal sharpness SLopt. , Edge enhancement Eenhance,
Eenhance = ks · (SLopt-SL) ** (1/2) (25)
Asking. Here, the coefficient ks changes based on the size of the image. When the image data is composed of height dots and width dots in the vertical and horizontal directions,
ks = min (height, width) / A (26)
You can find it like this. Here, min (height, width) indicates the smaller of the height dot and the width dot, and A is a constant “768”. Of course, these are obtained from the experimental results and can be changed as appropriate. However, basically, a larger result is obtained by increasing the degree of enhancement for a larger image.
[0092]
As described above, the edge enhancement processing can be executed manually or automatically.
[0093]
Saturation image processing is performed as follows. When the saturation enhancement parameter Sratio is used to enhance the saturation, as described above, if the image data has a saturation parameter, the same parameter may be converted. Therefore, the saturation value cannot be obtained unless conversion to the color space where the saturation value is a direct component value is inherently performed. However, it is necessary to convert RGB image data into image data in the Luv space and return to RGB again after saturation enhancement, and the amount of computation must be increased. Therefore, saturation enhancement is performed using RGB gradation data as it is.
[0094]
When each component is a component value of a hue component in which the respective components are roughly equivalent as in the RGB color space, if R = G = B, the color is gray and achromatic. Therefore, assuming that the component having the minimum value in each component of RGB is merely reducing the saturation without affecting the hue of each pixel, the minimum value in each component is determined from all the component values. It can be said that the saturation can be enhanced by subtracting and enlarging the difference value.
[0095]
If the component value of blue (B) in each component (R, G, B) of the RGB gradation data is the minimum value, conversion is performed as follows using this saturation emphasis parameter Sratio.
[0096]
R ′ = B + (R−B) × Sratio (27)
G ′ = B + (GB) × Sratio (28)
B '= B (29)
As a result, it is not necessary to perform two-time color conversion between the RGB color space and the Luv space, so that the calculation time can be reduced. In this embodiment, the method of simply subtracting the minimum value component from the other component values for the achromatic component is adopted, but another conversion formula is adopted for subtracting the achromatic component. It doesn't matter if you do it. However, when only the minimum value is subtracted as in equations (27) to (29), there is an effect that the amount of calculation becomes easy because multiplication and division are not involved.
[0097]
Even when the equations (27) to (29) are adopted, good conversion is possible, but in this case, when the saturation is emphasized, there is a tendency that the luminance is improved and the entire image becomes brighter. Therefore, the conversion is performed on the difference value obtained by subtracting the luminance equivalent value from each component value.
[0098]
Saturation enhancement
R ′ = R + ΔR (30)
G ′ = G + ΔG (31)
B ′ = B + ΔB (32)
Then, the addition / subtraction values ΔR, ΔG, and ΔB are obtained as follows based on the difference value from the luminance. That is,
ΔR = (R−Y) × Sratio (33)
ΔG = (G−Y) × Sratio (34)
ΔB = (BY) × Sratio (35)
And as a result,
R ′ = R + (R−Y) × Sratio (36)
G ′ = G + (G−Y) × Sratio (37)
B ′ = B + (BY) × Sratio (38)
Can be converted as In addition, the preservation | save of a brightness | luminance is clear from following Formula.
[0099]
Figure 0003918257
Further, when the input is gray (R = G = B), the luminance Y = R = G = B, so the addition / subtraction value ΔR = ΔG = ΔB = 0, and the achromatic color is not colored. . If the formulas (36) to (38) are used, the luminance is preserved, and even if the saturation is enhanced, the overall brightness does not increase.
[0100]
Of course, the saturation emphasis index Sratio in this case may be changed depending on the number of clicks on the up arrow and down arrow in the column for saturation correction in the processing menu area 43 shown in FIG. However, the saturation emphasis index Sratio can also be automatically set.
[0101]
First, the saturation of the pixel is determined in a simplified manner. For this purpose, a saturation substitution value X is calculated as follows.
[0102]
X = | G + B−2 × R | (41)
Originally, the saturation is “0” when R = G = B, and becomes the maximum value when mixing with a predetermined ratio of one or two colors of RGB. Although it is possible to express the saturation appropriately from this property, it is possible to obtain the maximum saturation if it is yellow, which is a single color of red and a mixed color of green and blue, even by the simple equation (41). It is “0” when the components are uniform. In addition, green and blue single colors reach about half of the maximum value. Of course,
X ′ = | R + B−2 × G | (42)
X ″ = | G + R−2 × B | (43)
It is also possible to substitute for this formula.
[0103]
If the distribution of the histogram for the alternative value X of saturation is obtained, the saturation is distributed in the range from the minimum value “0” to the maximum value “511”, and thus the distribution is roughly as shown in FIG. . Next, a saturation index for the image is determined based on the aggregated saturation distribution. A range occupied by upper 16% is obtained from this saturation distribution, and the lowest saturation “A” in this range represents the saturation of this image.
S = −A × (10/92) +50 (44)
If 92 ≦ A <184
S = −A × (10/46) +60 (45)
If 184 ≤ A <230
S = −A × (10/23) +100 (46)
If 230 ≦ A
S = 0 (47)
Thus, the saturation emphasis index S is determined. FIG. 23 shows the relationship between the saturation “A” and the saturation enhancement index S. As shown in the figure, the saturation index S is large when the saturation “A” is small in the range from the maximum value “50” to the minimum value “0”, and small when the saturation “A” is large. It will change gradually. The conversion from the saturation index S to the saturation enhancement index Sratio is
Sratio = (S + 100) / 100 (48)
As long as you ask. In this case, when the saturation enhancement index S = 0, the saturation enhancement parameter Sratio = 1 and the saturation is not enhanced.
[0104]
Finally, a method for enhancing the chromaticity while designating the range of the pixel by chromaticity as shown in FIG. 10 will be described. Basically, a method for increasing the luminance of the pixel in enhancing the color tone. Is adopted. Accordingly, a tone curve for γ correction as shown in FIG. 20 is used. Of course, the value of γ may be changed according to the degree of emphasis. In the case of automatic setting, an average value (Rs.ideal, Gs.ideal, Bs.ideal) is calculated for an image close to the ideal value, and the average value (Rs.ideal, Gs). .ideal, Bs.ideal) and the average value (Rs.ave, Gs.ave, Bs.ave) based on the total result of the image, and the difference is set as the correction amount ΔR, ΔG, ΔB. Good.
[0105]
As described above, the image processing method prepared in the present embodiment has been described, but since the application correspondence relationship of the target pixel is determined in step S110 and the applicability k is obtained in steps S111 to S115, in step S120, Image data is converted based on the determination result.
[0106]
As described above, in the processing menu area 43 shown in FIG. 7, the type of image processing is selected and the enhancement level is also selected. Accordingly, in step S100, a conversion table corresponding to each enhancement level is created on the premise of the above-described image processing, and is stored in a predetermined storage area in the computer system. In step S120, the conversion is performed as follows with reference to the conversion table.
[0107]
Each component (Rpre, Gpre, Bpre) of the RGB gradation data before conversion and each component (Rpost, Gpost, Bpost) of the RGB gradation data after conversion with reference to a predetermined conversion table are used. If the typical image data is (Rfinl, Gfinl, Bfinl)
Rfinl = k.Rpost + (1-k) .Rpre (49)
Gfinl = k · Gpost + (1−k) · Gpre (50)
Bfinl = k · Bpost + (1−k) · Bpre (51)
And convert. This means that the image processing gradually has a weight in the transition region where the applicability k changes from “0” to “1”, and a step does not occur.
[0108]
Of course, the formulas (49) to (51) are sequentially applied to all the image processing conversion tables to which the target pixel is applicable. If the applicability k is “0”, image data conversion is not performed. May be. Further, although Equations (49) to (51) are calculations for each component of RGB, the target component may be a part. Further, when the applicability k is not used, each component (Rpost, Gpost, Bpost) of RGB gradation data obtained by simply changing the type of the conversion table may be used as it is.
[0109]
In the above, the target to be applied for each image processing is specified. That is, when viewed from the whole, only a specific area is subjected to image processing. However, as a matter of course, it is possible to perform another image processing on a specific area while performing some image processing on the whole.
[0110]
Here, each component (Rtotal, Gtotal, Btotal) is obtained as a conversion result of image processing for the entire image, and each component (Rpart, Gpart, Bpart) is obtained as a conversion result of image processing for a specific region. Then, the final image data (Rfinl, Gfinl, Bfinl) uses the same applicability k ′,
Rfinl = k ′ · Rpart + (1−k ′) · Rtotal (52)
Gfinl = k ′ · Gpart + (1−k ′) · Gtotal (53)
Bfinl = k ′ · Bpart + (1−k ′) · Btotal (54)
It may be calculated by weighted addition.
[0111]
For example, FIG. 24 schematically shows a selection mode in a situation where it is desired to brighten a person with a slight backlight while enhancing the vividness of the color as a whole in the photograph of FIG. That is, the conversion results (Rtotal, Gtotal, Btotal) for the lower left falling hatch area for the entire image and the conversion results (Rpart, Gpart, Bpart) for the lower right falling hatch area for the human image are as follows: They are superimposed using the applicability k ′. In this case, the applicability k ′ becomes 0.5 at the maximum in the region designated for the human image, and the applicability k ′ changes within the range of 0 <k ′ <0.5 in the peripheral transition region. You can do it. On the other hand, the applicability k ′ in the region designated for the human image is set to be 1.0 at maximum, and the applicability k ′ is 0 <k ′ <1. If the change is made within the range of 0, it is possible to prevent the conversion of the entire image from being applied within the area designated for the human image. Of course, a larger number of image processing results can be applied in the same manner.
[0112]
Thereafter, in step S130, the target pixel is moved, and in step S140, it is determined whether the processing has been completed for all target pixels. If the processing has been completed, the image processing ends.
[0113]
In addition, although the method for automatically setting the degree of enhancement in each image processing has been described, they perform the necessary aggregation by sampling the image data evenly before moving the target pixel as described above. The degree of emphasis may be automatically set based on the total result and a conversion table may be created.
[0114]
When the printer driver 21b selects an option based on chromaticity, the enhancement level can be set by such automatic setting, so that the operability can be improved.
[0115]
Next, the operation of the present embodiment configured as described above will be described.
[0116]
Assume that a photographic image is read by the scanner 11 and printed by the printer 31. Then, first, while the operating system 21a is operating on the computer 21, the image processing application 21d is started, and the scanner 11 is started to read a photograph. When the read image data is taken into the image processing application 21d via the operating system 21a, the image processing application 21d executes image processing based on the flowchart shown in FIG.
[0117]
First, in step S100, the read photographic image is displayed in the display area 42 of the window 40 as shown in FIG. In this state, as shown in FIG. 8, the operator designates the sky blue portion as a rectangular area with the mouse 27 and clicks the up arrow several times so as to emphasize the saturation in the processing menu area 43. In addition, a rectangular area is selected so that the person image at the center enters, and the up arrow is clicked several times so as to emphasize the brightness in the processing menu area 43. That is, the image processing for enhancing the saturation is specified by designating the sky region of the background, and the image processing for increasing the brightness by designating the human region is designated.
[0118]
When the specification is ended by closing the window, a conversion table is created based on the specification. That is, referring to the area table correspondence table shown in FIG. 9, the type of image processing is determined with reference to the processing type, the degree of enhancement is determined based on the level, and a conversion table is created. Here, a conversion table for saturation enhancement processing and a conversion table for increasing brightness are created.
[0119]
Thereafter, the processing target pixel is set to the initial position, and in step S110, it is determined whether or not the coordinates of the target pixel are included in each region of the region table correspondence table shown in FIG. Of course, in this case, the transition area is also taken into consideration, and the applicability k is obtained. As shown in FIG. 8, if the target pixel falls within the hatched area, “1” is set as the applicability k. Therefore, in step S120, the conversion table of the target image processing is referred to, and (49) to The image data is converted based on the equation (51). In the example shown in FIG. 8, the rectangular area designating the background portion and the rectangular area designating the human image partially overlap, and the equations (49) to (51) are applied to the overlapping portions in two stages. To convert the image data. Of course, the image data is also converted for the transition region so that no step is generated from the unspecified peripheral portion.
[0120]
The above process is repeated until it is determined in step S140 that all the pixels have been executed while moving the pixel to be processed in step S130. As a result, image processing is performed for the sky blue part to enhance the saturation and make it look like a blue sky. It becomes an image. Of course, even if the person image becomes brighter, the sky part does not become brighter, and the saturation is not particularly emphasized in the person image part.
[0121]
Thereafter, the image data subjected to image processing is displayed on the display 32 via the display driver 21c, and if it is satisfactory, the image data is printed by the printer 31 via the printer driver 21b. That is, the printer driver 21b inputs RGB gradation data subjected to image processing as specified for each specified area, performs rasterization corresponding to the print head area of the printer 31 through predetermined resolution conversion. The rasterized data is color-converted from RGB to CMYK, and then converted from CMYK gradation data to binary data and output to the printer 31.
[0122]
On the other hand, when image processing is not performed as the image processing application 21d but print processing is executed from a predetermined application and the printer driver 21b is activated, the read image cannot be displayed in the display area 41 of the window 40 in many cases. . In this case, the printer driver 21b can display an option selection screen as shown in FIG. 10, and the operator wants to clean a person's skin while looking at a photograph before reading, etc. For example, an item for desired image processing is selected. This process corresponds to the application target designation process in step S100 shown in FIG.
[0123]
After selecting the option, the printer driver 21b internally creates a conversion table, determines the chromaticity for each pixel of the input image data, and determines whether the chromaticity is the target of the option selected. If it is the target, conversion is executed based on the equations (49) to (51) with reference to the conversion table, and the converted image data is converted into CMY image data that can be output to the printer 31. Convert.
[0124]
As a result, in the original image, the human skin pixel and the green pixel of the trees are corrected brightly, and as a result, the image is printed so that it looks vivid.
[0125]
As described above, the computer 21 which is the center of the image processing designates an area to which the image processing is to be applied in step S100, and in steps S110 to S140, it is determined whether or not it belongs to the designated area while moving the target pixel. However, if it belongs, the specified image processing will be executed, so modifying the image data of one area will not adversely affect the image data of another area, and make it beautiful as a whole Can be easily realized.
[Brief description of the drawings]
FIG. 1 is a block diagram of an image processing apparatus according to an embodiment of the present invention.
FIG. 2 is a block diagram of specific hardware of the image processing apparatus.
FIG. 3 is a schematic block diagram illustrating another application example of the image processing apparatus of the present invention.
FIG. 4 is a schematic block diagram illustrating another application example of the image processing apparatus of the present invention.
FIG. 5 is a flowchart showing image processing in the image processing apparatus of the present invention.
FIG. 6 is a diagram illustrating a state in which a processing target pixel is moved.
FIG. 7 is a diagram showing a display state for designating a processing target area and processing content.
FIG. 8 is a diagram illustrating a state where two processing target areas are selected.
FIG. 9 is a diagram showing an area / table correspondence table for storing a designated area and an image processing target;
FIG. 10 is a diagram showing a display state of a screen for selecting options for processing targets and processing details;
FIG. 11 is a diagram illustrating a rectangular area designated by xy chromaticity.
FIG. 12 is a diagram illustrating a situation in which a center point is designated by xy chromaticity.
FIG. 13 is a flowchart when setting the degree of application;
FIG. 14 is a graph showing a change in applicability when a center point is designated by xy chromaticity.
FIG. 15 is a diagram illustrating a distribution range when a luminance distribution is enlarged.
FIG. 16 is a diagram illustrating a conversion table when a luminance distribution is enlarged.
FIG. 17 is a diagram illustrating a conversion relationship for expanding a luminance distribution.
FIG. 18 is a diagram illustrating a concept of brightening by γ correction.
FIG. 19 is a diagram showing a concept of darkening by γ correction.
FIG. 20 is a diagram illustrating a correspondence relationship of luminance changed by γ correction.
FIG. 21 is a diagram illustrating an unsharp mask of 5 × 5 pixels.
FIG. 22 is a schematic view of a total state of saturation distribution.
FIG. 23 is a diagram illustrating a relationship between saturation A and saturation enhancement index S.
FIG. 24 is a diagram illustrating a processing target area in a case where image processing applied to the whole and image processing applied to a part are performed.
[Explanation of symbols]
10. Image input device
20. Image processing apparatus
21 ... Computer
21a ... Operating system
21b ... Printer driver
21c ... Display driver
21d ... Image processing application
22 Hard disk
23 ... Keyboard
24 ... CD-ROM drive
25 ...flexibleDisk drive
26. Modem
30. Image output device

Claims (9)

複数の画素からなる実写画像の画像データを入力し、各画素の画像データを変換する画像処理装置であって、
前記画像データを変換する対応関係をそれぞれ保持する第1保持手段と、
前記画素が画像処理の適用対象となるか否かを決定する色の範囲を示す色関係情報を、画像処理の内容を表わす処理内容情報と関連付けて組にし、該組を複数保持しており、かつ該各組の前記色関係情報が示す前記色の範囲は互いに独立な2つ以上の範囲である第2保持手段と、
前記入力された画像データに対応する画素が画像処理の適用対象であるか否かを、前記複数の組のそれぞれの色関係情報を参照して判定する適用対象判定手段と、
前記画素が画像処理の適用対象であると判定された場合に、該判定において前記参照した色関係情報に関連付けられた処理内容情報を参照して、前記複数の対応関係のうちから、画像処理の内容を実現する前記対応関係を特定する対応関係特定手段と、
該対応関係の特定が行なわれた画素については、該特定した対応関係を参照して、当該画素の画像データを変換することで、前記複数の組の前記各色関係情報により前記画像処理の適用対象であると判断された画素のそれぞれについて、前記複数種類の画像処理内容をそれぞれ実現する画像データ変換手段と
を備えた画像処理装置。
An image processing device that inputs image data of a real image consisting of a plurality of pixels and converts the image data of each pixel,
First holding means for holding each correspondence for converting the image data;
Color relationship information indicating a color range for determining whether or not the pixel is an application target of image processing is associated with processing content information indicating the content of image processing, and a plurality of the sets are held; And the color range indicated by the color relationship information of each set is a second holding unit that is two or more ranges independent of each other;
Application target determining means for determining whether or not a pixel corresponding to the input image data is an application target of image processing with reference to each color relationship information of the plurality of sets;
When it is determined that the pixel is an image processing application target, the processing content information associated with the referenced color relationship information in the determination is referred to, and the image processing is selected from the plurality of correspondence relationships. Correspondence specifying means for specifying the correspondence that realizes the contents;
For the pixel for which the correspondence relationship has been specified, the image processing target is applied based on the color relationship information of the plurality of sets by converting the image data of the pixel with reference to the specified correspondence relationship. An image processing apparatus comprising: image data conversion means for realizing the plurality of types of image processing contents for each of the pixels determined to be.
前記第1保持手段は、前記対応関係を、トーンカーブの形態で保持する請求項1記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the first holding unit holds the correspondence in the form of a tone curve. 前記第1保持手段は、前記対応関係を、変換元の画像データと変換後の画像データの対応関係を表わした色変換テーブルの形態で保持する請求項1または請求項2記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the first holding unit holds the correspondence in the form of a color conversion table that represents the correspondence between the conversion source image data and the converted image data. 前記第1保持手段は、前記複数の対応関係を、一の対応関係と該対応関係を適用する度合いを変化させることによって生成される他の対応関係として保持する請求項1ないし請求項3のいずれか記載の画像処理装置。  The first holding unit holds the plurality of correspondence relationships as one correspondence relationship and another correspondence relationship generated by changing the degree of application of the correspondence relationship. Or an image processing apparatus. 前記第2保持手段は、使用者の操作によって入力された前記色関係情報および前記処理内容情報を保持する手段である請求項1ないし請求項4のいずれかに記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the second holding unit is a unit that holds the color-related information and the processing content information input by a user's operation. 前記第1保持手段は、前記対応関係として、前記画像データに基づいて明るさを変化させる関係を保持する請求項1ないし請求項5のいずれかに記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the first holding unit holds a relationship of changing brightness based on the image data as the correspondence relationship. 前記第1保持手段は、前記対応関係として、前記画像データに基づいて色の鮮やかさを変化させる関係を保持する請求項1ないし請求項6のいずれかに記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the first holding unit holds a relationship of changing color vividness based on the image data as the correspondence relationship. 複数の画素からなる実写画像の画像データを入力し、各画素の画像データを変換する方法であって、
前記画像データを変換する対応関係を複数保持すると共に、前記画素が画像処理の適用対象となるか否かを決定する色の範囲を示す色関係情報を、画像処理の内容を表わす処理内容情報と関連付けて組にし、該組を複数保持しており、かつ該各組の前記色の範囲は互いに独立な2つ以上の範囲であり、
前記入力された画像データに対応する画素が画像処理の適用対象であるか否かを、前記複数の組のそれぞれの色関係情報を参照して判定し、
前記画素が画像処理の適用対象であると判定された場合に、該判定において前記参照した色関係情報に関連付けられた処理内容情報を参照して、前記複数の対応関係のうちから、画像処理の内容を実現する前記対応関係を特定し、
該対応関係の特定が行なわれた画素については、該特定した対応関係を参照して、当該画素の画像データを変換することで、前記複数の組の前記各色関係情報により前記画像処理の適用対象であると判断された画素のそれぞれについて、前記複数種類の画像処理内容をそれぞれ実現する
画像処理方法。
A method of inputting image data of a live-action image composed of a plurality of pixels and converting the image data of each pixel,
A plurality of correspondence relationships for converting the image data are held, and color relationship information indicating a color range for determining whether or not the pixel is to be subjected to image processing is represented by processing content information representing the content of the image processing Associated with each other, holding a plurality of the sets, and the color range of each set is two or more ranges independent of each other;
It is determined whether or not a pixel corresponding to the input image data is an application target of image processing with reference to each color relationship information of the plurality of sets,
When it is determined that the pixel is an image processing application target, the processing content information associated with the referenced color relationship information in the determination is referred to, and the image processing is selected from the plurality of correspondence relationships. Identify the correspondence that realizes the content,
For the pixel for which the correspondence relationship has been specified, the image processing target is applied based on the color relationship information of the plurality of sets by converting the image data of the pixel with reference to the specified correspondence relationship. An image processing method for realizing the plurality of types of image processing contents for each of the pixels determined to be.
複数の画素からなる実写画像の画像データを変換するプログラムを、コンピュータに読み取り可能に記録した記録媒体であって、
前記画像データを変換する対応関係を複数保持すると共に、前記画素が画像処理の適用対象となるか否かを決定する色の範囲を示す色関係情報を、画像処理の内容を表わす処理内容情報と関連付けて組にし、該組を複数保持しており、かつ該各組の前記色の範囲は互いに独立な2つ以上の範囲であるとする機能と、
前記入力された画像データに対応する画素が画像処理の適用対象であるか否かを、前記複数の組のそれぞれの色関係情報を参照して判定する機能と、
前記画素が画像処理の適用対象であると判定された場合に、該判定において前記参照した色関係情報に関連付けられた処理内容情報を参照して、前記複数の対応関係のうちから、画像処理の内容を実現する前記対応関係を特定する機能と、
該対応関係の特定が行なわれた画素については、該特定した対応関係を参照して、当該画素の画像データを変換することで、前記複数の組の前記各色関係情報により前記画像処理の適用対象であると判断された画素のそれぞれについて、前記複数種類の画像処理内容をそれぞれ実現する機能と
をコンピュータに実現させるプログラムを記録した記録媒体。
A recording medium in which a program for converting image data of a photographed image composed of a plurality of pixels is recorded in a computer-readable manner,
A plurality of correspondence relationships for converting the image data are held, and color relationship information indicating a color range for determining whether or not the pixel is to be subjected to image processing is represented by processing content information representing the content of the image processing A function of associating a set, holding a plurality of the sets, and assuming that the color range of each set is two or more ranges independent of each other;
A function of determining whether or not a pixel corresponding to the input image data is an application target of image processing with reference to each color relationship information of the plurality of sets;
When it is determined that the pixel is an image processing application target, the processing content information associated with the referenced color relationship information in the determination is referred to, and the image processing is selected from the plurality of correspondence relationships. A function for identifying the correspondence to realize the contents;
For the pixel for which the correspondence relationship has been specified, the image processing target is applied based on the color relationship information of the plurality of sets by converting the image data of the pixel with reference to the specified correspondence relationship. A recording medium on which a program for causing a computer to realize the functions for realizing the plurality of types of image processing contents is recorded for each of the pixels determined to be.
JP31212697A 1997-06-17 1997-11-13 Image processing apparatus, image processing method, and medium storing image processing program Expired - Fee Related JP3918257B2 (en)

Priority Applications (10)

Application Number Priority Date Filing Date Title
JP31212697A JP3918257B2 (en) 1997-11-13 1997-11-13 Image processing apparatus, image processing method, and medium storing image processing program
EP05077482A EP1619876A3 (en) 1997-06-17 1998-06-12 Colour image processing apparatus and method
EP05077481A EP1619875A1 (en) 1997-06-17 1998-06-12 Image processing apparatus, image processing method, color adjustment method, and color adjusment system
EP98304660A EP0886437B1 (en) 1997-06-17 1998-06-12 Method and apparatus for colour adjustment
EP04077594A EP1489833A1 (en) 1997-06-17 1998-06-12 Image processing apparatus, image processing method, color adjustment method, and color adjustment system
DE69827703T DE69827703T2 (en) 1997-06-17 1998-06-12 Method and device for adjusting the color
US09/097,828 US6535301B1 (en) 1997-06-17 1998-06-16 Image processing apparatus, image processing method, image processing program recording medium, color adjustment method, color adjustment device, and color adjustment control program recording medium
US10/270,485 US7072074B2 (en) 1997-06-17 2002-10-16 Image processing apparatus, image processing method, image processing program recording medium, color adjustment method, color adjustment device, and color adjustment control program recording medium
US11/431,753 US7286265B2 (en) 1997-06-17 2006-05-11 Image processing apparatus, image processing method, image processing program recording medium, color adjustment method, color adjustment device, and color adjustment control program recording medium
US11/431,752 US7292371B2 (en) 1997-06-17 2006-05-11 Image processing apparatus, image processing method, image processing program recording medium, color adjustment method, color adjustment device, and color adjustment control program recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31212697A JP3918257B2 (en) 1997-11-13 1997-11-13 Image processing apparatus, image processing method, and medium storing image processing program

Related Child Applications (2)

Application Number Title Priority Date Filing Date
JP2004327172A Division JP3956970B2 (en) 2004-11-11 2004-11-11 Image processing apparatus, image processing method, and medium storing image processing program
JP2004327174A Division JP3941810B2 (en) 2004-11-11 2004-11-11 Image processing apparatus, image processing method, and medium storing image processing program

Publications (2)

Publication Number Publication Date
JPH11146219A JPH11146219A (en) 1999-05-28
JP3918257B2 true JP3918257B2 (en) 2007-05-23

Family

ID=18025573

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31212697A Expired - Fee Related JP3918257B2 (en) 1997-06-17 1997-11-13 Image processing apparatus, image processing method, and medium storing image processing program

Country Status (1)

Country Link
JP (1) JP3918257B2 (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100389428C (en) 2001-10-24 2008-05-21 Nik软件公司 User definable image reference points
US7602991B2 (en) 2001-10-24 2009-10-13 Nik Software, Inc. User definable image reference regions
EP1545135B1 (en) 2002-09-26 2013-04-03 Seiko Epson Corporation Adjusting output image of image data
US9143657B2 (en) 2006-01-24 2015-09-22 Sharp Laboratories Of America, Inc. Color enhancement technique using skin color detection
JP4289628B2 (en) * 2006-05-12 2009-07-01 株式会社両備システムソリューションズ Image data processing device
WO2007147081A1 (en) 2006-06-14 2007-12-21 Nik Software, Inc. Graphical user interface and related method
WO2008064349A1 (en) 2006-11-22 2008-05-29 Nik Software, Inc. Method for dynamic range editing
WO2008067333A2 (en) 2006-11-27 2008-06-05 Nik Software, Inc. Method for sliced inpainting
US8837849B2 (en) 2007-06-26 2014-09-16 Google Inc. Method for noise-robust color changes in digital images
JP5384623B2 (en) * 2008-05-28 2014-01-08 ポイボス ビジョン オプト−エレクトロニクス テクノロジー リミテッド Color gamut expansion system and method
JP5203159B2 (en) * 2008-12-05 2013-06-05 日本電気株式会社 Image processing method, image processing system, and image processing program
WO2010073200A1 (en) * 2008-12-22 2010-07-01 Koninklijke Philips Electronics N.V. Method for changing an image data signal, device for changing an image data signal, display device
JP5652126B2 (en) * 2010-10-27 2015-01-14 カシオ計算機株式会社 Image processing apparatus and method, and program
JP2012227591A (en) * 2011-04-15 2012-11-15 Seiko Epson Corp Image processor, printer, image processing program, and image processing method

Also Published As

Publication number Publication date
JPH11146219A (en) 1999-05-28

Similar Documents

Publication Publication Date Title
US7286265B2 (en) Image processing apparatus, image processing method, image processing program recording medium, color adjustment method, color adjustment device, and color adjustment control program recording medium
US7155060B2 (en) Image processing system, image processing method, and medium having an image processing control program recorded thereon
US8553285B2 (en) Image processing apparatus, an image processing method, a medium on which an image processing control program is recorded, an image evaluation device, an image evaluation method and a medium on which an image evaluation program is recorded
US7679786B2 (en) Color correction method
JP3918257B2 (en) Image processing apparatus, image processing method, and medium storing image processing program
US8290262B2 (en) Color processing apparatus and method thereof
JP2006033383A (en) Image processing apparatus and method thereof
JP4019204B2 (en) Image processing apparatus, image processing method, and medium on which image processing control program is recorded
JP4243362B2 (en) Image processing apparatus, image processing method, and recording medium recording image processing program
JP3956970B2 (en) Image processing apparatus, image processing method, and medium storing image processing program
JP3941810B2 (en) Image processing apparatus, image processing method, and medium storing image processing program
JP3921737B2 (en) Image processing apparatus, image processing method, and medium on which image processing control program is recorded
JP3501151B2 (en) Image processing apparatus, image processing method, medium recording image processing control program
JP3705250B2 (en) Image processing apparatus, image processing method, and medium on which image processing control program is recorded
JP3573143B2 (en) Image processing apparatus, image processing method, medium recording image processing control program
JP3570416B2 (en) Image processing apparatus, image processing method, and medium recording image processing control program
JP3558073B2 (en) Image processing apparatus, image processing method, medium recording image processing control program
JP2000067239A (en) Picture evaluation device/method, medium recording picture evaluation program and picture retouching device
JP2000067239A5 (en)
JP2003051001A (en) Device and method for processing image and medium recording image processing control program
JP2008065845A (en) Image processor, recording medium recording image processing program and image processing method
JP2011066928A (en) Image evaluation device, image evaluation method, medium recorded with image evaluation program, and image correcting device to correct image adopting image evaluation method
JP2008245321A (en) Image processing apparatus, 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: 20041111

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041111

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060829

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061030

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070205

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110223

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120223

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130223

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130223

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees