[go: up one dir, main page]

JP3853224B2 - White balance correction method - Google Patents

White balance correction method Download PDF

Info

Publication number
JP3853224B2
JP3853224B2 JP2002025304A JP2002025304A JP3853224B2 JP 3853224 B2 JP3853224 B2 JP 3853224B2 JP 2002025304 A JP2002025304 A JP 2002025304A JP 2002025304 A JP2002025304 A JP 2002025304A JP 3853224 B2 JP3853224 B2 JP 3853224B2
Authority
JP
Japan
Prior art keywords
color
gray
color temperature
image
image signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2002025304A
Other languages
Japanese (ja)
Other versions
JP2003209856A (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.)
Fujifilm Holdings Corp
Original Assignee
Fuji Photo Film 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 Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP2002025304A priority Critical patent/JP3853224B2/en
Priority to US10/290,335 priority patent/US7146041B2/en
Priority to EP02025015A priority patent/EP1311111A3/en
Publication of JP2003209856A publication Critical patent/JP2003209856A/en
Application granted granted Critical
Publication of JP3853224B2 publication Critical patent/JP3853224B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、入力画像信号に対して、デジタル画像処理を施し、プリントを作成する際のカラー画像のホワイトバランス補正及び濃度補正の技術に関する。
【0002】
【従来の技術】
従来、銀塩写真技術における露光系では、一般にアナログ露光(面露光、直接露光)によってプリントが行われていた。すなわち、現像済みのネガフィルムを所定の焼き付け位置に位置決めして、白色光源(ハロゲンランプ等)からの光を照射し、ネガフィルムからの透過画像を印画紙に結像して露光していた。
【0003】
これに対して、近年では、デジタル露光を利用する焼き付け装置、すなわち、ネガフィルムやカラーリバーサルフィルム等の写真フィルムに記録された画像を光電的に読み取って、読み取った画像をデジタル信号とした後、種々の画像処理を施して記録用の画像データとし、この画像データに応じて変調した記録光によって感光材料を走査露光して画像(潜像)を記録し、(仕上がり)プリントとするデジタルフォトプリンタが実用化されている。
【0004】
このようなデジタルフォトプリンタにおいては、画像をデジタル画像データとして取り扱うので、フィルムに撮影された画像のみならず、デジタルスチルカメラ(DSC)等で撮影された画像や、CD−Rやフレキシブルディスク、リムーバブルハードディスク(Zip、Jaz等)等の磁気記録媒体、MOディスク(光磁気記録媒体)等の各種の記録媒体にデジタルデータとして記録された画像データについても、画像処理を施してプリントとして出力することができる。
【0005】
従来、カラーネガフィルムは、多数の一般ユーザによって広く利用されており、そのネガフィルムへの原稿画像の撮影状態は必ずしも一様ではなく、例えば昼光や蛍光灯等の様々な光源下で使用されている。従って、現像済ネガフィルムからプリントを作成する場合、プリント光源の光質を一定にして、焼き付けを行うと、撮影光源の色味が直接プリントに反映されてしまい、不適切なプリントになってしまうことがあった。
【0006】
そのため、従来、プリント上でホワイトバランスを調整するために様々な工夫がなされて来た。その中の代表的なものとして、「世の中の色をすべて平均すればグレーである。」というエバンスの原理(仮説)に基づく、LATD方式がある。LATD(Large Area Transmission Density 、大面積平均透過濃度) とは、画面全体の平均透過濃度のことをいい、LATD方式とは、カラーネガフィルムの各コマのLATDを測定し、そのRGB濃度の大小によりプリント光源の光質を変化させることによりプリント上の平均色をグレーに近づけるというものである。
【0007】
一方、近年、デジタルスチルカメラ(DSC)が急激に普及し始めている。DSCは、シーンを撮像するという意味でカラーネガと同一視できるが、根本的に異なる点がある。それは、カラーネガフィルムに撮影された画像は、それ自体を観察することはないのに対し、DSC画像は、直接鑑賞の対象になるということである。そのため、DSC画像は、これをプリントとして出力する以前に、DSC画像自体がホワイトバランスのとれた美しい画像でなくてはならない。カラーネガフィルムと同様にDSCも様々な光源下で撮影するため、ホワイトバランスを補正する機能がないと、不満足な画像となってしまうため、最近のほとんどのDSCには、ホワイトバランス補正を自動的に行うAWB(Auto White Balance ) 機能が搭載されている。
【0008】
【発明が解決しようとする課題】
しかしながら、前述したLATD方式は、一定の成果をあげてきたが、一方で不都合なプリントをも生み出しているという問題がある。その一つにプリントの色などが偏ってしまうカラーフェリアの発生がある。例えば、赤い服を着た女性のシーンを撮影した画像に対してLATD方式でホワイトバランス補正を行うと、画面全体をグレーにしようとするために、赤の補色であるシアン色が画面全体に入れられるが、このため赤い服は濁り、女性の顔色は悪くなってしまう。
また、画面全体として赤みのシーンの場合、それが光源によるものか、被写体によるものかの区別ができないため、LATD方式では、原因が光源の場合にはうまくいくが、原因が被写体の場合には、上のようなカラーフェリアを引き起こすという問題がある。
【0009】
また、前記DSCのAWB機能は基本的にネガフィルム/プリント系と同様に前記エバンスの原理に基づいており、ネガフィルム/プリント系のLATDによるホワイトバランス補正と同様の問題を有している。
すなわち、AWB後のDSC画像は、エバンスの原理の平均性能として約60〜70%は、カラーバランスのとれた良好な画像となるが、残りの約30〜40%は、AWBの作動不良による、何らかのカラーバランス補正をさらに必要とする画像である。従って、DSC画像からプリントを作成する際にホワイトバランス補正をしなければ、これらのプリントの約30〜40%は、不満足な、受け入れ難いプリントとなってしまう。
【0010】
以上述べたように、従来技術のエバンスの原理に基づくLATD方式では、画面全体の平均値がグレーという仮説によってホワイトバランス補正を行っているが、この方式では画像中の真のグレーを見い出すことができないためホワイトバランス補正が充分ではなく、却って逆補正してしまう場合も少なくなかった。
また、このようなLATD方式でプリントの画像全体の濃度補正を行おうとすると、主要被写体の濃度がシーンの構成によって影響を受け、適正濃度に仕上がらないという問題があったため、主要被写体(多くの場合顔である。)を検出して、その濃度に基づいてプリント濃度を決める方法が提案されている。一方、プリント濃度が適正かどうかの判断は、画面全体の濃度よりは、むしろ主要被写体の濃度によりなされるため、主要被写体である顔を検出して、顔の濃度が適正になるように画像全体を濃度補正することが重要である。
【0011】
しかし、主要被写体である顔の検出は、一般に形状認識を用いて行われているが、顔の検出を精度良く行うことは非常に難しいのが現状である。また、顔の検出を色情報を用いて行う方法も試みられているが、光源が未知な場合にはやはり難しいという問題がある。
本発明は、前記従来の問題に鑑みてなされたものであり、入力された画像データに対してデジタル画像処理を施してプリントを作成する際に、ホワイトバランス補正を適正に、高い得率で実現することができるホワイトバランス補正方法および装置ならびにホワイトバランス補正方法をコンピュータに実行させるプログラムを記載した記録媒体を提供することを課題とする。
【0012】
【課題を解決するための手段】
前記課題を解決するために、本発明の第1の態様は、入力されたカラー画像中に含まれるグレーおよび/または肌色の色情報を用いて、前記カラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、および/または、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、前記肌色候補画素および/またはグレー候補画素の個数が最大となるように、前記係数を最適化して得られる肌色候補画素群および/またはグレー候補画素群のそれぞれの平均色温度から、前記カラー画像を撮影した際の撮影光源の色温度を推定し、前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにし、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、前記係数を最適化する際に、前記入力されたカラー画像の画像信号の最大値を検出し、この最大値で前記入力されたカラー画像の各画像信号を割り算することにより前記画像信号の最大値が1.0となるように規格化した画像信号を用いるようにしたことを特徴とするホワイトバランス補正方法を提供するものである
【0013】
また、前記撮影光源の色温度を推定し、前記カラー画像の画像信号を補正する際、グレーおよび肌色の色情報のみを用いることが好ましい。
【0015】
また、前記肌色候補画素およびグレー候補画素の個数が最大となるように係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から撮影光源の色温度を推定することが好ましい。
【0016】
また、前記課題を解決するために、本発明の第1の態様は、入力されたカラー画像中に含まれるグレーおよび肌色の色情報を用いて、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、また、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、前記肌色候補画素群の平均色温度とグレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から前記カラー画像を撮影した際の撮影光源の色温度を推定し、前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにし、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、前記係数を最適化する際に、前記入力されたカラー画像の画像信号の最大値を検出し、この最大値で前記入力されたカラー画像の各画像信号を割り算することにより前記画像信号の最大値が1.0となるように規格化した画像信号を用いるようにしたことを特徴とするホワイトバランス補正方法を提供するものである。
【0017】
また、前記課題を解決するために、本発明の第1の態様は、入力されたカラー画像中に含まれるグレーおよび肌色の色情報を用いて、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、また、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、前記肌色候補画素および/またはグレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度とグレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から前記撮影光源の色温度を推定し、前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにし、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、前記係数を最適化する際に、前記入力されたカラー画像の画像信号の最大値を検出し、この最大値で前記入力されたカラー画像の各画像信号を割り算することにより前記画像信号の最大値が1.0となるように規格化した画像信号を用いるようにしたことを特徴とするホワイトバランス補正方法を提供するものである。
【0018】
また、前記課題を解決するために、本発明の第1の態様は、入力されたカラー画像中に含まれるグレーおよび肌色の色情報を用いて、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、また、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、前記肌色候補画素および前記グレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から前記カラー画像を撮影した際の撮影光源の色温度を推定し、前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにした第1のホワイトバランス補正信号を得、かつ、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、また、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、前記グレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から前記撮影光源の色温度を推定し、前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにした第2のホワイトバランス補正信号を得、
得られた2つの前記第1および第2ホワイトバランス補正信号を用いて、前記カラー画像の画像信号を補正することを特徴とするホワイトバランス補正方法を提供するものである。
【0019】
また、前記課題を解決するために、本発明の第1の態様は、入力されたカラー画像中に含まれるグレーおよび肌色の色情報を用いて、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、また、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、前記グレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から前記カラー画像を撮影した際の撮影光源の色温度を推定し、前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにした第1のホワイトバランス補正信号を得、かつ、 前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、また、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、前記肌色候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から前記撮影光源の色温度を推定し、前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにした第2のホワイトバランス補正信号を得、得られた2つの前記第1および第2ホワイトバランス補正信号を用いて、前記カラー画像の画像信号を補正することを特徴とするホワイトバランス補正方法を提供するものである。
【0020】
また、前記第1および第2ホワイトバランス補正信号を平均して、前記カラー画像の画像信号を補正して得られたホワイトバランス補正後画像信号として用いることが好ましい。
また、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、所定の目的関数が最小になるように前記係数を最適化する際に、前記入力されたカラー画像の画像信号の最大値を検出し、この最大値で前記入力されたカラー画像の各画像信号を割り算することにより前記画像信号の最大値が1.0となるように規格化した画像信号を用いるようにしたことが好ましい。
【0021】
また、前記カラー画像の画像信号を補正して得られたホワイトバランス補正後画像信号をそのまま使わず補正を6割から8割に弱めて用いることが好ましい。
また、前記カラー画像の画像信号を補正して得られたホワイトバランス補正後画像信号そのまま使わず、デジタルスチルカメラ画像の明るさを示す指数であるBV値に応じて、補正を6割から8割に弱めて用いることが好ましい。
また、前記肌色およびグレーの黒体軌跡曲線を設定する際に、分光感度分布として、前記入力画像を撮影した撮影装置の分光感度を用いるようにしたことが好ましい。
【0022】
また、前記肌色及びグレーの黒体軌跡曲線を設定する際に、分光感度分布として、BT709の分光感度を用いるようにしたことが好ましい。
【0023】
また、同様に前記課題を解決するために、本発明の第2の態様は、入力されたカラー画像中に含まれるグレーおよび/または肌色の色情報を用いて、前記カラー画像を撮影した際の撮影光源の色温度を推定する手段と、前記推定された色温度により前記カラー画像の画像信号を補正する手段とを備え、前記入力されたカラー画像に対して、デジタル画像処理を施しプリントを作成する際の、ホワイトバランスを補正するホワイトバランス補正装置であって、前記撮影光源の色温度を推定する手段は、前記入力されたカラー画像の各画素の画像信号に対して、所定の係数を乗算する手段と、前記乗算の結果、肌色の黒体軌跡曲線の近傍に入る画素を検出する肌色候補画素検出手段、およびグレーの黒体軌跡曲線の近傍に入る画素を検出するグレー候補画素検出手段と、前記肌色候補画素の個数および/または前記グレー候補画素の個数が最大となり、かつ前記肌色候補画素群の平均色温度とグレー候補画素群の平均色温度との差が最小となるように前記係数を最適化する手段と、前記肌色候補画素群の平均色温度およびグレー候補画素群の平均色温度から、前記撮影光源の色温度を算出する手段と、を有し、また、前記カラー画像の画像信号を補正する手段は、前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正する手段であり、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、前記係数を最適化する際に、前記入力されたカラー画像の画像信号の最大値を検出し、この最大値で前記入力されたカラー画像の各画像信号を割り算することにより前記画像信号の最大値が1.0となるように規格化した画像信号を用いるようにしたことを特徴とするホワイトバランス補正装置を提供するものである
【0024】
また、同様に前記課題を解決するために、本発明の第2の態様は、入力されたカラー画像中に含まれるグレーおよび/または肌色の色情報を用いて、前記カラー画像を撮影した際の撮影光源の色温度を推定する手段と、前記推定された色温度により前記カラー画像の画像信号を補正する手段とを備え、前記入力されたカラー画像に対して、デジタル画像処理を施しプリントを作成する際の、ホワイトバランスを補正するホワイトバランス補正装置であって、前記撮影光源の色温度を推定する手段は、前記入力されたカラー画像の各画素の画像信号に対して、所定の係数を乗算する手段と、前記乗算の結果、肌色の黒体軌跡曲線の近傍に入る画素を検出する肌色候補画素検出手段、およびグレーの黒体軌跡曲線の近傍に入る画素を検出するグレー候補画素検出手段と、前記肌色候補画素の個数および/または前記グレー候補画素の個数が最大となり、かつ前記肌色候補画素群の平均色温度とグレー候補画素群の平均色温度との差が最小となるように前記係数を最適化する手段と、前記肌色候補画素群の平均色温度およびグレー候補画素群の平均色温度から、前記撮影光源の色温度を算出する手段と、を有し、また、前記カラー画像の画像信号を補正する手段は、前記係数を最適化する手段によって、前記肌色候補画素および前記グレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から、前記色温度を算出する手段によって推定された色温度と基準白色の色温度との差分だけ、前記最適化された係数が乗算された前記カラー画像信号を補正するようにした第1のホワイトバランス補正信号と、前記係数を最適化する手段によって、前記グレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から、前記色温度を算出する手段によって推定された色温度と基準白色の色温度との差分だけ、前記最適化された係数が乗算された前記カラー画像信号を補正するようにした第2のホワイトバランス補正信号とを用いて補正する手段であることを特徴とするホワイトバランス補正装置を提供するものである。
【0025】
また、同様に前記課題を解決するために、本発明の第2の態様は、入力されたカラー画像中に含まれるグレーおよび/または肌色の色情報を用いて、前記カラー画像を撮影した際の撮影光源の色温度を推定する手段と、前記推定された色温度により前記カラー画像の画像信号を補正する手段とを備え、前記入力されたカラー画像に対して、デジタル画像処理を施しプリントを作成する際の、ホワイトバランスを補正するホワイトバランス補正装置であって、前記撮影光源の色温度を推定する手段は、前記入力されたカラー画像の各画素の画像信号に対して、所定の係数を乗算する手段と、前記乗算の結果、肌色の黒体軌跡曲線の近傍に入る画素を検出する肌色候補画素検出手段、およびグレーの黒体軌跡曲線の近傍に入る画素を検出するグレー候補画素検出手段と、前記肌色候補画素の個数および/または前記グレー候補画素の個数が最大となり、かつ前記肌色候補画素群の平均色温度とグレー候補画素群の平均色温度との差が最小となるように前記係数を最適化する手段と、前記肌色候補画素群の平均色温度およびグレー候補画素群の平均色温度から、前記撮影光源の色温度を算出する手段と、を有し、また、前記カラー画像の画像信号を補正する手段は、前記係数を最適化する手段によって、前記グレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から、前記色温度を算出する手段によって推定された色温度と基準白色の色温度との差分だけ、前記最適化された係数が乗算された前記カラー画像信号を補正するようにした第1のホワイトバランス補正信号と、前記係数を最適化する手段によって、前記肌色候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から、前記色温度を算出する手段によって推定された色温度と基準白色の色温度との差分だけ前記最適化された係数が乗算された前記カラー画像信号を補正するようにした第2のホワイトバランス補正信号とを用いて補正する手段であることを特徴とするホワイトバランス補正装置を提供するものである
【0027】
さらに、前記課題を解決するために、本発明の第3の態様は、上記ホワイトバランス補正方法を、コンピュータに実行させるためのプログラムとして、コンピュータにより読み取り可能に記録したことを特徴とする記録媒体を提供するものである
【0028】
【発明の実施の形態】
以下、本発明に係るホワイトバランス補正方法について、添付の図面に示される好適実施形態を基に、詳細に説明する。
【0029】
図1は、本発明のホワイトバランス補正方法を実行するホワイトバランス補正装置の一実施形態の概略を示すブロック図である。
図1に示すホワイトバランス補正装置は、入力画像信号に対して、デジタル画像処理を施し、プリントを作成する際の、ホワイトバランス補正を行うためのものであり、例えば、デジタルフォトプリンタ等の画像処理装置内に設置される。
【0030】
図1において、ホワイトバランス補正装置10は、主に、入力カラー画像を撮影した際の撮影光源の色温度を推定する光源色温度推定手段12と、該光源色温度推定手段12によって推定された撮影光源の色温度を用いて、ホワイトバランス補正を行う画像信号補正手段14とを有して構成される。
また、光源色温度推定手段12は、係数乗算手段16、肌色候補検出手段18、グレー候補検出手段20、係数最適化手段22および光源色温度算出手段24によって構成される。
【0031】
これらの各手段の働きについて説明する前に、まず本発明の原理を説明することとする。
従来のホワイトバランス補正は、前述したように、色が偏っていた場合には、エバンスの原理に基づいて、画面全体の色の平均がグレーになるように補正をしていたのであるが、これに対し、本発明は、画面の中からグレーの部分を積極的に探してそのグレーの候補点がプリント上でグレーに仕上がるように露光されるように補正しようというものである。
【0032】
カラーネガフィルムの場合でも、デジタルスチルカメラ(DSC)の場合でも、ホワイトバランス補正の方法は同じであり、以下DSCにより、一般的な条件でシーンを撮影した場合を例にとり説明することとする。
例えば、DSCにより、色温度4000Kの自然昼光でグレー部分(グレーおよびその近似色)を含むシーンを撮影した場合を考える。
このとき、撮影したグレー部分の画像信号(R,G,B)を次の式(1)
r=R/(R+G+B)
b=B/(R+G+B) ・・・・・・(1)
により、色度座標(r,b)に変換して、色度図にプロットする。
【0033】
図2に色度図を示す。図2において、曲線Gy はグレーの黒体軌跡である。黒体軌跡とは、良く知られているように、色温度をT、色温度Tの黒体放射エネルギ分布をP(λ)、被写体の分光反射率分布をρ(λ)、CCDセンサの分光感度分布をSi (λ)(ただし、i=B、G、R)としたとき、次の式(2)
Ei = ∫ P(λ)ρ(λ)Si (λ)dλ ・・・・・・(2)
で計算されるEi を上の式(1)により色度座標(r,b)に変換して色度図にプロットしたとき、色温度Tを動かしたときの軌跡である。
黒体軌跡は、CCDセンサの分光分布および被写体の色ごとに存在し、グレーの黒体軌跡は、被写体をグレーとしたときの被写体の分光反射率ρ(λ)を1として得られる。典型的なCCDセンサの分光感度分布を図3に示した。Si(λ) は、このようなCCDセンサ固有のものを使うことが好ましいが、図5に示すようなBT709の理想分光感度分布を用いてもよい。
【0034】
上に述べたグレー部分の画像信号を図2の色度図にプロットすると、グレーの黒体軌跡Gy の4000Kの近傍Gy0に散布すると考えられる。
しかし、最近のDSCは、ほとんどAWB(オートホワイトバランス)機能を有しているため、この機能が上手く作動した場合には、グレー部分は標準白色(例えば、5500K)の近傍Gy1に散布するが、逆にこの機能が上手く作動しなかった場合には、撮影温度4000Kから離れた位置不明な場所(例えば、図2中符号Aで示す場所)に散布してしまう。
【0035】
そこで、DSC画像に含まれる、図2に符号Aで示すような位置不明のグレー部分を基準白色(例えば、5500K)の近傍Gy1に変換するために、プリンタ側でホワイトバランス補正が行われる。この変換をすべての画素に適用することにより、グレーバランスのとれた美しいプリントが得られるものと期待される。
図2のAの部分の位置は不明であるので、Aを基準白色(例えば、5500K)の近傍Gy1へ直接変換するのは不可能である。そこで、本発明では、この変換を2段階で行うこととした。
【0036】
すなわち、図2に2つのベクトルαおよびβによって表される変換である。
ここで、ベクトルαは、DSC側のAWB機能の不完全性により引き起こされた黒体軌跡Gy からのずれ量を補正するベクトルである。ベクトルαによる変換で図2のAの部分が黒体軌跡Gy 上の部分Gy0に変換される。
また、ベクトルβは、黒体軌跡Gy 上のGy0の部分を基準白色(例えば、5500K)の近傍Gy1に変換するベクトルである。
従って、この2つのベクトルαおよびβの合成により、図2のAから基準白色(例えば、5500K)の近傍Gy1への変換が実現される。
【0037】
ここで図1の各手段の説明に戻ることとする。
いま、説明した2つのベクトルαおよびβによる2段階の変換のうち、図2のAの部分を黒体軌跡Gy 上のGy0に移す変換を表すベクトルαを求めることは難しい。このGy0が求められれば、これから撮影光源の色温度Tを推定することができる。そして、黒体軌跡Gy 上でこのGy0(色温度T)をGy1(色温度5500K)へ移す変換を表すベクトルβを求めるのはたやすい。
このベクトルαを求め、この変換を行うのが光源色温度推定手段12であり、ベクトルβを求め、この変換を行うのが画像信号補正手段14である。
【0038】
DSCのAWB機能は、撮影直後の全画素の画像信号R、G、Bを一様に定数倍するように作用する。定数倍という作用は、一次変換である。この作用により、画像信号が黒体軌跡からずれたとすれば、これと丁度逆の操作をすれば、黒体軌跡上の撮影光源の色温度(今の場合、4000K)近傍(図2のGy0)に、多くのグレー部分が散布するようになるはずである。
上記DSCのAWB機能(一次変換)の逆変換も一次変換であるので、DSC画像信号R、G、Bに対して、所定の係数を乗算する(図2では、画像信号R、G、Bを色度座標に変換している。)。この乗算を行うのが係数乗算手段16である。
【0039】
係数乗算手段16では、DSC画像信号R、G、BのうちR、Gに対し、それぞれ所定の係数α1 、α2 を次の式(3)のように乗算し、R、GをR’、G’に変換する。
R’=α1
G’=α2 G ・・・・・・(3)
ここで、この変換は3信号を変化させる必要はなく、2信号で充分である。
本来グレーであるべき点が移動したAは、未知であるため、どれがグレーかはわからない。そこで次に、グレー候補検出手段20では、一次変換を施した信号をグレーの黒体軌跡と比較して、黒体軌跡の近傍として検出される画素をグレーの可能性が高いとして、グレー候補画素とする。近傍であるかの判断は、色度座標(r,b)上で距離0.01の範囲内であるかどうかで行えばよい。
【0040】
係数最適化手段22では、グレー候補検出手段20の検出したグレー候補画素の個数を数えて、グレー候補画素の個数が最大となるように、所定の係数α1 、α2 を変えながら係数乗算手段16およびグレー候補検出手段20に上と同じ操作を行わせ、係数α1 、α2 の最適化を行う。
最適化の方法は、特に限定されるものではなく、例えば、数値計算における標準的手法であるシンプレックス法が好適に例示される。このようにして、最適化で求められた一次変換、式(3)の係数α1 、α2 がDSCのAWB機能の逆操作に対応し、ベクトルαの成分となる。すなわち、α=(α1 ,α2 )である。
【0041】
また、最適化の精度をより高めるために、グレーの他に色情報を追加することが考えられる。被写体の中で、撮影頻度が高く、種類によって色味の変化が少ない色として肌色が挙げられる。肌色は、人種(白人、黄色人、黒人)によって色味がかなり異なるとも思われるが、測定された分光スペクトルによれば、違うのは主として明るさであり、スペクトルの形はあまり変わらず色味の変化は小さいことがわかる。従って、この肌色の性質は、色の同定に利用できる。
そこで、肌色候補検出手段18において、グレーの場合と同様に肌色についても黒体軌跡を設定し(図示省略)、係数乗算手段16で係数の乗算された画像信号に対して、肌色の黒体軌跡の近傍色として肌色候補画素を検出する。
【0042】
このとき、係数最適化手段22では、肌色候補検出手段18で検出された肌色候補画素の個数をも数え、前述したグレー候補画素の個数と合わせて、これらの個数が最大となるように前記係数α1 、α2 を最適化する。これにより、係数α1 、α2 の最適化の精度が向上する。
また、グレー部分と肌色部分を含むシーンを均一光源で撮影した場合、黒体軌跡の近傍色として、検出されるグレー候補画素群および肌色候補画素群の平均色温度は一致すると期待される。そこで、係数最適化手段22における最適化において、「グレー候補画素群と肌色候補画素群の平均色温度の差を最小」とすることを目的関数として前記係数の最適化を行うこともできる。
【0043】
さらに、上記2つの手法を併用して「グレー候補画素および肌色候補画素の個数最大」および「グレー候補画素群と肌色候補画素群の平均色温度の差最小」を目的関数として、前記係数の最適化を行うようにしてもよい。
このように2つを併用する方法によれば、より一層最適化の精度を上げることができる。
【0044】
光源色温度算出手段24では、上で最適化された係数α1 、α2 を用いて画像信号を変換し、グレーの黒体軌跡上のグレー候補画素群の平均色温度Tg および肌色の黒体軌跡上の肌色候補画素群の平均色温度Tf を算出し、 これから、 撮影光源の色温度Tを算出する。これは、例えば、これらの平均をとってT=(Tg +Tf )/2としてもよいし、グレーの色を重視する場合には、T=Tg としてもよい。このようにして撮影光源の色温度Tが推定される。
【0045】
最後に、画像信号補正手段14では、黒体軌跡上で色温度Tから基準白色(例えば、5500K)へ変換する変換を求める。この変換は、R、B信号の一次変換
R”=β1 R’
B”=β2 B ・・・・・・(4)
で表記でき、この係数β1 、β2 がベクトルβの成分となる。
画像信号補正手段14では、このベクトルβによる変換を各画素に対して施し、以上により、各画素に対するホワイトバランス補正が完了する。
【0046】
以上の変換をまとめると、図2の点Aから基準白色(例えば、5500K)Gy1への変換は、ベクトルαおよびベクトルβによる変換の合成により実現され、これを式で表すと、次の式(5)となる。
R”=α1 β1
G”=α2
B”=β2 B ・・・・・・(5)
なお、上記式(5)では、カラーバランスだけでなく、明るさの変化を含むので、G信号は不変として表現すれば、次の式(6)のようになる。
R”=(α1 β1 /α2 )R
G”=G
B”=(β2 /α2 )B ・・・・・・(6)
【0047】
以下、本実施形態の作用を図4のフローチャートに沿って説明する。
まず、ステップ100において、デジタルスチルカメラ(DSC)により、あるシーンをある光源の下において撮影する。
次にステップ110において、このDSCによって撮影された画像の画像信号R、G、Bを入力する。
【0048】
ステップ120では、光源色温度推定手段12の係数乗算手段16、肌色候補検出手段18、グレー候補検出手段20および係数最適化手段22により、画像信号最適化処理が行われる。これは、DSCのAWB機能によって黒体軌跡からずれた画像信号をずれのない黒体軌跡近傍の信号(ローデータ)に戻すものである。係数乗算手段16では、すべての画像信号に所定の係数を乗算する。肌色候補検出手段18では、このデータを肌色の黒体軌跡と比較して黒体軌跡の肌色近傍にあると思われるデータ(肌色候補画素)を検出し、グレー候補検出手段20では、このデータをグレーの黒体軌跡と比較して黒体軌跡のグレー近傍にあると思われるデータ(グレー候補画素)を検出する。
【0049】
係数最適化手段22は、検出された肌色候補画素およびグレー候補画素の個数を数えこの個数が最大となるように、または、肌色候補画素群の平均色温度とグレー候補画素群の平均色温度の差が最小となるように、あるいはこの両方の条件が成立するように前記乗算の係数を設定しなおしてこの操作を繰り返して、係数を最適化する。
【0050】
ステップ130では、光源色温度算出手段24において、最適化された係数を乗算して得られる肌色候補画素群の平均色温度Tf と、グレー候補画素群の平均色温度Tg とから光源の色温度の推定値Tが算出される。
次に、ステップ140では、画像信号補正手段において、上で推定された光源色温度Tから基準白色(例えば、5500K)への補正量が決定される。そして、この補正量によりすべての画素に対しホワイトバランス補正が行われる。
最後に、ステップ150において、その他各種の画像処理等が施され、プリンタから仕上がりプリントとして出力される。
【0051】
以下、より具体的な実施例について説明する。
(実施例1)
富士写真フイルム社製の代表的なDSC2機種で撮影した309コマのDSC画像からプリントを作成する際に、上で説明したホワイトバランス補正方法の性能のテストを行った。比較対象は、原画(DSCのAWBのみでそれに対し何の修正もせずそのまま出力したプリント)、及びDSCの撮影画像に対し従来技術によるホワイトバランス補正を行ったプリントである。プリントは、三段階の評価○△×で評価し、最も良い評価である○のみを合格とした。
【0052】
まず、8ビットのDSC画像信号R、G、Bを被写体リニアなR0 、G0 、B0 に変換した。これは以下のようにして行った。
DSCで撮影して得られる8ビットのDSC画像信号R、G、Bについて考えて見ると、これは、まずCCDセンサで発生する被写体リニアなR0 、G0 、B0 信号を次の式(7)のようにガンマ0.45の非線形変換を施し、
1 =1.099×R0 0.45 −0.099
1 =1.099×G0 0.45 −0.099
1 =1.099×B0 0.45 −0.099 ・・・(7)
その後、次の式(8)により、色差信号Y1 、Cr1、Cb1を導き、
1 =0.30R1 +0.59G1 +0.11B1
r1=0.70R1 −0.59G1 −0.11B1
b1=−0.30R1 −0.59G1 +0.89B1 ・・・(8)
色彩度を高めるための色差マトリクス演算をし、次の式(9)のように色差信号Y2 、Cr2 、Cb2に変換される。
2 =Y1
r2=1.625Cr1+0.2734Cb1
b2=−0.08203Cr1+1.6094Cb1 ・・・(9)
【0053】
そして、最後に、次の式(10)によりR、G、B信号に戻し、8ビット化しすることにより8ビットのDSC画像信号R、G、Bが得られる。
R=Y2 +Cr2
G=Y2 −0.51Cr2−0.18Cb2
B=Y2 +Cb2 ・・・(10)
従って、8ビットのDSC画像信号R、G、Bを被写体リニアなR0 、G0 、B0 信号に変換するには、R、G、B信号からスタートして式(10)、式(9)、式(8)、式(7)と逆算しながら辿ればよいので、この逆算を行い被写体リニアなR0 、G0 、B0 を得た。
【0054】
次に、被写体リニアな信号R0 、G0 、B0 の最適化によるホワイトバランス補正量を算出した。
そのため、撮影したDSCの分光感度を用いて、予めグレーの黒体軌跡と、肌色の黒体軌跡を作成した。そして、これを用いて、R0 、G0 、B0 信号の最適化計算を実施し、ベクトルαとベクトルβを求め、次の式(11)により、ホワイトバランス補正信号R”、G”、B”を得た。ここでの最適化計算においては、グレー候補画素および肌色候補画素の個数が最大となり、肌色候補画素群の平均色温度とグレー候補画素群の平均色温度の差が最小になるように係数を最適化して行った。
R”=(α1 β1 /α2 )R0
G”=G0
B”=(β2 /α2 )B0 ・・・・・・(11)
このホワイトバランス補正信号R”、G”、B”を8ビットの画像信号にするには、式(7)、式(8)、式(9)、式(10)と順にたどればよい。この画像信号をプリンタから出力することで、ホワイトバランス補正されたプリントが得られた。
【0055】
このようにして得られた本発明のホワイトバランス補正によるプリントと原画及び従来技術によるものとを比較した結果を表1に示す。

Figure 0003853224
表1に示すように、本特許は、従来技術より12ポイントほど合格率が高く、充分なホワイトバランス補正能力が示された。
【0056】
(実施例2)
前記実施例1では、DSCの機種名が既知であり、分光感度および色処理アルゴリズムも既知の場合であったが、本発明のホワイトバランス補正方法をプリント用ソフトとして利用するのであれば、機種が不明のDSC画像に対しても対応できること(ロバスト性を有すること)が望ましい。
そこで、本実施例2では、前記実施例1と同じ富士写真フイルム社製の代表的なDSC2機種で撮影した309コマのDSC画像、および各社製の15機種で同一シーン(16コマ)を撮影した240コマの画像に対し、機種不明とした場合のホワイトバランス補正テストを実施した。
【0057】
本実施例においては、たとえ機種がわからなくても、どの機種においても、分光感度と色処理アルゴリズムとの組み合わせにより、図5に示すような理想分光感度BT709の性能に近づけるようにしているはずであるから、すべての機種を理想分光感度を有するDSCと見なして本発明のホワイトバランス補正を行った。
すなわち、本実施例では、黒体軌跡を求める際の式(2)におけるCCDセンサの分光感度分布Siとして、図5に示すBT709の分光感度分布を用いた。また、理想分光感度を有するDSCでは、色彩度を高める色処理アルゴリズムは不要であるため、8ビットのDSC画像信号R、G、Bを被写体リニアなR0 、G0 、B0 に変換する場合に、実施例1のように式(10)〜(7)と逆算しながら辿る必要はなく、直接、式(7)の逆算を行うことができる。
【0058】
理想分光感度BT709を用い、予めグレーの黒体軌跡および肌色の黒体軌跡を作成しておき、これを用いて、実施例1と同様にR、G、B信号の最適化計算を実施し、ベクトルαおよびベクトルβを求めることにより、前記式(11)で表されるホワイトバランス補正信号R”、G”、B”を得た。
この信号に対し、式(7)のガンマ0.45の非線形変換を行った後、8ビットの量子化を行って8ビットの画像信号を得た。この画像信号をプリンタに印加することによりホワイトバランス補正されたプリントを得た。
【0059】
プリントの評価方法は、実施例1と同様であり、プリントは、三段階の評価○△×で評価し、最も良い評価である○のみを合格とした。結果を次の表2に示す。
Figure 0003853224
【0060】
表2に示すように、富士写真フイルム社製の代表的2機種(309コマ)については、本発明の合格率は若干下がるものの実施例1の場合とほぼ同じ合格率(88%)を維持しており、各社製15機種(240コマ)については、本発明の合格率の絶対値は低い(76%)ものの、従来技術に比べ6ポイントほど合格率が高かった。
合格率が低い理由は、原画の合格率がかなり低い(47%)ことからも窺えるように、評価シーンが少ない(16シーン)上に絵柄に偏りがあったためであり、実在のDSCを理想分光感度を有するDSCと見なしたためではないと思われる。
このように、実施例2によれば、本発明のホワイトバランス補正方法は、同一ソフトで全機種に対応することができ、分光感度および色処理アルゴリズムの未知の機種であっても、充分にホワイトバランス補正を行うことが可能である。
【0061】
尚、以上の実施例では、最適化計算において、グレーの候補画素Ng および肌色の候補画素Nf が最大となり、グレーの候補画素群の平均色温度Tg と肌色の候補画素群の平均色温度Tf の差が最小になるように係数を最適化してホワイトバランス補正信号を求めていた。この場合、最適化の目的関数Fは一つでありこれを式で表わせば、
F=abs(Tg −Tf )−(Ng +Nf )
となる。ここでabs は絶対値を示す。シンプレックス法では設定した目的関数が最小化するように働くので、候補画素の個数を最大化したい場合には−(Ng +Nf )のように−をつければよい。
目的関数が一つでも、前述したように全体としては好結果を得たわけであるが、細かく見てみるとうまくいかないプリント(×プリント)も散見された。自動プリント作業では、×プリントをできだけ少なくすることは重要であるので、目的関数の数を増やした場合の効果を調べてみた。目的関数の数を二つとし、二番目の目的関数として
* =abs(Tg −Tf )−Ng
を用いた。第一の目的関数を用いて係数を最適化して得られる第1のホワイトバランス補正信号と、第二の目的関数を用いて係数を最適化して得られる第2のホワイトバランス補正信号を平均して新たなホワイトバランス補正信号としてプリントを作成したところ、従来、×プリントであったものの内、約半分が△プリントに変化した。○プリントの数に殆ど変化はなく、全体として△プリントが増え×プリントが減って安定したプリントが得られるようになった。更に、目的関数の二つの組み合わせはこれに限るものではなく、他の組み合わせについても調べたところ、
F =abs(Tg −Tf )−Ng
* =abs(Tg −Tf )−Nf
の二つの目的関数の組み合わせが最もプリント安定性に効果があった。この場合のホワイトバランス補正方法の実施形態を図6で説明する。まず、ホワイバランス補正装置10より出力される、第一の目的関数に対応する第1のホワイバランス補正後画像信号はメモリ30に保存され、次いで、第二の目的関数に対応する第2のホワイバランス補正後画像信号はメモリ31に保存された後に、第1および第2のホワイバランス補正後画像信号より新たなホワイバランス補正後画像信号が生成されプリント作成用の信号として用いられる。
【0062】
更に、プリント出力を安定化させる方法として、最適化計算で得られるグレーバランス補正後画像信号をそのまま使わず補正を弱めてプリントすると効果のあることを見出した。弱める程度は6割から8割が好ましい。また、DSC画像のExifファイルに書き込まれているBV値(画像の明るさを示す指数)に応じて補正を6割から8割に弱めてもよい。
また、以上説明した最適化計算では、従来、信号値の小さな(暗い)画素には有効な情報が少ないと考えられ、演算時間の節約のためにも、信号値が下限値(0.08)以下の画素は計算に利用しないことにしていた。しかしながら、アンダー露光の画像では、多くの画素の信号値が下限値0.08を下回ってしまうために最適化計算に利用できる画素がかなり少なくなり、計算精度が低下する。逆に、オーバー露光画像では、例えば、白壁をタングステン照明し、適正露光の場合、R=1.0、G=0.7、B=0.5である信号がR=1.0、G=1.0、B=1.0のように、すべて1.0にクリップされて、あたかも標準光源照明の信号のようになってしまうが、信号値が1.0の場合、それが真の値であるかまたはクリップで生じたのかの区別は難しい。このように、露光のアンダー/オーバーによって、最適化計算に利用する画素の吟味が必要である。例えば、下限値を下げて画素数を増やすことも考えられるが画像毎に設定値を変更するのは煩わしい。そこで、前記画素の吟味を自動的に行うために、以下のように、画像信号の最大値が1.0になるように画像信号の規格化を行い、露光のアンダー/オーバーに関係なく、最適化計算に利用できる画素数をほぼ一定に維持できるようにした。
すなわち、RGB信号の一つでも1.0である画素は除き、残りの全画素についてRGB信号毎に最大値(Rmax ,Gmax ,Bmax )を求め、最大値の中の最大値をTmax 、最小値をTmin とし、画像のRGB信号をTmax で規格化することにより、あたかも適正露光で撮影されたが如き画像が得られる。信号利用範囲を1.0〜0.25×(Tmin /Tmax )と明るい範囲に限定することにより、最適化計算に利用する画素数をあまり多く用いることなく、アンダー適正/オーバー露光のいずれの画像に対しても、適切なホワイトバランス補正が実現できることになる。オーバー露光の雪のシーンでは規格化処理の効果により、雪の白をうまく検出し、美しいプリントに仕上げることができた。
【0063】
以上詳細に説明したように、本実施形態によれば、DSC画像中のグレーおよび/または肌色情報のみを用いたアルゴリズムを構築し、プリント作成時のホワイトバランス補正を行うようにしたため、上記各実施例にも示すように、従来技術に比して格段の補正能力を有している。また、従来技術で問題であった画像全体が色味づいている場合に、それが撮影光源によるものか、または被写体によるものかの識別力が極めて高く、特に日陰、曇りの高色温度シーン(7000〜10000K)では、ほぼ完璧な補正能力を示し、従来では、全体に青みがかり顔色も沈んだプリントであったものが、生き返ったように白色、肌色も自然なプリントを得ることができた。
また、上述したように、画像中の一番明るい画素の信号値が1になるように画像の信号全体を規格化することで、アンダー/オーバーに無関係に最適化計算を行い、処理することが可能となり、適正露光で撮影されたのと同様の画像を得ることができる。
なお、上記実施形態では、DSC画像について説明したが、DSCに限定されず、カラーネガフィルムに撮影された画像についても、本発明のホワイトバランス補正方法を適用することができる。
【0064】
次に、本発明の応用例として、光源が未知の場合に、上記実施形態で説明した肌色候補画素検出方法を利用して、画像中から肌色(特に顔には限定されない)を検出し、その情報を基にプリント濃度を決定して適正なプリントを得る濃度補正方法について図7のフローチャートに沿って説明する。
なお、本発明の応用例を実行する装置としては、前記実施形態で説明したホワイトバランス補正装置10中の、係数乗算手段16、肌色候補検出手段18及び係数最適化手段22等(その他濃度補正手段)を有する画像処理装置を含むデジタルフォトプリンタが例示される。
【0065】
まず、ステップ200において、デジタルスチルカメラ(DSC)により、あるシーンをある光源下で撮影し、ステップ210において、撮影画像の画像信号R、G、Bを入力する。次にステップ220において、この入力信号に対して、前記実施形態で説明した肌色候補検出処理を行い、肌色候補画素を検出する。すなわち、すべての入力画像信号に所定の係数を乗算し、このデータを肌色の黒体軌跡と比較して黒体軌跡の肌色近傍にあると思われるデータを肌色候補画素として検出する。このときさらに、検出された肌色候補画素の個数を数え、この個数が最大となるように、あるいは、肌色候補画素群の平均色温度と、同様にして求めたグレー候補画素群の平均色温度の差が最小となるようにして、あるいは、これら両方の条件が成立するように前記乗算の係数を最適化して、最適化された係数を乗算して肌色候補画素を求めるようにしてもよい。
【0066】
次に、ステップ230において、濃度補正を行う。すなわち、まず上記のようにして検出された肌色候補画素の色信号(R、G、B)の平均値を求める。このとき、R、G、Bの平均値((R+G+B)/3)を用いてもよいし、特定の色、例えばG信号を用いるようにしてもよい。どのような信号を用いるかは特に限定はされないが、G信号を用いるのが好ましい。
G信号を用いた場合、G信号の平均値をプリント上で、所定のG濃度D(例えば、D=0.7)に割り付けるようにして、濃度補正を行う。このとき、G濃度Dについては、0.7≦D≦1.0であることが好ましい。
そして、ステップ240において、濃度補正後のデータをプリンタより出力する。
【0067】
このように、撮影光源が未知の場合であっても、肌色を検出し、その情報に基づいて、濃度補正を行うことにより、主要被写体である顔の濃度を適正な濃度にすることにより、適正なプリントに仕上げることが可能となる。
例えば、LATD方式において失敗例の多い逆光シーン(真中に人物がおり、太陽を背にしたシーン)のDSCによる撮影画像について、濃度補正を行ったところ以下のような結果を得た。
【0068】
LATD方式によるプリントは、画面全体の濃度は程よいが、顔は真っ暗となってしまい、明らかに不適切なプリントであった。
これに対し、光源を未知として、本実施形態の肌色検出を利用した濃度補正を行ったプリントは、背景は少し飛び気味であったが、顔の濃度は適切であり、ほぼ満足できるプリントであった。これは、肌色検出に成功し、それに基づいて濃度補正をしてプリントした効果であり、その他のシーンについても適切なプリント濃度を得ることができた。
【0069】
また、上で説明したホワイトバランス補正方法及び濃度補正方法のうち少なくとも一つを、コンピュータで実行可能なプログラムとして、コンピュータで読み取り可能な記録媒体に記録しておけば、この記録媒体からプログラムを入力することにより任意の画像処理装置等で本発明のホワイトバランス補正方法あるいは濃度補正方法を実行することができる。
【0070】
以上、本発明のホワイトバランス補正方法について詳細に説明したが、本発明は、以上の例には限定されず、本発明の要旨を逸脱しない範囲において、各種の改良や変更を行ってもよいのはもちろんである。
【0071】
【発明の効果】
以上説明した通り、本発明によれば、入力されたカラー画像中に含まれるグレーおよび/または肌色の色情報のみを用いて、前記カラー画像を撮影した際の撮影光源の色温度を推定し、これによりホワイトバランスを補正するアルゴリズムを構築するようにしたため、どのような入力画像に対しても、また、撮影に用いられたDSCの機種にかかわらず、ホワイトバランス補正を適正に、かつ高い得率で実現することが可能となる。特に、画像中の一番明るい画素を用いて画像全体を規格化するようにした場合には、アンダー/オーバーに関係無く最適化計算を行い処理することができ、適正露光の画像を得ることができる。
また、画像中の肌色を検出し、その情報に基づいて濃度補正を行うようにした場合には、従来技術では難しいシーンについても、プリント濃度を適切に仕上げることが可能となる。
【図面の簡単な説明】
【図1】 本発明に係るホワイトバランス補正装置の一実施形態の概略を示すブロック図である。
【図2】 本実施形態においてホワイトバランス補正の原理を示すための色度図である。
【図3】 典型的なCCDセンサの分光感度分布を示す線図である。
【図4】 本実施形態の処理の流れを示すフローチャートである。
【図5】 BT709の分光感度分布を示す線図である。
【図6】 本発明に係るホワイトバランス補正装置の一実施形態の他の例の概略を示すブロック図である。
【図7】 本発明の第2実施形態の処理の流れを示すフローチャートである。
【符号の説明】
10 ホワイトバランス補正装置
12 光源色温度推定手段
14 画像信号補正手段
16 係数乗算手段
18 肌色候補検出手段
20 グレー候補検出手段
22 係数最適化手段
24 光源色温度算出手段
30、31 メモリ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a technique for white balance correction and density correction of a color image when digital image processing is performed on an input image signal to create a print.
[0002]
[Prior art]
Conventionally, in an exposure system in silver salt photography technology, printing is generally performed by analog exposure (surface exposure, direct exposure). That is, a developed negative film is positioned at a predetermined printing position, irradiated with light from a white light source (halogen lamp or the like), and a transmission image from the negative film is formed on a photographic paper for exposure.
[0003]
On the other hand, in recent years, an image recorded on a photographic film such as a negative film or a color reversal film is photoelectrically read and a read image is converted into a digital signal. A digital photo printer that performs various image processing to obtain image data for recording, scans and exposes a photosensitive material with recording light modulated in accordance with the image data, records an image (latent image), and produces a (finished) print Has been put to practical use.
[0004]
In such a digital photo printer, images are handled as digital image data. Therefore, not only images taken on film but also images taken with a digital still camera (DSC), CD-R, flexible disk, removable, etc. Image data recorded as digital data on various recording media such as hard disks (Zip, Jaz, etc.) and various recording media such as MO discs (magneto-optical recording media) can be subjected to image processing and output as a print. it can.
[0005]
Conventionally, a color negative film has been widely used by many general users, and the shooting state of an original image on the negative film is not necessarily uniform, and is used under various light sources such as daylight and fluorescent lamps. Yes. Therefore, when creating a print from a developed negative film, if printing is performed with the light quality of the print light source kept constant, the color of the photographic light source is directly reflected in the print, resulting in an inappropriate print. There was a thing.
[0006]
For this reason, various ideas have been conventionally made to adjust the white balance on the print. A typical example is the LATD system based on Evans' principle (hypothesis) that “the average of all colors in the world is gray.” LATD (Large Area Transmission Density) refers to the average transmission density of the entire screen. The LATD method measures the LATD of each frame on a color negative film and prints it according to the RGB density. By changing the light quality of the light source, the average color on the print is made closer to gray.
[0007]
On the other hand, in recent years, digital still cameras (DSC) have begun to spread rapidly. DSC can be identified with a color negative in the sense of capturing a scene, but there are fundamental differences. That is, an image photographed on a color negative film does not observe itself, whereas a DSC image is directly subject to viewing. Therefore, before the DSC image is output as a print, the DSC image must be a beautiful image with white balance. As with color negative film, DSC shoots under various light sources, so if there is no function to correct the white balance, it will result in an unsatisfactory image. Therefore, most modern DSCs automatically apply white balance correction. AWB (Auto White Balance) function is installed.
[0008]
[Problems to be solved by the invention]
However, although the above-mentioned LATD system has achieved a certain result, there is a problem that it also produces an inconvenient print. One of them is the occurrence of color feria that causes the print colors to be biased. For example, when white balance correction is performed using the LATD method on an image of a woman's scene wearing red clothes, a cyan color, which is the complementary color of red, is put on the entire screen in order to make the entire screen gray. For this reason, red clothes become muddy and women's complexion becomes worse.
In addition, in the case of a reddish scene as a whole screen, it cannot be distinguished whether it is caused by a light source or a subject, so the LATD method works well when the cause is a light source, but when the cause is a subject. There is a problem of causing the color feria as described above.
[0009]
The AWB function of the DSC is basically based on the Evans principle as in the negative film / print system, and has the same problem as the white balance correction by the LATD in the negative film / print system.
In other words, the DSC image after AWB is about 60 to 70% as the average performance of the Evans principle, and a good image with good color balance is obtained, but the remaining about 30 to 40% is due to malfunction of AWB. The image further requires some color balance correction. Therefore, if white balance correction is not performed when creating a print from a DSC image, approximately 30 to 40% of these prints are unsatisfactory and unacceptable prints.
[0010]
As described above, in the LATD system based on the Evans principle of the prior art, white balance correction is performed based on the hypothesis that the average value of the entire screen is gray. However, in this system, true gray can be found in an image. Since this is not possible, white balance correction is not sufficient, and there are many cases where reverse correction is performed instead.
In addition, if the density correction of the entire print image is performed by such a LATD method, the density of the main subject is affected by the scene configuration, and there is a problem that the proper density is not finished. A method has been proposed in which the print density is determined based on the density of the detected face. On the other hand, whether or not the print density is appropriate is determined by the density of the main subject rather than the density of the entire screen, so the face that is the main subject is detected and the entire image is adjusted so that the face density is appropriate. It is important to correct the density.
[0011]
  However, detection of the face that is the main subject is generally performed using shape recognition, but it is very difficult to detect the face with high accuracy. In addition, a method of performing face detection using color information has been tried, but there is a problem that it is still difficult when the light source is unknown.
  The present invention has been made in view of the above-described conventional problems, and achieves white balance correction appropriately and with a high yield when digital image processing is performed on input image data to create a print.White balance correction method and apparatus capable of performing the same, and recording medium describing program for causing computer to execute white balance correction methodTo provideLet it be an issue.
[0012]
[Means for Solving the Problems]
  The problemIn order to solve the problem, the first aspect of the present invention uses gray and / or skin color information included in an input color image,The image signal of each pixel in the color image is multiplied by a predetermined coefficient, and as a result, a pixel that enters the vicinity of the skin color black body locus curve is set as a skin color candidate pixel, and / or a gray black body locus. A skin color candidate pixel group and / or a gray candidate pixel group obtained by optimizing the coefficient so that the number of the skin color candidate pixels and / or gray candidate pixels is maximized, assuming that the pixels entering the vicinity of the curve are gray candidate pixels. From the average color temperature of each, Estimating the color temperature of the photographic light source when the color image was taken,Multiplied by the optimized coefficientThe color image signal, Only the difference between the estimated color temperature and the reference white color temperatureto correctThe image signal of each pixel in the input color image is multiplied by a predetermined coefficient, and as a result, when the coefficient is optimized, the maximum of the image signal of the input color image By detecting the value and dividing each image signal of the input color image by this maximum value, the image signal normalized so that the maximum value of the image signal becomes 1.0 is used.Provide a white balance correction method characterized byIs a thing.
[0013]
Further, it is preferable to use only gray and skin color information when estimating the color temperature of the photographing light source and correcting the image signal of the color image.
[0015]
Further, the color temperature of the photographing light source is estimated from the average color temperatures of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficients so that the number of the skin color candidate pixels and the gray candidate pixels is maximized. Is preferred.
[0016]
  Also,In order to solve the above-mentioned problem, the first aspect of the present invention uses gray and skin color information included in an input color image,The image signal of each pixel in the input color image is multiplied by a predetermined coefficient. As a result, a pixel that enters the vicinity of the flesh-colored black body locus curve is defined as a flesh-color candidate pixel, and a gray black body Pixels that enter the vicinity of the locus curve are gray candidate pixels,SaidThe average color temperatures of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient so that the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. From,SaidWhen shooting a color imageA color temperature of a photographing light source is estimated, and the color image signal multiplied by the optimized coefficient is corrected by a difference between the estimated color temperature and a reference white color temperature.The image signal of each pixel in the input color image is multiplied by a predetermined coefficient, and as a result, when the coefficient is optimized, the maximum value of the image signal of the input color image is An image signal that has been standardized so that the maximum value of the image signal is 1.0 by detecting and dividing each image signal of the input color image by the maximum value is used. A white balance correction method is provided.
[0017]
  Also,In order to solve the above-mentioned problem, the first aspect of the present invention uses gray and skin color information included in an input color image,The image signal of each pixel in the input color image is multiplied by a predetermined coefficient. As a result, a pixel that enters the vicinity of the flesh-colored black body locus curve is defined as a flesh-color candidate pixel, and a gray black body Pixels that enter the vicinity of the locus curve are gray candidate pixels,SaidThe number of skin color candidate pixels and / or gray candidate pixels is maximized, andSaidThe average color temperatures of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient so that the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. From,A color temperature of the photographing light source is estimated, and the color image signal multiplied by the optimized coefficient is corrected by a difference between the estimated color temperature and a reference white color temperature.The image signal of each pixel in the input color image is multiplied by a predetermined coefficient, and as a result, when the coefficient is optimized, the maximum value of the image signal of the input color image is An image signal that has been standardized so that the maximum value of the image signal is 1.0 by detecting and dividing each image signal of the input color image by the maximum value is used. A white balance correction method is provided.
[0018]
  Also,In order to solve the above-mentioned problem, the first aspect of the present invention uses gray and skin color information included in an input color image,The image signal of each pixel in the input color image is multiplied by a predetermined coefficient. As a result, a pixel that enters the vicinity of the flesh-colored black body locus curve is defined as a flesh-color candidate pixel, and a gray black body Pixels that enter the vicinity of the locus curve are gray candidate pixels,SaidThe number of skin color candidate pixels and the gray candidate pixels is maximized, andSaidEach average color of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient so that the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. From temperature,SaidWhen shooting a color imageA first white that estimates a color temperature of a photographing light source and corrects the color image signal multiplied by the optimized coefficient by a difference between the estimated color temperature and a color temperature of a reference white. Balance correction signalAndThe image signal of each pixel in the input color image is multiplied by a predetermined coefficient. As a result, a pixel that enters the vicinity of the flesh-colored black body locus curve is defined as a flesh-color candidate pixel, and a gray black body Pixels that enter the vicinity of the locus curve are gray candidate pixels,SaidThe number of gray candidate pixels is maximized, andSaidThe average color temperature of the skin color candidate pixelsSaidThe color temperature of the photographing light source is estimated from the average color temperatures of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient so that the difference from the average color temperature of the gray candidate pixel group is minimized. A second white balance correction signal that corrects the color image signal multiplied by the optimized coefficient by a difference between the estimated color temperature and a reference white color temperature.And
  The two obtained first andUsing the second white balance correction signalThe image signal of the color imageto correctThe present invention provides a white balance correction method characterized by the above.
[0019]
  Also,In order to solve the above-mentioned problem, the first aspect of the present invention uses gray and skin color information included in an input color image,The image signal of each pixel in the input color image is multiplied by a predetermined coefficient. As a result, a pixel that enters the vicinity of the flesh-colored black body locus curve is defined as a flesh-color candidate pixel, and a gray black body Pixels that enter the vicinity of the locus curve are gray candidate pixels,SaidThe number of gray candidate pixels is maximized, andSaidEach average color of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient so that the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. From temperature,SaidWhen shooting a color imageA first white that estimates a color temperature of a photographing light source and corrects the color image signal multiplied by the optimized coefficient by a difference between the estimated color temperature and a color temperature of a reference white. Balance correction signalAnd The image signal of each pixel in the input color image is multiplied by a predetermined coefficient. As a result, a pixel that enters the vicinity of the flesh-colored black body locus curve is defined as a flesh-color candidate pixel, and a gray black body Pixels that enter the vicinity of the locus curve are gray candidate pixels,SaidThe number of skin color candidate pixels is maximized, andSaidIn order to minimize the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group,in frontA color temperature of the photographing light source is estimated from an average color temperature of each of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the recording coefficient, and the color image signal multiplied by the optimized coefficient is A second white balance correction signal in which only the difference between the estimated color temperature and the reference white color temperature is corrected.And obtained the two said first and secondUsing the white balance correction signalThe image signal of the color imageto correctThe present invention provides a white balance correction method characterized by the above.
[0020]
  Further, it is preferable that the first and second white balance correction signals are averaged and used as an image signal after white balance correction obtained by correcting the image signal of the color image.
  Further, when the image signal of each pixel in the input color image is multiplied by a predetermined coefficient, and as a result, the coefficient is optimized so that the predetermined objective function is minimized, the input is performed. Detect the maximum value of the image signal of the color imagethisThe above entered at the maximum valueColorIt is preferable to use an image signal that is normalized so that the maximum value of the image signal is 1.0 by dividing each image signal of the image.
[0021]
  Further, it is preferable to use the image signal after the white balance correction obtained by correcting the image signal of the color image as it is without using the image signal as it is and reducing the correction from 60% to 80%.
  Further, the image signal after white balance correction obtained by correcting the image signal of the color imageTheIt is preferable that the correction is weakened from 60% to 80% according to the BV value that is an index indicating the brightness of the digital still camera image without being used as it is.
  Further, when setting the flesh color and gray black body locus curves, it is preferable to use the spectral sensitivity of the photographing apparatus that captured the input image as the spectral sensitivity distribution.
[0022]
Further, it is preferable to use the spectral sensitivity of BT709 as the spectral sensitivity distribution when setting the skin color and gray black body locus curves.
[0023]
  Similarly,The problemIn order to solve the problem, the second aspect of the present invention provides:inputMeans for estimating a color temperature of a photographing light source when the color image is photographed using color information of gray and / or flesh color contained in the color image, and the color image of the color image by the estimated color temperature. Means for correcting the image signalA white balance correction device that corrects white balance when digital image processing is performed on the input color image to create a print, and means for estimating a color temperature of the photographing light source includes the input Means for multiplying the image signal of each pixel of the color image thus obtained by a predetermined coefficient, skin color candidate pixel detecting means for detecting a pixel that enters the vicinity of the skin color black body locus curve as a result of the multiplication, and gray Gray candidate pixel detecting means for detecting pixels that fall in the vicinity of the black body locus curve, and the number of the skin color candidate pixels and / or the number of gray candidate pixels is maximized, and the average color temperature of the skin color candidate pixel group Means for optimizing the coefficient so as to minimize the difference from the average color temperature of the gray candidate pixel group, and the average color temperature of the skin color candidate pixel group and the average of the gray candidate pixel group Means for calculating the color temperature of the photographic light source from the color temperature, and means for correcting the image signal of the color image, the color image signal multiplied by the optimized coefficient, A means for correcting only the difference between the estimated color temperature and the color temperature of the reference white, and multiplying an image signal of each pixel in the input color image by a predetermined coefficient, When optimizing the coefficients, the maximum value of the image signal of the input color image is detected, and the maximum value of the image signal is obtained by dividing each image signal of the input color image by this maximum value. An image signal standardized to 1.0 is used.A white balance correction device is provided.Is a thing.
[0024]
  Also,Similarly, in order to solve the above-described problem, a second aspect of the present invention provides a photographing light source when photographing a color image using gray and / or skin color information included in the input color image. Means for estimating the color temperature of the image and means for correcting the image signal of the color image based on the estimated color temperature, and performing digital image processing on the input color image to create a print A white balance correction device for correcting white balance,The means for estimating the color temperature of the photographic light source is a means for multiplying an image signal of each pixel of the input color image by a predetermined coefficient, and as a result of the multiplication, in the vicinity of a skin color black body locus curve. Skin color candidate pixel detecting means for detecting a pixel entering the pixel, gray candidate pixel detecting means for detecting a pixel entering the vicinity of the gray black body locus curve, and the number of the skin color candidate pixels and / or the number of the gray candidate pixels Means for optimizing the coefficient so as to minimize the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group, and the average color temperature of the skin color candidate pixel group, From the average color temperature of the gray candidate pixels,SaidMeans for calculating the color temperature of the photographing light source, and means for correcting the image signal of the color image,The means for optimizing the coefficient maximizes the number of the skin color candidate pixels and the gray candidate pixels, and minimizes the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group. The means for calculating the color temperature from the average color temperatures of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient so thatOnly the difference between the estimated color temperature and the reference white color temperatureThe color image signal multiplied by the optimized coefficientto correctBy the first white balance correction signal and the means for optimizing the coefficient, the number of gray candidate pixels is maximized, and the average color temperature of the skin color candidate pixel group and the average of the gray candidate pixel group The color temperature estimated by the means for calculating the color temperature from the average color temperatures of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient so that the difference from the color temperature is minimized. And a second white balance correction signal that corrects the color image signal multiplied by the optimized coefficient by the difference between the color temperature and the reference white color temperature. A white balance correction device is provided.
[0025]
  Similarly,The problemTo solve the present inventionSecond aspect ofIsMeans for estimating a color temperature of a photographing light source when photographing the color image using gray and / or skin color information included in the input color image, and the color image based on the estimated color temperature A white balance correction device for correcting white balance when digital image processing is performed on the input color image to create a print. The means for estimating the color temperature is the above-mentionedMultiply the image signal of each pixel of the input color image by a predetermined coefficientMeans for performing the multiplicationAs a result, pixels that are in the vicinity of the flesh-colored blackbody locus curveSkin color candidate pixel detecting means for detecting, gray candidate pixel detecting means for detecting pixels that fall in the vicinity of a gray black body locus curve, and the number of skin color candidate pixels and / or the number of gray candidate pixels are maximized, and Means for optimizing the coefficient so as to minimize the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group; and the average color temperature of the skin color candidate pixel group and the gray candidate pixel group Means for calculating the color temperature of the photographing light source from the average color temperature of the image, and the means for correcting the image signal of the color image includes the means for optimizing the coefficient by means of optimizing the coefficient. Skin color candidates obtained by optimizing the coefficients so that the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. The optimized coefficient is multiplied by the difference between the color temperature estimated by the means for calculating the color temperature and the color temperature of the reference white from the average color temperature of each of the prime group and the gray candidate pixel group. The number of the flesh color candidate pixels is maximized by the first white balance correction signal for correcting the color image signal and the means for optimizing the coefficient, and the average color temperature of the flesh color candidate pixel group From the average color temperatures of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient so that the difference from the average color temperature of the gray candidate pixel group is minimized,Color temperature estimated by means for calculating the color temperatureAnd the difference between the color temperature of the reference white,A second white balance correction signal that corrects the color image signal multiplied by the optimized coefficient;to correctIs a meansIt is characterized byWhite balance correction deviceI will provide aIs a thing.
[0027]
  further,The problemTo solve the present inventionThird aspect ofIs the above white balance correctionmethod,Provided is a recording medium recorded as readable by a computer as a program to be executed by a computerIs a thing.
[0028]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, a white balance correction method according to the present invention will be described in detail based on a preferred embodiment shown in the accompanying drawings.
[0029]
FIG. 1 is a block diagram showing an outline of an embodiment of a white balance correction apparatus for executing the white balance correction method of the present invention.
The white balance correction apparatus shown in FIG. 1 performs digital image processing on an input image signal and performs white balance correction when creating a print. For example, the white balance correction device performs image processing such as a digital photo printer. Installed in the device.
[0030]
In FIG. 1, a white balance correction device 10 mainly includes a light source color temperature estimation unit 12 that estimates a color temperature of a photographing light source when an input color image is captured, and a photographing estimated by the light source color temperature estimation unit 12. The image signal correcting unit 14 performs white balance correction using the color temperature of the light source.
The light source color temperature estimation unit 12 includes a coefficient multiplication unit 16, a skin color candidate detection unit 18, a gray candidate detection unit 20, a coefficient optimization unit 22, and a light source color temperature calculation unit 24.
[0031]
Before describing the function of each of these means, the principle of the present invention will be described first.
In the conventional white balance correction, as described above, when the colors are biased, the average color of the entire screen is corrected to gray based on the Evans principle. In contrast, according to the present invention, a gray portion is actively searched from the screen, and correction is made so that the gray candidate point is exposed so as to be finished in gray on the print.
[0032]
The method of white balance correction is the same whether it is a color negative film or a digital still camera (DSC), and a case where a scene is photographed under general conditions by DSC will be described below as an example.
For example, consider a case where a scene including a gray portion (gray and its approximate color) is captured by DSC in natural daylight with a color temperature of 4000K.
At this time, the image signal (R, G, B) of the photographed gray part is expressed by the following equation (1).
r = R / (R + G + B)
b = B / (R + G + B) (1)
Is converted into chromaticity coordinates (r, b) and plotted on a chromaticity diagram.
[0033]
FIG. 2 shows a chromaticity diagram. In FIG. 2, a curve Gy is a gray blackbody locus. As is well known, the black body locus is the color temperature T, the black body radiant energy distribution at the color temperature T is P (λ), the spectral reflectance distribution of the subject is ρ (λ), and the spectral of the CCD sensor. When the sensitivity distribution is Si (λ) (where i = B, G, R), the following equation (2)
Ei = ∫ P (λ) ρ (λ) Si (λ) dλ (2)
This is a locus when the color temperature T is moved when Ei calculated in (1) is converted into chromaticity coordinates (r, b) by the above equation (1) and plotted on the chromaticity diagram.
A black body locus exists for each of the spectral distribution of the CCD sensor and the color of the subject. A gray black body locus is obtained by setting the subject's spectral reflectance ρ (λ) to 1 when the subject is gray. The spectral sensitivity distribution of a typical CCD sensor is shown in FIG. Si (λ) is preferably unique to such a CCD sensor, but an ideal spectral sensitivity distribution of BT709 as shown in FIG. 5 may be used.
[0034]
When the image signal of the gray portion described above is plotted in the chromaticity diagram of FIG. 2, it is considered that the gray portion is scattered in the vicinity Gy0 of 4000K of the black body locus Gy.
However, since most recent DSCs have an AWB (auto white balance) function, when this function works well, the gray part is scattered in the vicinity of standard white (for example, 5500K) Gy1, On the other hand, if this function does not work well, it will be sprayed to a place where the position is unknown (for example, the place indicated by symbol A in FIG. 2) away from the photographing temperature 4000K.
[0035]
Therefore, white balance correction is performed on the printer side in order to convert a gray portion with an unknown position, which is included in the DSC image, as indicated by symbol A in FIG. 2, into a neighborhood Gy1 of the reference white (for example, 5500K). By applying this conversion to all the pixels, it is expected that a beautiful print with gray balance can be obtained.
Since the position of the portion A in FIG. 2 is unknown, it is impossible to directly convert A to the neighborhood Gy1 of the reference white (for example, 5500K). Therefore, in the present invention, this conversion is performed in two stages.
[0036]
That is, the transformation represented by the two vectors α and β in FIG.
Here, the vector α is a vector for correcting a deviation amount from the black body locus Gy caused by imperfection of the AWB function on the DSC side. The portion A in FIG. 2 is converted into a portion Gy0 on the black body locus Gy by conversion with the vector α.
Further, the vector β is a vector for converting the portion of Gy0 on the black body locus Gy into the vicinity Gy1 of the reference white (for example, 5500K).
Therefore, by combining these two vectors α and β, the conversion from A in FIG. 2 to the neighborhood Gy1 of the reference white (for example, 5500K) is realized.
[0037]
Returning to the description of each means in FIG.
Now, it is difficult to obtain a vector α representing a conversion for shifting the portion A in FIG. 2 to Gy0 on the black body locus Gy out of the two-stage conversions based on the two vectors α and β described above. If this Gy0 is obtained, the color temperature T of the photographing light source can be estimated from this. Then, it is easy to obtain a vector β representing a conversion for transferring this Gy0 (color temperature T) to Gy1 (color temperature 5500K) on the black body locus Gy.
The light source color temperature estimation means 12 obtains this vector α and performs this conversion, and the image signal correction means 14 obtains the vector β and performs this conversion.
[0038]
The DSC AWB function acts to uniformly multiply the image signals R, G, and B of all the pixels immediately after photographing. The effect of constant multiplication is a linear transformation. As a result, if the image signal deviates from the black body locus, if the operation is just reversed, near the color temperature (4000 K in this case) of the photographing light source on the black body locus (Gy0 in FIG. 2) In addition, many gray parts should be scattered.
Since the inverse conversion of the DSC AWB function (primary conversion) is also a primary conversion, the DSC image signals R, G, and B are multiplied by a predetermined coefficient (in FIG. 2, the image signals R, G, and B are multiplied). Converted to chromaticity coordinates). Coefficient multiplication means 16 performs this multiplication.
[0039]
In the coefficient multiplication means 16, predetermined coefficients α are respectively applied to R and G of the DSC image signals R, G and B.1, Α2Is multiplied by the following equation (3) to convert R and G into R ′ and G ′.
R ′ = α1R
G ’= α2G (3)
Here, this conversion does not require changing three signals, and two signals are sufficient.
Since A where the point that should be gray originally moved is unknown, it is not known which is gray. Then, next, the gray candidate detection means 20 compares the signal subjected to the primary conversion with the gray black body locus, and determines that the pixel detected as the vicinity of the black body locus is likely to be gray, and the gray candidate pixel And Judgment as to whether it is in the vicinity may be made based on whether or not the distance is within a range of 0.01 on the chromaticity coordinates (r, b).
[0040]
The coefficient optimizing unit 22 counts the number of gray candidate pixels detected by the gray candidate detecting unit 20 and determines a predetermined coefficient α so that the number of gray candidate pixels is maximized.1, Α2The coefficient multiplication means 16 and the gray candidate detection means 20 perform the same operation as above while changing the coefficient α.1, Α2Perform optimization.
The optimization method is not particularly limited, and for example, a simplex method which is a standard method in numerical calculation is preferably exemplified. In this way, the linear transformation obtained by the optimization, the coefficient α in the equation (3)1, Α2Corresponds to the reverse operation of the AWB function of the DSC and becomes a component of the vector α. That is, α = (α1, Α2).
[0041]
In order to further improve the optimization accuracy, it is conceivable to add color information in addition to gray. Among subjects, skin color is mentioned as a color that is frequently photographed and has little change in color depending on the type. It seems that the skin color varies considerably by race (white, yellow, black), but according to the measured spectral spectrum, the difference is mainly brightness, and the shape of the spectrum does not change much. It can be seen that the change in taste is small. Therefore, this skin color property can be used for color identification.
Therefore, the skin color candidate detection means 18 sets a black body locus for the skin color as in the case of gray (not shown), and the skin color black body locus for the image signal multiplied by the coefficient by the coefficient multiplication means 16. A skin color candidate pixel is detected as a neighboring color.
[0042]
At this time, the coefficient optimizing unit 22 also counts the number of skin color candidate pixels detected by the skin color candidate detecting unit 18, and together with the number of gray candidate pixels described above, the coefficient so as to maximize these coefficients. α1, Α2To optimize. As a result, the coefficient α1, Α2The accuracy of optimization is improved.
In addition, when a scene including a gray portion and a skin color portion is photographed with a uniform light source, it is expected that the average color temperatures of the detected gray candidate pixel group and the skin color candidate pixel group are the same as the color near the black body locus. Therefore, in the optimization in the coefficient optimizing means 22, the coefficient can be optimized with the objective function of “minimizing the difference in average color temperature between the gray candidate pixel group and the skin color candidate pixel group”.
[0043]
Further, the above two methods are used in combination with the objective function as “maximum number of gray candidate pixels and skin color candidate pixels” and “minimum difference in average color temperature between gray candidate pixels and skin color candidate pixels” as an objective function. You may make it perform.
Thus, according to the method using the two in combination, the optimization accuracy can be further increased.
[0044]
The light source color temperature calculation means 24 uses the coefficient α optimized above.1, Α2Is used to calculate an average color temperature Tg of the gray candidate pixel group on the gray black body locus and an average color temperature Tf of the skin color candidate pixel group on the skin color black body locus. The color temperature T is calculated. For example, T = (Tg + Tf) / 2 may be obtained by taking an average of these, and T = Tg may be used when the gray color is important. In this way, the color temperature T of the photographing light source is estimated.
[0045]
Finally, the image signal correction unit 14 obtains conversion for converting the color temperature T to the reference white color (for example, 5500K) on the black body locus. This conversion is the primary conversion of R and B signals
R ″ = β1R ’
B ″ = β2B (4)
This coefficient β1, Β2Is a component of the vector β.
In the image signal correction means 14, the conversion by the vector β is performed on each pixel, and the white balance correction for each pixel is thus completed.
[0046]
To summarize the above conversion, the conversion from the point A in FIG. 2 to the reference white (for example, 5500K) Gy1 is realized by the synthesis of the conversion by the vector α and the vector β. 5).
R "= α1β1R
G ″ = α2G
B ″ = β2B (5)
In addition, since the above equation (5) includes not only color balance but also a change in brightness, the G signal can be expressed as the following equation (6) when expressed as invariant.
R ″ = (α1β1/ Α2) R
G "= G
B ″ = (β2/ Α2) B (6)
[0047]
Hereinafter, the operation of the present embodiment will be described with reference to the flowchart of FIG.
First, in step 100, a scene is photographed with a digital still camera (DSC) under a certain light source.
Next, in step 110, image signals R, G, and B of an image photographed by the DSC are input.
[0048]
In step 120, image signal optimization processing is performed by the coefficient multiplication unit 16, the skin color candidate detection unit 18, the gray candidate detection unit 20, and the coefficient optimization unit 22 of the light source color temperature estimation unit 12. This is to return the image signal shifted from the black body locus by the AWB function of the DSC to a signal (raw data) in the vicinity of the black body locus without any deviation. The coefficient multiplication means 16 multiplies all image signals by a predetermined coefficient. The skin color candidate detection means 18 compares this data with the skin color black body locus to detect data (skin color candidate pixels) that appear to be near the skin color of the black body locus, and the gray candidate detection means 20 detects this data. Data (gray candidate pixels) that are considered to be near the gray color of the black body locus in comparison with the gray body locus are detected.
[0049]
The coefficient optimizing unit 22 counts the number of detected skin color candidate pixels and gray candidate pixels so that the number becomes the maximum, or the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group. The multiplication coefficient is reset so that the difference is minimized or both conditions are satisfied, and this operation is repeated to optimize the coefficient.
[0050]
In step 130, the light source color temperature calculation means 24 calculates the color temperature of the light source from the average color temperature Tf of the skin color candidate pixel group obtained by multiplying the optimized coefficient and the average color temperature Tg of the gray candidate pixel group. An estimated value T is calculated.
Next, in step 140, the image signal correction means determines a correction amount from the light source color temperature T estimated above to a reference white color (for example, 5500K). Then, with this correction amount, white balance correction is performed on all pixels.
Finally, in step 150, various other image processing and the like are performed and output as a finished print from the printer.
[0051]
Hereinafter, more specific examples will be described.
(Example 1)
When creating a print from a 309-frame DSC image taken with two representative DSC models manufactured by Fuji Photo Film Co., Ltd., the performance of the white balance correction method described above was tested. The comparison object is an original image (print which is output as it is without any modification to the DSC AWB) and a print obtained by performing white balance correction on the DSC photographed image according to the conventional technique. The print was evaluated with a three-stage evaluation ○ Δ ×, and only the best evaluation ○ was accepted.
[0052]
First, an 8-bit DSC image signal R, G, B is converted into a subject linear R0, G0, B0Converted to. This was done as follows.
Considering the 8-bit DSC image signals R, G, and B obtained by photographing with the DSC, this is the subject linear R generated by the CCD sensor first.0, G0, B0The signal is subjected to a non-linear transformation with a gamma of 0.45 as in the following equation (7),
R1= 1.099 × R0 0.45-0.099
G1= 1.099 × G0 0.45-0.099
B1= 1.099 × B0 0.45-0.099 (7)
Thereafter, the color difference signal Y is expressed by the following equation (8).1, Cr1, Cb1Lead and
Y1= 0.30R1+ 0.59G1+ 0.11B1
Cr1= 0.70R1-0.59G1-0.11B1
Cb1= -0.30R1-0.59G1+ 0.89B1    ... (8)
A color difference matrix calculation for increasing the color saturation is performed, and the color difference signal Y is expressed by the following equation (9).2, Cr2 , Cb2Is converted to
Y2= Y1
Cr2= 1.625Cr1+ 0.2734Cb1
Cb2= -0.08203Cr1+ 1.6094Cb1      ... (9)
[0053]
Finally, the R, G, B signal is returned to the following equation (10) and converted to 8 bits to obtain 8-bit DSC image signals R, G, B.
R = Y2+ Cr2
G = Y2-0.51Cr2-0.18Cb2
B = Y2+ Cb2                              (10)
Therefore, the 8-bit DSC image signals R, G, and B are converted into subject linear R0, G0, B0In order to convert to a signal, it is only necessary to start from the R, G, B signals and follow the equations (10), (9), (8), and (7). Linear R0, G0, B0Got.
[0054]
Next, subject linear signal R0, G0, B0The amount of white balance correction by optimization was calculated.
Therefore, a gray black body locus and a flesh-colored black body locus were created in advance using the spectral sensitivity of the photographed DSC. And using this, R0, G0, B0Signal optimization calculation was performed to obtain vectors α and β, and white balance correction signals R ″, G ″, B ″ were obtained by the following equation (11). In the optimization calculation here, The coefficients were optimized so that the number of gray candidate pixels and skin color candidate pixels was maximized, and the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group was minimized.
R ″ = (α1β1/ Α2) R0
G "= G0
B ″ = (β2/ Α2) B0        (11)
In order to convert the white balance correction signals R ″, G ″, and B ″ into 8-bit image signals, the equations (7), (8), (9), and (10) may be followed in this order. By outputting this image signal from the printer, a print with the white balance corrected was obtained.
[0055]
Table 1 shows the result of comparing the print obtained by the white balance correction according to the present invention, the original image, and the image obtained by the conventional technique.
Figure 0003853224
As shown in Table 1, this patent has a higher pass rate of about 12 points than the prior art, indicating a sufficient white balance correction capability.
[0056]
(Example 2)
In the first embodiment, the model name of the DSC is known and the spectral sensitivity and the color processing algorithm are also known. However, if the white balance correction method of the present invention is used as printing software, the model is It is desirable to be able to cope with an unknown DSC image (having robustness).
Therefore, in this second embodiment, 309 frames of DSC images shot with two typical DSC models manufactured by Fuji Photo Film Co., Ltd., and the same scene (16 frames) were shot with 15 models manufactured by each company. A white balance correction test was conducted for 240 frames of images when the model was unknown.
[0057]
In the present embodiment, even if the model is unknown, the combination of the spectral sensitivity and the color processing algorithm should be close to the performance of the ideal spectral sensitivity BT709 as shown in FIG. Therefore, all the models were regarded as DSC having ideal spectral sensitivity, and the white balance correction of the present invention was performed.
That is, in this embodiment, the spectral sensitivity distribution of BT709 shown in FIG. 5 is used as the spectral sensitivity distribution Si of the CCD sensor in the equation (2) when obtaining the black body locus. In addition, since a DSC having ideal spectral sensitivity does not require a color processing algorithm for increasing color saturation, 8-bit DSC image signals R, G, and B are converted into subject linear R0, G0, B0In the case of conversion to (2), it is not necessary to follow the equations (10) to (7) in reverse calculation as in the first embodiment, and the reverse calculation of equation (7) can be performed directly.
[0058]
  Using the ideal spectral sensitivity BT709, a gray black body locus and a flesh-colored black body locus are prepared in advance, and using these, R is the same as in the first embodiment.0, G0, B0Signal optimization calculation was performed to obtain vectors α and β, thereby obtaining white balance correction signals R ″, G ″, and B ″ represented by the above equation (11).
  This signal was subjected to gamma 0.45 non-linear transformation of equation (7), and then 8-bit quantization was performed to obtain an 8-bit image signal. This image signal is sent to the printerAppliedAs a result, a white balance corrected print was obtained.
[0059]
The print evaluation method was the same as in Example 1, and the print was evaluated by three-level evaluation ○ Δ ×, and only the best evaluation ○ was accepted. The results are shown in Table 2 below.
Figure 0003853224
[0060]
As shown in Table 2, with respect to two representative models (309 frames) manufactured by Fuji Photo Film Co., the pass rate of the present invention is slightly lowered, but the pass rate (88%) almost the same as that in Example 1 is maintained. As for 15 types (240 frames) manufactured by each company, the absolute value of the acceptance rate of the present invention was low (76%), but the acceptance rate was about 6 points higher than the conventional technology.
The reason why the acceptance rate is low is that the evaluation rate is small (16 scenes) and the design is biased, as can be seen from the fact that the acceptance rate of the original picture is quite low (47%). This seems not to be because DSC was regarded as having sensitivity.
As described above, according to the second embodiment, the white balance correction method of the present invention can be applied to all models with the same software, and even if the model with unknown spectral sensitivity and color processing algorithm is sufficiently white. Balance correction can be performed.
[0061]
In the above embodiment, the gray candidate pixel Ng and the skin color candidate pixel Nf are maximized in the optimization calculation, and the average color temperature Tg of the gray candidate pixel group and the average color temperature Tf of the skin color candidate pixel group are the same. The white balance correction signal is obtained by optimizing the coefficient so that the difference is minimized. In this case, the objective function F for optimization is one, and if this is expressed by an equation,
F = abs (Tg-Tf)-(Ng + Nf)
It becomes. Where abs is an absolute value. In the simplex method, the objective function that has been set works to be minimized. Therefore, if it is desired to maximize the number of candidate pixels, a minus sign such as-(Ng + Nf) may be added.
Even with a single objective function, as described above, good results were obtained as a whole, but there were some prints (× prints) that did not work well when viewed closely. In automatic printing, it is important to reduce the number of x prints as much as possible, so the effect of increasing the number of objective functions was investigated. The number of objective functions is two, and the second objective function
F*= Abs (Tg-Tf) -Ng
Was used. The first white balance correction signal obtained by optimizing the coefficient using the first objective function and the second white balance correction signal obtained by optimizing the coefficient using the second objective function are averaged. When a print was created as a new white balance correction signal, about half of what was conventionally x print changed to Δ print. ○ There was almost no change in the number of prints, and as a whole, Δ prints increased × prints decreased and stable prints were obtained. Furthermore, the two combinations of objective functions are not limited to this, and when other combinations were examined,
F = abs (Tg-Tf) -Ng
F*= Abs (Tg -Tf) -Nf
The combination of these two objective functions had the most effect on print stability. An embodiment of the white balance correction method in this case will be described with reference to FIG. First, the first white balance corrected image signal corresponding to the first objective function output from the white balance correction apparatus 10 is stored in the memory 30, and then the second white function corresponding to the second objective function. After the balance-corrected image signal is stored in the memory 31, a new white balance corrected image signal is generated from the first and second white balance corrected image signals, and is used as a signal for print creation.
[0062]
Furthermore, as a method for stabilizing the print output, it has been found that it is effective to reduce the correction without using the image signal after the gray balance correction obtained by the optimization calculation as it is and to print it. The degree of weakening is preferably 60% to 80%. Further, the correction may be weakened from 60% to 80% according to the BV value (index indicating the brightness of the image) written in the Exif file of the DSC image.
In the optimization calculation described above, conventionally, it is considered that there is little effective information for a small (dark) signal value, and the signal value is set to the lower limit (0.08) in order to save calculation time. The following pixels were not used for calculation. However, in an underexposed image, the signal value of many pixels falls below the lower limit value 0.08, so that the number of pixels that can be used for optimization calculation is considerably reduced, and the calculation accuracy is lowered. On the other hand, in the overexposed image, for example, when the white wall is illuminated with tungsten, and in the case of proper exposure, the signals R = 1.0, G = 0.7, and B = 0.5 are R = 1.0, G = As 1.0 and B = 1.0, all are clipped to 1.0 and it looks like a standard light source illumination signal. If the signal value is 1.0, it is the true value. It is difficult to distinguish whether it was caused by a clip or a clip. Thus, it is necessary to examine the pixels used for the optimization calculation due to under / over exposure. For example, it may be possible to increase the number of pixels by lowering the lower limit value, but it is troublesome to change the set value for each image. Therefore, in order to automatically examine the pixels, the image signal is standardized so that the maximum value of the image signal is 1.0 as follows, and the optimum regardless of under / over exposure. The number of pixels that can be used for the calculation can be kept almost constant.
That is, except for a pixel in which at least one of the RGB signals is 1.0, the maximum value (Rmax, Gmax, Bmax) And calculate the maximum value among the maximum values as Tmax, The minimum value is TminAnd the RGB signal of the image is TmaxBy normalizing with, an image as if taken with appropriate exposure is obtained. The signal utilization range is 1.0 to 0.25 × (Tmin/ Tmax) And a bright range, an appropriate white balance correction can be realized for any under-adjusted / over-exposed image without using a large number of pixels used for the optimization calculation. In the overexposed snow scene, we were able to detect snow white well and finish beautiful prints due to the effect of normalization.
[0063]
As described above in detail, according to the present embodiment, an algorithm using only gray and / or skin color information in a DSC image is constructed, and white balance correction at the time of print creation is performed. As shown in the example, it has a remarkable correction capability compared with the prior art. In addition, when the entire image, which has been a problem in the prior art, is tinted, it has a very high discriminating power as to whether it is due to the photographing light source or the subject, especially in the shaded and cloudy high color temperature scene ( 7000-10000K) showed almost perfect correction ability, and in the past, prints that were bluish and the skin color subsided were obtained, but white and flesh-colored prints could be obtained as if they were revived.
Further, as described above, by optimizing the entire image signal so that the signal value of the brightest pixel in the image is 1, optimization calculation can be performed and processed regardless of under / over. This makes it possible to obtain an image similar to that captured with proper exposure.
In the above embodiment, the DSC image has been described. However, the present invention is not limited to the DSC, and the white balance correction method of the present invention can be applied to an image photographed on a color negative film.
[0064]
  Next, the present inventionApplication examplesWhen the light source is unknown, the skin color candidate pixel detection method described in the above embodiment is used to detect the skin color (particularly not limited to the face) from the image, and the print density is determined based on the information. A density correction method for obtaining an appropriate print will be described with reference to the flowchart of FIG.
  BookApplication examples of the inventionThe image processing apparatus having the coefficient multiplying unit 16, the skin color candidate detecting unit 18, the coefficient optimizing unit 22, and the like (other density correcting unit) in the white balance correcting apparatus 10 described in the above embodiment is used. Examples include a digital photo printer.
[0065]
First, in step 200, a scene is photographed with a digital light camera (DSC) under a certain light source. In step 210, image signals R, G, and B of the photographed image are input. Next, in step 220, the skin color candidate detection process described in the above embodiment is performed on this input signal to detect skin color candidate pixels. That is, all input image signals are multiplied by a predetermined coefficient, and this data is compared with a skin color black body locus to detect data that appears to be near the skin color of the black body locus as a skin color candidate pixel. At this time, the number of detected flesh color candidate pixels is further counted, and the average color temperature of the gray candidate pixel group obtained in the same manner as the average color temperature of the flesh color candidate pixel group is calculated so that this number is maximized. The skin color candidate pixels may be obtained by optimizing the multiplication coefficient so as to minimize the difference or satisfy both conditions, and multiplying the optimized coefficient.
[0066]
Next, in step 230, density correction is performed. That is, first, an average value of the color signals (R, G, B) of the skin color candidate pixels detected as described above is obtained. At this time, an average value of R, G, and B ((R + G + B) / 3) may be used, or a specific color, for example, a G signal may be used. Although what kind of signal is used is not particularly limited, it is preferable to use the G signal.
When the G signal is used, density correction is performed by assigning an average value of the G signal to a predetermined G density D (for example, D = 0.7) on the print. At this time, the G concentration D is preferably 0.7 ≦ D ≦ 1.0.
In step 240, the data after density correction is output from the printer.
[0067]
In this way, even if the photographic light source is unknown, the skin color is detected, and density correction is performed based on the information, so that the density of the face, which is the main subject, is adjusted to an appropriate level. It is possible to finish the prints.
For example, the following results were obtained when density correction was performed on a photographed image by DSC of a backlight scene (a scene with a person in the middle and the sun on the back), which is frequently failed in the LATD system.
[0068]
The printing by the LATD method was a moderately inappropriate print because the density of the entire screen was moderate, but the face was dark.
On the other hand, the print with density correction using the skin color detection according to the present embodiment with the light source unknown is a print that is almost satisfactory because the background density is appropriate, although the background is slightly jumpy. It was. This is an effect of successful skin color detection and density correction based on the detection, and an appropriate print density can be obtained for other scenes.
[0069]
Further, if at least one of the white balance correction method and the density correction method described above is recorded on a computer-readable recording medium as a computer-executable program, the program is input from the recording medium. By doing so, the white balance correction method or density correction method of the present invention can be executed by an arbitrary image processing apparatus or the like.
[0070]
The white balance correction method of the present invention has been described in detail above. However, the present invention is not limited to the above examples, and various improvements and modifications may be made without departing from the scope of the present invention. Of course.
[0071]
【The invention's effect】
As described above, according to the present invention, the color temperature of the photographing light source when photographing the color image is estimated using only gray and / or skin color information included in the input color image, As a result, an algorithm for correcting the white balance is constructed, so that the white balance correction can be performed appropriately and with a high yield for any input image and regardless of the DSC model used for shooting. Can be realized. In particular, when the entire image is standardized using the brightest pixel in the image, optimization calculation can be performed regardless of under / over, and an image with proper exposure can be obtained. it can.
Further, when the skin color in the image is detected and the density correction is performed based on the information, the print density can be appropriately finished even for a scene that is difficult with the prior art.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an outline of an embodiment of a white balance correction apparatus according to the present invention.
FIG. 2 is a chromaticity diagram for illustrating the principle of white balance correction in the present embodiment.
FIG. 3 is a diagram showing a spectral sensitivity distribution of a typical CCD sensor.
FIG. 4 is a flowchart showing a processing flow of the present embodiment.
FIG. 5 is a diagram showing a spectral sensitivity distribution of BT709.
FIG. 6 is a block diagram showing an outline of another example of an embodiment of a white balance correction apparatus according to the present invention.
FIG. 7 is a flowchart showing a process flow of the second embodiment of the present invention.
[Explanation of symbols]
10 White balance correction device
12 Light source color temperature estimation means
14 Image signal correction means
16 Coefficient multiplication means
18 Skin color candidate detection means
20 Gray candidate detection means
22 Coefficient optimization means
24 Light source color temperature calculation means
30, 31 memory

Claims (17)

入力されたカラー画像中に含まれるグレーおよび/または肌色の色情報を用いて、前記カラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、および/または、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、前記肌色候補画素および/またはグレー候補画素の個数が最大となるように、前記係数を最適化して得られる肌色候補画素群および/またはグレー候補画素群のそれぞれの平均色温度から、前記カラー画像を撮影した際の撮影光源の色温度を推定し、
前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにし、
前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、前記係数を最適化する際に、前記入力されたカラー画像の画像信号の最大値を検出し、この最大値で前記入力されたカラー画像の各画像信号を割り算することにより前記画像信号の最大値が1.0となるように規格化した画像信号を用いるようにしたことを特徴とするホワイトバランス補正方法。
Using the gray and / or skin color information contained in the input color image, the image signal of each pixel in the color image is multiplied by a predetermined coefficient, and as a result, the skin color black body locus Pixels that enter the vicinity of the curve are skin color candidate pixels and / or pixels that enter the vicinity of the gray black body locus curve are gray candidate pixels so that the number of skin color candidate pixels and / or gray candidate pixels is maximized. In addition, from the average color temperature of the skin color candidate pixel group and / or gray candidate pixel group obtained by optimizing the coefficient, the color temperature of the photographing light source when photographing the color image is estimated,
Correcting the color image signal multiplied by the optimized coefficient by a difference between the estimated color temperature and a reference white color temperature ;
The image signal of each pixel in the input color image is multiplied by a predetermined coefficient, and as a result, the maximum value of the image signal of the input color image is detected when the coefficient is optimized. Then, by dividing each image signal of the inputted color image by this maximum value, an image signal standardized so that the maximum value of the image signal becomes 1.0 is used. White balance correction method.
グレーおよび肌色の色情報のみを用いることを特徴とする請求項1に記載のホワイトバランス補正方法。2. The white balance correction method according to claim 1, wherein only the color information of gray and skin color is used. 前記肌色候補画素およびグレー候補画素の個数が最大となるように前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から前記撮影光源の色温度を推定する請求項2に記載のホワイトバランス補正方法。A color temperature of the photographing light source is estimated from an average color temperature of each of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient so that the number of the skin color candidate pixels and the gray candidate pixels is maximized. Item 3. The white balance correction method according to Item 2. 入力されたカラー画像中に含まれるグレーおよび肌色の色情報を用いて、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、また、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、Using the gray and skin color information included in the input color image, the image signal of each pixel in the input color image is multiplied by a predetermined coefficient, and as a result, the skin color black body Pixels that enter the vicinity of the locus curve are skin color candidate pixels, and pixels that enter the vicinity of the gray black body locus curve are gray candidate pixels.
前記肌色候補画素群の平均色温度とグレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から、前記カラー画像を撮影した際の撮影光源の色温度を推定し、The respective average colors of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient so that the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. From the temperature, the color temperature of the photographing light source when photographing the color image is estimated,
前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにし、Correcting the color image signal multiplied by the optimized coefficient by a difference between the estimated color temperature and a reference white color temperature;
前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、前記係数を最適化する際に、前記入力されたカラー画像の画像信号の最大値を検出し、この最大値で前記入力されたカラー画像の各画像信号を割り算することにより前記画像信号の最大値が1.0となるように規格化した画像信号を用いるようにしたことを特徴とするホワイトバランス補正方法。The image signal of each pixel in the input color image is multiplied by a predetermined coefficient, and as a result, the maximum value of the image signal of the input color image is detected when the coefficient is optimized. Then, by dividing each image signal of the inputted color image by this maximum value, an image signal standardized so that the maximum value of the image signal becomes 1.0 is used. White balance correction method.
入力されたカラー画像中に含まれるグレーおよび肌色の色情報を用いて、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、また、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、Using the gray and skin color information included in the input color image, the image signal of each pixel in the input color image is multiplied by a predetermined coefficient, and as a result, the skin color black body Pixels that enter the vicinity of the locus curve are skin color candidate pixels, and pixels that enter the vicinity of the gray black body locus curve are gray candidate pixels.
前記肌色候補画素および/またはグレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度とグレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から、前記カラー画像を撮影した際の撮影光源の色温度を推定し、The coefficient is optimized so that the number of skin color candidate pixels and / or gray candidate pixels is maximized, and the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. From the average color temperature of each of the skin color candidate pixel group and the gray candidate pixel group obtained by converting the color temperature of the photographing light source when photographing the color image,
前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにし、Correcting the color image signal multiplied by the optimized coefficient by a difference between the estimated color temperature and a reference white color temperature;
前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、そのThe image signal of each pixel in the input color image is multiplied by a predetermined coefficient, 結果、前記係数を最適化する際に、前記入力されたカラー画像の画像信号の最大値を検出し、この最大値で前記入力されたカラー画像の各画像信号を割り算することにより前記画像信号の最大値が1.0となるように規格化した画像信号を用いるようにしたことを特徴とするホワイトバランス補正方法。As a result, when optimizing the coefficient, the maximum value of the image signal of the input color image is detected, and each image signal of the input color image is divided by this maximum value to thereby calculate the image signal. A white balance correction method characterized in that an image signal standardized so as to have a maximum value of 1.0 is used.
入力されたカラー画像中に含まれるグレーおよび肌色の色情報を用いて、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、また、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、Using the gray and skin color information included in the input color image, the image signal of each pixel in the input color image is multiplied by a predetermined coefficient, and as a result, the skin color black body Pixels that enter the vicinity of the locus curve are skin color candidate pixels, and pixels that enter the vicinity of the gray black body locus curve are gray candidate pixels.
前記肌色候補画素および前記グレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から、前記カラー画像を撮影した際の撮影光源の色温度を推定し、The coefficient is optimized so that the number of the skin color candidate pixels and the gray candidate pixels is maximized, and the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. From the average color temperature of each of the skin color candidate pixel group and the gray candidate pixel group obtained by converting the color temperature of the photographing light source when photographing the color image,
前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにした第1のホワイトバランス補正信号を得、かつ、Obtaining a first white balance correction signal for correcting the color image signal multiplied by the optimized coefficient by a difference between the estimated color temperature and a reference white color temperature; and
前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、また、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、The image signal of each pixel in the input color image is multiplied by a predetermined coefficient. As a result, a pixel that enters the vicinity of the flesh-colored black body locus curve is defined as a flesh-color candidate pixel, and a gray black body Pixels that enter the vicinity of the locus curve are gray candidate pixels,
前記グレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から前記撮影光源の色温度を推定し、Skin color obtained by optimizing the coefficient so that the number of gray candidate pixels is maximized and the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. Estimating the color temperature of the photographing light source from the average color temperature of each of the candidate pixel group and the gray candidate pixel group;
前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにした第2のホワイトバランス補正信号を得、A second white balance correction signal obtained by correcting the color image signal multiplied by the optimized coefficient by a difference between the estimated color temperature and a reference white color temperature;
得られた2つの前記第1および第2ホワイトバランス補正信号を用いて、前記カラー画像の画像信号を補正することを特徴とするホワイトバランス補正方法。A white balance correction method for correcting an image signal of the color image using the obtained two first and second white balance correction signals.
入力されたカラー画像中に含まれるグレーおよび肌色の色情報を用いて、前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、また、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、Using the gray and skin color information included in the input color image, the image signal of each pixel in the input color image is multiplied by a predetermined coefficient, and as a result, the skin color black body Pixels that enter the vicinity of the locus curve are skin color candidate pixels, and pixels that enter the vicinity of the gray black body locus curve are gray candidate pixels.
前記グレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から、前記カラー画像を撮影した際の撮影光源の色温度を推定し、Skin color obtained by optimizing the coefficient so that the number of the gray candidate pixels is maximized and the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. From the average color temperature of each of the candidate pixel group and the gray candidate pixel group, the color temperature of the photographing light source when photographing the color image is estimated,
前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにした第1のホワイトバランス補正信号を得、かつ、Obtaining a first white balance correction signal for correcting the color image signal multiplied by the optimized coefficient by a difference between the estimated color temperature and a reference white color temperature; and
前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、肌色の黒体軌跡曲線の近傍に入る画素を肌色候補画素とし、また、グレーの黒体軌跡曲線の近傍に入る画素をグレー候補画素として、The image signal of each pixel in the input color image is multiplied by a predetermined coefficient. As a result, a pixel that enters the vicinity of the flesh-colored black body locus curve is defined as a flesh-color candidate pixel, and a gray black body Pixels that enter the vicinity of the locus curve are gray candidate pixels,
前記肌色候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から前記撮影光源の色温度を推定し、The skin color obtained by optimizing the coefficient so that the number of the skin color candidate pixels is maximized and the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. Estimating the color temperature of the photographing light source from the average color temperature of each of the candidate pixel group and the gray candidate pixel group;
前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正するようにした第2のホワイトバランス補正信号を得、A second white balance correction signal obtained by correcting the color image signal multiplied by the optimized coefficient by a difference between the estimated color temperature and a reference white color temperature;
得られた2つの前記第1および第2ホワイトバランス補正信号を用いて、前記カラー画像の画像信号を補正することを特徴とするホワイトバランス補正方法。  A white balance correction method for correcting an image signal of the color image using the obtained two first and second white balance correction signals.
前記第1および第2ホワイトバランス補正信号を平均して、前記カラー画像の画像信号を補正して得られたホワイトバランス補正後画像信号として用いる請求項6または7に記載のホワイトバランス補正方法。8. The white balance correction method according to claim 6, wherein the first and second white balance correction signals are averaged and used as an image signal after white balance correction obtained by correcting an image signal of the color image. 前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、前記係数を最適化する際に、前記入力されたカラー画像の画像信号の最大値を検出し、この最大値で前記入力されたカラー画像の各画像信号を割り算することにより前記画像信号の最大値が1.0となるように規格化した画像信号を用いるようにした請求項6〜8のいずれかに記載のホワイトバランス補正方法。The image signal of each pixel in the input color image is multiplied by a predetermined coefficient, and as a result, the maximum value of the image signal of the input color image is detected when the coefficient is optimized. 9. An image signal that is standardized so that the maximum value of the image signal becomes 1.0 by dividing each image signal of the input color image by the maximum value. The white balance correction method according to any one of the above. 前記カラー画像の画像信号を補正して得られたホワイトバランス補正後画像信号をそのまま使わず補正を6割から8割に弱めて用いる請求項1〜9のいずれかに記載のホワイトバランス補正方法。10. The white balance correction method according to claim 1, wherein the white balance corrected image signal obtained by correcting the image signal of the color image is not used as it is, and the correction is weakened from 60% to 80%. 前記カラー画像の画像信号を補正して得られたホワイトバランス補正後画像信号そのまま使わず、デジタルスチルカメラ画像の明るさを示す指数であるBV値に応じて、補正を6割から8割に弱めて用いる請求項1〜10のいずれかに記載のホワイトバランス補正方法。 The image signal after white balance correction obtained by correcting the image signal of the color image is not used as it is, and the correction is increased from 60% to 80% according to the BV value that is an index indicating the brightness of the digital still camera image. The white balance correction method according to claim 1, wherein the white balance correction method is used weakly. 前記肌色およびグレーの黒体軌跡曲線を設定する際に、分光感度分布として、前記入力画像を撮影した撮影装置の分光感度を用いるようにした請求項1〜11のいずれかに記載のホワイトバランス補正方法。The white balance correction according to any one of claims 1 to 11, wherein when setting the flesh color and gray black body locus curve, the spectral sensitivity of the photographing apparatus that has captured the input image is used as the spectral sensitivity distribution. Method. 前記肌色およびグレーの黒体軌跡曲線を設定する際に、分光感度分布として、BT709の分光感度を用いるようにした請求項1〜11のいずれかに記載のホワイトバランス補正方法。The white balance correction method according to claim 1, wherein the spectral sensitivity of the BT 709 is used as a spectral sensitivity distribution when setting the skin color and gray black body locus curves. 請求項1〜13のいずれかに記載のホワイトバランス補正方法を、コンピュータに実行させるためのプログラムとして、コンピュータにより読み取り可能に記録したことを特徴とする記録媒体。14. A recording medium recorded with a computer-readable recording medium as a program for causing a computer to execute the white balance correction method according to claim 1. 入力されたカラー画像中に含まれるグレーおよび/または肌色の色情報を用いて、前記カラー画像を撮影した際の撮影光源の色温度を推定する手段と、前記推定された色温度により前記カラー画像の画像信号を補正する手段とを備え、前記入力されたカラー画像に対して、デジタル画像処理を施しプリントを作成する際の、ホワイトバランスを補正するホワイトバランス補正装置であって、Means for estimating a color temperature of a photographing light source when photographing the color image using gray and / or skin color information included in the input color image, and the color image based on the estimated color temperature A white balance correction device for correcting white balance when a digital image process is performed on the input color image to create a print.
前記撮影光源の色温度を推定する手段は、The means for estimating the color temperature of the photographing light source is
前記入力されたカラー画像の各画素の画像信号に対して、所定の係数を乗算する手段と、Means for multiplying an image signal of each pixel of the input color image by a predetermined coefficient;
前記乗算の結果、肌色の黒体軌跡曲線の近傍に入る画素を検出する肌色候補画素検出手段、およびグレーの黒体軌跡曲線の近傍に入る画素を検出するグレー候補画素検出手段と、As a result of the multiplication, skin color candidate pixel detection means for detecting pixels that enter the vicinity of the flesh color black body locus curve, and gray candidate pixel detection means for detecting pixels that enter the vicinity of the gray black body locus curve;
前記肌色候補画素の個数および/または前記グレー候補画素の個数が最大となり、かつ前記肌色候補画素群の平均色温度とグレー候補画素群の平均色温度との差が最小となるように前記係数を最適化する手段と、The coefficient is set so that the number of skin color candidate pixels and / or the number of gray candidate pixels is maximized, and the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. Means to optimize,
前記肌色候補画素群の平均色温度およびグレー候補画素群の平均色温度から、前記撮影光源の色温度を算出する手段と、を有し、Means for calculating a color temperature of the photographing light source from an average color temperature of the skin color candidate pixel group and an average color temperature of the gray candidate pixel group;
また、前記カラー画像の画像信号を補正する手段は、前記最適化された係数が乗算された前記カラー画像信号を、前記推定された色温度と基準白色の色温度との差分だけ補正すThe means for correcting the image signal of the color image corrects the color image signal multiplied by the optimized coefficient by a difference between the estimated color temperature and the reference white color temperature. る手段であり、Means,
前記入力されたカラー画像中の各画素の画像信号に対して、所定の係数を乗算し、その結果、前記係数を最適化する際に、前記入力されたカラー画像の画像信号の最大値を検出し、この最大値で前記入力されたカラー画像の各画像信号を割り算することにより前記画像信号の最大値が1.0となるように規格化した画像信号を用いるようにしたことを特徴とするホワイトバランス補正装置。The image signal of each pixel in the input color image is multiplied by a predetermined coefficient, and as a result, the maximum value of the image signal of the input color image is detected when the coefficient is optimized. Then, by dividing each image signal of the inputted color image by this maximum value, an image signal standardized so that the maximum value of the image signal becomes 1.0 is used. White balance correction device.
入力されたカラー画像中に含まれるグレーおよび/または肌色の色情報を用いて、前記カラー画像を撮影した際の撮影光源の色温度を推定する手段と、前記推定された色温度により前記カラー画像の画像信号を補正する手段とを備え、前記入力されたカラー画像に対して、デジタル画像処理を施しプリントを作成する際の、ホワイトバランスを補正するホワイトバランス補正装置であって、Means for estimating a color temperature of a photographing light source when photographing the color image using gray and / or skin color information included in the input color image, and the color image based on the estimated color temperature A white balance correction device for correcting white balance when a digital image process is performed on the input color image to create a print.
前記撮影光源の色温度を推定する手段は、The means for estimating the color temperature of the photographing light source is
前記入力されたカラー画像の各画素の画像信号に対して、所定の係数を乗算する手段と、Means for multiplying an image signal of each pixel of the input color image by a predetermined coefficient;
前記乗算の結果、肌色の黒体軌跡曲線の近傍に入る画素を検出する肌色候補画素検出手段、およびグレーの黒体軌跡曲線の近傍に入る画素を検出するグレー候補画素検出手段と、As a result of the multiplication, skin color candidate pixel detection means for detecting pixels that enter the vicinity of the flesh color black body locus curve, and gray candidate pixel detection means for detecting pixels that enter the vicinity of the gray black body locus curve;
前記肌色候補画素の個数および/または前記グレー候補画素の個数が最大となり、かつ前記肌色候補画素群の平均色温度とグレー候補画素群の平均色温度との差が最小となるように前記係数を最適化する手段と、The coefficient is set so that the number of skin color candidate pixels and / or the number of gray candidate pixels is maximized, and the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. Means to optimize,
前記肌色候補画素群の平均色温度およびグレー候補画素群の平均色温度から、前記撮影光源の色温度を算出する手段と、を有し、Means for calculating a color temperature of the photographing light source from an average color temperature of the skin color candidate pixel group and an average color temperature of the gray candidate pixel group;
また、前記カラー画像の画像信号を補正する手段は、The means for correcting the image signal of the color image is:
前記係数を最適化する手段によって、前記肌色候補画素および前記グレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から、前記色温度を算出する手段によって推定された色温度と基準白色の色温度との差分だけ、前記最適化された係数が乗算された前記カラー画像信号を補正するようにした第1のホワイトバランス補正信号と、The means for optimizing the coefficient maximizes the number of the skin color candidate pixels and the gray candidate pixels, and minimizes the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group. From the average color temperatures of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient, the color temperature estimated by the means for calculating the color temperature and the color temperature of the reference white A first white balance correction signal for correcting the color image signal multiplied by the optimized coefficient by the difference of
前記係数を最適化する手段によって、前記グレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から、前記色温度を算出する手段によって推定された色温度と基準白色の色温度との差分だけ、前記最適化された係数が乗算された前記カラー画像信号を補正するようにした第2のホワイトバランス補正信号とを用いて補正する手段であることを特徴とするホワイトバランス補正装置。The means for optimizing the coefficient maximizes the number of gray candidate pixels, and minimizes the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group. From the average color temperature of each of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient, only the difference between the color temperature estimated by the means for calculating the color temperature and the color temperature of the reference white A white balance correction apparatus comprising: a second white balance correction signal that corrects the color image signal multiplied by the optimized coefficient.
入力されたカラー画像中に含まれるグレーおよび/または肌色の色情報を用いて、前記カラー画像を撮影した際の撮影光源の色温度を推定する手段と、前記推定された色温度により前記カラー画像の画像信号を補正する手段とを備え、前記入力されたカラー画像に対して、デジタル画像処理を施しプリントを作成する際の、ホワイトバランスを補正するホワイトバランス補正装置であって、
前記撮影光源の色温度を推定する手段は、
前記入力されたカラー画像の各画素の画像信号に対して、所定の係数を乗算する手段と、
前記乗算の結果、肌色の黒体軌跡曲線の近傍に入る画素を検出する肌色候補画素検出手段、およびグレーの黒体軌跡曲線の近傍に入る画素を検出するグレー候補画素検出手段と、
前記肌色候補画素の個数および/または前記グレー候補画素の個数が最大となり、かつ 前記肌色候補画素群の平均色温度とグレー候補画素群の平均色温度との差が最小となるように前記係数を最適化する手段と、
前記肌色候補画素群の平均色温度およびグレー候補画素群の平均色温度から、前記撮影光源の色温度を算出する手段と、を有し、
また、前記カラー画像の画像信号を補正する手段は、
前記係数を最適化する手段によって、前記グレー候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から、前記色温度を算出する手段によって推定された色温度と基準白色の色温度との差分だけ、前記最適化された係数が乗算された前記カラー画像信号を補正するようにした第1のホワイトバランス補正信号と、
前記係数を最適化する手段によって、前記肌色候補画素の個数が最大となり、かつ、前記肌色候補画素群の平均色温度と前記グレー候補画素群の平均色温度との差が最小となるように、前記係数を最適化して得られる肌色候補画素群およびグレー候補画素群のそれぞれの平均色温度から、前記色温度を算出する手段によって推定された色温度と基準白色の色温度との差分だけ前記最適化された係数が乗算された前記カラー画像信号を補正するようにした第2のホワイトバランス補正信号とを用いて補正する手段であることを特徴とするホワイトバランス補正装置。
Means for estimating a color temperature of a photographing light source when photographing the color image using gray and / or skin color information included in the input color image, and the color image based on the estimated color temperature A white balance correction device for correcting white balance when a digital image process is performed on the input color image to create a print.
The means for estimating the color temperature of the photographing light source is
Means for multiplying an image signal of each pixel of the input color image by a predetermined coefficient;
As a result of the multiplication, skin color candidate pixel detection means for detecting pixels that enter the vicinity of the flesh color black body locus curve, and gray candidate pixel detection means for detecting pixels that enter the vicinity of the gray black body locus curve;
The coefficient is set so that the number of skin color candidate pixels and / or the number of gray candidate pixels is maximized, and the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group is minimized. Means to optimize,
Means for calculating a color temperature of the photographing light source from an average color temperature of the skin color candidate pixel group and an average color temperature of the gray candidate pixel group;
The means for correcting the image signal of the color image is:
The means for optimizing the coefficient maximizes the number of gray candidate pixels, and minimizes the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group. From the average color temperature of each of the skin color candidate pixel group and the gray candidate pixel group obtained by optimizing the coefficient, only the difference between the color temperature estimated by the means for calculating the color temperature and the color temperature of the reference white A first white balance correction signal adapted to correct the color image signal multiplied by the optimized coefficient;
The means for optimizing the coefficient maximizes the number of skin color candidate pixels and minimizes the difference between the average color temperature of the skin color candidate pixel group and the average color temperature of the gray candidate pixel group. the coefficients from each of the average color temperature optimization to skin color candidate pixel group and gray candidate pixel group obtained by the difference between the color temperature and reference white color temperature estimated by means for calculating the color temperature, the A white balance correction apparatus comprising: a second white balance correction signal that corrects the color image signal multiplied by the optimized coefficient .
JP2002025304A 2001-11-08 2002-02-01 White balance correction method Expired - Lifetime JP3853224B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2002025304A JP3853224B2 (en) 2001-11-08 2002-02-01 White balance correction method
US10/290,335 US7146041B2 (en) 2001-11-08 2002-11-08 Method and apparatus for correcting white balance, method for correcting density and recording medium on which program for carrying out the methods is recorded
EP02025015A EP1311111A3 (en) 2001-11-08 2002-11-08 Method and apparatus for correcting white balance, method for correcting density and program recording medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001-343256 2001-11-08
JP2001343256 2001-11-08
JP2002025304A JP3853224B2 (en) 2001-11-08 2002-02-01 White balance correction method

Publications (2)

Publication Number Publication Date
JP2003209856A JP2003209856A (en) 2003-07-25
JP3853224B2 true JP3853224B2 (en) 2006-12-06

Family

ID=27667005

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002025304A Expired - Lifetime JP3853224B2 (en) 2001-11-08 2002-02-01 White balance correction method

Country Status (1)

Country Link
JP (1) JP3853224B2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7663788B2 (en) 2004-06-29 2010-02-16 Fujifilm Corporation Image correcting apparatus and method, and image correction program
US7599093B2 (en) 2004-09-30 2009-10-06 Fujifilm Corporation Image processing apparatus, method and program
JP2007036462A (en) * 2005-07-25 2007-02-08 Fujifilm Holdings Corp Image processing apparatus
JP4683132B2 (en) 2009-01-30 2011-05-11 ブラザー工業株式会社 Image processing apparatus, image processing program, and image processing method
JP4683131B2 (en) 2009-01-30 2011-05-11 ブラザー工業株式会社 Image processing apparatus, image processing program, and image processing method
JP2010178151A (en) 2009-01-30 2010-08-12 Brother Ind Ltd Image processing apparatus, image processing program, and image processing method
WO2013099644A1 (en) 2011-12-28 2013-07-04 日本電気株式会社 Spectral image processing method, spectral image processing device and program
JP6376128B2 (en) 2013-06-19 2018-08-22 日本電気株式会社 Illumination estimation apparatus, illumination estimation method, and illumination estimation program
KR102142654B1 (en) * 2013-10-02 2020-08-07 현대모비스 주식회사 Picture quality testing apparatus and method of display device
CN117314916B (en) * 2023-11-29 2024-01-30 宝鸡市钛程金属复合材料有限公司 Explosion welding detection method for metal composite plate based on artificial intelligence

Also Published As

Publication number Publication date
JP2003209856A (en) 2003-07-25

Similar Documents

Publication Publication Date Title
US7146041B2 (en) Method and apparatus for correcting white balance, method for correcting density and recording medium on which program for carrying out the methods is recorded
US10412296B2 (en) Camera using preview image to select exposure
US7133070B2 (en) System and method for deciding when to correct image-specific defects based on camera, scene, display and demographic data
JP4294896B2 (en) Image processing method and apparatus, and program therefor
US7139425B2 (en) Method and apparatus for correcting white balance, method for correcting density and a recording medium on which a program for carrying out the methods is recorded
CN101124611B (en) Method and device of automatic white balancing of colour gain values
EP0457537A2 (en) Color image processing apparatus
US8035853B2 (en) Image processing apparatus which calculates a correction coefficient with respect to a pixel of interest and uses the correction coefficient to apply tone correction to the pixel of interest
JP2003244467A (en) Image processing method, image processor and image recorder
JP3853224B2 (en) White balance correction method
JP4029206B2 (en) Imaging device
US20040036899A1 (en) Image forming method, image processing apparatus, print producing apparatus and memory medium
JP3819302B2 (en) White balance correction method
JP4104904B2 (en) Image processing method, apparatus, and program
JP2000148978A (en) Method and device for estimating photographic light source, method and device for processing image and recording medium
JP2007036462A (en) Image processing apparatus
JP5435887B2 (en) Image processing apparatus, method, and program
JP2007311895A (en) Imaging apparatus, image processor, image processing method and image processing program
JP2000333185A (en) Photographing apparatus and white balance adjustment method and apparatus
JP3813513B2 (en) White balance correction method
CN101160954A (en) Imaging system and image signal processing program
JPH11196324A (en) Method and device for outputting image
WO2007032324A1 (en) Imaging device, image processing device, image processing method, and image processing program
JP3614541B2 (en) Digital printer and image data conversion method and image recording method therefor
JP2010055192A (en) Image processor, processing method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040315

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060526

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060530

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060728

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060905

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

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

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100915

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100915

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110915

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120915

Year of fee payment: 6