JP4304846B2 - Image processing method and recording medium recording image processing program - Google Patents

Image processing method and recording medium recording image processing program Download PDF

Info

Publication number
JP4304846B2
JP4304846B2 JP2000237497A JP2000237497A JP4304846B2 JP 4304846 B2 JP4304846 B2 JP 4304846B2 JP 2000237497 A JP2000237497 A JP 2000237497A JP 2000237497 A JP2000237497 A JP 2000237497A JP 4304846 B2 JP4304846 B2 JP 4304846B2
Authority
JP
Japan
Prior art keywords
color difference
data
image
component data
color
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
JP2000237497A
Other languages
Japanese (ja)
Other versions
JP2002051222A (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.)
Noritsu Koki Co Ltd
Original Assignee
Noritsu Koki Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Noritsu Koki Co Ltd filed Critical Noritsu Koki Co Ltd
Priority to JP2000237497A priority Critical patent/JP4304846B2/en
Publication of JP2002051222A publication Critical patent/JP2002051222A/en
Application granted granted Critical
Publication of JP4304846B2 publication Critical patent/JP4304846B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、カラー画像データをモノクロ画像データに変換する画像処理方法に関するものである。
【0002】
【従来の技術】
従来、カメラなどによって撮影された画像を、白黒などの単色の濃淡で表現したモノクローム画像として出力するモノクロプリントが行われている。モノクロプリントは、例えば2色刷りの印刷物に写真を載せる場合などに用いられる。また、モノクロプリント独特の画質をプリント画像として使いたい時などに用いられることもある。
【0003】
このようなモノクロプリントを行う方法としては、撮影時にモノクロフィルムを用いる方法と、撮影時にはカラーフィルムを用いて撮影し、印画紙上に焼き付ける際に、モノクローム画像として焼き付ける方法とがある。
【0004】
また、昨今では、デジタルカメラやスキャナなどの普及により、写真画像をデジタル画像データとして処理し、例えばPLZTやLCD(Liquid Crystal Display)などを用いたデジタルプリンタによって焼付を行ったり、インクジェットプリンタやレーザプリンタなどによってプリントを行うことも行われている。このようなデジタルプリントにおいても、デジタルカメラによる撮影時、スキャナによる画像読み取り時、あるいは画像処理時において、モノクローム画像データが生成され、モノクロプリントが行われる場合がある。
【0005】
上記のいずれの方法においても、モノクロプリントを行う際には、画像に含まれる対象物の様々な色彩を無彩色の濃淡の階調で表現することによって、モノクローム画像が生成されることになる。
【0006】
【発明が解決しようとする課題】
モノクローム画像は、上記のように、対象物の様々な色彩を無彩色の濃淡の階調で表現されたものとなっている。したがって、対象物において、互いに色相が異なる色であっても、輝度が同程度の色同士であるならば、モノクローム画像に変換すると、同じ濃度の色として表現されることになる。例えば、緑色の背景の中に赤色の物体があるような画像の場合、背景と物体との輝度が同程度である場合には、モノクローム画像にすると、両者が同じ濃度として表現されてしまい、背景と物体との区別が困難になる、という問題が生じる。
【0007】
このような問題に対応するために、モノクロフィルムを用いて撮影を行う際に、主要な被写体を構成する色の同色のフィルターをカメラのレンズの前にセットし、モノクロフィルムの感色性を調整する方法がある。すなわち、強調したい色彩と同色のフィルターを用いることによって、強調したい色彩以外の色彩を弱め、主要な被写体を引き立たせることになる。
【0008】
しかしながら、この方法は、フィルターを用いずに撮影を行ってしまった画像に対しては対応できないという問題や、フィルターの色の種類をある程度用意しておかなければならず、一般のアマチュアカメラマンでは対応が困難であるという問題などを有している。
【0009】
一方、デジタル画像処理においては、上記のように、背景と物体との区別が困難となっているようなモノクローム画像に対して、例えばコントラストを上げることによって対応する方法がある。すなわち、コントラストを上げることによって濃度の差を広げることができるので、互いに異なる色彩同士の間で濃度差が小さい場合でも、両者の区別をつけやすくすることが可能となる。しかしながら、互いに異なる色彩同士の間で濃度差がほとんどない場合には、いくらコントラストを上げても濃度の差がほとんど大きくならないことになり、また、コントラストを上げ過ぎても、画像全体で不自然な濃度バランスになるという問題も生じることになる。
【0010】
本発明は、上記の問題点を解決するためになされたもので、その目的は、カラー画像データを、画像内の主要な被写体と背景との区別が明確となるモノクロ画像データに変換する画像処理方法および画像処理プログラムを記録した記録媒体を提供することにある。
【0011】
【課題を解決するための手段】
上記の課題を解決するために、請求項1記載の画像処理方法は、複数の画素からなるカラー画像データをモノクロ画像データに変換する画像処理方法において、上記カラー画像データを、輝度成分データと色差成分データとに変換するステップと、強調を行うべき色差成分を設定するステップと、上記強調を行うべき色差成分に含まれる色差成分データを有する画素の輝度成分データを強調する補正を行うステップと、補正された輝度成分データに基づいてモノクロ画像データに変換するステップとを有していることを特徴としている。
【0012】
上記の方法では、まず、例えばRGBの各成分からなるカラー画像データを、輝度成分データおよび色差成分データに変換している。そして、強調を行うべき色差成分データを有する画素に対して、その輝度成分データを強調する補正を行い、この補正された輝度成分データに基づいてモノクロ画像データに変換している。よって、所定の色差成分データとして、元のカラー画像における主要となる被写体を主に構成している色差成分を設定することによって、この主要となる被写体の輝度成分が強調されることになり、変換されたモノクロ画像データにおいても、この被写体が強調された状態の画像となる。したがって、背景と主要となる被写体とが明確に区別されたモノクローム画像を提供することができる。
【0013】
請求項2記載の画像処理方法は、請求項1記載の方法において、上記の所定の色差成分データを有する画素の輝度成分データを強調する補正を行うか否かを判断するステップをさらに有していることを特徴としている。
【0014】
上記の方法によれば、輝度成分データを強調する補正を行うか否かを判断するステップを有しているので、例えば輝度成分データを強調する補正を行わない方が、より自然なモノクローム画像が得られるような画像である場合に、必要以上の補正を行わないようにすることが可能となる。
【0015】
請求項3記載の画像処理方法は、請求項2記載の方法において、上記の補正を行うか否かの判断が、各画素の輝度成分データの分布における分散の値に応じて行われることを特徴としている。
【0016】
上記の方法では、輝度成分データの分布における分散の値に応じて、補正を行うか否かを判断している。よって、例えば、輝度成分データの分布における分散が所定値よりも小さい場合に補正を行うように判断するように設定すれば、輝度成分データの分布における分散の小さい画像に対しては、補正を行うことによって輝度を分散させることにより、モノクローム画像ににおける各種形状を明確に表現することが可能となる。また、輝度成分データの分布における分散が大きい場合には、補正を行わずとも十分に各種形状が明確となったモノクローム画像に変換することができるので、上記のような判断によれば、必要以上の補正を行うことを防止することができる。
【0017】
また、上記のように、補正を行うか否かの判断を、各画素の輝度成分データの分布における分散の値という、客観的な数値に基づいて行っているので、例えばオペレータなどの人手を介さずに、コンピュータなどによる演算処理によって判断することが可能となる。
【0018】
請求項4記載の画像処理方法は、請求項2または3記載の方法において、上記の補正を行うか否かの判断が、各画素の色差成分データの分布における分散の値に応じて行われることを特徴としている。
【0019】
上記の方法では、色差成分データの分布における分散の値に応じて、補正を行うか否かを判断している。よって、例えば、色差成分データの分布における分散が所定値よりも大きい場合に補正を行うように判断するように設定すれば、上記分散が大きくなる可能性の高い、様々な色成分からなる画像に対しては、補正を行うことによって、同程度の輝度で色のみが異なる複数の領域同士の区別を明確にしたモノクローム画像を提供することが可能となる。また、色差成分データの分布における分散が小さい場合には、元の画像が似通った色の画素の割合が高く、補正を行わずとも十分に各種形状が明確となったモノクローム画像に変換することができるので、上記のような判断によれば、必要以上の補正を行うことを防止することができる。
【0020】
また、上記のように、補正を行うか否かの判断を、各画素の色差成分データの分布における分散の値という、客観的な数値に基づいて行っているので、例えばオペレータなどの人手を介さずに、コンピュータなどによる演算処理によって判断することが可能となる。
【0021】
請求項5記載の画像処理方法は、請求項1ないし4のいずれかに記載の方法において、色差成分を複数の範囲に分割するとともに、各範囲に色差成分データが含まれる画素の度数に基づいて、上記強調を行うべき色差成分の設定が行われることを特徴としている。
【0022】
上記の方法では、色差成分を複数の範囲に分割するとともに、強調を行うべき色差成分の設定を、各範囲に含まれる画素の度数に基づいて設定している。よって、例えば、含まれる画素の度数が最も高くなる範囲の色差成分を、強調を行うべき色差成分と設定した場合、主要となる被写体は画像内で大きな面積を占めると仮定すると、この主要となる被写体を構成する画素の色差成分が、強調を行うべき色差成分と設定されることになる。したがって、この主要となる被写体に対して強調が行われることになる。
【0023】
また、上記のように、強調を行うべき色差成分の設定が、各範囲に色差成分データが含まれる画素の度数という、客観的な数値に基づいて行っているので、例えばオペレータなどの人手を介さずに、コンピュータなどによる演算処理によって判断することが可能となる。
【0024】
請求項6記載の画像処理方法は、請求項1ないし5のいずれかに記載の方法において、上記強調を行うべき色差成分の設定が、強調を行うべき色相を設定することによって行われることを特徴としている。
【0025】
上記の方法によれば、強調を行うべき色相を設定し、この色相を有する画素に対して、その輝度成分データを強調する補正を行うことになる。よって、例えば、元の画像において、主要となる被写体を構成する主な色相を設定することによって、彩度の変化による影響をなくした状態で、輝度成分データを強調する画素の選択を行うことが可能となる。
【0026】
請求項7記載の画像処理プログラムを記録した記録媒体は、複数の画素からなるカラー画像データをモノクロ画像データに変換する画像処理プログラムを記録した記録媒体において、上記カラー画像データを、輝度成分データと色差成分データとに変換する処理と、強調を行うべき色差成分を設定する処理と、上記強調を行うべき色差成分に含まれる色差成分データを有する画素の輝度成分データを強調する補正を行う処理と、補正された輝度成分データに基づいてモノクロ画像データに変換する処理とをコンピュータに実行させるためのプログラムを記録してなることを特徴としている。
【0027】
上記の記録媒体に記録されたプログラムでは、まず、例えばRGBの各成分からなるカラー画像データを、輝度成分データおよび色差成分データに変換している。そして、強調を行うべき色差成分データを有する画素に対して、その輝度成分データを強調する補正を行い、この補正された輝度成分データに基づいてモノクロ画像データに変換している。よって、所定の色差成分データとして、元のカラー画像における主要となる被写体を主に構成している色差成分を設定することによって、この主要となる被写体の輝度成分が強調されることになり、変換されたモノクロ画像データにおいても、この被写体が強調された状態の画像となる。したがって、背景と主要となる被写体とが明確に区別されたモノクローム画像を提供することができる。
【0028】
請求項8記載の画像処理プログラムを記録した記録媒体は、請求項7記載の構成において、上記プログラムが、上記の所定の色差成分データを有する画素の輝度成分データを強調する補正を行うか否かを判断する処理をさらに有していることを特徴としている。
【0029】
上記の記録媒体に記録されたプログラムによれば、輝度成分データを強調する補正を行うか否かを判断する処理を有しているので、例えば輝度成分データを強調する補正を行わない方が、より自然なモノクローム画像が得られるような画像である場合に、必要以上の補正を行わないようにすることが可能となる。
【0030】
請求項9記載の画像処理プログラムを記録した記録媒体は、請求項8記載の構成において、上記の補正を行うか否かの判断が、各画素の輝度成分データの分布における分散の値に応じて行われることを特徴としている。
【0031】
上記の記録媒体に記録されたプログラムでは、輝度成分データの分布における分散の値に応じて、補正を行うか否かを判断している。よって、例えば、輝度成分データの分布における分散が所定値よりも小さい場合に補正を行うように判断するように設定すれば、輝度成分データの分布における分散の小さい画像に対しては、補正を行うことによって輝度を分散させることにより、モノクローム画像ににおける各種形状を明確に表現することが可能となる。また、輝度成分データの分布における分散が大きい場合には、補正を行わずとも十分に各種形状が明確となったモノクローム画像に変換することができるので、上記のような判断によれば、必要以上の補正を行うことを防止することができる。
【0032】
また、上記のように、補正を行うか否かの判断を、各画素の輝度成分データの分布における分散の値という、客観的な数値に基づいて行っているので、例えばオペレータなどの人手を介さずに、コンピュータなどによる演算処理によって判断することが可能となる。
【0033】
請求項10記載の画像処理プログラムを記録した記録媒体は、請求項8または9記載の構成において、上記の補正を行うか否かの判断が、各画素の色差成分データの分布における分散の値に応じて行われることを特徴としている。
【0034】
上記の記録媒体に記録されたプログラムでは、色差成分データの分布における分散の値に応じて、補正を行うか否かを判断している。よって、例えば、色差成分データの分布における分散が所定値よりも大きい場合に補正を行うように判断するように設定すれば、上記分散が大きくなる可能性の高い、様々な色成分からなる画像に対しては、補正を行うことによって、同程度の輝度で色のみが異なる複数の領域同士の区別を明確にしたモノクローム画像を提供することが可能となる。また、色差成分データの分布における分散が小さい場合には、元の画像が似通った色の画素の割合が高く、補正を行わずとも十分に各種形状が明確となったモノクローム画像に変換することができるので、上記のような判断によれば、必要以上の補正を行うことを防止することができる。
【0035】
また、上記のように、補正を行うか否かの判断を、各画素の色差成分データの分布における分散の値という、客観的な数値に基づいて行っているので、例えばオペレータなどの人手を介さずに、コンピュータなどによる演算処理によって判断することが可能となる。
【0036】
請求項11記載の画像処理プログラムを記録した記録媒体は、請求項7ないし10のいずれかに記載の構成において、色差成分を複数の範囲に分割するとともに、各範囲に色差成分データが含まれる画素の度数に基づいて、上記強調を行うべき色差成分の設定が行われることを特徴としている。
【0037】
上記の記録媒体に記録されたプログラムでは、色差成分を複数の範囲に分割するとともに、強調を行うべき色差成分の設定を、各範囲に含まれる画素の度数に基づいて設定している。よって、例えば、含まれる画素の度数が最も高くなる範囲の色差成分を、強調を行うべき色差成分と設定した場合、主要となる被写体は画像内で大きな面積を占めると仮定すると、この主要となる被写体を構成する画素の色差成分が、強調を行うべき色差成分と設定されることになる。したがって、この主要となる被写体に対して強調が行われることになる。
【0038】
また、上記のように、強調を行うべき色差成分の設定が、各範囲に色差成分データが含まれる画素の度数という、客観的な数値に基づいて行っているので、例えばオペレータなどの人手を介さずに、コンピュータなどによる演算処理によって判断することが可能となる。
【0039】
請求項12記載の画像処理プログラムを記録した記録媒体は、請求項7ないし11のいずれかに記載の構成において、上記強調を行うべき色差成分の設定が、強調を行うべき色相を設定することによって行われることを特徴としている。
【0040】
上記の記録媒体に記録されたプログラムによれば、強調を行うべき色相を設定し、この色相を有する画素に対して、その輝度成分データを強調する補正を行うことになる。よって、例えば、元の画像において、主要となる被写体を構成する主な色相を設定することによって、彩度の変化による影響をなくした状態で、輝度成分データを強調する画素の選択を行うことが可能となる。
【0041】
【発明の実施の形態】
本発明の実施の一形態について図1ないし図7に基づいて説明すれば、以下のとおりである。
【0042】
図2は、本発明の実施の形態に係る写真処理システムの概略を示すブロック図である。同図に示すように、該写真処理システムは、画像処理装置1と、画像処理装置1にデジタル画像データを入力するデジタルカメラ2、およびスキャナ3と、画像処理装置1において処理された画像データに基づいて、各種用紙に画像をプリントするプリンタ4とを備えた構成となっている。
【0043】
デジタルカメラ2は、例えばCCD(Charge Coupled Device) などの撮像素子を用いて写真撮影を行い、これをデジタル画像データとして記録するものである。このデジタルカメラ2によって撮影された画像データは、フラッシュメモリーなどの各種記憶手段に記録される。
【0044】
スキャナ3は、元画像としての各種アナログ画像をCCDなどによって読み取り、これをデジタル画像データに変換するものである。このスキャナ3としては、ネガフィルムなどの写真フィルムに記録されている画像を読み取るフィルムスキャナでもよいし、例えばプリント済の銀塩写真や、その他紙状媒体に記録された画像などを読み取るスキャナでもよい。
【0045】
プリンタ4は、画像処理装置1から送られてくる画像データをプリントすることが可能なものであれば、どのようなものを用いてもよい。このプリンタ4としては、例えば、インクジェット方式のプリンタやレーザプリンタ、あるいは、LCD、DMD、PLZTなどの光変調素子を用い、印画紙などの感光材料を感光させることによって焼付を行うデジタルプリンタなどが挙げられる。
【0046】
画像処理装置1は、例えばPC(Personal Computer) ベースの装置によって構成され、図示はしないが、PC本体、モニターなどの表示手段、キーボード、マウスなどの入力手段などによって構成されている。そして、この画像処理装置1は、デジタルカメラ2およびスキャナ3からデジタル画像データを取り込む画像入力部5と、画像入力部5において取り込まれたデジタル画像データに対して種々の画像処理を行う画像処理部6と、画像処理部6において画像処理されたデジタル画像データをプリンタ4に対して出力する画像出力処理部7とを備えている。
【0047】
画像入力部5は、上記のように、デジタルカメラ2およびスキャナ3と、画像処理装置1とのインターフェースとなる部分である。接続形態は特に限定されるものではないが、例えばデジタルカメラ2との接続は、RS-232C などによるシリアル接続、USB(Universal Serial Bus)接続、などが挙げられ、スキャナ3との接続は、SCSI(Small Computer System Interface) 接続、パラレル接続、USB接続などが挙げられる。なお、図2に示す例では、画像データの入力手段として、デジタルカメラ2とスキャナ3とを挙げているが、これに限定されるものではなく、例えば、画像データが記録されたハードディスクドライブや各種リムーバブルメディアドライブなどから画像データを入力するシステムとすることも可能である。
【0048】
画像処理部6は、例えば、PCにおいて動作する画像処理プログラムによって動作するものである。この画像処理部6における処理の詳細については後述する。
【0049】
画像出力処理部7は、画像処理部6において画像処理がなされた画像データを、プリンタ4で出力するのに最適なデータ形式に変換し、これをプリンタ4に送信するものである。データ形式の変換は、例えばプリンタドライバと呼ばれるプログラムによって行われることになる。また、プリンタ4との接続形態は特に限定されるものではないが、例えば、パラレル接続、USB接続などが挙げられる。
【0050】
次に、画像処理部6において行われる処理について説明する。この画像処理部6では、入力されたカラー画像データに基づいて、主要となる被写体が強調されたモノクロ画像データを作成する処理を行っている。図1は、この画像処理部6における画像処理の流れを示すフローチャートである。
【0051】
まず、ステップ1(以下、S1のように称する)において、画像入力部5によって画像データが入力される。そして、入力された画像データからなるRGBデータ(B,G,R)を、YCC変換によって、YCCデータ(C2,YY,C1)に変換する(S2)。なお、このYCCデータにおけるYYは輝度信号であり、該当画素の輝度を示している。また(C1,C2)は色差信号であり、該当画素の色相および彩度の状態を示している。このRGBデータ(B,G,R)からYCCデータ(C2,YY,C1)に変換する際の演算は、次に示すような式によって行われる。
【0052】
【数1】

Figure 0004304846
【0053】
次に、色の強調に関する各種判定を手動で行うか自動で行うかの選択が行われる(S3)。この選択は、オペレータによって行われることになる。なお、この選択は、1つの画像に対する処理ごとに行われてもよいし、一旦どちらかに設定してしまえば、設定変更指令を出さない限り、その設定で処理が行われるような設定でもよい。
【0054】
S3において手動判定を行うように選択された場合、S4において、色の強調を行うべきか否かがオペレータによって判断される。ここでの判断は、S2でYCC変換されたYCCデータのYY成分に基づいて作成したモノクロ画像を表示画面上に表示し、この画像の状態をオペレータが観察することによって行われる。すなわち、このモノクロ画像において、主要となる被写体と背景との区別がわかりにくい場合などに、色の強調を行うべきであると判断されることになる。
【0055】
そして、S4において色の強調を行うべきであると判断された場合、S5において、強調する色の指定を行う。ここでの色の選択は、S1において入力された画像データをカラー画像として表示画面上に表示し、この画像の状態をオペレータが観察することによって行われる。すなわち、このカラー画像において、主要となる被写体における、強調したい色成分を確認し、その色を強調すべき色として指定することになる。
【0056】
一方、S3において自動判定を行うように選択された場合、S6において、画像データにおける輝度分布および色分布の解析が行われる。輝度分布は、YCCデータにおけるYY成分より求められ、色分布は、YCCデータにおける(C1,C2)成分より求められる。なお、ここでの輝度分布および色分布の解析についての詳細は後述する。
【0057】
次に、S6における解析結果に基づいて、色の強調を行うべきか否かが判断される(S7)。ここでの判断は、上記の解析結果が所定の条件を満たすか否かによって判断されるものであり、オペレータによる判断は不要となっている。この判断の詳細についても後述する。
【0058】
そして、S7において色の強調を行うべきであると判断された場合、S8において、強調する色が指定される。ここでの色の選択は、YCCデータにおける(C1,C2)成分の分布状態に応じて選択されるものであり、オペレータによる判断は不要となっている。この色の選択の詳細についても後述する。
【0059】
次に、手動判定が行われた場合には、S5において色の指定が行われた後に、また、自動判定が行われた場合には、S8において色の指定が行われた後に、画像データに対して、指定された色の強調処理が行われる(S9)。ここでの色の強調処理は、指定された色の輝度成分を上げることによって行われる。この色の強調処理の詳細についても後述する。
【0060】
このようにして色の強調処理が行われた画像データに基づいて、S10において、モノクロ画像データが生成される。ここで、生成されたモノクロ画像データを表示画面上に表示させ、強調処理後の画像の確認をオペレータが行うようにしてもよい。その後、強調処理後のモノクロ画像データが、画像出力処理部7からプリンタ4に送出され、プリンタ4によって該モノクロ画像データが出力される。
【0061】
次に、上記のS6〜S9の処理の詳細について説明する。まず、S6における、画像データにおける輝度分布および色分布の解析について説明する。
【0062】
まず、S2においてYCC変換されることによって得られたYCCデータの中から、輝度成分であるYY成分を該当画像における全画素分抽出する。そして、これらのYY成分のデータの集合から、YY成分の平均値を算出するとともに、該集合における分散yを算出する。例えば、全画素のYY成分のデータの集合が、図3に示すヒストグラムのような分布をしている場合、このYY成分の散らばり具合を分散yによって数値化する。
【0063】
この分散yの値が比較的大きい場合には、画像データにおける輝度が広い範囲に分散していることになり、画像内の物体の形状や輪郭などが、輝度の差異によって十分に区別することができるような画像である可能性が高いと判断できる。一方、分散yの値が比較的小さい場合には、画像データにおける輝度が狭い範囲に集まっていることになり、画像内の物体の形状や輪郭などが、輝度の差異だけでは十分に区別することができないような画像である可能性が高いと判断できる。
【0064】
また、S2においてYCC変換されることによって得られたYCCデータの中から、色差成分である(C1,C2)成分を該当画像における全画素分抽出する。これらの(C1,C2)成分のデータの集合をC1−C2平面上にプロットするとともに、これらのプロットされた点の重心位置を求める。そして、この重心位置とプロットされた各点との距離を全て算出し、この距離のデータからなる集合における分散ccを算出する。
【0065】
この分散ccの値が比較的大きい場合には、元の画像が、様々な色相および彩度の色を含んでいる可能性が高いと判断することができる。すなわち、このような場合には、互いに色は異なるが、輝度値でいえば同じ程度となるような複数の領域が画像内に存在する可能性が高く、モノクロ画像にすると、これらの領域の区別が難しくなる可能性が高いと判断することができる。一方、分散ccの値が比較的小さい場合には、元の画像が、特定の色相および彩度の近傍に色が集中している可能性が高いと判断することができる。すなわち、このような場合には、画像全体が同じような色だけで構成されており、輝度成分の差異によって十分に画像内の各種形状が明確になる可能性が高いと判断することができる。
【0066】
次に、S7における、色の強調を行うか否かの判断について説明する。色の強調を行うか否かの判断は、強調を行わないと、互いに色は異なるが、輝度値でいえば同じ程度となるような複数の領域が存在し、モノクロ画像にした時に、これらの領域同士の区別が困難となるか否かによって行われることになる。本実施形態において、色の強調を行うべき条件は、S6において求められた分散yが所定値Aよりも小さく、同じくS6において求められた分散ccが所定値Bよりも大きいことである。
【0067】
まず、分散yが所定値Aよりも小さいということは、画像データにおける輝度が狭い範囲に集まっている状態を示しており、画像内の物体の形状や輪郭などが、輝度の差異だけでは十分に区別することができないような画像である可能性が高い状態である。また、分散ccが所定値Bよりも大きいということは、元の画像が、様々な色相および彩度の色を含んでいる可能性が高いと判断できる状態を示しており、互いに色は異なるが、輝度値でいえば同じ程度となるような複数の領域が画像内に存在する可能性が高い状態である。すなわち、上記の条件を満たす画像は、そのままの状態でモノクロ画像に変換すると、主要な被写体の各種形状などが不明確な画像となるような状態であることになる。逆に言えば、上記の条件を満たさないのであれば、強調処理を行わなくても、十分な画像状態のモノクロ画像に変換することが可能である。このように、上記のような条件によって強調処理を行うか否かを判断することによって、不必要な強調処理を行うことによって不自然なモノクロ画像に変換してしまうことを防ぐことができる。
【0068】
また、上記の条件によって、強調処理をすべきであると判断された場合、さらに強調の度合いについても算出される。この強調の度合いは、C1−C2平面において、画像データの全画素分をプロットした点の重心位置と、原点との距離dに応じて設定される。図4は、重心位置から原点までの距離dと、強調の度合いとの関係を示すグラフである。同図に示すように、重心位置と原点との距離dが大きくなればなるほど、強調の度合いが小さくなるように設定されている。また、最も強調の度合いが強くなるのは、重心位置が原点に一致した時である。このように強調の度合いが設定されているのは、以下のような理由によるものである。
【0069】
まず、重心位置が原点近傍にある場合を考える。この場合には、各点は原点のまわりのあらゆる方向に分布していると考えられる。すなわち、このような場合の画像データは、様々な種類の色相からなる色の画素で構成されていることになる。したがって、輝度において特定のレベルの近傍となる画素が複数存在している場合に、これらの画素がそれぞれ異なる色相を有している可能性が高く、色相の異なりを輝度の差で表すために、強めの強調を行うことが好ましいと考えられる。
【0070】
次に、重心位置が原点から離れた位置にある場合を考える。この場合には、各点は原点からみて特定の方向の範囲に多く分布していると考えられる。すなわち、このような場合の画像データは、似たような色相からなる色の画素が多く含まれていることになる。したがって、同程度の輝度からなる画素は、似たような色相からなる色の画素である可能性が高く、これらの画素同士の間では、カラー画像においても見た感じの差が少ないので、必要以上に強調する必要がないと考えられる。
【0071】
なお、図4に示す、重心位置から原点までの距離dと、強調の度合いとの関係を示す曲線を示す関数は、特に限定されるものではなく、重心位置と原点との距離dが大きくなればなるほど、強調の度合いが小さくなるように設定されていれば、どのような関数を用いてもよい。
【0072】
なお、上記では、色の強調を行うべき条件として、S6において求められた分散yが所定値Aよりも小さく、同じくS6において求められた分散ccが所定値Bよりも大きいという条件を示したが、これに限定されるものではない。例えば、分散yおよび分散ccの値に応じて、強調の度合いを連続的に変化させるような条件としてもよい。このような条件とすれば、色の強調を行う場合と行わない場合との変化の不連続性をなくすことができる。
【0073】
次に、S8における、強調する色の指定方法について説明する。まず、画像データをYCC変換することによって得られたYCCデータの中から(C1,C2)成分を抽出し、これを各画素毎にC1−C2平面上にプロットする。図5は、各画素毎の(C1,C2)成分をC1−C2平面上にプロットした状態の例を示している。
【0074】
そして、このC1−C2平面において、原点を中心に複数の角度領域、すなわち、特定の範囲からなる複数の色相領域を設け、各色相領域毎の度数分布を求める。図6は、このようにして求められた各色相毎のヒストグラムの例を示している。なお、この度数をカウントする際に、C1−C2平面において、原点を中心とする所定の半径からなる円を設け、この円の内部にプロットされている点は、対応する色相領域の度数としてカウントしないようにする方が好ましい。これは、彩度の低い画素の影響をなくすためである。つまり、彩度が低いということは、主要な被写体を構成する画素ではない可能性が高く、このような画素による、強調する色の選択に対する影響を、できるだけ小さくすることを目的としている。なお、この円の半径は、特に固定である必要はなく、画像データの状態に応じて適宜変更しても構わない。例えば、彩度の低い画素の割合が比較的多いデータである場合には、円の半径を小さめに設定するなどの処理を行ってもよい。
【0075】
このようにして求められた、図6に示すようなヒストグラムにおいて、最も度数が高くなっている色相を、強調する色として設定する。図6に示す例においては、最も度数が高くなっている色相Aを、強調する色として設定することになる。なお、ここでは、強調する色の色相を1つに設定しているが、これに限定されるものではなく、強調する色を複数設定してもよい。例えば、ヒストグラムにおいて、度数のピークが複数ある場合に、対応する色相をそれぞれ強調する色として設定してもよい。この際に、強調する色として設定する度数の下限値を設け、この下限値以下である場合には、度数としてピークとなっていても、これを強調する色として設定しない、というように設定してもよい。
【0076】
次に、S9における、強調する色として指定された色の強調処理について説明する。ここでの色の強調処理は、S5あるいはS8において指定された色の色相に近い範囲の色相を有する画素に対して、輝度を上げる処理を行う。図7は、輝度の補正量の算出方法を説明する説明図である。この図7は、C1−C2平面に対して垂直な方向に輝度の補正量ΔYを示した空間を示している。
【0077】
まず、C1−C2平面上において、強調する色として指定された色の色相方向を示す直線hを設定する。そして、この直線hと、補正量ΔYの軸からなる平面を想定し、この平面内で、直線hの原点からの距離に比例して輝度の補正量ΔYが大きくなるような直線kを設定する。直線h上の点に対応する画素に対しては、この直線h上の点から補正量ΔYの方向における直線kに到る距離を、その画素に対する輝度の補正量として設定することになる。
【0078】
例えば、図7に示す例においては、直線h上の点である(C1’,C2’)に対応する画素の輝度がY1である場合、(C1’,C2’)から補正量ΔYの方向における直線kに到る距離がaとなっているので、この画素の補正後の輝度Y1’は、Y1’=Y1+aによって求められることになる。
【0079】
また、強調する色の色相方向の近傍における補正量は、次のように設定される。すなわち、原点から直線h方向を見た状態で、直線kを最大値とする正規分布となるような曲面を想定し、この曲面とC1−C2平面上の点との補正量ΔY方向での距離を、補正量として設定する。なお、ここでは、補正量を示す曲面として、原点から直線h方向を見た状態で、直線kを最大値とする正規分布となるような曲面を想定したが、正規分布に限るものではなく、直線kを最大値とし、直線kから離れるにしたがって補正量が小さくなるような関数であればどのような関数を用いてもよい。また、この関数としては、直線kの近傍および補正量が0となる領域近傍において連続性が保たれるような関数であることが好ましい。
【0080】
なお、上記では、強調する色の色相方向およびその近傍となる色相を有している画素に対して、輝度を上げるように補正を行っているが、強調する色の色相方向およびその近傍となる色相以外の色相を有している画素に対して、輝度を下げるような補正を行ってもよい。すなわち、この場合には、強調する色の色相方向となる色相を有する画素に対しては、輝度の補正を行わず、原点から直線h方向を見た状態で、直線hを最大値とする正規分布となるような曲面を想定し、この曲面とC1−C2平面上の点との補正量ΔY方向での距離(負の値)を、補正量として設定する。
【0081】
また、上記したように、強調する色を複数設定した場合、それぞれの強調する色の色相方向に対して、上記の直線kに相当する直線を設定してもよい。この場合、原点からそれぞれの色相方向を見た状態で、対応する直線を最大値とする正規分布となるような曲面を想定し、この曲面とC1−C2平面上の点との補正量ΔY方向での距離を、補正量として設定することになる。
【0082】
【発明の効果】
以上のように、請求項1の発明に係る画像処理方法は、複数の画素からなるカラー画像データをモノクロ画像データに変換する画像処理方法において、上記カラー画像データを、輝度成分データと色差成分データとに変換するステップと、強調を行うべき色差成分を設定するステップと、上記強調を行うべき色差成分に含まれる色差成分データを有する画素の輝度成分データを強調する補正を行うステップと、補正された輝度成分データに基づいてモノクロ画像データに変換するステップとを有している方法である。
【0083】
これにより、所定の色差成分データとして、元のカラー画像における主要となる被写体を主に構成している色差成分を設定することによって、この主要となる被写体の輝度成分が強調されることになり、変換されたモノクロ画像データにおいても、この被写体が強調された状態の画像となる。したがって、背景と主要となる被写体とが明確に区別されたモノクローム画像を提供することができるという効果を奏する。
【0084】
請求項2の発明に係る画像処理方法は、上記の所定の色差成分データを有する画素の輝度成分データを強調する補正を行うか否かを判断するステップをさらに有している方法である。
【0085】
これにより、請求項1の方法による効果に加えて、例えば輝度成分データを強調する補正を行わない方が、より自然なモノクローム画像が得られるような画像である場合に、必要以上の補正を行わないようにすることが可能となるという効果を奏する。
【0086】
請求項3の発明に係る画像処理方法は、上記の補正を行うか否かの判断が、各画素の輝度成分データの分布における分散の値に応じて行われる方法である。
【0087】
これにより、請求項2の方法による効果に加えて、例えば、輝度成分データの分布における分散が所定値よりも小さい場合に補正を行うように判断するように設定すれば、輝度成分データの分布における分散の小さい画像に対しては、補正を行うことによって輝度を分散させることにより、モノクローム画像ににおける各種形状を明確に表現することが可能となるという効果を奏する。また、輝度成分データの分布における分散が大きい場合には、補正を行わずとも十分に各種形状が明確となったモノクローム画像に変換することができるので、上記のような判断によれば、必要以上の補正を行うことを防止することができるという効果を奏する。
【0088】
また、上記のように、補正を行うか否かの判断を、各画素の輝度成分データの分布における分散の値という、客観的な数値に基づいて行っているので、例えばオペレータなどの人手を介さずに、コンピュータなどによる演算処理によって判断することが可能となるという効果を奏する。
【0089】
請求項4の発明に係る画像処理方法は、上記の補正を行うか否かの判断が、各画素の色差成分データの分布における分散の値に応じて行われる方法である。
【0090】
これにより、請求項2または3の方法による効果に加えて、例えば、色差成分データの分布における分散が所定値よりも大きい場合に補正を行うように判断するように設定すれば、上記分散が大きくなる可能性の高い、様々な色成分からなる画像に対しては、補正を行うことによって、同程度の輝度で色のみが異なる複数の領域同士の区別を明確にしたモノクローム画像を提供することが可能となるという効果を奏する。また、色差成分データの分布における分散が小さい場合には、元の画像が似通った色の画素の割合が高く、補正を行わずとも十分に各種形状が明確となったモノクローム画像に変換することができるので、上記のような判断によれば、必要以上の補正を行うことを防止することができるという効果を奏する。
【0091】
また、上記のように、補正を行うか否かの判断を、各画素の色差成分データの分布における分散の値という、客観的な数値に基づいて行っているので、例えばオペレータなどの人手を介さずに、コンピュータなどによる演算処理によって判断することが可能となるという効果を奏する。
【0092】
請求項5の発明に係る画像処理方法は、色差成分を複数の範囲に分割するとともに、各範囲に色差成分データが含まれる画素の度数に基づいて、上記強調を行うべき色差成分の設定が行われる方法である。
【0093】
これにより、請求項1ないし4のいずれかの方法による効果に加えて、例えば、含まれる画素の度数が最も高くなる範囲の色差成分を、強調を行うべき色差成分と設定した場合、主要となる被写体は画像内で大きな面積を占めると仮定すると、この主要となる被写体を構成する画素の色差成分が、強調を行うべき色差成分と設定されることになる。したがって、この主要となる被写体に対して強調が行われることになるという効果を奏する。
【0094】
また、上記のように、強調を行うべき色差成分の設定が、各範囲に色差成分データが含まれる画素の度数という、客観的な数値に基づいて行っているので、例えばオペレータなどの人手を介さずに、コンピュータなどによる演算処理によって判断することが可能となるという効果を奏する。
【0095】
請求項6の発明に係る画像処理方法は、上記強調を行うべき色差成分の設定が、強調を行うべき色相を設定することによって行われる方法である。
【0096】
これにより、請求項1ないし5のいずれかの方法による効果に加えて、例えば、元の画像において、主要となる被写体を構成する主な色相を設定することによって、彩度の変化による影響をなくした状態で、輝度成分データを強調する画素の選択を行うことが可能となるという効果を奏する。
【0097】
請求項7の発明に係る画像処理プログラムを記録した記録媒体は、複数の画素からなるカラー画像データをモノクロ画像データに変換する画像処理プログラムを記録した記録媒体において、上記カラー画像データを、輝度成分データと色差成分データとに変換する処理と、強調を行うべき色差成分を設定する処理と、上記強調を行うべき色差成分に含まれる色差成分データを有する画素の輝度成分データを強調する補正を行う処理と、補正された輝度成分データに基づいてモノクロ画像データに変換する処理とをコンピュータに実行させるためのプログラムを記録してなる構成である。
【0098】
これにより、所定の色差成分データとして、元のカラー画像における主要となる被写体を主に構成している色差成分を設定することによって、この主要となる被写体の輝度成分が強調されることになり、変換されたモノクロ画像データにおいても、この被写体が強調された状態の画像となる。したがって、背景と主要となる被写体とが明確に区別されたモノクローム画像を提供することができるという効果を奏する。
【0099】
請求項8の発明に係る画像処理プログラムを記録した記録媒体は、上記プログラムが、上記の所定の色差成分データを有する画素の輝度成分データを強調する補正を行うか否かを判断する処理をさらに有している構成である。
【0100】
これにより、請求項7の構成による効果に加えて、例えば輝度成分データを強調する補正を行わない方が、より自然なモノクローム画像が得られるような画像である場合に、必要以上の補正を行わないようにすることが可能となるという効果を奏する。
【0101】
請求項9の発明に係る画像処理プログラムを記録した記録媒体は、上記の補正を行うか否かの判断が、各画素の輝度成分データの分布における分散の値に応じて行われる構成である。
【0102】
これにより、請求項8の構成による効果に加えて、例えば、輝度成分データの分布における分散が所定値よりも小さい場合に補正を行うように判断するように設定すれば、輝度成分データの分布における分散の小さい画像に対しては、モノクローム画像ににおける各種形状を明確に表現することが可能となるという効果を奏する。また、輝度成分データの分布における分散が大きい場合には、補正を行わずとも十分に各種形状が明確となったモノクローム画像に変換することができるので、上記のような判断によれば、必要以上の補正を行うことを防止することができるという効果を奏する。
【0103】
また、上記のように、補正を行うか否かの判断を、各画素の輝度成分データの分布における分散の値という、客観的な数値に基づいて行っているので、例えばオペレータなどの人手を介さずに、コンピュータなどによる演算処理によって判断することが可能となるという効果を奏する。
【0104】
請求項10の発明に係る画像処理プログラムを記録した記録媒体は、上記の補正を行うか否かの判断が、各画素の色差成分データの分布における分散の値に応じて行われる構成である。
【0105】
これにより、請求項8または9の構成による効果に加えて、例えば、色差成分データの分布における分散が所定値よりも大きい場合に補正を行うように判断するように設定すれば、上記分散が大きくなる可能性の高い、様々な色成分からなる画像に対しては、補正を行うことによって、同程度の輝度で色のみが異なる複数の領域同士の区別を明確にしたモノクローム画像を提供することが可能となるという効果を奏する。また、色差成分データの分布における分散が小さい場合には、元の画像が似通った色の画素の割合が高く、補正を行わずとも十分に各種形状が明確となったモノクローム画像に変換することができるので、上記のような判断によれば、必要以上の補正を行うことを防止することができるという効果を奏する。
【0106】
また、上記のように、補正を行うか否かの判断を、各画素の色差成分データの分布における分散の値という、客観的な数値に基づいて行っているので、例えばオペレータなどの人手を介さずに、コンピュータなどによる演算処理によって判断することが可能となるという効果を奏する。
【0107】
請求項11の発明に係る画像処理プログラムを記録した記録媒体は、色差成分を複数の範囲に分割するとともに、各範囲に色差成分データが含まれる画素の度数に基づいて、上記強調を行うべき色差成分の設定が行われる構成である。
【0108】
これにより、請求項7ないし10のいずれかの構成による効果に加えて、例えば、含まれる画素の度数が最も高くなる範囲の色差成分を、強調を行うべき色差成分と設定した場合、主要となる被写体は画像内で大きな面積を占めると仮定すると、この主要となる被写体を構成する画素の色差成分が、強調を行うべき色差成分と設定されることになる。したがって、この主要となる被写体に対して強調が行われることになるという効果を奏する。
【0109】
また、上記のように、強調を行うべき色差成分の設定が、各範囲に色差成分データが含まれる画素の度数という、客観的な数値に基づいて行っているので、例えばオペレータなどの人手を介さずに、コンピュータなどによる演算処理によって判断することが可能となるという効果を奏する。
【0110】
請求項12の発明に係る画像処理プログラムを記録した記録媒体は、上記強調を行うべき色差成分の設定が、強調を行うべき色相を設定することによって行われる構成である。
【0111】
これにより、請求項7ないし11のいずれかの構成による効果に加えて、例えば、元の画像において、主要となる被写体を構成する主な色相を設定することによって、彩度の変化による影響をなくした状態で、輝度成分データを強調する画素の選択を行うことが可能となるという効果を奏する。
【図面の簡単な説明】
【図1】本発明の実施の一形態に係る写真処理システムの画像処理装置が備える画像処理部における処理の流れを示すフローチャートである。
【図2】上記写真処理システムの概略構成を示すブロック図である。
【図3】画像データのYCCデータにおけるYY成分の度数分布の一例を示すヒストグラムである。
【図4】C1−C2平面において、画像データの全画素分をプロットした点の重心位置から原点までの距離と、強調の度合いとの関係を示すグラフである。
【図5】各画素毎の(C1,C2)成分をC1−C2平面上にプロットした状態の一例を示す説明図である。
【図6】各色相毎の度数分布の一例を示すヒストグラムである。
【図7】C1−C2平面に対して垂直な方向に輝度の補正量ΔYを示した空間を示す説明図である。
【符号の説明】
1 画像処理装置
2 デジタルカメラ
3 スキャナ
4 プリンタ
5 画像入力部
6 画像処理部
7 画像出力処理部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method for converting color image data into monochrome image data.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, monochrome printing has been performed in which an image captured by a camera or the like is output as a monochrome image that is expressed in shades of a single color such as monochrome. The monochrome print is used, for example, when a photograph is placed on a two-color print. It may also be used when it is desired to use the image quality unique to monochrome printing as a print image.
[0003]
As a method of performing such monochrome printing, there are a method of using a monochrome film at the time of shooting, and a method of shooting with a color film at the time of shooting and printing as a monochrome image when printing on a photographic paper.
[0004]
In recent years, with the widespread use of digital cameras and scanners, photographic images are processed as digital image data, for example, printed by digital printers using PLZT, LCD (Liquid Crystal Display), etc., inkjet printers and laser printers. Printing is also performed by such methods. Even in such digital printing, monochrome image data may be generated and monochrome printing may be performed when photographing with a digital camera, reading an image with a scanner, or processing an image.
[0005]
In any of the above methods, when monochrome printing is performed, a monochrome image is generated by expressing various colors of an object included in the image with grayscale gradations of achromatic colors.
[0006]
[Problems to be solved by the invention]
As described above, the monochrome image is obtained by expressing various colors of the target object with grayscale gradations of achromatic colors. Therefore, even if the colors of the object are different from each other, if they have colors having the same brightness, they are expressed as colors having the same density when converted into a monochrome image. For example, in the case of an image in which a red object is present in a green background, if the brightness of the background and the object is approximately the same, a monochrome image will result in both being expressed as the same density. There arises a problem that it becomes difficult to distinguish the object from the object.
[0007]
To deal with this problem, when shooting with monochrome film, adjust the color sensitivity of the monochrome film by setting the same color filter that composes the main subject in front of the camera lens. There is a way to do it. In other words, by using a filter having the same color as the color to be emphasized, colors other than the color to be emphasized are weakened, and the main subject is emphasized.
[0008]
However, this method cannot be used for images that have been shot without using a filter, and some types of filter colors must be prepared. Has the problem of being difficult.
[0009]
On the other hand, in digital image processing, there is a method for dealing with a monochrome image in which it is difficult to distinguish between a background and an object as described above, for example, by increasing the contrast. That is, since the difference in density can be widened by increasing the contrast, even when the density difference is small between different colors, it is possible to easily distinguish the two. However, if there is almost no difference in density between different colors, the difference in density will hardly increase no matter how much the contrast is increased, and if the contrast is increased too much, the entire image will be unnatural. The problem of density balance also arises.
[0010]
The present invention has been made to solve the above-described problems, and an object of the present invention is to perform image processing for converting color image data into monochrome image data in which the distinction between the main subject and the background in the image is clear. A method and a recording medium on which an image processing program is recorded are provided.
[0011]
[Means for Solving the Problems]
In order to solve the above problem, an image processing method according to claim 1 is an image processing method for converting color image data composed of a plurality of pixels into monochrome image data. Converting to component data; setting a color difference component to be emphasized; correcting to enhance luminance component data of a pixel having color difference component data included in the color difference component to be enhanced; And converting to monochrome image data based on the corrected luminance component data.
[0012]
In the above method, first, for example, color image data composed of RGB components is converted into luminance component data and color difference component data. Then, a correction for enhancing the luminance component data is performed on the pixel having the color difference component data to be emphasized, and converted to monochrome image data based on the corrected luminance component data. Therefore, by setting the color difference component mainly constituting the main subject in the original color image as the predetermined color difference component data, the luminance component of the main subject is emphasized and converted. Even in the monochrome image data, the image of the subject is emphasized. Therefore, it is possible to provide a monochrome image in which the background and the main subject are clearly distinguished.
[0013]
According to a second aspect of the present invention, there is provided the image processing method according to the first aspect, further comprising a step of determining whether or not to perform correction for enhancing the luminance component data of the pixel having the predetermined color difference component data. It is characterized by being.
[0014]
According to the above method, since it includes a step of determining whether or not to perform correction for enhancing the luminance component data, for example, a more natural monochrome image is obtained when correction for enhancing the luminance component data is not performed. In the case of an image that can be obtained, it is possible not to perform unnecessary correction.
[0015]
According to a third aspect of the present invention, in the method of the second aspect, the determination as to whether or not to perform the correction is made according to a variance value in the distribution of luminance component data of each pixel. It is said.
[0016]
In the above method, it is determined whether or not to perform correction according to the variance value in the distribution of the luminance component data. Therefore, for example, if it is determined to perform correction when the variance in the distribution of luminance component data is smaller than a predetermined value, the correction is performed for an image having a small variance in the distribution of luminance component data. By dispersing the luminance in this way, various shapes in the monochrome image can be clearly expressed. Also, when the variance in the distribution of the luminance component data is large, it can be converted into a monochrome image with various shapes sufficiently clarified without performing correction. It is possible to prevent the correction.
[0017]
In addition, as described above, whether or not to perform correction is determined based on an objective numerical value such as a variance value in the distribution of luminance component data of each pixel. Instead, the determination can be made by a calculation process by a computer or the like.
[0018]
According to a fourth aspect of the present invention, in the method of the second or third aspect, the determination as to whether or not to perform the correction is performed according to a variance value in the distribution of the color difference component data of each pixel. It is characterized by.
[0019]
In the above method, it is determined whether or not to perform correction according to the dispersion value in the distribution of the color difference component data. Therefore, for example, if it is determined that correction is performed when the variance in the distribution of the color difference component data is larger than a predetermined value, an image composed of various color components, which is likely to increase the variance, is used. On the other hand, by performing the correction, it is possible to provide a monochrome image in which the distinction between a plurality of regions having only the same brightness and different colors is clarified. In addition, when the variance in the distribution of the color difference component data is small, the original image has a high proportion of similar color pixels and can be converted into a monochrome image in which various shapes are sufficiently clarified without correction. Therefore, according to the determination as described above, it is possible to prevent unnecessary correction.
[0020]
In addition, as described above, whether or not to perform correction is determined based on an objective numerical value called a dispersion value in the distribution of color difference component data of each pixel. Instead, the determination can be made by a calculation process by a computer or the like.
[0021]
An image processing method according to a fifth aspect is the method according to any one of the first to fourth aspects, wherein the color difference component is divided into a plurality of ranges, and the color difference component data is included in each range based on the frequency of pixels. The color difference component to be emphasized is set.
[0022]
In the above method, the color difference component is divided into a plurality of ranges, and the setting of the color difference component to be emphasized is set based on the frequency of the pixels included in each range. Therefore, for example, when the color difference component in the range where the frequency of the included pixel is the highest is set as the color difference component to be emphasized, assuming that the main subject occupies a large area in the image, this is the main component. The color difference component of the pixel constituting the subject is set as the color difference component to be enhanced. Therefore, this main subject is emphasized.
[0023]
Further, as described above, the setting of the color difference component to be emphasized is performed based on an objective numerical value such as the frequency of the pixels in which the color difference component data is included in each range. Instead, the determination can be made by a calculation process by a computer or the like.
[0024]
The image processing method according to claim 6 is the method according to any one of claims 1 to 5, wherein the setting of the color difference component to be enhanced is performed by setting a hue to be enhanced. It is said.
[0025]
According to the above method, a hue to be emphasized is set, and correction for enhancing the luminance component data is performed on a pixel having this hue. Therefore, for example, by setting the main hues that constitute the main subject in the original image, it is possible to select pixels that enhance the luminance component data in a state where the influence of the change in saturation is eliminated. It becomes possible.
[0026]
A recording medium on which the image processing program according to claim 7 is recorded is a recording medium on which an image processing program for converting color image data composed of a plurality of pixels into monochrome image data is recorded. A process of converting to color difference component data, a process of setting a color difference component to be enhanced, and a process of performing correction to enhance luminance component data of pixels having color difference component data included in the color difference component to be enhanced A program for causing a computer to execute processing for converting to monochrome image data based on the corrected luminance component data is recorded.
[0027]
In the program recorded on the recording medium, first, for example, color image data composed of RGB components is converted into luminance component data and color difference component data. Then, a correction for enhancing the luminance component data is performed on the pixel having the color difference component data to be emphasized, and converted to monochrome image data based on the corrected luminance component data. Therefore, by setting the color difference component mainly constituting the main subject in the original color image as the predetermined color difference component data, the luminance component of the main subject is emphasized and converted. Even in the monochrome image data, the image of the subject is emphasized. Therefore, it is possible to provide a monochrome image in which the background and the main subject are clearly distinguished.
[0028]
A recording medium on which the image processing program according to claim 8 is recorded is, in the configuration according to claim 7, whether or not the program performs correction for enhancing luminance component data of a pixel having the predetermined color difference component data. It further has a process for judging
[0029]
According to the program recorded on the recording medium, since it has a process of determining whether or not to perform correction to enhance the luminance component data, for example, it is preferable not to perform correction to enhance the luminance component data. When the image is such that a more natural monochrome image can be obtained, it becomes possible not to perform unnecessary correction.
[0030]
In the recording medium on which the image processing program according to claim 9 is recorded, in the configuration according to claim 8, the determination as to whether or not to perform the correction depends on the value of dispersion in the distribution of the luminance component data of each pixel. It is characterized by being performed.
[0031]
In the program recorded on the above recording medium, it is determined whether or not to perform correction according to the dispersion value in the distribution of the luminance component data. Therefore, for example, if it is determined to perform correction when the variance in the distribution of luminance component data is smaller than a predetermined value, the correction is performed for an image having a small variance in the distribution of luminance component data. By dispersing the luminance in this way, various shapes in the monochrome image can be clearly expressed. Also, when the variance in the distribution of the luminance component data is large, it can be converted into a monochrome image with various shapes sufficiently clarified without performing correction. It is possible to prevent the correction.
[0032]
In addition, as described above, whether or not to perform correction is determined based on an objective numerical value such as a variance value in the distribution of luminance component data of each pixel. Instead, the determination can be made by a calculation process by a computer or the like.
[0033]
In the recording medium on which the image processing program according to claim 10 is recorded, in the configuration according to claim 8 or 9, the determination as to whether or not to perform the correction is made based on the variance value in the distribution of the color difference component data of each pixel. It is characterized by being performed in response.
[0034]
In the program recorded on the recording medium, it is determined whether or not to perform correction according to the dispersion value in the distribution of the color difference component data. Therefore, for example, if it is determined that correction is performed when the variance in the distribution of the color difference component data is larger than a predetermined value, an image composed of various color components, which is likely to increase the variance, is used. On the other hand, by performing the correction, it is possible to provide a monochrome image in which the distinction between a plurality of regions having only the same brightness and different colors is clarified. In addition, when the variance in the distribution of the color difference component data is small, the original image has a high proportion of similar color pixels and can be converted into a monochrome image in which various shapes are sufficiently clarified without correction. Therefore, according to the determination as described above, it is possible to prevent unnecessary correction.
[0035]
In addition, as described above, whether or not to perform correction is determined based on an objective numerical value called a dispersion value in the distribution of color difference component data of each pixel. Instead, the determination can be made by a calculation process by a computer or the like.
[0036]
A recording medium on which an image processing program according to claim 11 is recorded is the structure according to any one of claims 7 to 10, wherein the color difference component is divided into a plurality of ranges and each range includes pixels containing color difference component data. The color difference component to be emphasized is set based on the frequency.
[0037]
In the program recorded on the recording medium, the color difference component is divided into a plurality of ranges, and the setting of the color difference component to be emphasized is set based on the frequency of the pixels included in each range. Therefore, for example, when the color difference component in the range where the frequency of the included pixel is the highest is set as the color difference component to be emphasized, assuming that the main subject occupies a large area in the image, this is the main component. The color difference component of the pixel constituting the subject is set as the color difference component to be enhanced. Therefore, this main subject is emphasized.
[0038]
Further, as described above, the setting of the color difference component to be emphasized is performed based on an objective numerical value such as the frequency of the pixels in which the color difference component data is included in each range. Instead, the determination can be made by a calculation process by a computer or the like.
[0039]
A recording medium on which an image processing program according to claim 12 is recorded is the configuration according to any one of claims 7 to 11, wherein the setting of the color difference component to be emphasized sets the hue to be emphasized. It is characterized by being performed.
[0040]
According to the program recorded on the recording medium, a hue to be emphasized is set, and correction for enhancing the luminance component data is performed on a pixel having this hue. Therefore, for example, by setting the main hues that constitute the main subject in the original image, it is possible to select pixels that enhance the luminance component data in a state where the influence of the change in saturation is eliminated. It becomes possible.
[0041]
DETAILED DESCRIPTION OF THE INVENTION
An embodiment of the present invention will be described with reference to FIGS. 1 to 7 as follows.
[0042]
FIG. 2 is a block diagram showing an outline of the photographic processing system according to the embodiment of the present invention. As shown in FIG. 1, the photographic processing system includes an image processing apparatus 1, a digital camera 2 that inputs digital image data to the image processing apparatus 1, a scanner 3, and image data processed by the image processing apparatus 1. Based on this, the printer 4 for printing images on various papers is provided.
[0043]
The digital camera 2 takes a picture using an image sensor such as a CCD (Charge Coupled Device), and records this as digital image data. Image data photographed by the digital camera 2 is recorded in various storage means such as a flash memory.
[0044]
The scanner 3 reads various analog images as original images with a CCD or the like and converts them into digital image data. The scanner 3 may be a film scanner that reads an image recorded on a photographic film such as a negative film, or may be a scanner that reads, for example, a printed silver salt photograph or an image recorded on a paper-like medium. .
[0045]
The printer 4 may be any printer that can print the image data sent from the image processing apparatus 1. Examples of the printer 4 include an ink jet printer, a laser printer, or a digital printer that uses a light modulation element such as an LCD, DMD, and PLZT to perform printing by exposing a photosensitive material such as photographic paper. It is done.
[0046]
The image processing apparatus 1 is configured by, for example, a PC (Personal Computer) -based apparatus, and is configured by a PC body, a display unit such as a monitor, an input unit such as a keyboard and a mouse, although not illustrated. The image processing apparatus 1 includes an image input unit 5 that captures digital image data from the digital camera 2 and the scanner 3, and an image processing unit that performs various image processes on the digital image data captured by the image input unit 5. 6 and an image output processing unit 7 for outputting the digital image data processed by the image processing unit 6 to the printer 4.
[0047]
As described above, the image input unit 5 is a part serving as an interface between the digital camera 2 and the scanner 3 and the image processing apparatus 1. The connection form is not particularly limited. For example, the connection with the digital camera 2 includes serial connection by RS-232C, USB (Universal Serial Bus) connection, etc. The connection with the scanner 3 is SCSI. (Small Computer System Interface) connection, parallel connection, USB connection, and the like. In the example shown in FIG. 2, the digital camera 2 and the scanner 3 are cited as the image data input means. However, the present invention is not limited to this. For example, the hard disk drive in which the image data is recorded, A system for inputting image data from a removable media drive or the like is also possible.
[0048]
The image processing unit 6 is operated by an image processing program that operates on a PC, for example. Details of the processing in the image processing unit 6 will be described later.
[0049]
The image output processing unit 7 converts the image data that has been subjected to image processing in the image processing unit 6 into a data format that is optimal for output by the printer 4, and transmits the data to the printer 4. The data format conversion is performed by a program called a printer driver, for example. The connection form with the printer 4 is not particularly limited, and examples thereof include parallel connection and USB connection.
[0050]
Next, processing performed in the image processing unit 6 will be described. The image processing unit 6 performs processing for creating monochrome image data in which the main subject is emphasized based on the input color image data. FIG. 1 is a flowchart showing the flow of image processing in the image processing unit 6.
[0051]
First, in step 1 (hereinafter referred to as S1), image data is input by the image input unit 5. Then, RGB data (B, G, R) composed of the input image data is converted into YCC data (C2, YY, C1) by YCC conversion (S2). Note that YY in this YCC data is a luminance signal indicating the luminance of the corresponding pixel. Further, (C1, C2) is a color difference signal indicating the hue and saturation state of the corresponding pixel. The calculation when converting the RGB data (B, G, R) to the YCC data (C2, YY, C1) is performed by the following equation.
[0052]
[Expression 1]
Figure 0004304846
[0053]
Next, it is selected whether various determinations regarding color enhancement are performed manually or automatically (S3). This selection is made by the operator. Note that this selection may be performed for each process for one image, or once set to either one, the setting may be set so that the process is performed unless a setting change command is issued. .
[0054]
If it is selected to perform manual determination in S3, in S4, the operator determines whether or not color enhancement should be performed. This determination is made by displaying on the display screen a monochrome image created based on the YY component of the YCC data YCC converted in S2, and the operator observes the state of this image. That is, in this monochrome image, it is determined that color enhancement should be performed when it is difficult to distinguish the main subject from the background.
[0055]
If it is determined in S4 that the color should be emphasized, the color to be emphasized is designated in S5. The color selection here is performed by displaying the image data input in S1 as a color image on the display screen and observing the state of this image by the operator. That is, in this color image, the color component to be emphasized in the main subject is confirmed, and that color is designated as the color to be emphasized.
[0056]
On the other hand, when the automatic determination is selected in S3, the luminance distribution and the color distribution in the image data are analyzed in S6. The luminance distribution is obtained from the YY component in the YCC data, and the color distribution is obtained from the (C1, C2) component in the YCC data. Details of the analysis of the luminance distribution and the color distribution here will be described later.
[0057]
Next, based on the analysis result in S6, it is determined whether or not color enhancement should be performed (S7). This determination is made based on whether or not the above analysis result satisfies a predetermined condition, and does not require determination by the operator. Details of this determination will also be described later.
[0058]
If it is determined in S7 that the color should be enhanced, the color to be enhanced is designated in S8. The selection of the color here is selected according to the distribution state of the (C1, C2) component in the YCC data, and the determination by the operator is unnecessary. Details of this color selection will also be described later.
[0059]
Next, when the manual determination is performed, the color is designated in S5. When the automatic determination is performed, after the color is designated in S8, the image data is displayed. On the other hand, the specified color is emphasized (S9). The color enhancement processing here is performed by increasing the luminance component of the designated color. Details of this color enhancement processing will also be described later.
[0060]
In step S10, monochrome image data is generated based on the image data that has been subjected to the color enhancement processing in this manner. Here, the generated monochrome image data may be displayed on the display screen, and the operator may confirm the image after the enhancement processing. Thereafter, the monochrome image data after the enhancement processing is sent from the image output processing unit 7 to the printer 4, and the monochrome image data is output by the printer 4.
[0061]
Next, the details of the processing of S6 to S9 will be described. First, analysis of luminance distribution and color distribution in image data in S6 will be described.
[0062]
First, the YY component, which is a luminance component, is extracted for all pixels in the corresponding image from the YCC data obtained by YCC conversion in S2. Then, the average value of the YY components is calculated from the set of data of these YY components, and the variance y in the set is calculated. For example, when the set of YY component data of all the pixels has a distribution like the histogram shown in FIG. 3, the degree of dispersion of the YY components is digitized by the variance y.
[0063]
When the value of the variance y is relatively large, the luminance in the image data is distributed over a wide range, and the shape and contour of the object in the image can be sufficiently distinguished by the luminance difference. It can be determined that there is a high possibility that the image can be obtained. On the other hand, when the value of the variance y is relatively small, the luminance in the image data is gathered in a narrow range, and the shape and contour of the object in the image can be sufficiently distinguished only by the luminance difference. It can be determined that there is a high possibility that the image cannot be captured.
[0064]
In addition, (C1, C2) components which are color difference components are extracted for all pixels in the corresponding image from the YCC data obtained by YCC conversion in S2. A set of these (C1, C2) component data is plotted on the C1-C2 plane, and the barycentric positions of these plotted points are obtained. Then, all the distances between the center of gravity position and each plotted point are calculated, and the variance cc in the set composed of the data of this distance is calculated.
[0065]
When the value of the variance cc is relatively large, it can be determined that there is a high possibility that the original image includes colors of various hues and saturations. That is, in such a case, there is a high possibility that a plurality of regions having different colors but having the same level in terms of luminance values are present in the image. It can be determined that there is a high possibility that it will become difficult. On the other hand, when the value of the variance cc is relatively small, it can be determined that there is a high possibility that the original image is concentrated in the vicinity of a specific hue and saturation. That is, in such a case, it can be determined that the entire image is composed of only similar colors, and it is highly likely that various shapes in the image are sufficiently clarified due to differences in luminance components.
[0066]
Next, the determination of whether or not to perform color enhancement in S7 will be described. The determination of whether or not to perform color enhancement is that when there is no enhancement, the colors are different from each other, but there are a plurality of regions that have the same level in terms of luminance values. This is done depending on whether it becomes difficult to distinguish the areas. In the present embodiment, the condition for color enhancement is that the variance y obtained in S6 is smaller than the predetermined value A, and the variance cc obtained in S6 is larger than the predetermined value B.
[0067]
First, the fact that the variance y is smaller than the predetermined value A indicates a state in which the luminance in the image data is gathered in a narrow range. There is a high possibility that the image cannot be distinguished. Further, the fact that the variance cc is larger than the predetermined value B indicates that the original image can be judged to have a high possibility of containing colors of various hues and saturations, and the colors are different from each other. In other words, there is a high possibility that a plurality of regions having the same level in terms of luminance values are present in the image. In other words, when an image satisfying the above conditions is converted into a monochrome image as it is, it will be in a state where the various shapes of the main subject will be unclear. In other words, if the above conditions are not satisfied, it is possible to convert the image into a monochrome image having a sufficient image state without performing enhancement processing. In this way, by determining whether or not the enhancement process is performed under the above-described conditions, it is possible to prevent the image from being converted into an unnatural monochrome image by performing the unnecessary enhancement process.
[0068]
In addition, when it is determined that the enhancement processing should be performed based on the above conditions, the degree of enhancement is also calculated. The degree of emphasis is set according to the distance d between the center of gravity of the point where all the pixels of the image data are plotted and the origin on the C1-C2 plane. FIG. 4 is a graph showing the relationship between the distance d from the center of gravity position to the origin and the degree of emphasis. As shown in the figure, the degree of emphasis is set smaller as the distance d between the center of gravity position and the origin becomes larger. The degree of emphasis becomes strongest when the position of the center of gravity coincides with the origin. The reason for setting the degree of emphasis in this way is as follows.
[0069]
First, consider a case where the center of gravity is near the origin. In this case, the points are considered to be distributed in all directions around the origin. That is, the image data in such a case is composed of pixels of colors composed of various types of hues. Therefore, when there are a plurality of pixels that are close to a specific level in luminance, it is highly likely that these pixels have different hues, and in order to represent the difference in hue by the difference in luminance, A strong emphasis may be preferred.
[0070]
Next, consider a case where the center of gravity is located away from the origin. In this case, it is considered that each point is distributed in a range in a specific direction as viewed from the origin. That is, the image data in such a case includes a large number of pixels having similar colors. Therefore, pixels with similar brightness are likely to be pixels with similar hues, and there is little difference in the feeling seen in color images between these pixels. It seems that there is no need for emphasis above.
[0071]
In addition, the function which shows the curve which shows the relationship between the distance d from the gravity center position to the origin and the degree of emphasis shown in FIG. 4 is not particularly limited, and the distance d between the gravity center position and the origin can be increased. Any function may be used as long as the degree of emphasis is set smaller.
[0072]
In the above description, the condition for color enhancement is that the variance y obtained in S6 is smaller than the predetermined value A, and the variance cc obtained in S6 is larger than the predetermined value B. However, the present invention is not limited to this. For example, the condition may be such that the degree of emphasis is continuously changed according to the values of the variance y and the variance cc. With such a condition, it is possible to eliminate the discontinuity of change between when the color is emphasized and when it is not.
[0073]
Next, a method for specifying a color to be emphasized in S8 will be described. First, (C1, C2) components are extracted from YCC data obtained by YCC conversion of image data, and plotted on the C1-C2 plane for each pixel. FIG. 5 shows an example of a state in which the (C1, C2) components for each pixel are plotted on the C1-C2 plane.
[0074]
In the C1-C2 plane, a plurality of angle regions, that is, a plurality of hue regions including a specific range are provided with the origin as the center, and a frequency distribution for each hue region is obtained. FIG. 6 shows an example of a histogram for each hue obtained in this way. When this frequency is counted, a circle having a predetermined radius centered at the origin is provided on the C1-C2 plane, and the points plotted inside the circle are counted as the frequency of the corresponding hue area. It is preferable not to do so. This is to eliminate the influence of pixels with low saturation. In other words, low saturation is highly likely not to be a pixel constituting the main subject, and the purpose is to minimize the influence of such pixels on the selection of the emphasized color. Note that the radius of the circle does not have to be fixed, and may be appropriately changed according to the state of the image data. For example, in the case of data with a relatively high ratio of pixels with low saturation, processing such as setting a smaller radius of the circle may be performed.
[0075]
In the histogram as shown in FIG. 6 obtained in this way, the hue having the highest frequency is set as the emphasized color. In the example shown in FIG. 6, the hue A having the highest frequency is set as an emphasized color. Here, the hue of the emphasized color is set to one, but the present invention is not limited to this, and a plurality of emphasized colors may be set. For example, when there are a plurality of frequency peaks in the histogram, the corresponding hue may be set as a color to be emphasized. At this time, a lower limit value of the frequency to be set as the emphasized color is provided, and if it is equal to or lower than this lower limit value, it is set so that it is not set as the emphasized color even if the frequency is peaked. May be.
[0076]
Next, the enhancement process for the color designated as the color to be enhanced in S9 will be described. In this color enhancement process, a process for increasing the luminance is performed on a pixel having a hue in a range close to the hue of the color designated in S5 or S8. FIG. 7 is an explanatory diagram for explaining a method of calculating a luminance correction amount. FIG. 7 shows a space indicating the luminance correction amount ΔY in a direction perpendicular to the C1-C2 plane.
[0077]
First, on the C1-C2 plane, a straight line h indicating the hue direction of the color designated as the emphasized color is set. A plane consisting of the straight line h and the axis of the correction amount ΔY is assumed, and a straight line k is set within the plane so that the luminance correction amount ΔY increases in proportion to the distance from the origin of the straight line h. . For the pixel corresponding to the point on the straight line h, the distance from the point on the straight line h to the straight line k in the direction of the correction amount ΔY is set as the luminance correction amount for the pixel.
[0078]
For example, in the example shown in FIG. 7, when the luminance of the pixel corresponding to (C1 ′, C2 ′), which is a point on the straight line h, is Y1, the correction amount ΔY in the direction from (C1 ′, C2 ′). Since the distance to the straight line k is a, the corrected luminance Y1 ′ of this pixel is obtained by Y1 ′ = Y1 + a.
[0079]
Further, the correction amount in the vicinity of the hue direction of the emphasized color is set as follows. That is, assuming a curved surface having a normal distribution with the straight line k as the maximum value when viewed from the origin in the direction of the straight line h, the distance in the correction amount ΔY direction between the curved surface and a point on the C1-C2 plane. Is set as the correction amount. Here, the curved surface indicating the correction amount is assumed to be a curved surface having a normal distribution with the straight line k as the maximum value when viewed in the direction of the straight line h from the origin, but is not limited to the normal distribution. Any function may be used as long as the straight line k is the maximum value and the correction amount decreases with distance from the straight line k. The function is preferably a function that maintains continuity in the vicinity of the straight line k and in the vicinity of the region where the correction amount is zero.
[0080]
Note that, in the above, correction is performed to increase the luminance of the pixel having the hue direction of the emphasized color and the hue in the vicinity thereof, but the pixel is in the hue direction of the emphasized color and the vicinity thereof. Correction that lowers the luminance may be performed on a pixel having a hue other than the hue. That is, in this case, for pixels having a hue that is the hue direction of the emphasized color, luminance correction is not performed, and the normal value with the straight line h as the maximum value is viewed in the state of viewing the straight line h direction from the origin. A curved surface having a distribution is assumed, and a distance (negative value) in the correction amount ΔY direction between the curved surface and a point on the C1-C2 plane is set as a correction amount.
[0081]
As described above, when a plurality of colors to be emphasized are set, a straight line corresponding to the straight line k may be set with respect to the hue direction of each emphasized color. In this case, assuming a curved surface having a normal distribution with the corresponding straight line as the maximum value in a state where each hue direction is viewed from the origin, a correction amount ΔY direction between the curved surface and a point on the C1-C2 plane is assumed. The distance at is set as the correction amount.
[0082]
【The invention's effect】
As described above, the image processing method according to the first aspect of the present invention is the image processing method for converting color image data composed of a plurality of pixels into monochrome image data, wherein the color image data includes luminance component data and color difference component data. And a step of setting a color difference component to be emphasized, a step of correcting luminance component data of pixels having color difference component data included in the color difference component to be emphasized, and a correction. And converting to monochrome image data based on the luminance component data.
[0083]
Thereby, by setting the color difference component mainly constituting the main subject in the original color image as the predetermined color difference component data, the luminance component of the main subject is emphasized. The converted monochrome image data also has an image in which the subject is emphasized. Therefore, it is possible to provide a monochrome image in which the background and the main subject are clearly distinguished.
[0084]
An image processing method according to a second aspect of the present invention is a method further comprising a step of determining whether or not to perform correction for enhancing luminance component data of a pixel having the predetermined color difference component data.
[0085]
Thus, in addition to the effect of the method of claim 1, for example, when the correction that emphasizes the luminance component data is such that a more natural monochrome image is obtained, the correction more than necessary is performed. There is an effect that it is possible to avoid the above.
[0086]
An image processing method according to a third aspect of the present invention is a method in which whether or not to perform the above correction is determined according to a variance value in the distribution of luminance component data of each pixel.
[0087]
Thus, in addition to the effect of the method of claim 2, for example, if it is determined to perform correction when the variance in the distribution of luminance component data is smaller than a predetermined value, the distribution in the luminance component data distribution For an image with small dispersion, there is an effect that various shapes in a monochrome image can be clearly expressed by dispersing luminance by performing correction. Also, when the variance in the distribution of the luminance component data is large, it can be converted into a monochrome image with various shapes sufficiently clarified without performing correction. There is an effect that it is possible to prevent the correction.
[0088]
In addition, as described above, whether or not to perform correction is determined based on an objective numerical value such as a variance value in the distribution of luminance component data of each pixel. In addition, there is an effect that it is possible to make a determination by a calculation process by a computer or the like.
[0089]
An image processing method according to a fourth aspect of the present invention is a method in which the determination as to whether or not to perform the correction is performed in accordance with a variance value in the distribution of color difference component data of each pixel.
[0090]
Thus, in addition to the effect of the method of claim 2 or 3, for example, if the setting is made so that the correction is made when the variance in the distribution of the color difference component data is larger than a predetermined value, the variance becomes large. It is possible to provide a monochrome image in which distinction between a plurality of regions having only the same brightness and different colors is clarified by performing correction on an image composed of various color components that is likely to be There is an effect that it becomes possible. In addition, when the variance in the distribution of the color difference component data is small, the original image has a high proportion of similar color pixels and can be converted into a monochrome image in which various shapes are sufficiently clarified without correction. Therefore, according to the above determination, there is an effect that it is possible to prevent unnecessary correction.
[0091]
In addition, as described above, whether or not to perform correction is determined based on an objective numerical value called a dispersion value in the distribution of color difference component data of each pixel. In addition, there is an effect that it is possible to make a determination by a calculation process by a computer or the like.
[0092]
The image processing method according to the invention of claim 5 divides the color difference component into a plurality of ranges, and sets the color difference component to be emphasized based on the frequency of pixels in which the color difference component data is included in each range. It is a method.
[0093]
Thus, in addition to the effect of the method according to any one of claims 1 to 4, for example, when the color difference component in the range in which the frequency of the included pixel is the highest is set as the color difference component to be emphasized, it becomes main. Assuming that the subject occupies a large area in the image, the color difference component of the pixels constituting the main subject is set as the color difference component to be enhanced. Therefore, the main subject is emphasized.
[0094]
Further, as described above, the setting of the color difference component to be emphasized is performed based on an objective numerical value such as the frequency of the pixels in which the color difference component data is included in each range. In addition, there is an effect that it is possible to make a determination by a calculation process by a computer or the like.
[0095]
The image processing method according to the invention of claim 6 is a method in which the setting of the color difference component to be enhanced is performed by setting the hue to be enhanced.
[0096]
Thus, in addition to the effect of the method of any one of claims 1 to 5, for example, by setting the main hue constituting the main subject in the original image, the influence due to the change in saturation is eliminated. In this state, there is an effect that it becomes possible to select a pixel for emphasizing the luminance component data.
[0097]
According to a seventh aspect of the present invention, there is provided a recording medium on which an image processing program is recorded. The recording medium stores an image processing program for converting color image data including a plurality of pixels into monochrome image data. A process of converting data and color difference component data, a process of setting a color difference component to be enhanced, and a correction for enhancing luminance component data of pixels having color difference component data included in the color difference component to be enhanced This is a configuration in which a program for causing a computer to execute processing and processing for converting to monochrome image data based on the corrected luminance component data is recorded.
[0098]
Thereby, by setting the color difference component mainly constituting the main subject in the original color image as the predetermined color difference component data, the luminance component of the main subject is emphasized. The converted monochrome image data also has an image in which the subject is emphasized. Therefore, it is possible to provide a monochrome image in which the background and the main subject are clearly distinguished.
[0099]
The recording medium on which the image processing program according to the invention of claim 8 is recorded further includes a process of determining whether or not the program performs correction for enhancing the luminance component data of the pixel having the predetermined color difference component data. It is the structure which has.
[0100]
Thus, in addition to the effect of the configuration of claim 7, for example, when correction that emphasizes luminance component data is an image that provides a more natural monochrome image, correction is performed more than necessary. There is an effect that it is possible to avoid the above.
[0101]
The recording medium on which the image processing program according to the ninth aspect of the invention is recorded has a configuration in which the determination as to whether or not to perform the correction is made according to the variance value in the distribution of the luminance component data of each pixel.
[0102]
Thus, in addition to the effect of the configuration of claim 8, for example, if the setting is made so that the correction is made when the variance in the distribution of the luminance component data is smaller than a predetermined value, the distribution in the luminance component data distribution For an image with small dispersion, there is an effect that various shapes in a monochrome image can be clearly expressed. Also, when the variance in the distribution of the luminance component data is large, it can be converted into a monochrome image with various shapes sufficiently clarified without performing correction. There is an effect that it is possible to prevent the correction.
[0103]
In addition, as described above, whether or not to perform correction is determined based on an objective numerical value such as a variance value in the distribution of luminance component data of each pixel. In addition, there is an effect that it is possible to make a determination by a calculation process by a computer or the like.
[0104]
The recording medium on which the image processing program according to the tenth aspect of the invention is recorded is configured such that the determination as to whether or not to perform the correction is made according to the variance value in the distribution of the color difference component data of each pixel.
[0105]
Thus, in addition to the effect of the configuration according to the eighth or ninth aspect, for example, if the setting is made so that correction is performed when the variance in the distribution of the color difference component data is larger than a predetermined value, the variance becomes large. It is possible to provide a monochrome image in which distinction between a plurality of regions having only the same brightness and different colors is clarified by performing correction on an image composed of various color components that is likely to be There is an effect that it becomes possible. In addition, when the variance in the distribution of the color difference component data is small, the original image has a high proportion of similar color pixels and can be converted into a monochrome image in which various shapes are sufficiently clarified without correction. Therefore, according to the above determination, there is an effect that it is possible to prevent unnecessary correction.
[0106]
In addition, as described above, whether or not to perform correction is determined based on an objective numerical value called a dispersion value in the distribution of color difference component data of each pixel. In addition, there is an effect that it is possible to make a determination by a calculation process by a computer or the like.
[0107]
A recording medium recording an image processing program according to an invention of claim 11 divides a color difference component into a plurality of ranges, and performs the color difference to be emphasized based on the frequency of pixels in which the color difference component data is included in each range. In this configuration, the components are set.
[0108]
Thereby, in addition to the effect of the configuration according to any one of claims 7 to 10, for example, when the color difference component in the range where the frequency of the included pixels is the highest is set as the color difference component to be emphasized, it becomes main. Assuming that the subject occupies a large area in the image, the color difference component of the pixels constituting the main subject is set as the color difference component to be enhanced. Therefore, the main subject is emphasized.
[0109]
Further, as described above, the setting of the color difference component to be emphasized is performed based on an objective numerical value such as the frequency of the pixels in which the color difference component data is included in each range. In addition, there is an effect that it is possible to make a determination by a calculation process by a computer or the like.
[0110]
A recording medium recording an image processing program according to a twelfth aspect of the invention is configured such that the setting of the color difference component to be enhanced is performed by setting the hue to be enhanced.
[0111]
Thus, in addition to the effect of the configuration according to any one of claims 7 to 11, for example, by setting the main hue constituting the main subject in the original image, there is no influence due to the change in saturation. In this state, there is an effect that it becomes possible to select a pixel for emphasizing the luminance component data.
[Brief description of the drawings]
FIG. 1 is a flowchart showing a flow of processing in an image processing unit provided in an image processing apparatus of a photographic processing system according to an embodiment of the present invention.
FIG. 2 is a block diagram showing a schematic configuration of the photographic processing system.
FIG. 3 is a histogram showing an example of a frequency distribution of YY components in YCC data of image data.
FIG. 4 is a graph showing the relationship between the distance from the center of gravity of a point on which all pixels of image data are plotted on the C1-C2 plane to the origin and the degree of emphasis.
FIG. 5 is an explanatory diagram showing an example of a state in which (C1, C2) components for each pixel are plotted on a C1-C2 plane.
FIG. 6 is a histogram showing an example of a frequency distribution for each hue.
FIG. 7 is an explanatory diagram showing a space indicating a luminance correction amount ΔY in a direction perpendicular to the C1-C2 plane.
[Explanation of symbols]
1 Image processing device
2 Digital camera
3 Scanner
4 Printer
5 Image input section
6 Image processing section
7 Image output processor

Claims (12)

複数の画素からなるカラー画像データをモノクロ画像データに変換する画像処理方法において
記カラー画像データを、輝度成分データと色差成分データとに変換するステップと、強調を行うべき色差成分についてのオペレータからの入力を受け付けるステップと、上記強調を行うべき色差成分に含まれる色差成分データを有する画素の輝度成分データを強調する補正を行うステップと、補正された輝度成分データに基づいてモノクロ画像データに変換するステップとを有していることを特徴とする画像処理方法。
In an image processing method for converting color image data composed of a plurality of pixels into monochrome image data ,
On SL color image data, color difference component included in color difference components to perform the steps of converting the luminance component data and chrominance component data, comprising the steps of: receiving an input from an operator of the color difference component to be subjected to emphasis, the emphasis An image processing method comprising a step of performing correction for emphasizing luminance component data of a pixel having data, and a step of converting to monochrome image data based on the corrected luminance component data.
複数の画素からなるカラー画像データをモノクロ画像データに変換する画像処理方法において、In an image processing method for converting color image data composed of a plurality of pixels into monochrome image data,
上記カラー画像データを、輝度成分データと色差成分データとに変換するステップと、色差成分の分布状態に応じて選択される強調を行うべき色差成分を設定するステップと、上記強調を行うべき色差成分に含まれる色差成分データを有する画素の輝度成分データを強調する補正を行うステップと、補正された輝度成分データに基づいてモノクロ画像データに変換するステップとを有していることを特徴とする画像処理方法。Converting the color image data into luminance component data and chrominance component data; setting a chrominance component to be enhanced selected in accordance with a distribution state of the chrominance component; and chrominance component to be enhanced An image comprising: a step of performing correction for emphasizing luminance component data of a pixel having color difference component data included in the image, and a step of converting to monochrome image data based on the corrected luminance component data. Processing method.
上記の所定の色差成分データを有する画素の輝度成分データを強調する補正を行うか否かを判断するステップをさらに有しており、
上記の補正を行うか否かの判断が、各画素の輝度成分データの分布における分散の値に応じて行われることを特徴とする請求項2記載の画像処理方法。
And further comprising a step of determining whether or not to perform correction for enhancing the luminance component data of the pixel having the predetermined color difference component data ,
3. The image processing method according to claim 2, wherein the determination as to whether or not to perform the correction is made according to a variance value in the distribution of luminance component data of each pixel.
上記の所定の色差成分データを有する画素の輝度成分データを強調する補正を行うか否かを判断するステップをさらに有しており、
上記の補正を行うか否かの判断が、各画素の色差成分データの分布における分散の値に応じて行われることを特徴とする請求項2または3記載の画像処理方法。
And further comprising a step of determining whether or not to perform correction for enhancing the luminance component data of the pixel having the predetermined color difference component data ,
4. The image processing method according to claim 2, wherein the determination as to whether or not to perform the correction is performed according to a variance value in the distribution of color difference component data of each pixel.
色差成分を複数の範囲に分割するとともに、各範囲に色差成分データが含まれる画素の度数に基づいて、上記強調を行うべき色差成分の設定が行われることを特徴とする請求項ないし4のいずれかに記載の画像処理方法。With dividing the color difference components into a plurality of ranges, based on the frequency of pixels that contain the color difference component data to each range, according to claim 2 to 4, characterized in that the setting of the chrominance component to be subjected to the emphasis is performed The image processing method according to any one of the above. 上記強調を行うべき色差成分の設定が、強調を行うべき色相を設定することによって行われることを特徴とする請求項1ないし5のいずれかに記載の画像処理方法。  6. The image processing method according to claim 1, wherein the color difference component to be enhanced is set by setting a hue to be enhanced. 複数の画素からなるカラー画像データをモノクロ画像データに変換する画像処理プログラムを記録した記録媒体において
記カラー画像データを、輝度成分データと色差成分データとに変換する処理と、強調を行うべき色差成分についてのオペレータからの入力を受け付ける処理と、上記強調を行うべき色差成分に含まれる色差成分データを有する画素の輝度成分データを強調する補正を行う処理と、補正された輝度成分データに基づいてモノクロ画像データに変換する処理とをコンピュータに実行させるためのプログラムを記録してなることを特徴とする画像処理プログラムを記録した記録媒体。
In a recording medium on which an image processing program for converting color image data composed of a plurality of pixels into monochrome image data is recorded ,
On SL color image data, and processing for converting the luminance component data and chrominance component data, and processing for accepting an input from the operator of the color difference component to be subjected to enhancement, color difference component included in color difference components to perform the enhancement A program for recording a program for causing a computer to execute a correction process for emphasizing luminance component data of pixels having data and a process for converting to monochrome image data based on the corrected luminance component data. A recording medium on which an image processing program is recorded.
複数の画素からなるカラー画像データをモノクロ画像データに変換する画像処理プログラムを記録した記録媒体において、In a recording medium on which an image processing program for converting color image data composed of a plurality of pixels into monochrome image data is recorded,
上記カラー画像データを、輝度成分データと色差成分データとに変換する処理と、色差成分の分布状態に応じて選択される強調を行うべき色差成分を設定する処理と、上記強調を行うべき色差成分に含まれる色差成分データを有する画素の輝度成分データを強調する補正を行う処理と、補正された輝度成分データに基づいてモノクロ画像データに変換する処理とをコンピュータに実行させるためのプログラムを記録してなることを特徴とする画像処理プログラムを記録した記録媒体。Processing for converting the color image data into luminance component data and color difference component data, processing for setting a color difference component to be emphasized selected according to the distribution state of the color difference component, and color difference component to be emphasized A program for causing a computer to execute a correction process for emphasizing luminance component data of pixels having color difference component data included in the image and a process for converting to monochrome image data based on the corrected luminance component data is recorded. A recording medium on which an image processing program is recorded.
上記プログラムが、上記の所定の色差成分データを有する画素の輝度成分データを強調する補正を行うか否かを判断する処理をさらに有しており、
上記の補正を行うか否かの判断が、各画素の輝度成分データの分布における分散の値に応じて行われることを特徴とする請求項8記載の画像処理プログラムを記録した記録媒体。
The program further includes a process of determining whether or not to perform correction for enhancing the luminance component data of the pixel having the predetermined color difference component data ,
9. The recording medium recording an image processing program according to claim 8, wherein the determination as to whether or not to perform the correction is made in accordance with a variance value in the distribution of luminance component data of each pixel.
上記プログラムが、上記の所定の色差成分データを有する画素の輝度成分データを強調する補正を行うか否かを判断する処理をさらに有しており、
上記の補正を行うか否かの判断が、各画素の色差成分データの分布における分散の値に応じて行われることを特徴とする請求項8または9記載の画像処理プログラムを記録した記録媒体
The program further includes a process of determining whether or not to perform correction for enhancing the luminance component data of the pixel having the predetermined color difference component data ,
10. The recording medium recorded with the image processing program according to claim 8, wherein the determination as to whether or not to perform the correction is made according to a variance value in the distribution of color difference component data of each pixel .
色差成分を複数の範囲に分割するとともに、各範囲に色差成分データが含まれる画素の度数に基づいて、上記強調を行うべき色差成分の設定が行われることを特徴とする請求項ないし10のいずれかに記載の画像処理プログラムを記録した記録媒体。With dividing the color difference components into a plurality of ranges, based on the frequency of pixels that contain the color difference component data to each range, of from 10 settings of the color difference component to be subjected to the emphasis claims 8 characterized in that it is performed A recording medium on which any one of the image processing programs is recorded. 上記強調を行うべき色差成分の設定が、強調を行うべき色相を設定することによって行われることを特徴とする請求項7ないし11のいずれかに記載の画像処理プログラムを記録した記録媒体。  12. The recording medium recording the image processing program according to claim 7, wherein the color difference component to be enhanced is set by setting a hue to be enhanced.
JP2000237497A 2000-08-04 2000-08-04 Image processing method and recording medium recording image processing program Expired - Fee Related JP4304846B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000237497A JP4304846B2 (en) 2000-08-04 2000-08-04 Image processing method and recording medium recording image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000237497A JP4304846B2 (en) 2000-08-04 2000-08-04 Image processing method and recording medium recording image processing program

Publications (2)

Publication Number Publication Date
JP2002051222A JP2002051222A (en) 2002-02-15
JP4304846B2 true JP4304846B2 (en) 2009-07-29

Family

ID=18729348

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000237497A Expired - Fee Related JP4304846B2 (en) 2000-08-04 2000-08-04 Image processing method and recording medium recording image processing program

Country Status (1)

Country Link
JP (1) JP4304846B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2391111A1 (en) 2010-05-24 2011-11-30 Ricoh Company, Ltd. Image processing apparatus, image processing method, and computer program product

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100477656B1 (en) * 2002-07-27 2005-03-22 삼성전자주식회사 Method and apparatus for improvement of digital image quality
KR100524072B1 (en) 2003-06-28 2005-10-26 삼성전자주식회사 Method for improving image quality
DE102004044647A1 (en) * 2004-09-15 2006-03-30 OCé PRINTING SYSTEMS GMBH Method and apparatus for converting source image data into target image data
JP5137481B2 (en) * 2007-06-29 2013-02-06 オリンパス株式会社 Image processing apparatus, image processing program, and image processing method
JP6293466B2 (en) * 2013-12-02 2018-03-14 シャープ株式会社 Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP6211952B2 (en) * 2014-02-26 2017-10-11 シャープ株式会社 Image processing apparatus and image forming apparatus
JP6535222B2 (en) * 2015-05-28 2019-06-26 株式会社沖データ Image processing apparatus and image forming system
JP7349653B2 (en) * 2018-12-10 2023-09-25 株式会社サンライン image identification system
JP7483471B2 (en) * 2020-04-10 2024-05-15 キヤノン株式会社 Image processing device, image processing method, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2391111A1 (en) 2010-05-24 2011-11-30 Ricoh Company, Ltd. Image processing apparatus, image processing method, and computer program product

Also Published As

Publication number Publication date
JP2002051222A (en) 2002-02-15

Similar Documents

Publication Publication Date Title
EP0967791B1 (en) Image processing method, apparatus and memory medium therefor
US5978519A (en) Automatic image cropping
US6628830B1 (en) Image processing method and apparatus and storage medium
US20100208946A1 (en) Specifying flesh area on image
JP3931903B2 (en) Output image adjustment of image data
JP4007367B2 (en) Output image adjustment of image data
JP2004112596A (en) Output target image data selection
JP4304846B2 (en) Image processing method and recording medium recording image processing program
JP4035688B2 (en) False color removal apparatus, false color removal program, false color removal method, and digital camera
JP2001148780A (en) Method for setting red-eye correction area and red-eye correction method
US8086063B2 (en) Image display apparatus and method, and program
JP2002044469A (en) Image processing method and recording medium with recorded image processing program stored
JP4006590B2 (en) Image processing apparatus, scene determination apparatus, image processing method, scene determination method, and program
JP4219577B2 (en) Image processing apparatus, image output apparatus, image processing method, and storage medium
JP4428347B2 (en) Output image adjustment of image data
JP2006262404A (en) Device and method for estimating light source, image processor, and method for image processing
JP2005192158A (en) Image processing method, image processing apparatus, and image recording apparatus
JP5067489B2 (en) Output image adjustment of image data
JP3797346B2 (en) Output image adjustment of image data
JP4666009B2 (en) Output image adjustment for image files
JP3797347B2 (en) Output image adjustment of image data
JP4073877B2 (en) Image processing method, image processing apparatus, image forming apparatus, and computer program
JP2009081631A (en) Image processing apparatus, method and program
JP2006092137A (en) Image processing method, image processor, imaging device and image processing program
JP2008079196A (en) Image correcting method, image correcting program and image correcting module

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070712

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090113

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090313

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090420

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

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20120515

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120515

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130515

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140515

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees