JP2004348362A - Image processing system and method, recording medium, and program - Google Patents
Image processing system and method, recording medium, and program Download PDFInfo
- Publication number
- JP2004348362A JP2004348362A JP2003143596A JP2003143596A JP2004348362A JP 2004348362 A JP2004348362 A JP 2004348362A JP 2003143596 A JP2003143596 A JP 2003143596A JP 2003143596 A JP2003143596 A JP 2003143596A JP 2004348362 A JP2004348362 A JP 2004348362A
- Authority
- JP
- Japan
- Prior art keywords
- image
- white balance
- conversion
- coefficient
- inverse
- 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.)
- Pending
Links
Images
Landscapes
- Editing Of Facsimile Originals (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
- Image Processing (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、画像処理装置および方法、記録媒体、並びにプログラムに関し、特に、画像を合成する際、背景画像と合成画像のホワイトバランスの調整をとることにより違和感のない合成画像を生成できるようにした画像処理装置および方法、記録媒体、並びにプログラムに関する。
【0002】
【従来の技術】
CG(Computer Graphics)と実写画像を合成したり、実写画像同士を合成する技術は、映画やテレビジョン番組などの放送業界、広告、出版業界などで一般的な技術となりつつある。
【0003】
また、AR(Augumented Reality)技術のように、CG(Computer Graphics)のような人工的な画像と、実世界の画像とを合成して表示する技術の進歩により、それらを応用したゲームやシミュレーション装置が、民生用に開発されている。
【0004】
例えば、画像を合成する方法としては、図1で示されるように、背景画像IBに前景画像IFを合成する場合、マスク画像IM(背景画像の画素値がそのまま用いられる位置の画素は、画素値が0にされており、それ以外の位置の画素は0以外の値となっている画像)により前景画像となる部分以外の領域の色情報を除去して、背景画像IBの上に前景画像IFを重ね合わせることで、合成画像IOが生成される。
【0005】
このように、複数の画像やCGを違和感なく合成するためには、それぞれの画像のホワイトバランスの整合性の取れた画像に変換して合成する必要がある。従来、複数の画像のホワイトバランスの整合を取るには、それぞれの画像毎に独立してホワイトバランスの整合をとった後に、それらを合成するか、ホワイトバランスに必要な係数を保存しておき、その係数を使って全ての画像のホワイトバランスを取る(例えば、特許文献1参照)か、或いは、ホワイトバランスの係数を固定して、同じカメラで撮像する、といった方法が知られている。
【0006】
一方、撮影を行う際には、オートホワイトバランスを使わず、マニュアルホワイトバランスで色温度の違いによる撮影効果を狙う場合がある。例えば、夕焼けのシーンなど、オートホワイトバランス変換すると赤味が軽減してしまうため、マニュアルホワイトバランスによって赤味を強調するといった方法である。また、室内でろうそくの明かりを使って撮影する場合などでも、画像に、その雰囲気を残すために、オートホワイトバランスを使わないことがある。
【0007】
【特許文献1】
特開平10−150585号公報
【0008】
【発明が解決しようとする課題】
しかしながら、上述のようにホワイトバランスをマニュアル設定したシーンに対し、オートホワイトバランス変換された別の画像やCGを合成する場合、ホワイトバランスの違いにより、合成画像が不自然に見えてしまうことがあった。また、ホワイトバランスの係数を保存して全ての画像のホワイトバランスを取る方法の場合、CGとの合成や、撮影したカメラが異なる時には、マニュアルホワイトバランスの情報が共用できず、違和感のある不自然な合成画像が生成されてしまうという課題があった。
【0009】
さらに、現実空間が撮影された画像と合成される別の画像とで、異なるカメラによる異なるホワイトバランスの係数によってホワイトバランス変換がなされる場合、それらの画像を合成すると、異なるホワイトバランスにより調整された画像同士が合成されることにより、生成された合成画像の色合いに違和感が発生する恐れがあった。
【0010】
本発明はこのような状況に鑑みてなされたものであり、現実空間が撮像された画像の逆ホワイトバランス変換に必要な係数を求め、ホワイトバランスが取れている合成画像に対し、撮影画像の逆ホワイトバランス変換を適用することで、合成画像と現実空間が撮像された画像とのホワイトバランスの係数のずれを調整することにより、違和感のない合成画像を生成できるようにするものである。
【0011】
【課題を解決するための手段】
本発明の画像処理装置は、第1の画像のホワイトバランス変換処理係数を計算する第1の係数計算手段と、第1の係数計算手段により計算された、第1の画像のホワイトバランス変換処理係数に基づいて、第1の画像をホワイトバランス変換するホワイトバランス変換手段と、第2の画像のホワイトバランス変換処理係数を計算する第2の係数計算手段と、第2の係数計算手段により計算された、第2の画像のホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理係数を計算する第3の係数計算手段と、ホワイトバランス変換手段によりホワイトバランス変換された第1の画像を、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換する逆ホワイトバランス変換手段と、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理された第1の画像と、第2の画像を合成する画像合成手段とを備えることを特徴とする。
【0012】
前記第1の画像は、前景画像とするようにすることができ、第2の画像は、背景画像とするようにすることができる。
【0013】
本発明の画像処理方法は、第1の画像のホワイトバランス変換処理係数を計算する第1の係数計算ステップと、第1の係数計算ステップの処理で計算された、第1の画像のホワイトバランス変換処理係数に基づいて、第1の画像をホワイトバランス変換するホワイトバランス変換ステップと、第2の画像のホワイトバランス変換処理係数を計算する第2の係数計算ステップと、第2の係数計算ステップの処理で計算された、第2の画像のホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理係数を計算する第3の係数計算ステップと、ホワイトバランス変換ステップの処理でホワイトバランス変換された第1の画像を、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換する逆ホワイトバランス変換ステップと、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理された第1の画像と、第2の画像を合成する画像合成ステップとを含むことを特徴とする。
【0014】
本発明の記録媒体のプログラムは、第1の画像のホワイトバランス変換処理係数を計算する第1の係数計算ステップと、第1の係数計算ステップの処理で計算された、第1の画像のホワイトバランス変換処理係数に基づいて、第1の画像をホワイトバランス変換するホワイトバランス変換ステップと、第2の画像のホワイトバランス変換処理係数を計算する第2の係数計算ステップと、第2の係数計算ステップの処理で計算された、第2の画像のホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理係数を計算する第3の係数計算ステップと、ホワイトバランス変換ステップの処理でホワイトバランス変換された第1の画像を、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換する逆ホワイトバランス変換ステップと、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理された第1の画像と、第2の画像を合成する画像合成ステップとを含むことを特徴とする。
【0015】
本発明のプログラムは、第1の画像のホワイトバランス変換処理係数を計算する第1の係数計算ステップと、第1の係数計算ステップの処理で計算された、第1の画像のホワイトバランス変換処理係数に基づいて、第1の画像をホワイトバランス変換するホワイトバランス変換ステップと、第2の画像のホワイトバランス変換処理係数を計算する第2の係数計算ステップと、第2の係数計算ステップの処理で計算された、第2の画像のホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理係数を計算する第3の係数計算ステップと、ホワイトバランス変換ステップの処理でホワイトバランス変換された第1の画像を、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換する逆ホワイトバランス変換ステップと、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理された第1の画像と、第2の画像を合成する画像合成ステップとをコンピュータに実行させることを特徴とする。
【0016】
本発明の画像処理装置および方法、並びにプログラムにおいては、第1の画像のホワイトバランス変換処理係数が計算され、計算された、第1の画像のホワイトバランス変換処理係数に基づいて、第1の画像がホワイトバランス変換され、第2の画像のホワイトバランス変換処理係数が計算され、計算された、第2の画像のホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理係数が計算され、ホワイトバランス変換された第1の画像が、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換され、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理された第1の画像と、第2の画像が合成される。
【0017】
本発明の画像処理装置は、独立した装置であっても良いし、画像処理を行うブロックであっても良い。
【0018】
【発明の実施の形態】
以下に本発明の実施の形態を説明するが、請求項に記載の構成要件と、発明の実施の形態における具体例との対応関係を例示すると、次のようになる。この記載は、請求項に記載されている発明をサポートする具体例が、発明の実施の形態に記載されていることを確認するためのものである。従って、発明の実施の形態中には記載されているが、構成要件に対応するものとして、ここには記載されていない具体例があったとしても、そのことは、その具体例が、その構成要件に対応するものではないことを意味するものではない。逆に、具体例が構成要件に対応するものとしてここに記載されていたとしても、そのことは、その具体例が、その構成要件以外の構成要件には対応しないものであることを意味するものでもない。
【0019】
さらに、この記載は、発明の実施の形態に記載されている具体例に対応する発明が、請求項に全て記載されていることを意味するものではない。換言すれば、この記載は、発明の実施の形態に記載されている具体例に対応する発明であって、この出願の請求項には記載されていない発明の存在、すなわち、将来、分割出願されたり、補正により追加される発明の存在を否定するものではない。
【0020】
即ち、本発明の画像処理装置は、第1の画像のホワイトバランス変換処理係数を計算する第1の係数計算手段(例えば、図2のホワイトバランス変換係数計算部15)と、第1の係数計算手段により計算された、第1の画像のホワイトバランス変換処理係数に基づいて、第1の画像をホワイトバランス変換するホワイトバランス変換手段(例えば、図2のホワイトバランス変換部16)と、第2の画像のホワイトバランス変換処理係数を計算する第2の係数計算手段(例えば、図2のホワイトバランス変換係数計算部11)と、第2の係数計算手段により計算された、第2の画像のホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理係数を計算する第3の係数計算手段(例えば、図2の逆ホワイトバランス変換係数計算部12)と、ホワイトバランス変換手段によりホワイトバランス変換された第1の画像を、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換する逆ホワイトバランス変換手段(例えば、図2の逆ホワイトバランス変換部13)と、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理された第1の画像と、第2の画像を合成する画像合成手段(例えば、図2の合成部14)とを備えることを特徴とする。
【0021】
前記第1の画像は、前景画像とするようにすることができ、第2の画像は、背景画像とするようにすることができる。
【0022】
本発明の画像処理方法は、第1の画像のホワイトバランス変換処理係数を計算する第1の係数計算ステップ(例えば、図3のフローチャートのステップS2の処理)と、第1の係数計算ステップの処理で計算された、第1の画像のホワイトバランス変換処理係数に基づいて、第1の画像をホワイトバランス変換するホワイトバランス変換ステップ(例えば、図3のフローチャートのステップS3の処理)と、第2の画像のホワイトバランス変換処理係数を計算する第2の係数計算ステップ(例えば、図3のフローチャートのステップS1の処理)と、第2の係数計算ステップの処理で計算された、第2の画像のホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理係数を計算する第3の係数計算ステップ(例えば、図3のフローチャートのステップS4の処理)と、ホワイトバランス変換ステップの処理でホワイトバランス変換された第1の画像を、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換する逆ホワイトバランス変換ステップ(例えば、図3のフローチャートのステップS5の処理)と、逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理された第1の画像と、第2の画像を合成する画像合成ステップ(例えば、図3のフローチャートのステップS6の処理)とを含むことを特徴とする。
【0023】
図2は、本発明に係る前景画像と背景画像を合成し、合成画像を生成する画像処理装置1の一実施の形態の構成を示すブロック図である。
【0024】
図2のWB(ホワイトバランス)変換係数計算部11は、入力される背景画像IBの各画素のRGB(Red Green Blue)成分から、ホワイトバランスを調整するための変換に必要なWB変換係数を求めて逆WB変換係数計算部12に出力する。
【0025】
逆WB変換係数計算部12は、WB変換係数計算部11より供給されてくるWB変換係数に基づいて、逆WB変換処理に必要な逆WB変換係数を計算し、逆WB変換部13に供給する。
【0026】
WB変換係数計算部15は、入力される前景画像IFの各画素のRGB(Red Green Blue)成分から、ホワイトバランスを調整するための変換に必要なWB変換係数を求めてWB変換部16に出力する。
【0027】
WB変換部16は、WB変換係数計算部15より供給されるWB変換係数を用いて、入力される前景画像IFをWB変換し、WB変換した前景画像I’Fを逆WB変換部13に出力する。
【0028】
逆WB変換部13は、逆WB変換係数計算部12より供給された、背景画像に基づいて演算されている逆WB変換係数に基づいて、WB変換部16より供給されるWB変換された前景画像I’Fに、逆WB変換を施し合成部14に出力する。
【0029】
合成部14は、前景画像に対応したマスク画像IMを用いて、入力される背景画像と、自らの画像情報に基づいてWB変換処理された後、逆WB変換処理された画像とを合成し、合成画像IOを生成して出力する。マスク画像IMは、合成画像のうち、背景画像の画素値を採用したい位置の画素の画素値を0として、それ以外の位置の画素の画素値を0以外の画素値とした画像であり、合成部14は、このマスク画像IMの情報に基づいて、前景画像と背景画像を合成する。
【0030】
次に、図3のフローチャートを参照して、図2の画像合成装置による画像合成処理について説明する。
【0031】
ステップS1において、WB変換係数計算部11は、入力される背景画像IBの各画素のRGB(Red Green Blue)成分から、ホワイトバランスを調整するための変換に必要なWB変換係数を求めて逆WB変換係数計算部12に出力する。尚、詳細な処理については、図4のフローチャートを参照して、後述する。
【0032】
ステップS2において、WB変換係数計算部15は、入力される前景画像IFの各画素のRGB(Red Green Blue)成分から、ホワイトバランスを調整するための変換に必要なWB変換係数を求めてWB変換部16に出力する。尚、詳細な処理については、図5のフローチャートを参照して、後述する。
【0033】
ステップS3において、WB変換部16は、WB変換係数計算部15より供給されるWB変換係数を用いて、入力される前景画像をWB変換し逆WB変換部13に出力する。尚、詳細な処理については、図6のフローチャートを参照して、後述する。
【0034】
ステップS4において、逆WB変換係数計算部12は、WB変換係数計算部11より供給されてくるWB変換係数に基づいて、逆WB変換処理に必要な逆WB変換係数を計算し、逆WB変換部13に供給する。尚、詳細な処理については、図7のフローチャートを参照して、後述する。
【0035】
ステップS5において、逆WB変換部13は、逆WB変換係数計算部12より供給された、背景画像IBに基づいて演算されている逆WB変換係数に基づいて、WB変換部16より供給されるWB変換された前景画像に、逆WB変換を施し合成部14に出力する。尚、詳細な処理については、図8のフローチャートを参照して、後述する。
【0036】
ステップS6において、合成部14は、前景画像に対応したマスク画像IMを用いて、入力される背景画像と、自らの画像に基づいてWB変換処理された後、逆WB変換処理された画像とを合成し、合成画像IOを生成して出力する。尚、詳細な処理については、図9のフローチャートを参照して、後述する。
【0037】
次に、図4のフローチャートを参照して、図3のフローチャートのステップS1の処理に対応する、背景画像のWB変換係数計算処理について説明する。
【0038】
ステップS21において、WB変換係数計算部11は、図示せぬカウンタSBR,SBG,SBBを0に初期化する。尚、このカウンタSBR,SBG,SBBは、それぞれ背景画像IBのWB変換係数のRGB成分の積算値を示すものである。
【0039】
ステップS22において、WB変換係数計算部11は、図示せぬカウンタyを0に初期化する。尚、このカウンタyは、入力される背景画像IBの垂直方向の画素数をカウントするものである。
【0040】
ステップS23において、WB変換係数計算部11は、図示せぬカウンタxを0に初期化する。尚、このカウンタxは、入力される背景画像IBの水平方向の画素数をカウントするものである。
【0041】
ステップS24において、WB変換係数計算部11は、カウンタSBR,SBG,SBBのそれぞれに、入力された背景画像IBの(x,y)の座標上の画素のRGB成分であるIBR(x,y),IBG(x,y),IBB(x,y)を加算する。
【0042】
ステップS25において、WB変換係数計算部11は、カウンタxを1インクリメントする。
【0043】
ステップS26において、WB変換係数計算部11は、カウンタxが入力された背景画像IBの水平方向の画素数を超えているか否かを判定し、超えていないと判定した場合、その処理は、ステップS24に戻る。すなわち、カウンタxが入力された背景画像IBの水平方向の画素数を超えたと判定されるまで、ステップS24乃至S26の処理が繰り返される。
【0044】
ステップS26において、カウンタxが入力された背景画像IBの水平方向の画素数を超えたと判定された場合、その処理は、ステップS27に進む。
【0045】
ステップS27において、WB変換係数計算部11は、カウンタyを1インクリメントする。
【0046】
ステップS28において、WB変換係数計算部11は、カウンタyが入力された背景画像IBの垂直方向の画素数を超えているか否かを判定し、超えていないと判定した場合、その処理は、ステップS23に戻る。すなわち、カウンタyが入力された背景画像IBの垂直方向の画素数を超えたと判定されるまで、ステップS23乃至S28の処理が繰り返される。
【0047】
ステップS28において、カウンタyが入力された背景画像IBの垂直方向の画素数を超えたと判定された場合、その処理は、ステップS29に進む。
【0048】
ステップS29において、WB変換係数計算部11は、背景画像のWB変換係数としてカウンタSBR,SBG,SBBの値を読み出して、逆WB変換係数計算部13に供給する。
【0049】
すなわち、ホワイトバランスの調整は、RGB成分毎の画像内の総和からなるWB変換係数に基づいてなされるものであるので、WB変換係数計算部11は、図4のフローチャートのステップS23乃至S28の処理を繰り返すことにより、背景画像IB内のRGB成分毎の総和を求め、これを背景画像のWB変換係数として出力する。
【0050】
より詳細には、背景画像IBの画素値をIB=(IBR,IBG,IBB)T、前景画像IFの画素値をIF=(IFR,IFG,IFB)T、合成画像IOの画素値をIO=(IOR,IOG,IOB)T、背景画像IBにホワイトバランスを掛けた背景画像をI’B、その画素値をI’B=(I’BR,I’BG,I’BB)Tとそれぞれ表すものとすると、背景画像IBと、ホワイトバランスが掛けられた背景画像IBとの関係は、以下の式(1)で表される。
【0051】
【数1】
【0052】
ここで、SBR,SBG,SBBは、以下の式(2)で示されるように上述した図4のフローチャートを参照して説明した処理により求められる背景画像IBのWB変換係数である。また、KBは、背景画像IBのWB変換係数の正規化定数であり、背景画像IBとホワイトバランスが掛けられた背景画像I’Bの輝度値の和を等しくするためのものである。
【0053】
【数2】
【0054】
尚、背景画像IBの輝度LBは、SMPTE(Society of Motion Picture and Television Engineers) 170Mの定義により、RGBの値から次の式(3)で求められる。
【0055】
L=0.299×IBR+0.587×IBG+0.144×IBB・・・(3)
【0056】
ここで、背景画像IBの輝度値LBと、ホワイトバランスが掛けられた背景画像の輝度値L’Bは、その総和が等しい。従って、以下の式(4)の関係が成立することになる。
【0057】
【数3】
【0058】
結果として、式(1)乃至(4)を展開することにより、背景画像IBのWB変換係数の正規化定数KBは、以下の式(5)で示されることになる。
【0059】
【数4】
【0060】
次に、図5のフローチャートを参照して、図3のフローチャートのステップS2の処理に対応する、前景画像のWB変換係数計算処理について説明する。
【0061】
ステップS41において、WB変換係数計算部15は、図示せぬカウンタSFR,SFG,SFBを0に初期化する。尚、このカウンタSFR,SFG,SFBは、それぞれ前景画像IFのWB変換係数のRGB成分の積算値を示すものである。
【0062】
ステップS42において、WB変換係数計算部15は、図示せぬカウンタyを0に初期化する。尚、このカウンタyは、入力される前景画像IFの垂直方向の画素数をカウントするものである。
【0063】
ステップS43において、WB変換係数計算部15は、図示せぬカウンタxを0に初期化する。尚、このカウンタxは、入力される前景画像IFの水平方向の画素数をカウントするものである。
【0064】
ステップS44において、WB変換係数計算部15は、カウンタSFR,SFG,SFBのそれぞれに、入力された前景画像IFの(x,y)の座標上の画素のRGB成分であるIFR(x,y),IFG(x,y),IFB(x,y)を加算する。
【0065】
ステップS45において、WB変換係数計算部15は、カウンタxを1インクリメントする。
【0066】
ステップS46において、WB変換係数計算部15は、カウンタxが入力された前景画像IFの水平方向の画素数を超えているか否かを判定し、超えていないと判定した場合、その処理は、ステップS44に戻る。すなわち、カウンタxが入力された前景画像IFの水平方向の画素数を超えたと判定されるまで、ステップS44乃至S46の処理が繰り返される。
【0067】
ステップS46において、カウンタxが入力された前景画像IFの水平方向の画素数を超えたと判定された場合、その処理は、ステップS47に進む。
【0068】
ステップS47において、WB変換係数計算部15は、カウンタyを1インクリメントする。
【0069】
ステップS48において、WB変換係数計算部15は、カウンタyが入力された前景画像IFの垂直方向の画素数を超えているか否かを判定し、超えていないと判定した場合、その処理は、ステップS43に戻る。すなわち、カウンタyが入力された前景画像IFの垂直方向の画素数を超えたと判定されるまで、ステップS43乃至S48の処理が繰り返される。
【0070】
ステップS48において、カウンタyが入力された前景画像IFの垂直方向の画素数を超えたと判定された場合、その処理は、ステップS49に進む。
【0071】
ステップS49において、WB変換係数計算部15は、前景画像IFのWB変換係数としてカウンタSFR,SFG,SFBの値を読み出して、WB変換部16に出力する。
【0072】
すなわち、図4のフローチャートを参照して説明した背景画像のWB変換係数を求めた処理と同様に、ホワイトバランスの調整は、RGB成分毎の画像内の総和からなるWB変換係数に基づいてなされるものであるので、WB変換係数計算部15は、図5のフローチャートのステップS43乃至S48の処理を繰り返すことにより、背景画像IF内のRGB成分毎の総和を求め、これを前景画像のWB変換係数として出力する。
【0073】
より詳細には、ホワイトバランスが掛けられた前景画像I’Fの画素値をI’F=(I’FR,I’FG,I’FB)Tと表すものとすると、背景画像IFと、ホワイトバランスが掛けられた背景画像I’Fとの関係は、以下の式(6)で表される。
【0074】
【数5】
【0075】
ここで、SFR,SFG,SFBは、以下の式(7)で示されるように上述した図5のフローチャートを参照して説明した処理により求められる前景画像IFのWB変換係数である。また、KFは、前景画像IFのWB変換係数の正規化定数であり、前景画像IFとホワイトバランスが掛けられた前景画像I’Fの輝度値の和を等しくするためのものである。
【0076】
【数6】
【0077】
尚、前景画像IFの輝度値LFは、SMPTE 170Mの定義により、RGBの値から次の式(8)で求められる。
【0078】
L=0.299×IFR+0.587×IFG+0.144×IFB・・・(8)
【0079】
ここで、前景画像IFの輝度値LFと、ホワイトバランスが掛けられた前景画像の輝度値L’Fは、その総和が等しい。
【0080】
結果として、式(6)乃至(8)を展開することにより、前景画像IFのWB変換係数の正規化定数KFは、以下の式(9)で示されることになる。
【0081】
【数7】
【0082】
次に、図6のフローチャートを参照して、図3のフローチャートのステップS3の処理に対応する、前景画像のWB変換処理について説明する。
【0083】
ステップS61において、WB変換部16は、図示せぬカウンタSFR,SFG,SFBを読み出すことで、前景画像のWB変換係数を読み出す。
【0084】
ステップS62において、WB変換部16は、前景画像の正規化定数KFを計算する。より詳細には、カウンタSFR,SFG,SFBから読み出した前景画像のWB変換係数に基づいて、上述した式(5)を計算することにより、前景画像の正規化定数KFを計算する。
【0085】
ステップS63において、WB変換部16は、図示せぬカウンタyを0に初期化する。尚、このカウンタyは、入力される前景画像IFの垂直方向の画素数をカウントするものである。
【0086】
ステップS64において、WB変換部16は、図示せぬカウンタxを0に初期化する。尚、このカウンタxは、入力される前景画像IFの水平方向の画素数をカウントするものである。
【0087】
ステップS65において、WB変換部16は、読み出したカウンタSFR,SFG,SFBの値、ステップS62の処理で演算された正規化定数KF、および、それぞれに、入力された前景画像IFの(x,y)の座標上の画素のRGB成分であるIFR(x,y),IFG(x,y),IFB(x,y)を用いて、上述した式(6)を演算することにより、各画素の画素値のRGB成分にWB変換を掛けて、逆WB変換部13に出力する。
【0088】
ステップS66において、WB変換部16は、カウンタxを1インクリメントする。
【0089】
ステップS67において、WB変換部16は、カウンタxが入力された前景画像IFの水平方向の画素数を超えているか否かを判定し、超えていないと判定した場合、その処理は、ステップS65に戻る。すなわち、カウンタxが入力された前景画像IFの水平方向の画素数を超えたと判定されるまで、ステップS65乃至S67の処理が繰り返される。
【0090】
ステップS67において、カウンタxが入力された前景画像IFの水平方向の画素数を超えたと判定された場合、その処理は、ステップS68に進む。
【0091】
ステップS68において、WB変換部16は、カウンタyを1インクリメントする。
【0092】
ステップS69において、WB変換部16は、カウンタyが入力された前景画像IFの垂直方向の画素数を超えているか否かを判定し、超えていないと判定した場合、その処理は、ステップS64に戻る。すなわち、カウンタyが入力された前景画像IFの垂直方向の画素数を超えたと判定されるまで、ステップS64乃至S69の処理が繰り返される。
【0093】
ステップS69において、カウンタyが入力された前景画像IFの垂直方向の画素数を超えたと判定された場合、その処理は、終了する。
【0094】
すなわち、WB変換部16は、図6のフローチャートのステップS64乃至S69の処理を繰り返すことにより、前景画像IFのRGB成分毎の各画素にWB変換を施し、前景画像IFにWB変換を掛けた画素を逆WB変換部13に出力する。
【0095】
次に、図7のフローチャートを参照して、図3のフローチャートのステップS4の処理に対応する、背景画像の逆WB変換係数計算処理について説明する。
【0096】
ステップS81において、逆WB変換係数計算部12は、図示せぬカウンタSBR,SBG,SBBを読み出す。
【0097】
ステップS82において、逆WB変換係数計算部12は、図示せぬカウンタS’FR,S’FG,S’FBを0に初期化する。尚、このカウンタS’FR,S’FG,S’FBは、それぞれ背景画像IBのWB変換係数を用いた、ホワイトバランスが掛けられた前景画像I’Fを逆WB変換するための逆WB変換係数のRGB成分にの積算値を示すものである。
【0098】
ステップS83において、逆WB変換係数計算部12は、図示せぬカウンタyを0に初期化する。尚、このカウンタyは、入力されるWBが掛けられた前景画像I’Fの垂直方向の画素数をカウントするものである。
【0099】
ステップS84において、逆WB変換係数計算部12は、図示せぬカウンタxを0に初期化する。尚、このカウンタxは、入力されるWBが掛けられた前景画像I’Fの水平方向の画素数をカウントするものである。
【0100】
ステップS85において、逆WB変換係数計算部12は、カウンタS’FR,S’FG,S’FBのそれぞれに、入力されたWB変換が掛けられた前景画像I’Fの(x,y)の座標上の画素のRGB成分であるI’FR(x,y),I’FG(x,y),I’FB(x,y)を加算する。
【0101】
ステップS86において、逆WB変換係数計算部12は、カウンタxを1インクリメントする。
【0102】
ステップS87において、逆WB変換係数計算部12は、カウンタxが入力されたWBが掛けられた前景画像I’Fの水平方向の画素数を超えているか否かを判定し、超えていないと判定した場合、その処理は、ステップS85に戻る。すなわち、カウンタxが入力されたWBが掛けられた前景画像I’Fの水平方向の画素数を超えたと判定されるまで、ステップS85乃至S87の処理が繰り返される。
【0103】
ステップS87において、カウンタxが入力されたWBが掛けられた前景画像I’Fの水平方向の画素数を超えたと判定された場合、その処理は、ステップS88に進む。
【0104】
ステップS88において、逆WB変換係数計算部12は、カウンタyを1インクリメントする。
【0105】
ステップS89において、逆WB変換係数計算部12は、カウンタyが入力されたWBが掛けられている前景画像I’Fの垂直方向の画素数を超えているか否かを判定し、超えていないと判定した場合、その処理は、ステップS84に戻る。すなわち、カウンタyが入力されたWBが掛けられている前景画像I’Fの垂直方向の画素数を超えたと判定されるまで、ステップS84乃至S89の処理が繰り返される。
【0106】
ステップS89において、カウンタyが入力されたWBが掛けられた前景画像I’Fの垂直方向の画素数を超えたと判定された場合、その処理は、ステップS90に進む。
【0107】
ステップS90において、逆WB変換係数計算部12は、背景画像IBのWB変換係数を用いた、前景画像IFの逆WB変換正規化係数K’Fを演算し、逆WB変換部13に出力する。
【0108】
すなわち、背景画像の逆WB変換は、以下に示す式(10)で示される関係となる。
【0109】
【数8】
【0110】
上述の式(10)で示される逆WB変換に用いられる逆WB変換係数を用いて、WB変換された前景画像IFを逆WB変換するためには、以下の式(11)で示される演算がなされることになる。
【0111】
【数9】
【0112】
ここで、I’’FR,I’’FG,I’’FBは、背景画像IBのWB変換係数を用いて、WB変換された前景画像I’Fが、逆WB変換された画素値のRGB成分を示している。また、逆WB変換の正規化係数K’Fは、以下に示される式(12)で示されるように、背景画像IBのWB変換係数を用いて、WB変換された前景画像I’Fの輝度値L’’Fと、WB変換が掛けられた前景画像の輝度値L’Fが、同一となる関係から、以下の式(13)のように導き出される。
【0113】
【数10】
【0114】
【数11】
【0115】
結果として、逆WB変換係数計算部12は、上述した式(13)を演算することにより、逆WB変換正規化係数K’Fを求めて、逆WB変換部13に出力する。
【0116】
次に、図8のフローチャートを参照して、逆WB変換部13による、WB変換された前景画像の、背景画像のWB変換係数を用いた、逆WB変換処理について説明する。
【0117】
ステップS101において、逆WB変換部13は、図示せぬカウンタSBR,SBG,SBBと、逆WB正規化変換定数K’Fを読み出す。
【0118】
ステップS102において、逆WB変換部13は、図示せぬカウンタyを0に初期化する。尚、このカウンタyは、入力されるWBが掛けられた前景画像I’Fの垂直方向の画素数をカウントするものである。
【0119】
ステップS103において、逆WB変換部13は、図示せぬカウンタxを0に初期化する。尚、このカウンタxは、入力されるWBが掛けられた前景画像I’Fの水平方向の画素数をカウントするものである。
【0120】
ステップS104において、逆WB変換部13は、読み出したカウンタSBR,SBG,SBBと、逆WB変換正規化定数K’Fを用いて、入力されたWB変換が掛けられている前景画像I’Fの(x,y)の座標上の画素のRGB成分であるI’FR(x,y),I’FG(x,y),I’FB(x,y)に逆WB変換を掛け、これらの処理が施された画像I’’FR(x,y),I’’FG(x,y),I’’FB(x,y)を合成部14に出力する。より詳細には、逆WB変換部13は、上述した式(11)の演算を実行することにより、WBが掛けられた前景画像I’Fに逆WB変換をかける。
【0121】
ステップS105において、逆WB変換部13は、カウンタxを1インクリメントする。
【0122】
ステップS106において、逆WB変換部13は、カウンタxが入力されたWBが掛けられている前景画像I’Fの水平方向の画素数を超えているか否かを判定し、超えていないと判定した場合、その処理は、ステップS104に戻る。すなわち、カウンタxが入力されたWBが掛けられた前景画像I’Fの水平方向の画素数を超えたと判定されるまで、ステップS104乃至S106の処理が繰り返される。
【0123】
ステップS106において、カウンタxが入力されたWBが掛けられた前景画像I’Fの水平方向の画素数を超えたと判定された場合、その処理は、ステップS107に進む。
【0124】
ステップS107において、逆WB変換部13は、カウンタyを1インクリメントする。
【0125】
ステップS108において、逆WB変換部13は、カウンタyが入力されたWBが掛けられている前景画像I’Fの垂直方向の画素数を超えているか否かを判定し、超えていないと判定した場合、その処理は、ステップS103に戻る。すなわち、カウンタyが入力されたWBが掛けられた前景画像I’Fの垂直方向の画素数を超えたと判定されるまで、ステップS103乃至S108の処理が繰り返される。
【0126】
ステップS108において、カウンタyが入力されたWBが掛けられた前景画像I’Fの垂直方向の画素数を超えたと判定された場合、その処理は、終了する。
【0127】
すなわち、逆WB変換部13は、ステップS103乃至S108の処理を繰り返すことにより、WB変換部16より供給されたWB変換された前景画像I’Fに、上述した式(11)で示される演算をすることで、逆WB変換を掛けて、合成しようとする前景画像IFを背景画像IBのWB変換係数に適合するように逆WB変換する。
【0128】
次に、図9のフローチャートを参照して、合成部14による合成処理について説明する。
【0129】
ステップS121において、合成部14は、図示せぬカウンタyを0に初期化する。尚、このカウンタyは、入力される背景画像IBの垂直方向の画素数をカウントするものである。
【0130】
ステップS122において、合成部14は、図示せぬカウンタxを0に初期化する。尚、このカウンタxは、入力される背景画像IBの水平方向の画素数をカウントするものである。
【0131】
ステップS123において、合成部14は、今の座標(x,y)に対応するマスク画像IMの画素IM(x,y)が、0以外の値となっているか否かを判定する。すなわち、マスク画像IMは、背景画像をそのまま残す領域に0が設定され、それ以外の画素に0以外の値(例えば、1)が設定されることにより、合成する前景画像をマスキングするもの(前景画像と背景画像を区別するもの)である。従って、マスク画像IMの画素IM(x,y)が、0であるということは、その位置の画素の画素値は、背景画像がそのまま用いられ、0以外の値であると言うことは、その位置の画素の画素値は、逆WB変換されている前景画像の画素値が用いられることになる。
【0132】
ステップS123において、今の座標(x,y)に対応するマスク画像IMの画素IM(x,y)が、0以外の値となっていると判定された場合、ステップS124において、合成部14は、合成画像IOの画素値IO(x,y)が、WBが掛けられた後、背景画像のWB変換係数に基づいて逆WB変換された前景画像I’’F(x,y)の画素値であるとものとみなし、RGBの各成分の画素値IOR(x,y),IOG(x,y),IOB(x,y)を、I’’FR(x,y),I’’FG(x,y),I’’FB(x,y)に設定し、その処理は、ステップS126に進む。
【0133】
一方、ステップS123において、今の座標(x,y)に対応するマスク画像IMの画素IM(x,y)が、0以外の値となっていない、すなわち、0であると判定された場合、ステップS125において、合成部14は、合成画像IOの画素値IO(x,y)が、背景画像IB(x,y)の画素値であるとものとみなし、RGBの各成分の画素値IOR(x,y),IOG(x,y),IOB(x,y)を、IBR(x,y),IBG(x,y),IBB(x,y)に設定し、その処理は、ステップS126に進む。
【0134】
ステップS126において、合成部14は、カウンタxを1インクリメントする。
【0135】
ステップS127において、合成部14は、カウンタxが入力された背景画像IBの水平方向の画素数を超えているか否かを判定し、超えていないと判定した場合、その処理は、ステップS123に戻る。すなわち、カウンタxが入力された背景画像IBの水平方向の画素数を超えたと判定されるまで、ステップS123乃至S127の処理が繰り返される。
【0136】
ステップS127において、カウンタxが入力された背景画像IBの水平方向の画素数を超えたと判定された場合、その処理は、ステップS128に進む。
【0137】
ステップS128において、合成部14は、カウンタyを1インクリメントする。
【0138】
ステップS129において、合成部14は、カウンタyが入力された背景画像IBの垂直方向の画素数を超えているか否かを判定し、超えていないと判定した場合、その処理は、ステップS122に戻る。すなわち、カウンタyが入力された背景画像IBの垂直方向の画素数を超えたと判定されるまで、ステップS122乃至S129の処理が繰り返される。
【0139】
ステップS129において、カウンタyが入力された背景画像IBの垂直方向の画素数を超えたと判定された場合、その処理は、終了する。同時に、図3のフローチャートの処理が終了する。
【0140】
すなわち、合成部14は、マスク画像IM上の画素値、より詳細には、前景画像であるか、背景画像であるかを識別する値に基づいて、前景画像IFの画素値であるか、または、背景画像IBの画素値であるかを識別し、識別された画素値を、合成画像IOの各画素値に置き換えることにより、背景画像と、WB調整された後、背景画像のWB変換係数に基づいて逆WB変換された前景画像を合成する。
【0141】
以上の処理をまとめると、図10で示されるようになる。
【0142】
すなわち、図3のステップS1の処理、すなわち、図4のフローチャートを参照して説明した処理により、WB変換係数計算部11が、背景画像IBに基づいて、背景画像IBのWB変換係数を計算し、逆WB変換係数計算部12に出力する。
【0143】
図3のステップS2の処理、すなわち、図5のフローチャートを参照して説明した処理により、WB変換係数計算部15が、前景画像IFに基づいて、前景画像IFのWB変換係数を計算し、WB変換部16に出力する。
【0144】
図3のステップS3の処理、すなわち、図6のフローチャートを参照して説明した処理により、WB変換部16が、前景画像IFをWB変換し、WB変換した前景画像I’Fを逆WB変換部13に出力する。
【0145】
図3のステップS4の処理、すなわち、図7のフローチャートを参照して説明した処理により、逆WB変換係数計算部12が、WB変換係数計算部11より供給された背景画像のWB変換係数に基づいて、逆WB変換係数を計算し、逆WB変換部13に出力する。
【0146】
図3のステップS5の処理、すなわち、図8のフローチャートを参照して説明した処理により、逆WB変換部16が、逆WB変換係数計算部13より供給された背景画像IBの変換係数に基づいて計算されている逆WB変換係数に基づいて、WB変換部16より供給されたWB変換された前景画像I’Fを逆WB変換し、逆WB変換した前景画像I’’Fを合成部14に出力する。
【0147】
図3のステップS6の処理、すなわち、図9のフローチャートを参照して説明した処理により、合成部14が、逆WB変換部13より供給された、背景画像のWB変換係数から計算された逆WB変換係数に基づいて、逆WB変換されている前景画像I’’Fと、背景画像IBを、マスク画像IMの情報に基づいて合成し、生成した合成画像を出力する。
【0148】
このような処理により、合成される前景画像は、背景画像のWB変換係数から計算された逆WB変換係数に基づいて、逆WB変換された後に背景画像と合成されるため、前景画像が背景画像とよく馴染んだ色合いとなり、違和感のない自然な合成画像を生成することが可能となる。
【0149】
尚、以上においては、前景画像が、背景画像のWB変換係数から計算された逆WB変換係数に基づいて、逆WB変換された後に背景画像と合成される場合について説明してきたが、前景画像と背景画像の関係が逆となるように処理しても、上述の処理と同様であることは言うまでもないが、この場合、前景画像の色合いに基づいて、背景画像のWBが調整されることになる。結果として、上述したように、背景画像が前景画像とよく馴染んだ色合いとなり、違和感のない自然な色合いの合成画像を生成することが可能となる。
【0150】
さらに、以上においては、前景画像と背景画像の2枚の画像を合成する場合について説明してきたが、2枚以上の画像を合成する場合に適用してもよく、この場合、いずれかWBの基準となる画像を決めて、その基準となる画像のWB変換係数に基づいて、逆WB変換係数を求めて、その他の画像を、その逆WB変換係数を用いて逆WB変換した後、合成することで、上述と同様の効果が得られる。
【0151】
上述した一連の処理は、ハードウェアにより実行させることもできるが、ソフトウェアにより実行させることもできる。一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行させることが可能な、例えば汎用のパーソナルコンピュータなどに記録媒体からインストールされる。
【0152】
図11は、画像処理装置1をソフトウェアにより実現する場合のパーソナルコンピュータの一実施の形態の構成を示している。パーソナルコンピュータのCPU101は、パーソナルコンピュータの動作の全体を制御する。また、CPU101は、バス104および入出力インタフェース105を介してユーザからキーボードやマウスなどからなる入力部106から指令が入力されると、それに対応してROM(Read Only Memory)102に格納されているプログラムを実行する。あるいはまた、CPU101は、ドライブ110に接続された磁気ディスク111、光ディスク112、光磁気ディスク113、または半導体メモリ114から読み出され、記憶部108にインストールされたプログラムを、RAM(Random Access Memory)103にロードして実行し、出力部107が実行結果を出力する。さらに、CPU101は、通信部109を制御して、外部と通信し、データの授受を実行する。
【0153】
プログラムが記録されている記録媒体は、図11に示すように、コンピュータとは別に、ユーザにプログラムを提供するために配布される、プログラムが記録されている磁気ディスク111(フレキシブルディスクを含む)、光ディスク112(CD−ROM(Compact Disc−Read Only Memory),DVD(Digital Versatile Disc)を含む)、光磁気ディスク113(MD(Mini−Disc)を含む)、もしくは半導体メモリ114などよりなるパッケージメディアにより構成されるだけでなく、コンピュータに予め組み込まれた状態でユーザに提供される、プログラムが記録されているROM102や、記憶部108に含まれるハードディスクなどで構成される。
【0154】
尚、本明細書において、記録媒体に記録されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理は、もちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理を含むものである。
【0155】
【発明の効果】
本発明によれば、違和感のない自然な色合いの画像として複数の画像を合成することが可能となる。
【図面の簡単な説明】
【図1】従来の画像合成を説明する図である。
【図2】本発明を適用した画像合成装置の一実施の形態の構成を示す図である。
【図3】図2の画像合成装置による画像合成処理を説明するフローチャートである。
【図4】図3のステップS1の処理である、背景画像のWB変換係数計算処理を説明するフローチャートである。
【図5】図3のステップS2の処理である、前景画像のWB変換係数計算処理を説明するフローチャートである。
【図6】図3のステップS3の処理である、前景画像のWB変換処理を説明するフローチャートである。
【図7】図3のステップS4の処理である、逆WB変換係数計算処理を説明するフローチャートである。
【図8】図3のステップS5の処理である、前景画像の逆WB変換処理を説明するフローチャートである。
【図9】図3のステップS6の処理である、合成処理を説明するフローチャートである。
【図10】図3のフローチャートの処理を説明する図である。
【図11】記録媒体を説明する図である。
【符号の説明】
1 画像処理装置11 WB変換係数計算部, 12 逆変換係数計算部, 13 逆WB変換部, 14 合成部, 15 WB変換係数計算部, 16 WB変換部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing apparatus and method, a recording medium, and a program. In particular, when combining images, it is possible to generate a combined image without a sense of incongruity by adjusting the white balance between the background image and the combined image. The present invention relates to an image processing apparatus and method, a recording medium, and a program.
[0002]
[Prior art]
2. Description of the Related Art Techniques for combining a CG (Computer Graphics) with an actual photographed image or combining actual photographed images are becoming general techniques in the broadcasting industry such as a movie or a television program, an advertisement, a publishing industry, and the like.
[0003]
In addition, due to the progress of technology for combining and displaying an artificial image such as CG (Computer Graphics) and an image of the real world, such as an AR (Augmented Reality) technology, games and simulation devices using these technologies have been developed. Is being developed for consumer use.
[0004]
For example, as a method of synthesizing an image, as shown in FIG. B Foreground image I F Are combined, the mask image I M (The pixel at the position where the pixel value of the background image is used as it is is an image in which the pixel value is set to 0, and the pixel at other positions is a value other than 0.) Of the background image I B On the foreground image I F Is superimposed on the composite image I O Is generated.
[0005]
As described above, in order to combine a plurality of images and CGs without a sense of incongruity, it is necessary to convert each of the images into an image having a consistent white balance and combine the images. Conventionally, in order to match the white balance of a plurality of images, after adjusting the white balance independently for each image, combine them, or store the coefficients necessary for white balance, A method is known in which the white balance of all images is obtained using the coefficient (for example, see Patent Document 1), or an image is captured by the same camera with the coefficient of white balance fixed.
[0006]
On the other hand, when photographing, there is a case where a photographing effect due to a difference in color temperature is aimed at with a manual white balance without using an auto white balance. For example, a method of emphasizing redness with a manual white balance since redness is reduced when performing auto white balance conversion in a sunset scene or the like. In addition, even when photographing indoors using candlelight, the auto white balance may not be used in order to leave the atmosphere in the image.
[0007]
[Patent Document 1]
JP-A-10-150585
[0008]
[Problems to be solved by the invention]
However, when a different image or CG subjected to auto white balance conversion is combined with a scene in which white balance is manually set as described above, the combined image may look unnatural due to a difference in white balance. Was. In the case of a method of storing the white balance coefficient and taking the white balance of all images, manual white balance information cannot be shared when combining with a CG or when a different camera is used, which makes the image unnatural. There is a problem that a complicated composite image is generated.
[0009]
Further, when white balance conversion is performed by an image captured in the real space and another image to be synthesized by different white balance coefficients from different cameras, when those images are synthesized, the images are adjusted by different white balances. When the images are combined with each other, there is a possibility that the color tone of the generated combined image may cause a sense of incongruity.
[0010]
The present invention has been made in view of such a situation, and obtains a coefficient necessary for inverse white balance conversion of an image obtained by imaging a real space, and performs an inverse operation of a captured image on a composite image having a white balance. By applying the white balance conversion, it is possible to adjust the deviation of the white balance coefficient between the synthesized image and the image obtained by capturing the real space, thereby generating a synthesized image without a sense of incongruity.
[0011]
[Means for Solving the Problems]
An image processing apparatus according to an embodiment of the present invention includes a first coefficient calculation unit that calculates a white balance conversion processing coefficient of a first image, and a white balance conversion processing coefficient of the first image calculated by the first coefficient calculation unit. , A white balance conversion means for white balance conversion of the first image, a second coefficient calculation means for calculating a white balance conversion processing coefficient of the second image, and a second coefficient calculation means. A third coefficient calculating means for calculating an inverse white balance conversion coefficient based on the white balance conversion processing coefficient of the second image, and a first image which has been white balance converted by the white balance conversion means. Reverse white balance conversion means for performing reverse white balance conversion based on the balance conversion processing coefficient; Based on, characterized in that it comprises a first image which is the inverse white balance conversion process, and an image synthesizing means for synthesizing the second image.
[0012]
The first image may be a foreground image, and the second image may be a background image.
[0013]
An image processing method according to the present invention includes a first coefficient calculating step of calculating a white balance conversion processing coefficient of a first image, and a white balance conversion of the first image calculated in the processing of the first coefficient calculating step. Processing of a white balance conversion step for white balance conversion of a first image based on a processing coefficient, a second coefficient calculation step of calculating a white balance conversion processing coefficient of a second image, and a second coefficient calculation step A third coefficient calculation step of calculating an inverse white balance conversion processing coefficient based on the white balance conversion processing coefficient of the second image calculated in step (a), and a first coefficient white balance converted in the processing of the white balance conversion step. Inverse white balance conversion, which performs an inverse white balance conversion of the image based on the inverse white balance conversion processing coefficient And-up, based on the inverse white balance conversion coefficients, characterized by comprising a first image which is the inverse white balance conversion process, and an image synthesizing step of synthesizing the second image.
[0014]
The program of the recording medium according to the present invention includes a first coefficient calculating step of calculating a white balance conversion processing coefficient of the first image, and a white balance of the first image calculated in the processing of the first coefficient calculating step. A white balance conversion step of performing white balance conversion on the first image based on the conversion processing coefficient, a second coefficient calculation step of calculating a white balance conversion processing coefficient of the second image, and a second coefficient calculation step A third coefficient calculation step of calculating an inverse white balance conversion processing coefficient based on the white balance conversion processing coefficient of the second image calculated in the processing, and a third coefficient white balance conversion processing performed in the white balance conversion step. 1 is an inverse white balance that performs inverse white balance conversion on the basis of the inverse white balance conversion processing coefficient. A conversion step, based on the inverse white balance conversion coefficients, characterized by comprising a first image which is the inverse white balance conversion process, and an image synthesizing step of synthesizing the second image.
[0015]
A program according to the present invention includes a first coefficient calculation step of calculating a white balance conversion processing coefficient of a first image, and a white balance conversion processing coefficient of the first image calculated in the processing of the first coefficient calculation step. , A white balance conversion step of white balance conversion of the first image, a second coefficient calculation step of calculating a white balance conversion processing coefficient of the second image, and a second coefficient calculation step. A third coefficient calculating step of calculating an inverse white balance conversion processing coefficient based on the white balance conversion processing coefficient of the second image, and a first image subjected to white balance conversion in the processing of the white balance conversion step To the inverse white balance conversion coefficient based on the inverse white balance conversion processing coefficient. And flop, based on the inverse white balance conversion coefficients, and wherein the first image that has been inverse white balance conversion processing that is executed and an image synthesizing step of synthesizing the second image to the computer.
[0016]
In the image processing apparatus, method, and program according to the present invention, a white balance conversion processing coefficient of a first image is calculated, and a first image is calculated based on the calculated white balance conversion processing coefficient of the first image. Is subjected to white balance conversion, a white balance conversion processing coefficient of the second image is calculated, and an inverse white balance conversion processing coefficient is calculated based on the calculated white balance conversion processing coefficient of the second image. The converted first image is subjected to inverse white balance conversion based on the inverse white balance conversion processing coefficient, and the first image subjected to inverse white balance conversion processing based on the inverse white balance conversion processing coefficient, and the second image. Are synthesized.
[0017]
The image processing device of the present invention may be an independent device or a block that performs image processing.
[0018]
BEST MODE FOR CARRYING OUT THE INVENTION
Embodiments of the present invention will be described below. The correspondence between constituent elements described in the claims and specific examples in the embodiments of the present invention is as follows. This description is for confirming that a specific example supporting the invention described in the claims is described in the embodiment of the invention. Therefore, even if there is a specific example which is described in the embodiment of the invention but is not described here as corresponding to the configuration requirement, the fact that the specific example is It does not mean that it does not correspond to the requirement. Conversely, even if a specific example is described here as corresponding to a configuration requirement, this means that the specific example does not correspond to a configuration requirement other than the configuration requirement. not.
[0019]
Furthermore, this description does not mean that the invention corresponding to the specific examples described in the embodiments of the invention is all described in the claims. In other words, this description is an invention corresponding to the specific example described in the embodiment of the invention, and the existence of the invention not described in the claims of this application, that is, It does not deny the existence of the invention added by the amendment.
[0020]
That is, the image processing apparatus of the present invention includes a first coefficient calculating unit (for example, a white balance conversion
[0021]
The first image may be a foreground image, and the second image may be a background image.
[0022]
The image processing method according to the present invention includes a first coefficient calculation step of calculating a white balance conversion processing coefficient of a first image (for example, the processing of step S2 in the flowchart of FIG. 3) and a processing of the first coefficient calculation step. A white balance conversion step for white balance conversion of the first image based on the white balance conversion processing coefficient of the first image calculated in step (e.g., the processing of step S3 in the flowchart of FIG. 3); A second coefficient calculation step for calculating a white balance conversion processing coefficient of the image (for example, the processing of step S1 in the flowchart of FIG. 3) and a white coefficient of the second image calculated in the processing of the second coefficient calculation step A third coefficient calculation step for calculating an inverse white balance conversion processing coefficient based on the balance conversion processing coefficient (for example, FIG. An inverse white balance conversion step (for example, the processing of step S4 in the flowchart) and an inverse white balance conversion step of performing an inverse white balance conversion of the first image that has been subjected to the white balance conversion in the processing of the white balance conversion step, based on the inverse white balance conversion processing coefficient. 3, an image synthesizing step of synthesizing the first image subjected to the inverse white balance conversion processing and the second image based on the inverse white balance conversion processing coefficient (for example, FIG. 3 of the flowchart of step S6).
[0023]
FIG. 2 is a block diagram showing the configuration of an embodiment of the
[0024]
The WB (white balance) conversion
[0025]
The inverse WB conversion
[0026]
The WB
[0027]
The
[0028]
The inverse
[0029]
The combining
[0030]
Next, an image combining process performed by the image combining apparatus of FIG. 2 will be described with reference to a flowchart of FIG.
[0031]
In step S1, the WB
[0032]
In step S2, the WB
[0033]
In step S <b> 3, the
[0034]
In step S4, the inverse WB conversion
[0035]
In step S5, the inverse
[0036]
In step S6, the synthesizing
[0037]
Next, with reference to the flowchart of FIG. 4, a description will be given of the WB conversion coefficient calculation processing of the background image corresponding to the processing of step S1 of the flowchart of FIG.
[0038]
In step S21, the WB
[0039]
In step S22, the WB
[0040]
In step S23, the WB
[0041]
In step S24, the WB
[0042]
In step S25, the WB
[0043]
In step S26, the WB
[0044]
In step S26, the background image I to which the counter x has been input B Is determined to have exceeded the number of pixels in the horizontal direction, the process proceeds to step S27.
[0045]
In step S27, the WB
[0046]
In step S28, the WB
[0047]
In step S28, the background image I to which the counter y has been input B Is determined to have exceeded the number of pixels in the vertical direction, the process proceeds to step S29.
[0048]
In step S29, the WB
[0049]
That is, since the adjustment of the white balance is performed based on the WB conversion coefficient composed of the sum in the image for each of the RGB components, the WB conversion
[0050]
More specifically, the background image I B Pixel value of I B = (I BR , I BG , I BB ) T , Foreground image I F Pixel value of I F = (I FR , I FG , I FB ) T , Composite image I O Pixel value of I O = (I OR , I OG , I OB ) T , Background image I B I 'with a background image with white balance applied B , And its pixel value is I ′ B = (I ' BR , I ' BG , I ' BB ) T Respectively, the background image I B And the background image I with the white balance applied B Is expressed by the following equation (1).
[0051]
(Equation 1)
[0052]
Where S BR , S BG , S BB Is a background image I obtained by the processing described with reference to the flowchart of FIG. 4 described above as shown by the following equation (2). B Are WB conversion coefficients. Also, K B Is the background image I B Is a normalized constant of the WB conversion coefficient of the background image I B And background image I 'with white balance applied B This is to make the sum of the luminance values equal.
[0053]
(Equation 2)
[0054]
The background image I B Brightness L B Is determined by the following equation (3) from RGB values according to the definition of SMPTE (Society of Motion Picture and Television Engineers) 170M.
[0055]
L = 0.299 × I BR + 0.587 × I BG + 0.144 × I BB ... (3)
[0056]
Here, the background image I B Brightness value L B And the luminance value L 'of the background image to which white balance has been applied. B Are equal in their sum. Therefore, the following equation (4) holds.
[0057]
[Equation 3]
[0058]
As a result, by developing Expressions (1) to (4), the background image I B Constant K of the WB conversion coefficient of B Is represented by the following equation (5).
[0059]
(Equation 4)
[0060]
Next, with reference to the flowchart of FIG. 5, a description will be given of the WB conversion coefficient calculation processing of the foreground image corresponding to the processing of step S2 of the flowchart of FIG.
[0061]
In step S41, the WB
[0062]
In step S42, the WB conversion
[0063]
In step S43, the WB
[0064]
In step S44, the WB
[0065]
In step S45, the WB
[0066]
In step S46, the WB conversion
[0067]
In step S46, the foreground image I to which the counter x has been input F Is determined to have exceeded the number of pixels in the horizontal direction, the process proceeds to step S47.
[0068]
In step S47, the WB
[0069]
In step S48, the WB conversion
[0070]
In step S48, the foreground image I for which the counter y has been input F Is determined to have exceeded the number of pixels in the vertical direction, the process proceeds to step S49.
[0071]
In step S49, the WB
[0072]
That is, similarly to the process of obtaining the WB conversion coefficient of the background image described with reference to the flowchart of FIG. 4, the adjustment of the white balance is performed based on the WB conversion coefficient made up of the sum of the RGB components in the image. Therefore, the WB conversion
[0073]
More specifically, the foreground image I ′ with the white balance applied F Pixel value of I ′ F = (I ' FR , I ' FG , I ' FB ) T If the background image I F And the background image I 'with the white balance applied F Is expressed by the following equation (6).
[0074]
(Equation 5)
[0075]
Where S FR , S FG , S FB Is the foreground image I obtained by the processing described with reference to the above-described flowchart of FIG. F Are WB conversion coefficients. Also, K F Is the foreground image I F Is a normalization constant of the WB conversion coefficient of the foreground image I F And foreground image I 'with white balance applied F This is to make the sum of the luminance values equal.
[0076]
(Equation 6)
[0077]
The foreground image I F Brightness value L F Is determined by the following equation (8) from RGB values according to the definition of SMPTE 170M.
[0078]
L = 0.299 × I FR + 0.587 × I FG + 0.144 × I FB ... (8)
[0079]
Here, foreground image I F Brightness value L F And the luminance value L ′ of the foreground image to which the white balance has been applied. F Are equal in their sum.
[0080]
As a result, by developing equations (6) to (8), the foreground image I F Constant K of the WB conversion coefficient of F Is represented by the following equation (9).
[0081]
(Equation 7)
[0082]
Next, the WB conversion process of the foreground image, which corresponds to the process in step S3 of the flowchart of FIG. 3, will be described with reference to the flowchart of FIG.
[0083]
In step S61, the
[0084]
In step S62, the
[0085]
In step S63, the
[0086]
In step S64, the
[0087]
In step S65, the
[0088]
In step S66, the
[0089]
In step S67, the
[0090]
In step S67, the foreground image I to which the counter x has been input F Is determined to have exceeded the number of pixels in the horizontal direction, the process proceeds to step S68.
[0091]
In step S68, the
[0092]
In step S69, the
[0093]
In step S69, the foreground image I for which the counter y has been input F Is determined to have exceeded the number of pixels in the vertical direction, the process ends.
[0094]
That is, the
[0095]
Next, with reference to the flowchart of FIG. 7, a description will be given of the process of calculating the inverse WB conversion coefficient of the background image, which corresponds to the process of step S4 of the flowchart of FIG.
[0096]
In step S81, the inverse WB conversion
[0097]
In step S82, the inverse WB conversion
[0098]
In step S83, the inverse WB conversion
[0099]
In step S84, the inverse WB
[0100]
In step S85, the inverse WB
[0101]
In step S86, the inverse WB conversion
[0102]
In step S87, the inverse WB transform
[0103]
In step S87, the foreground image I ′ multiplied by the WB input with the counter x is multiplied. F Is determined to have exceeded the number of pixels in the horizontal direction, the process proceeds to step S88.
[0104]
In step S88, the inverse WB
[0105]
In step S89, the inverse WB
[0106]
In step S89, the foreground image I ′ multiplied by the WB input with the counter y is multiplied. F If it is determined that the number of pixels in the vertical direction has been exceeded, the process proceeds to step S90.
[0107]
In step S90, the inverse WB transform
[0108]
That is, the inverse WB conversion of the background image has a relationship represented by the following equation (10).
[0109]
(Equation 8)
[0110]
The WB-converted foreground image I is obtained by using the inverse WB conversion coefficient used for the inverse WB conversion expressed by the above equation (10). F In order to perform the inverse WB conversion, the operation represented by the following equation (11) is performed.
[0111]
(Equation 9)
[0112]
Where I '' FR , I '' FG , I '' FB Is the background image I B WB-converted foreground image I ′ using the WB conversion coefficients F Shows the RGB components of the pixel value subjected to the inverse WB conversion. Also, the normalization coefficient K ′ for the inverse WB conversion F Is the background image I as shown in the following equation (12). B WB-converted foreground image I ′ using the WB conversion coefficients F Brightness value L '' F And the luminance value L ′ of the foreground image subjected to the WB conversion F Are derived from the same relationship as in the following equation (13).
[0113]
(Equation 10)
[0114]
(Equation 11)
[0115]
As a result, the inverse WB conversion
[0116]
Next, an inverse WB conversion process performed by the inverse
[0117]
In step S101, the inverse
[0118]
In step S102, the inverse
[0119]
In step S103, the inverse
[0120]
In step S104, the inverse
[0121]
In step S105, the inverse
[0122]
In step S106, the inverse
[0123]
In step S106, the foreground image I ′ multiplied by the WB to which the counter x has been input is multiplied. F If it is determined that the number of pixels in the horizontal direction has been exceeded, the process proceeds to step S107.
[0124]
In step S107, the inverse
[0125]
In step S108, the inverse
[0126]
In step S108, the foreground image I ′ multiplied by the WB input with the counter y is multiplied. F Is determined to have exceeded the number of pixels in the vertical direction, the process ends.
[0127]
In other words, the inverse
[0128]
Next, the combining process by the combining
[0129]
In step S121, the synthesizing
[0130]
In step S122, the synthesizing
[0131]
In step S123, the synthesizing
[0132]
In step S123, the mask image I corresponding to the current coordinates (x, y) M Pixel I M When it is determined that (x, y) is a value other than 0, in step S124, the combining
[0133]
On the other hand, in step S123, the mask image I corresponding to the current coordinates (x, y) M Pixel I M When it is determined that (x, y) is not a value other than 0, that is, it is 0, in step S125, the combining
[0134]
In step S126, the synthesizing
[0135]
In step S127, the synthesizing
[0136]
In step S127, the background image I to which the counter x has been input B Is determined to have exceeded the number of pixels in the horizontal direction, the process proceeds to step S128.
[0137]
In step S128, the combining
[0138]
In step S129, the synthesizing
[0139]
In step S129, the background image I to which the counter y has been input B Is determined to have exceeded the number of pixels in the vertical direction, the process ends. At the same time, the processing of the flowchart in FIG. 3 ends.
[0140]
That is, the combining
[0141]
The above processing is summarized as shown in FIG.
[0142]
That is, the WB conversion
[0143]
By the process of step S2 of FIG. 3, that is, the process described with reference to the flowchart of FIG. F Based on the foreground image I F Is calculated and output to the
[0144]
By the process of step S3 of FIG. 3, that is, the process described with reference to the flowchart of FIG. F Is subjected to WB conversion, and the WB-converted foreground image I ′ F To the inverse
[0145]
According to the processing of step S4 in FIG. 3, that is, the processing described with reference to the flowchart of FIG. Then, an inverse WB conversion coefficient is calculated and output to the inverse
[0146]
By the processing in step S5 in FIG. 3, that is, the processing described with reference to the flowchart in FIG. 8, the inverse
[0147]
By the process of step S6 in FIG. 3, that is, the process described with reference to the flowchart of FIG. Foreground image I ″ that has been subjected to inverse WB conversion based on the conversion coefficient F And the background image I B To the mask image I M And outputs the generated composite image.
[0148]
By such processing, the foreground image to be synthesized is synthesized with the background image after being subjected to inverse WB conversion based on the inverse WB conversion coefficient calculated from the WB conversion coefficient of the background image. This makes it possible to generate a natural composite image without discomfort.
[0149]
In the above description, a case has been described in which the foreground image is synthesized with the background image after the inverse WB conversion based on the inverse WB conversion coefficient calculated from the WB conversion coefficient of the background image. It goes without saying that even if the processing is performed so that the relationship between the background images is reversed, the processing is the same as that described above. In this case, the WB of the background image is adjusted based on the hue of the foreground image. . As a result, as described above, the background image has a hue that has become familiar with the foreground image, and it is possible to generate a composite image having a natural hue without a sense of discomfort.
[0150]
Further, in the above description, the case where two images of the foreground image and the background image are combined has been described. However, the present invention may be applied to the case where two or more images are combined. Is determined, an inverse WB conversion coefficient is determined based on the WB conversion coefficient of the reference image, and the other images are inverse WB-transformed using the inverse WB conversion coefficient and then combined. Thus, the same effect as described above can be obtained.
[0151]
The series of processes described above can be executed by hardware, but can also be executed by software. When a series of processing is executed by software, a program constituting the software may be executed by a computer built into dedicated hardware or by installing various programs to execute various functions. It is installed from a recording medium into a possible general-purpose personal computer or the like.
[0152]
FIG. 11 shows a configuration of an embodiment of a personal computer when the
[0153]
As shown in FIG. 11, the recording medium on which the program is recorded is a magnetic disk 111 (including a flexible disk) on which the program is recorded, which is distributed separately from the computer to provide the user with the program, An optical disk 112 (including a CD-ROM (Compact Disc-Read Only Memory), a DVD (Digital Versatile Disc)), a magneto-optical disk 113 (including an MD (Mini-Disc)), or a package medium including a
[0154]
In this specification, a step of describing a program recorded on a recording medium is performed in a time-series manner in the order described. Alternatively, the processing includes individually executed processing.
[0155]
【The invention's effect】
ADVANTAGE OF THE INVENTION According to this invention, it becomes possible to synthesize | combine several images as an image of a natural hue without a sense of incongruity.
[Brief description of the drawings]
FIG. 1 is a diagram for explaining conventional image synthesis.
FIG. 2 is a diagram showing a configuration of an embodiment of an image synthesizing apparatus to which the present invention is applied.
FIG. 3 is a flowchart illustrating an image combining process performed by the image combining device of FIG. 2;
FIG. 4 is a flowchart illustrating a WB conversion coefficient calculation process of a background image, which is a process of step S1 in FIG. 3;
FIG. 5 is a flowchart illustrating a WB conversion coefficient calculation process of a foreground image, which is a process of step S2 in FIG. 3;
FIG. 6 is a flowchart illustrating a WB conversion process of a foreground image, which is a process of step S3 in FIG. 3;
FIG. 7 is a flowchart illustrating an inverse WB conversion coefficient calculation process, which is a process of step S4 in FIG. 3;
FIG. 8 is a flowchart illustrating an inverse WB conversion process of a foreground image, which is a process of step S5 in FIG. 3;
FIG. 9 is a flowchart illustrating a combining process, which is the process of step S6 in FIG. 3;
FIG. 10 is a diagram for explaining the processing of the flowchart in FIG. 3;
FIG. 11 is a diagram illustrating a recording medium.
[Explanation of symbols]
Claims (5)
前記第1の係数計算手段により計算された、前記第1の画像のホワイトバランス変換処理係数に基づいて、前記第1の画像をホワイトバランス変換するホワイトバランス変換手段と、
第2の画像のホワイトバランス変換処理係数を計算する第2の係数計算手段と、
前記第2の係数計算手段により計算された、前記第2の画像のホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理係数を計算する第3の係数計算手段と、
前記ホワイトバランス変換手段によりホワイトバランス変換された前記第1の画像を、前記逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換する逆ホワイトバランス変換手段と、
前記逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理された前記第1の画像と、前記第2の画像を合成する画像合成手段と
を備えることを特徴とする画像処理装置。First coefficient calculating means for calculating a white balance conversion processing coefficient of the first image;
A white balance conversion unit configured to white balance the first image based on a white balance conversion processing coefficient of the first image calculated by the first coefficient calculation unit;
Second coefficient calculating means for calculating a white balance conversion processing coefficient of the second image;
Third coefficient calculating means for calculating an inverse white balance conversion processing coefficient based on the white balance conversion processing coefficient of the second image calculated by the second coefficient calculating means;
An inverse white balance conversion unit that performs an inverse white balance conversion on the first image that has been white balance converted by the white balance conversion unit, based on the inverse white balance conversion processing coefficient;
An image processing apparatus comprising: an image synthesizing unit that synthesizes the first image subjected to the inverse white balance conversion processing based on the inverse white balance conversion processing coefficient and the second image.
ことを特徴とする請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the first image is a foreground image, and the second image is a background image.
前記第1の係数計算ステップの処理で計算された、前記第1の画像のホワイトバランス変換処理係数に基づいて、前記第1の画像をホワイトバランス変換するホワイトバランス変換ステップと、
第2の画像のホワイトバランス変換処理係数を計算する第2の係数計算ステップと、
前記第2の係数計算ステップの処理で計算された、前記第2の画像のホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理係数を計算する第3の係数計算ステップと、
前記ホワイトバランス変換ステップの処理でホワイトバランス変換された前記第1の画像を、前記逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換する逆ホワイトバランス変換ステップと、
前記逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理された前記第1の画像と、前記第2の画像を合成する画像合成ステップと
を含むことを特徴とする画像処理方法。A first coefficient calculating step of calculating a white balance conversion processing coefficient of the first image;
A white balance conversion step of performing white balance conversion of the first image based on a white balance conversion processing coefficient of the first image calculated in the processing of the first coefficient calculation step;
A second coefficient calculating step of calculating a white balance conversion processing coefficient of the second image;
A third coefficient calculation step of calculating an inverse white balance conversion processing coefficient based on the white balance conversion processing coefficient of the second image calculated in the processing of the second coefficient calculation step;
An inverse white balance conversion step of performing an inverse white balance conversion on the first image subjected to the white balance conversion in the processing of the white balance conversion step, based on the inverse white balance conversion processing coefficient;
An image processing method, comprising: an image synthesizing step of synthesizing the first image subjected to inverse white balance conversion processing based on the inverse white balance conversion processing coefficient and the second image.
前記第1の係数計算ステップの処理で計算された、前記第1の画像のホワイトバランス変換処理係数に基づいて、前記第1の画像をホワイトバランス変換するホワイトバランス変換ステップと、
第2の画像のホワイトバランス変換処理係数を計算する第2の係数計算ステップと、
前記第2の係数計算ステップの処理で計算された、前記第2の画像のホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理係数を計算する第3の係数計算ステップと、
前記ホワイトバランス変換ステップの処理でホワイトバランス変換された前記第1の画像を、前記逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換する逆ホワイトバランス変換ステップと、
前記逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理された前記第1の画像と、前記第2の画像を合成する画像合成ステップと
を含むことを特徴とするコンピュータが読み取り可能なプログラムが記録されている記録媒体。A first coefficient calculating step of calculating a white balance conversion processing coefficient of the first image;
A white balance conversion step of performing white balance conversion of the first image based on a white balance conversion processing coefficient of the first image calculated in the processing of the first coefficient calculation step;
A second coefficient calculating step of calculating a white balance conversion processing coefficient of the second image;
A third coefficient calculation step of calculating an inverse white balance conversion processing coefficient based on the white balance conversion processing coefficient of the second image calculated in the processing of the second coefficient calculation step;
An inverse white balance conversion step of performing an inverse white balance conversion on the first image subjected to the white balance conversion in the processing of the white balance conversion step, based on the inverse white balance conversion processing coefficient;
A computer-readable program comprising an image synthesizing step of synthesizing the first image subjected to the inverse white balance conversion processing based on the inverse white balance conversion processing coefficient and the second image. Recording medium on which is recorded.
前記第1の係数計算ステップの処理で計算された、前記第1の画像のホワイトバランス変換処理係数に基づいて、前記第1の画像をホワイトバランス変換するホワイトバランス変換ステップと、
第2の画像のホワイトバランス変換処理係数を計算する第2の係数計算ステップと、
前記第2の係数計算ステップの処理で計算された、前記第2の画像のホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理係数を計算する第3の係数計算ステップと、
前記ホワイトバランス変換ステップの処理でホワイトバランス変換された前記第1の画像を、前記逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換する逆ホワイトバランス変換ステップと、
前記逆ホワイトバランス変換処理係数に基づいて、逆ホワイトバランス変換処理された前記第1の画像と、前記第2の画像を合成する画像合成ステップと
をコンピュータに実行させることを特徴とするプログラム。A first coefficient calculating step of calculating a white balance conversion processing coefficient of the first image;
A white balance conversion step of performing white balance conversion of the first image based on a white balance conversion processing coefficient of the first image calculated in the processing of the first coefficient calculation step;
A second coefficient calculating step of calculating a white balance conversion processing coefficient of the second image;
A third coefficient calculation step of calculating an inverse white balance conversion processing coefficient based on the white balance conversion processing coefficient of the second image calculated in the processing of the second coefficient calculation step;
An inverse white balance conversion step of performing an inverse white balance conversion on the first image subjected to the white balance conversion in the processing of the white balance conversion step, based on the inverse white balance conversion processing coefficient;
A program for causing a computer to execute an image synthesizing step of synthesizing the first image subjected to inverse white balance conversion processing and the second image based on the inverse white balance conversion processing coefficient.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003143596A JP2004348362A (en) | 2003-05-21 | 2003-05-21 | Image processing system and method, recording medium, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003143596A JP2004348362A (en) | 2003-05-21 | 2003-05-21 | Image processing system and method, recording medium, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004348362A true JP2004348362A (en) | 2004-12-09 |
Family
ID=33531336
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003143596A Pending JP2004348362A (en) | 2003-05-21 | 2003-05-21 | Image processing system and method, recording medium, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004348362A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012208287A (en) * | 2011-03-29 | 2012-10-25 | Casio Comput Co Ltd | Display controller and program |
US8786728B2 (en) | 2008-11-21 | 2014-07-22 | Olympus Imaging Corp. | Image processing apparatus, image processing method, and storage medium storing image processing program |
-
2003
- 2003-05-21 JP JP2003143596A patent/JP2004348362A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8786728B2 (en) | 2008-11-21 | 2014-07-22 | Olympus Imaging Corp. | Image processing apparatus, image processing method, and storage medium storing image processing program |
JP2012208287A (en) * | 2011-03-29 | 2012-10-25 | Casio Comput Co Ltd | Display controller and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5319415B2 (en) | Image processing apparatus and image processing method | |
Xiong et al. | Fast panorama stitching for high-quality panoramic images on mobile phones | |
AU2004202849B2 (en) | A system and process for generating high dynamic range images from multiple exposures of a moving scene | |
US7973827B2 (en) | Image data generating apparatus, method and program for generating an image having high spatial and high temporal resolution | |
JP4973719B2 (en) | Imaging apparatus, imaging method, and imaging program | |
KR101388130B1 (en) | Image processing apparatus and image processing method | |
JP5672796B2 (en) | Image processing apparatus and image processing method | |
JP5300756B2 (en) | Imaging apparatus and image processing method | |
JP2003199034A (en) | Still picture format for post-picture stitch for forming panorama image | |
JP2006121695A (en) | Device and method for color correction of input image | |
JP2005141527A (en) | Image processing apparatus, image processing method and computer program | |
JP5804856B2 (en) | Image processing apparatus, image processing method, and program | |
JP2007151080A (en) | Image processor and image processing method | |
JP2011109638A (en) | Image processing apparatus and image processing method | |
US20080170160A1 (en) | Automatic White Balancing Of A Digital Image | |
CN102595025A (en) | Image processing device and image processing method | |
CN111095931A (en) | Tone curve optimization method and associated video encoder and video decoder | |
JP2009206654A (en) | Imaging apparatus | |
WO2021056304A1 (en) | Image processing method and apparatus, mobile platform, and machine readable storage medium | |
JP2002300372A (en) | Image processing device, recording medium for recording image processing program, and image reproducing device | |
WO2011021235A1 (en) | Image processing method and image processing device | |
JPH11242737A (en) | Method for processing picture and device therefor and information recording medium | |
US20070115366A1 (en) | Moving image generating apparatus, moving image generating method and program therefore | |
JP4828479B2 (en) | Composite image generation apparatus and composite image generation program | |
JP2001014454A (en) | Picture processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060509 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090424 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090430 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090626 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20090818 |