JP7169841B2 - IMAGE PROCESSING DEVICE, IMAGING DEVICE, IMAGE PROCESSING METHOD, AND PROGRAM - Google Patents
IMAGE PROCESSING DEVICE, IMAGING DEVICE, IMAGE PROCESSING METHOD, AND PROGRAM Download PDFInfo
- Publication number
- JP7169841B2 JP7169841B2 JP2018197847A JP2018197847A JP7169841B2 JP 7169841 B2 JP7169841 B2 JP 7169841B2 JP 2018197847 A JP2018197847 A JP 2018197847A JP 2018197847 A JP2018197847 A JP 2018197847A JP 7169841 B2 JP7169841 B2 JP 7169841B2
- Authority
- JP
- Japan
- Prior art keywords
- reflection characteristic
- reflection
- light source
- image
- characteristic data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は、画像処理装置、撮像装置、画像処理方法、及びプログラムに関する。 The present invention relates to an image processing device, an imaging device, an image processing method, and a program.
従来から、写真撮影においては、補助照明やレフ板による光の調整によって、被写体に生じる光と影の領域の調整が行われている。これにより、被写体の印象をさまざまに変化させた写真撮影が可能となる。また、これらの光の調整を撮影後に行う技術として、被写体領域に対して、光の反射によるハイライトや陰影成分を加える技術(リライティング)がある。これにより、暗部を補正することや、立体感を強調した画像を生成することが可能となる。 2. Description of the Related Art Conventionally, in photography, areas of light and shadow that appear on a subject are adjusted by adjusting light using auxiliary lighting or a reflector. This makes it possible to take photographs with various impressions of the subject. In addition, as a technique for performing these light adjustments after photographing, there is a technique (relighting) for adding highlight and shadow components by reflecting light to the subject area. As a result, it is possible to correct dark areas and generate an image with an emphasized stereoscopic effect.
特許文献1は、被写体の距離情報を取得し、距離情報に基づいて被写体の形状情報を求め、形状情報、距離情報、及び仮想光源の位置に基づいて撮影画像を処理して、被写体に対して仮想光源からの光を照射した画像を生成する技術を開示している。 Patent Document 1 acquires distance information of a subject, obtains shape information of the subject based on the distance information, processes a photographed image based on the shape information, the distance information, and the position of a virtual light source, A technique for generating an image irradiated with light from a virtual light source is disclosed.
特許文献1では、被写体の距離情報から法線を算出し、法線、被写体距離、仮想光源の位置と方向、強度に基づき、仮想光源による反射特性を求めてリライティング制御を行っている。この方法では、被写体距離、法線、仮想光源による反射特性を算出する演算量が多く、処理に時間がかかる。特に、仮想光源の数を増やして多灯での照射を行う場合には、仮想光源の数だけ演算を繰り返す必要があるため、処理に要する時間が増大する。 In Patent Document 1, a normal line is calculated from distance information of a subject, and relighting control is performed by obtaining reflection characteristics of a virtual light source based on the normal line, the subject distance, and the position, direction, and intensity of the virtual light source. This method requires a large amount of computation for calculating the object distance, the normal line, and the reflection characteristics based on the virtual light source, and the processing takes a long time. In particular, when the number of virtual light sources is increased and multi-light irradiation is performed, it is necessary to repeat the calculation for the number of virtual light sources, which increases the time required for processing.
本発明はこのような状況に鑑みてなされたものであり、複数の仮想光源を用いるリライティングの処理負荷を軽減する技術を提供することを目的とする。 SUMMARY OF THE INVENTION It is an object of the present invention to provide a technique for reducing the processing load of relighting using a plurality of virtual light sources.
上記課題を解決するために、本発明は、入力画像に仮想光源の効果を付加する前に、前記入力画像に含まれる所定の被写体における第1の仮想光源の反射特性を示す第1の反射特性データと、前記所定の被写体における第2の仮想光源の反射特性を示す第2の反射特性データとを合成する合成処理を行うことにより、合成反射特性データを取得する合成手段と、前記合成処理により得られた前記合成反射特性データが示す反射特性に基づいて、前記入力画像に含まれる被写体における反射成分を生成する生成手段と、前記入力画像に対して、前記生成手段により生成された前記反射成分を付加する付加手段と、を備えることを特徴とする画像処理装置を提供する。 In order to solve the above problems, the present invention provides a first reflection characteristic indicating a reflection characteristic of a first virtual light source in a predetermined subject included in the input image before adding the effect of the virtual light source to the input image. a synthesizing unit for acquiring synthetic reflection characteristic data by performing synthesis processing for synthesizing the data and second reflection characteristic data indicating the reflection characteristics of the second virtual light source in the predetermined subject; and generating means for generating a reflection component of a subject included in the input image based on the reflection characteristic indicated by the obtained synthetic reflection characteristic data; and the reflection component generated by the generating means for the input image. and adding means for adding the image processing apparatus.
なお、その他の本発明の特徴は、添付図面及び以下の発明を実施するための形態における記載によって更に明らかになるものである。 In addition, other features of the present invention will be further clarified by the description in the attached drawings and the following detailed description.
本発明によれば、複数の仮想光源を用いるリライティングの処理負荷を軽減することが可能となる。 According to the present invention, it is possible to reduce the processing load of relighting using a plurality of virtual light sources.
以下、添付図面を参照して、本発明の実施形態を説明する。なお、本発明の技術的範囲は、特許請求の範囲によって確定されるのであって、以下の個別の実施形態によって限定されるわけではない。また、実施形態の中で説明されている特徴の組み合わせすべてが、本発明に必須とは限らない。また、別々の実施形態の中で説明されている特徴を適宜組み合せることも可能である。 Embodiments of the present invention will be described below with reference to the accompanying drawings. It should be noted that the technical scope of the present invention is determined by the claims and is not limited by the following individual embodiments. Also, not all combinations of features described in the embodiments are essential to the present invention. It is also possible to combine features described in separate embodiments as appropriate.
以下の各実施形態では、画像処理装置をデジタルカメラ(撮像装置)に適用した構成を例にして説明を行う。 In each of the following embodiments, a configuration in which an image processing device is applied to a digital camera (imaging device) will be described as an example.
[第1の実施形態]
図1は、デジタルカメラ100の構成を示すブロック図である。図1において、101は、ズームレンズ及びフォーカスレンズを含むレンズ群である。102は、絞り機能を備えるシャッターである。103は、光学像を電気信号に変換するCCDやCMOS素子等で構成される撮像部である。104は、アナログ信号をデジタル信号に変換するA/D変換器である。105は、A/D変換器104から出力される画像データに対し、ホワイトバランス処理や、リライティング処理、γ処理、輪郭強調処理、色補正処理などの各種画像処理を行う画像処理部である。106は、画像メモリである。107は、画像メモリ106を制御するメモリ制御部である。108は、入力デジタル信号をアナログ信号に変換するD/A変換器である。109は、LCD等を含む表示部である。110は、画像データを圧縮符号化・復号化するコーデック部である。
[First Embodiment]
FIG. 1 is a block diagram showing the configuration of the
111は、記録媒体112とのインタフェース(I/F)である。112は、メモリカードやハードディスク等の記録媒体である。113は、撮影画像中から顔が映っている領域を検出する顔検出部である。50は、デジタルカメラ100のシステム全体を制御するシステム制御部である。121は、プログラムやパラメータなどを格納するEEPROMなどの不揮発性メモリである。122は、システム制御部50の動作用の定数、変数、不揮発性メモリ121から読みだしたプログラム等を展開するシステムメモリである。123は、ストロボ(光源装置)である。124は、被写体との距離を測定する測距センサである。
111 is an interface (I/F) with the
次に、上記のように構成されたデジタルカメラ100における被写体撮影時の基本動作について説明する。撮像部103は、レンズ101及びシャッター102を介して入射した光を光電変換し、入力画像信号としてA/D変換器104へ出力する。A/D変換器104は、撮像部103から出力されるアナログ画像信号をデジタル画像信号に変換して画像処理部105に出力する。なお、デジタル画像信号は、RAW画像データとして記録媒体112に記録されてもよい。
Next, the basic operation of the
画像処理部105は、A/D変換器104からの画像データ、又は、メモリ制御部107からの画像データに対し、ホワイトバランスなどの色変換処理、リライティング処理、γ処理、輪郭強調処理などを行う。また、画像処理部105は、顔検出部113の顔検出結果や撮像した画像データを用いて所定の評価値算出処理を行う。システム制御部50は、得られた評価値に基づいて露光制御及び測距制御を行う。これにより、TTL(スルー・ザ・レンズ)方式のAF(オートフォーカス)処理、AE(自動露出)処理、AWB(オートホワイトバランス)処理などを行うことができる。
The
画像処理部105から出力された画像データは、メモリ制御部107を介して画像メモリ106に書き込まれる。画像メモリ106は、撮像部103から出力された画像データや、表示部109に表示するための画像データを格納する。D/A変換器108は、画像メモリ106に格納されている画像表示用のデータをアナログ信号に変換して表示部109に供給する。表示部109は、LCD等の表示デバイス上に、D/A変換器108からのアナログ信号に応じた表示を行う。
Image data output from the
コーデック部110は、画像メモリ106に記録された画像データをJPEG、MPEGなどの規格に基づき圧縮符号化する。システム制御部50は、符号化した画像データを、I/F111を介して記録媒体112に格納する。
A
以上、被写体撮影時の基本動作について説明した。上記の基本動作以外に、システム制御部50は、前述した不揮発性メモリ121に記録されたプログラムを実行することで、後述する本実施形態の各処理を実現する。ここでいうプログラムとは、本実施形態にて後述する各種フローチャートを実行するためのプログラムのことである。この際、システム制御部50の動作用の定数、変数、不揮発性メモリ121から読み出したプログラム等は、システムメモリ122に展開される。
The basic operation of photographing a subject has been described above. In addition to the basic operations described above, the
次に、図2を参照して、画像処理部105の詳細について説明する。図2は、画像処理部105の構成を示すブロック図である。図2において、200は同時化処理部、201はWB増幅部、202はリライティング処理部、203は輝度・色信号生成部である。204は輪郭強調処理部、205は輝度ガンマ処理部、206は色変換処理部、207は色ガンマ処理部、208は色差信号生成部、209は評価値生成部である。
Next, details of the
画像処理部105における動作について説明する。図1のA/D変換器104から出力された画像信号が、画像処理部105に入力される。画像処理部105に入力された画像信号は、同時化処理部200に入力される。同時化処理部200は、入力されたベイヤーRGBの形式の画像データに対して同時化処理を行い、色信号R,G,Bを生成する。
The operation of the
WB増幅部201は、システム制御部50が算出するホワイトバランスゲイン値に基づき、RGBの色信号にゲインをかけ、ホワイトバランスを調整する。WB増幅部201は、ホワイトバランスが調整されたRGB信号を、リライティング処理部202に入力する。また、WB増幅部201は、ホワイトバランスが調整されたRGB信号を、後述する評価値の生成に用いる輝度信号Y’の生成に用いるR’G’B’信号として、輝度・色信号生成部203に入力する。
Based on the white balance gain value calculated by the
リライティング処理部202は、入力されたRGB信号に対して後述するリライティング処理を施した後に、RGB信号を輝度・色信号生成部203に出力する。輝度・色信号生成部203は、RGB信号から輝度信号Yを生成し、生成した輝度信号Yを輪郭強調処理部204へ、色信号RGBを色変換処理部206へ、それぞれ出力する。また、輝度・色信号生成部203は、WB増幅部201から入力されたR’G’B’信号から輝度信号Y’を生成し、評価値生成部209に入力する。
The relighting
輪郭強調処理部204は、輝度信号Yに対して輪郭強調処理を行い、輝度ガンマ処理部205へ出力する。輝度ガンマ処理部205は、輝度信号Yに対してガンマ補正を行い、輝度信号Yを画像メモリ106に出力する。色変換処理部206は、RGB信号に対するマトリクス演算などにより、所望のカラーバランス変換を行う。色ガンマ処理部207は、RGBの色信号にガンマ補正を行う。色差信号生成部208は、RGB信号から色差信号R-Y、B-Yを生成し、画像メモリ106に出力する。画像メモリ106に出力された画像信号(Y、R-Y、B-Y)は、コーデック部110によって圧縮符号化され、記録媒体112に記録される。
The edge
評価値生成部209は、実際の環境光源の状態を推定するための評価値を生成する。本実施形態における環境光源の状態とは、被写体に対する環境光源の方向及び強度(輝度)である。従って、評価値生成部209は、環境光源の方向及び強度を推定するための評価値を生成して出力する。具体的には、評価値生成部209は、図5に示すように画像を複数のブロックに分割し、ブロック毎の平均輝度値を算出する。評価値生成部209は、算出した評価値をシステムメモリ122に記録する。
The
次に、図3を参照して、リライティング処理部202の構成及び動作について説明する。図3は、リライティング処理部202の構成を示すブロック図である。図3において、301は、仮想光源が被写体に反射した特性(被写体における仮想光源の反射特性)を示す反射特性マップを複数読み込み合成する反射特性マップ合成部である。302は、仮想光源の反射特性マップを被写体に合わせてなじませるフィッティング処理部である。303は、反射特性マップに基づいて被写体に反射した色成分(仮想光源反射成分)を算出する仮想光源反射成分算出部である。304は、入力画像に対して仮想光源反射成分を加算する仮想光源付加処理部である。以下、リライティング処理部202の各部の動作について詳細に説明する。
Next, the configuration and operation of the relighting
反射特性マップ合成部301は、事前に用意した仮想光源の反射特性マップ(詳細は後述)を複数読み込み合成する。この複数の反射特性マップの合成処理において、システム制御部50は、どの反射特性マップを読み込むのかの決定、及び合成パラメータの決定を行う。
The reflection characteristic
図4を参照して、システム制御部50が反射特性マップ合成部301のために実行する合成パラメータ設定処理について説明する。被写体の撮影が行われると、図4のフローチャートの処理が開始する。
Synthesis parameter setting processing executed by the
S401で、システム制御部50は、撮影した被写体の特徴量を取得する。具体的には、システム制御部50は、評価値生成部209(図2)により生成された、画像の各ブロックの平均輝度値を取得する。ブロック分割の例を図5に示す。評価値生成部209は、図5に示すように分割したブロック毎に被写体の平均輝度値を算出し、システム制御部50は、算出された平均輝度値を取得する。
In S401, the
S402で、システム制御部50は、撮影時のストロボ照射情報を取得する。ストロボ照射情報とは、撮影時にストロボ123を発光したか否かを示す情報である。
In S402, the
S403で、システム制御部50は、S401で取得した被写体の特徴量に応じて、リライティングモードを決定する。本実施形態では、リライティングモードとして、(1)斜光補正モード、(2)トップライト補正モード、(3)逆光補正モード、(4)フラット補正モード、の4種類がある場合の例について説明する。最初に、システム制御部50は、撮影された画像において顔検出部113が検出した顔領域の情報を取得する。例えば、システム制御部50は、顔検出部113から、顔領域501(図5(A)~(D)参照)の情報を取得する。次に、システム制御部50は、S401で取得した各ブロックの被写体特徴量のうち、顔領域501に含まれる各ブロックの被写体特徴量を取得する。システム制御部50は、顔領域501における被写体特徴量(輝度)の分布を解析し、分布が図5(A)~(D)のいずれに該当するかを判定する。図5(A)に示すように顔領域501の左右で明暗差がある場合、システム制御部50は斜光補正モードを選択する。図5(B)に示すように顔領域501の上下で明暗差があり、かつ上側が明るい場合、システム制御部50はトップライト補正モードを選択する。図5(C)に示すように顔領域501の中で明暗差が少なく、かつ顔領域501が他の領域よりも暗い場合、システム制御部50は逆光補正モードを選択する。図5(D)に示すように顔領域501の中で明暗差が少なく、かつ顔領域501が十分明るい場合、システム制御部50はフラット補正モードを選択する。なお、図5(A)には顔領域501の左側が明るく右側が暗い状態が示されているが、顔領域501の左側が暗く右側が明るい場合も斜光補正モードが選択される。顔領域501における被写体特徴量(輝度)の分布が上記4つのリライティングモードのいずれにも対応しない場合、システム制御部50は、リライティングによる画像補正を行わないと判定する。
In S403, the
S404で、システム制御部50は、S403で決定したリライティングモードに応じた反射特性マップ(反射特性データ)を選択し、選択した反射特性マップの合成特性を決定する。反射特性マップとは、平均的な顔形状モデルに対して、所定の光源位置からリライティングした結果の反射特性を示した画像である。反射特性マップの例を図6に示す。図6の上段は、光源の位置を左側90度(L90)から、右側90度(R90)まで変化させた反射特性マップを示している。図6の下段は、光源の位置を下側60度(Down60)及び上側60度(Up60)に設定した場合の反射特性マップを示している。このような反射特性マップは、平均的な顔形状モデルに基づき事前に生成しておき、不揮発性メモリ121(図1)に記録しておくものとする。
In S404, the
図7を参照して、リライティングモードと使用する反射特性マップとの関係について説明する。図7の例において、リライティングモードが「斜光補正モード」の場合、被写体の左右を比較して暗い側に対して60度の角度から仮想光源を照射する。また、明るい側に対して60度の角度から光を減光する。図5(A)の例の場合、被写体に向かって右側が暗く、左側が明るい。そのため、右側60度から仮想光源を照射した場合の反射特性マップ(R60)と、左側60度から仮想光源を照射した場合の反射特性マップ(L60)とを、下記の式(1)に従って合成する。
M = α×(R60)-β×(L60) ・・・(1)
ここで、Mは合成後の反射特性マップであり、α及びβは合成の際の係数(合成特性)であって0~1の値を取る。システム制御部50は、顔の所定の基準輝度に対して顔の暗部が暗いほどαを大きく設定し、基準輝度に対して顔の明部が明るいほどβを大きく設定する。βの項はマイナスになっているため減光を示している。合成後の反射特性マップを図8(A)に示す。合成後の反射特性マップ(合成反射特性データ)は、被写体の各位置における反射特性を表現する画像(反射特性画像)のデータ形式を持つ。図8(A)において、基準階調(例えば8ビットの場合は128)よりも明るい部分は加算光、暗い場合は減算光を示している(図8(B)~(D)においても同様)。
The relationship between the relighting mode and the reflection characteristic map to be used will be described with reference to FIG. In the example of FIG. 7, when the relighting mode is the "oblique light correction mode", the left and right sides of the subject are compared, and the dark side is irradiated with the virtual light source at an angle of 60 degrees. It also dims light from an angle of 60 degrees to the bright side. In the example of FIG. 5A, the subject is dark on the right side and bright on the left side. Therefore, the reflection characteristic map (R60) when the virtual light source is irradiated from the right 60 degrees and the reflection characteristic map (L60) when the virtual light source is irradiated from the left 60 degrees are combined according to the following formula (1). .
M = α × (R60) - β × (L60) (1)
Here, M is a reflection characteristic map after synthesis, and α and β are coefficients (synthesis characteristics) at the time of synthesis and take values from 0 to 1. FIG. The
図5(A)とは逆に、被写体に向かって左側が暗く、右側が明るい場合は、式(1)において使用する反射特性マップの左右を反転する。即ち、左側60度から仮想光源を照射した場合の反射特性マップ(L60)と、右側60度から仮想光源を照射した場合の反射特性マップ(R60)とを、下記の式(2)に従って合成する。
M = α×(L60)-β×(R60) ・・・(2)
Contrary to FIG. 5A, when the subject is dark on the left side and bright on the right side, the reflection characteristic map used in equation (1) is left-right reversed. That is, the reflection characteristic map (L60) when the virtual light source is irradiated from the left 60 degrees and the reflection characteristic map (R60) when the virtual light source is irradiated from the right 60 degrees are combined according to the following formula (2). .
M = α × (L60) - β × (R60) (2)
式(2)において、システム制御部50は、顔の所定の基準輝度に対して顔の暗部が暗いほどαを大きく設定し、基準輝度に対して顔の明部が明るいほどβを大きく設定する。
In equation (2), the
次に、リライティングモードが「トップライト補正モード」の場合について説明する。この場合、図5(B)に示すように、被写体の頭部付近が明るく、口から下が暗くなっている。そのため、被写体の上側から減光し、下側から加算光を照射することで顔に当たる光のバランスをとる。即ち、上側60度から仮想光源を照射した場合の反射特性マップ(Up60)と、下側60度から仮想光源を照射した場合の反射特性マップ(Down60)とを、下記の式(3)に従って合成する。
M = α×(Down60)-β×(Up60) ・・・(3)
Next, the case where the relighting mode is the "top light correction mode" will be described. In this case, as shown in FIG. 5B, the area around the subject's head is bright and the area below the mouth is dark. Therefore, by reducing the light from the upper side of the subject and irradiating the additional light from the lower side, the light striking the face is balanced. That is, the reflection characteristic map (Up60) when the virtual light source is irradiated from above 60 degrees and the reflection characteristic map (Down60) when the virtual light source is irradiated from below 60 degrees are synthesized according to the following formula (3). do.
M = α × (Down60) - β × (Up60) (3)
この場合の合成後の反射特性マップを図8(B)に示す。なお、式(3)において、システム制御部50は、顔の所定の基準輝度に対して顔の暗部が暗いほどαを大きく設定し、基準輝度に対して顔の明部が明るいほどβを大きく設定する。
FIG. 8B shows a reflection characteristic map after synthesis in this case. In equation (3), the
リライティングモードが「逆光補正モード」の場合、顔が全体的に暗いため、正面と、正面下方それぞれから加算光の仮想光源を照射する。即ち、正面から仮想光源を照射した場合の反射特性マップ(F0)と、下側60度から仮想光源を照射した場合の反射特性マップ(Down60)とを、下記の式(4)に従って合成する。
M = α×(F0)+β×(Down60) ・・・(4)
When the relighting mode is the "backlight correction mode", the face is dark as a whole, so virtual light sources of added light are emitted from the front and from below the front. That is, the reflection characteristic map (F0) when the virtual light source is irradiated from the front and the reflection characteristic map (Down60) when the virtual light source is irradiated from below 60 degrees are combined according to the following formula (4).
M=α×(F0)+β×(Down60) (4)
この場合の合成後の反射特性マップを図8(C)に示す。なお、式(4)において、システム制御部50は、顔の所定の基準輝度に対して顔領域501が暗いほどα及びβを大きく設定する。
FIG. 8C shows a reflection characteristic map after synthesis in this case. In equation (4), the
リライティングモードが「フラット補正モード」であり、ストロボ発光がない場合、仮想光源を左右どちらか斜め60度から照射する。この場合、反射特性マップの合成は行われず、式(5)に示すようにゲインの調整だけが行われる。
M = α×(L60又はR60) ・・・(5)
When the relighting mode is the "flat correction mode" and there is no strobe light emission, the virtual light source is emitted from either the left or the right at an angle of 60 degrees. In this case, reflection characteristic maps are not synthesized, and only gain adjustment is performed as shown in equation (5).
M=α×(L60 or R60) (5)
なお、式(5)において、システム制御部50は、顔の所定の基準輝度に対して顔領域501が暗いほどαを大きく設定する。
In equation (5), the
リライティングモードが「フラット補正モード」であり、ストロボ発光がある場合、ストロボ光をキャンセルするため、正面からの光を減光し、仮想光源を正面上側から照射する。具体的には、正面から仮想光源を照射した場合の反射特性マップ(F0)と、上側60度から仮想光源を照射した場合の反射特性マップ(Up60)とを、下記の式(6)に従って合成する。
M = α×(Up60)-β×(F0) ・・・(6)
When the relighting mode is the “flat correction mode” and strobe light is emitted, the light from the front is reduced to cancel the strobe light, and the virtual light source is illuminated from the front upper side. Specifically, the reflection characteristic map (F0) when the virtual light source is irradiated from the front and the reflection characteristic map (Up60) when the virtual light source is irradiated from above 60 degrees are combined according to the following formula (6). do.
M = α × (Up60) - β × (F0) (6)
この場合の合成後の反射特性マップを図8(D)に示す。なお、式(6)において、システム制御部50は、顔の所定の基準輝度に対して顔領域501が暗いほどαを大きく設定し、基準輝度に対して顔の明部が明るいほどβを大きく設定する。
FIG. 8D shows a reflection characteristic map after synthesis in this case. In equation (6), the
以上、リライティングモードに応じた反射特性マップの選択と合成特性(係数α及びβの値及び符号)の決定について説明した。 The selection of the reflection characteristic map and the determination of the composite characteristic (the values and signs of the coefficients α and β) according to the relighting mode have been described above.
S405で、システム制御部50は、S404で決定した合成パラメータ(反射特性マップ及び合成特性)を反射特性マップ合成部301に設定する。
In S<b>405 , the
以上、システム制御部50が反射特性マップ合成部301のために実行する合成パラメータ設定処理について説明した。その後、反射特性マップ合成部301は、設定された合成パラメータに基づいて反射特性マップの合成処理を行う。反射特性マップ合成部301は、合成後の反射特性マップを、フィッティング処理部302に出力する。フィッティング処理部302は、撮影画像(Rin、Gin、Bin)を参照して、合成後の反射特性マップに対してフィッティング処理を行う。
The synthesizing parameter setting processing executed by the
図9を参照して、フィッティング処理について説明する。図9(A)は、合成後の反射特性マップを示す。反射特性マップには、目や口の位置に対応した特徴点901~903が予め設定されている。図9(B)は、撮影画像(Rin、Gin、Bin)を示す。まず、フィッティング処理部302は、撮影画像の被写体の特徴点(目や口など)の位置904~906を基準に、反射特性マップを幾何変形(幾何学変換)する。具体的には、フィッティング処理部302は、顔検出部113(図1)から、撮影画像の被写体の特徴点(目や口など)の座標位置を取得する。そして、フィッティング処理部302は、特徴点901~903と位置904~906との位置関係が整合するように、反射特性マップに対して拡大、縮小、及び回転を行う。これにより、反射特性マップの平均的な顔形状モデル(所定の被写体)と撮影画像に含まれる被写体との形状の相違を補償することができる。
The fitting process will be described with reference to FIG. FIG. 9A shows a reflection characteristic map after synthesis. Feature points 901 to 903 corresponding to the positions of the eyes and mouth are preset in the reflection characteristic map. FIG. 9B shows captured images (Rin, Gin, Bin). First, the
次に、フィッティング処理部302は、撮影画像を参照画像として用いて、反射特性マップに対してジョイントバイラテラルフィルタを適用する。これにより、参照画像のエッジを保存した状態で反射特性マップに平滑化処理を適用することが可能である。ジョイントバイラテラルフィルタを適用した結果を図9(C)に示す。フィッティング処理部302は、ジョイントバイラテラルフィルタの適用により得られた反射特性マップMfを、仮想光源反射成分算出部303に出力する。
Next, the
なお、リライティングモードが「フラット補正モード」であり、ストロボ発光がない場合のように、複数の反射特性マップを合成する合成処理が行われない場合がある。この場合、上記の式(5)に示すように、反射特性マップ合成部301は、選択された反射特性マップに対して係数を乗じることにより得られる反射特性マップを、フィッティング処理部302に出力する。そして、フィッティング処理部302は、合成処理が行われた場合と同様に、反射特性マップ合成部301から出力された反射特性マップに対して、上で説明したフィッティング処理を行う。
As in the case where the relighting mode is the "flat correction mode" and there is no strobe light emission, there is a case where the synthesis processing for synthesizing a plurality of reflection characteristic maps is not performed. In this case, as shown in the above equation (5), the reflection characteristic
仮想光源反射成分算出部303は、式(7)に従い、撮影画像(Rin、Gin、Bin)に対してフィッティング処理後の反射特性マップMfを乗算する。これにより、仮想光源による被写体の反射色成分(Ra、Ga、Ba)が算出される。
Ra = Mf×Rin
Ga = Mf×Gin ・・・(7)
Ba = Mf×Bin
The virtual light source reflection
Ra = Mf x Rin
Ga=Mf×Gin (7)
Ba = Mf x Bin
仮想光源反射成分算出部303は、算出した仮想光源による被写体の反射成分(Ra、Ga、Ba)を仮想光源付加処理部304へ出力する。
The virtual light source reflection
仮想光源付加処理部304は、式(8)に従い、被写体領域に対して仮想光源の反射成分(Ra、Ga、Ba)を付加する。
Rout = Rin+Ra
Gout = Gin+Ga ・・・(8)
Bout = Bin+Ba
The virtual light source
Rout = Rin + Ra
Gout=Gin+Ga (8)
Bout = Bin + Ba
以上説明したように、第1の実施形態によれば、デジタルカメラ100は、複数の反射特性マップを合成し、合成後の反射特性マップが示す反射特性に基づいて画像に含まれる被写体の反射成分を生成し、生成した反射成分を画像に対して付加する。これにより、複数の仮想光源を用いるリライティングの処理負荷を軽減することが可能となる。
As described above, according to the first embodiment, the
なお、本実施形態では、デジタルカメラ100が反射特性マップを左右方向で5段階、上下方向で2段階持っている場合を例に説明を行ったが、反射特性マップの持ち方はこれに限定されない。例えば、デジタルカメラ100は、上下左右それぞれ10段階など、より多くのパターンの反射特性マップを保持していてもよい。また、例えば左側60度と右側60度のように左右対称の反射特性マップのペアについては、いずれか一方のみを用意しておき、デジタルカメラ100が被写体の状態に応じて反射特性マップを左右反転して利用してもよい。
In the present embodiment, the case where the
また、本実施形態では、反射特性マップの合成演算として、加算及び減算の例について説明したが、反射特性マップを合成する際の演算は、加算及び減算に限定されない。例えば、合成演算は、乗算又は除算を含んでもよいし、RGB色成分の割合を変化させて合成するような色変換処理を含んでもよい。 Further, in the present embodiment, examples of addition and subtraction have been described as reflection characteristic map synthesizing operations, but operations for synthesizing reflection characteristic maps are not limited to addition and subtraction. For example, the compositing operation may include multiplication or division, or may include color conversion processing such as compositing by changing the ratio of RGB color components.
また、本実施形態では、リライティングモードとして「斜光補正モード」、「トップライト補正モード」、「逆光補正モード」、及び「フラット補正モード」の4つのモードがある場合について説明した。しかし、リライティングモードはこれら4つのモードに限定されない。リライティングモードに応じて反射特性マップの合成パラメータを決定する構成であれば、どのようなモードを用意してもよい。 Also, in the present embodiment, a case where there are four relighting modes, namely, the "oblique light correction mode", the "top light correction mode", the "backlight correction mode", and the "flat correction mode", has been described. However, relighting modes are not limited to these four modes. Any mode may be prepared as long as the composition parameter of the reflection characteristic map is determined according to the relighting mode.
また、本実施形態では、被写体の輝度分布に応じてリライティングモードを決定する構成について説明したが、リライティングモードの決定はこれ以外の方法で行ってもよい。例えば、ユーザ指示に従ってリライティングモードを決定(選択)する構成を取ることも可能である。 Also, in this embodiment, the configuration for determining the relighting mode according to the luminance distribution of the subject has been described, but the relighting mode may be determined by other methods. For example, it is possible to adopt a configuration in which a relighting mode is determined (selected) according to a user instruction.
また、本実施形態では、2つの反射特性マップを合成する場合を例に説明したが、複数の反射特性マップを合成する構成であれば、いくつの反射特性マップを合成しても構わない。例えば、3灯照明を再現するために3つの反射特性マップを合成するなどの構成を取ることも可能である。 Further, in the present embodiment, the case of synthesizing two reflection characteristic maps has been described as an example, but any number of reflection characteristic maps may be synthesized as long as they are configured to synthesize a plurality of reflection characteristic maps. For example, it is possible to synthesize three reflection characteristic maps in order to reproduce three-lamp illumination.
[第2の実施形態]
第1の実施形態では、撮影時に被写体の状況に応じてリライティングモードを選択し、リライティングモードに応じて反射特性マップの合成パラメータを制御する構成について説明した。第2の実施形態では、記録媒体112に一度記録したRAW画像を現像する際に、ユーザ指示に応じた仮想光源によるリライティングを行う構成について説明する。第2の実施形態において、デジタルカメラ100の基本的な構成は第1の実施形態と同様である(図1乃至図3参照)。以下、主に第1の実施形態と異なる点について説明する。
[Second embodiment]
In the first embodiment, a configuration has been described in which the relighting mode is selected according to the condition of the subject during shooting, and the composition parameter of the reflection characteristic map is controlled according to the relighting mode. In the second embodiment, a configuration will be described in which relighting is performed using a virtual light source according to a user instruction when developing a RAW image once recorded on the
デジタルカメラ100は、撮像部103で撮影した撮影画像をすぐに画像処理部105で現像処理するのではなく、記録媒体112にRAW画像を一旦記録する。その後、ユーザの操作によって画像が選択されると、デジタルカメラ100は記録媒体112からRAW画像を読み出し、画像処理部105により画像処理を行う。
The
本実施形態では、図3の反射特性マップ合成部301に設定する反射特性マップの合成パラメータの決定方法が第1の実施形態と異なる。図10を参照して、合成パラメータの決定方法について説明する。
This embodiment differs from the first embodiment in the method of determining synthesis parameters for reflection characteristic maps set in the reflection characteristic
図10は、第2の実施形態に係る、システム制御部50が反射特性マップ合成部301のために実行する合成パラメータ設定処理のフローチャートである。ユーザにより現像対象画像(リライティング対象の画像)が選択されると、本フローチャートの処理が開始する。
FIG. 10 is a flowchart of synthesis parameter setting processing executed by the
S1001で、システム制御部50は、リライティングする仮想光源の照射角度を決定する。照射角度はユーザ操作に従って決定される。仮想光源を設置するユーザ操作のためのユーザインタフェースの例を図11に示す。
In S1001, the
図11において、1101はカメラ筐体、1102は操作部、1103は表示部を示している。操作部1102は、図1の操作部120に含まれる。表示部1103は、図1の表示部109に含まれる。リライティング対象の画像がユーザによって選択されると、システム制御部50は、表示部1103に選択された画像を表示する。1104~1106は、設定された仮想光源の位置を示している。デジタルカメラ100は、この仮想光源の位置と方向に基づいてリライティング処理を行う。仮想光源の位置は、ユーザによるタッチ操作によって決定される。1104~1106に示すように、ユーザは任意の位置に複数の仮想光源を設置することが可能である。光源の位置が決定されると、システム制御部50は、設定された仮想光源の位置から主被写体の中心方向に仮想光源を照射するように照射角度を決定する。仮想光源は複数設置可能であり、図11では3灯の仮想光源1104、1105、1106が設置された場合を示している。システム制御部50は、仮想光源の照射角度を決定した後、設置した複数の仮想光源毎に、S1002~S1007の処理を実行する。
In FIG. 11, 1101 denotes a camera casing, 1102 denotes an operation section, and 1103 denotes a display section. An
S1002で、システム制御部50は、照射角度に対応する反射特性マップが不揮発性メモリ121に記録されているか否かを判定する。本実施形態では、第1の実施形態と同様に、図6に示す7種類の反射特性マップが不揮発性メモリ121に記録されているものとする。図11の例では、仮想光源1104は被写体の正面にあり、図6の「F0」が照射角度に対応する。仮想光源1106は被写体の左側90度の位置にあり、図6の「L90」が照射角度に対応する。仮想光源1104、1106の例では、対応する反射特性マップが存在するので、処理はS1003に進む。一方、仮想光源1105は、被写体の左側75度から照射している。この照射角度に対応する反射特性マップは存在しないため、処理はS1004に進む。
In S<b>1002 , the
S1003で、システム制御部50は、仮想光源の照射角度に対応する反射特性マップを選択する。図11の例では、仮想光源1104に対しては図6の「F0」、仮想光源1106に対しては図6の「L90」が選択される。
In S1003, the
S1004で、システム制御部50は、仮想光源の照射角度に最も近い反射特性マップを2つ(決定した照射角度よりも大きいものと小さいもの)選択する。図11の例では、仮想光源1105は、左側75度の照射角度を持つため、左側75度に近い、左側90度(L90)と左側60度(L60)の2つの反射特性マップが選択される。
In S1004, the
S1005で、システム制御部50は、選択した2つの反射特性マップを合成する合成比率を決定する。仮想光源1105の場合、左側75度は左側90度と左側60度の中間の角度であるため、左側90度の反射特性マップ(L90)と左側60度の反射特性マップ(L60)とを1対1の比率で合成する。即ち、式(9)に従って反射特性マップの合成処理を行うことにより、近似的に左側75度から照射した反射特性マップを生成することができる。
M = 0.5×(L90)+0.5×(L60) ・・・(9)
In S1005, the
M = 0.5 x (L90) + 0.5 x (L60) (9)
S1006で、システム制御部50は、合成パラメータ(反射特性マップ及び合成比率)を反射特性マップ合成部301に設定する。
In S<b>1006 , the
S1007で、システム制御部50は、全ての仮想光源の処理が完了したか否かを判定する。図11の例では仮想光源を3つ設定しているため、システム制御部50は、3つの仮想光源に関してS1002~S1006の処理が完了したか否かを判定する。全ての仮想光源の処理が完了した場合、処理はS1008に進み、そうでない場合、処理はS1002に戻る。
In S1007, the
S1008で、システム制御部50は、選択又は生成した全ての仮想光源の反射特性マップを加算合成するように反射特性マップ合成部301を設定する。図11の例では、システム制御部50は、仮想光源1104~1106に対応する3つの反射特性マップを合成し、1つの合成反射特性マップを生成するように、反射特性マップ合成部301を設定する。
In S1008, the
以上、システム制御部50が反射特性マップ合成部301のために実行する合成パラメータ設定処理について説明した。その後、反射特性マップ合成部301は、設定された合成パラメータに基づいて反射特性マップの合成処理を行う。以後の処理は、第1の実施形態と同様である。
The synthesizing parameter setting processing executed by the
以上説明したように、第2の実施形態によれば、デジタルカメラ100は、リライティング処理を行う際に、ユーザ操作に従って仮想光源の照射角度を決定する。そして、デジタルカメラ100は、予め用意した反射特性マップを合成することにより、決定した照射角度に対応する反射特性マップを生成する。これにより、比較的少ない処理負荷で所望の照射角度の反射特性マップを生成することが可能となる。
As described above, according to the second embodiment, the
なお、本実施形態では、予め保持していた反射特性マップを合成することで最終的な反射特性マップを生成した。しかし、予め保持していた反射特性マップ以外に、撮影時に取得した被写体の形状から算出した反射特性マップを併せて利用する構成を取ることも可能である。この場合、デジタルカメラ100は、被写体の形状を取得し、形状に基づき反射特性マップを生成する。また、デジタルカメラ100は、予め保持していた反射特性マップと、被写体の形状に基づく反射特性マップとを選択的に利用するように構成されていてもよい。具体的には、デジタルカメラ100は、測距センサ124から取得した距離情報から法線を算出し、法線と仮想光源の位置・方向・反射率などに基づき反射特性マップを生成する。測距センサ124を用いて生成された反射特性マップは、精度は高くなるが、生成するための時間はかかってしまう。そこで、プレビューなど速度を重視する場合は事前に用意していた反射特性マップを合成して利用し、最終的な画像など精度を重視する場合は測距センサ124を用いて生成した反射特性マップを利用する方法を取ることも可能である。
Note that in the present embodiment, the final reflection characteristic map is generated by synthesizing reflection characteristic maps stored in advance. However, it is also possible to employ a configuration in which a reflection characteristic map calculated from the shape of the subject acquired at the time of photographing is also used in addition to the previously stored reflection characteristic map. In this case, the
また、被写体距離が離れすぎて距離情報を取得できない場合や、顔が小さい、暗すぎる、明るすぎるなどの理由により法線の精度が悪化するような条件の場合がある。このような場合、精度を優先する場合であっても、事前に用意していた反射特性マップに切り替えて利用する構成を取ることも可能である。 In addition, there are cases where the distance information cannot be obtained because the subject is too far away, or where the accuracy of the normal line deteriorates due to reasons such as the face being too small, too dark, or too bright. In such a case, even if the accuracy is given priority, it is possible to switch to a previously prepared reflection characteristic map and use it.
[第3の実施形態]
以下、図12及び図13を参照して、第3の実施形態について説明する。本実施形態では、被写体に応じてカメラ内で複数の反射特性マップを生成し、合成する例について説明する。さらに本実施形態では、拡散反射特性マップと鏡面反射特性マップという、異なる性格を有する2つのマップを生成し合成する。
[Third Embodiment]
The third embodiment will be described below with reference to FIGS. 12 and 13. FIG. In this embodiment, an example will be described in which a plurality of reflection characteristic maps are generated in the camera according to the subject and synthesized. Furthermore, in this embodiment, two maps having different characteristics, a diffuse reflection characteristic map and a specular reflection characteristic map, are generated and synthesized.
本実施形態における、デジタルカメラ100の全体構成は第1の実施形態(図1~図2)で説明したものと同様であるため、説明は省略する。本実施形態では、リライティング処理部202の構成が第1及び第2の実施形態と異なる。以下、主に第1及び第2の実施形態と異なる点について説明する。
Since the overall configuration of the
本実施形態におけるリライティング処理部202の構成を図12に示す。図12において、1201は法線を算出する法線算出部、1202は、法線情報と仮想光源の方向情報に基づき、仮想光源の反射特性マップを生成する反射特性マップ生成部である。1203は複数の反射特性マップを合成する反射特性マップ合成部、1204は合成した反射特性マップに基づき仮想光源の反射成分を算出する仮想光源反射成分算出部である。
FIG. 12 shows the configuration of the relighting
上記の構成のリライティング処理部202の動作について説明する。法線算出部1201は、測距センサ124(図1)から取得した被写体距離情報から法線マップを算出する。被写体距離情報とは、撮影画像の画素単位で得られる2次元の距離情報のことである。被写体距離情報から法線マップを生成する方法に関しては、公知のどのような技術を用いてもよいものとする。
The operation of the
反射特性マップ生成部1202は、被写体に対して仮想光源を設置し、法線と仮想光源の向きの関係から被写体の拡散反射特性マップDおよび、鏡面反射マップSを算出する。
The reflection characteristic
拡散反射マップDは、図13に示すように被写体中の着目画素Pにおける被写体の法線ベクトルをN、着目画素Pから仮想光源の方向ベクトルをL、仮想光源と被写体(着目画素)の距離をKとすると下記の式で計算される。ただし、ベクトルLおよびNは正規化されているものとする。
Di=(L・N)/K2
The diffuse reflection map D, as shown in FIG. 13, has N as the normal vector of the subject at the pixel of interest P in the subject, L as the directional vector of the virtual light source from the pixel of interest P, and the distance between the virtual light source and the subject (pixel of interest) as K is calculated by the following formula. However, vectors L and N are assumed to be normalized.
D i =(L·N)/K 2
拡散反射を付与する仮想光源は複数個設置することができ、Diはi番目の仮想光源に対応した拡散反射特性マップであることを示す。上記の式の演算により、法線ベクトルNの方向と仮想光源の方向ベクトルLの方向が近く、被写体と仮想光源の距離Kが近いほど、拡散反射成分は大きくなる。 A plurality of virtual light sources that impart diffuse reflection can be installed, and Di indicates a diffuse reflection characteristic map corresponding to the i-th virtual light source. According to the calculation of the above formula, the closer the direction of the normal vector N and the direction of the virtual light source direction vector L is, and the closer the distance K between the subject and the virtual light source is, the larger the diffuse reflection component is.
また、鏡面反射マップSは、図13に示すように鏡面反射の方向ベクトルをR、被写体位置(着目画素P)からカメラの方向ベクトル(視線の方向)をVとすると、下記の式で計算される。すなわち、鏡面反射成分は、カメラの方向が鏡面反射の方向と近いほど大きくなる。
Sj=(R・V)m
As shown in FIG. 13, the specular reflection map S is calculated by the following formula, where R is the direction vector of the specular reflection, and V is the direction vector (direction of line of sight) from the subject position (pixel of interest P) to the camera. be. That is, the specular reflection component increases as the direction of the camera approaches the direction of the specular reflection.
S j = (R·V) m
鏡面反射の方向ベクトルRの算出には、提案されている既知のどのような算出方法を用いても良い。ここでは、仮想光源の位置から被写体位置(着目画素P)のベクトルを入射角とした場合に、反射面に対して入射角と同じ角度で反射した場合のベクトルを鏡面反射の方向ベクトルRとする。また、mは、鏡面反射した光の広がり具合を示す輝き係数であり、この値が大きくなると鏡面反射が急峻になる。 Any known proposed calculation method may be used to calculate the direction vector R of the specular reflection. Here, when the angle of incidence is a vector from the position of the virtual light source to the position of the object (pixel of interest P), the direction vector R of the specular reflection is the vector when the light is reflected on the reflecting surface at the same angle as the angle of incidence. . Also, m is a brilliance coefficient that indicates the degree of spread of specularly reflected light, and the larger this value, the sharper the specular reflection.
鏡面反射を付与する仮想光源は複数個設置することができ、Siはj番目の仮想光源に対応した鏡面反射特性マップであることを示す。 A plurality of virtual light sources that impart specular reflection can be installed, and Si indicates a specular reflection characteristic map corresponding to the j-th virtual light source.
反射特性マップ生成部1202は、評価値生成部209(図2)で取得した被写体評価値に基づき、拡散反射および鏡面反射を付与する仮想光源を複数個設置する。例えば、図5Aに示すように被写体の左右の明るさが異なる斜光の場合は、被写体に対して左から光を照射する仮想光源と、右から照射する仮想光源を設置する。図5Bのように被写体の上下で明るさが異なる場合は、被写体に対して上から光を照射する仮想光源と、下から照射する仮想光源を設置する。
Reflection characteristic
上記のように、反射特性マップ生成部1202は、設置した複数の位置の仮想光源に対する拡散反射マップDと鏡面反射マップSを算出し、反射特性マップ合成部1203に出力する。
As described above, the reflection characteristic
反射特性マップ合成部1203は、下記の式に基づき、入力された複数の拡散反射マップDと鏡面反射マップSについて被写体の陰影状態に応じた比率で加減算を行い、最終的な反射特性マップMを生成する。
M=Σi(αi×Di)+Σj(βj×Sj)
Reflection characteristic
M=Σ i (α i ×D i )+Σ j (β j ×S j )
ここで、αおよびβは、加減算の重みであり負の値も取ることが可能である。αもしくはβを負値に設定することで、特定の仮想光源を減算光にすることが可能である。 Here, α and β are weights for addition and subtraction and can take negative values. By setting α or β to a negative value, it is possible to make a particular virtual light source the subtractive light.
例えば、図5Aに示す被写体のように被写体に向かって左側が明るく、右側が暗い斜光シーンの場合、左側から被写体に向かって照射する仮想光源のαもしくはβ値を負の値にして減光にする。また右側から照射する仮想光源のα値を大きくして暗部に対して強い拡散光を当てるようにする。このように複数の拡散反射マップおよび鏡面反射マップの合成比率を制御することで、被写体の状態に応じた反射特性マップMが生成される。生成された反射特性マップMは、仮想光源反射成分算出部1204に出力される。
For example, in the case of an oblique light scene where the subject is bright on the left side and dark on the right side, such as the subject shown in FIG. do. Also, the α value of the virtual light source that illuminates from the right side is increased to illuminate the dark area with strong diffused light. By controlling the composition ratio of a plurality of diffuse reflection maps and specular reflection maps in this way, a reflection characteristic map M corresponding to the state of the subject is generated. The generated reflection characteristic map M is output to the virtual light source
仮想光源反射成分算出部1204は、撮影画像(Rin、Gin、Bin)に対して、反射特性マップMを乗算する。これにより、仮想光源による被写体の反射色成分(Ra、Ga、Ba)を算出する。式では下記の通りとなる。
Ra = M × Rin
Ra = M × Gin
Ra = M × Bin
The virtual light source
Ra = M x Rin
Ra = M x Gin
Ra = M x Bin
上記のように算出した仮想光源による反射成分(Ra、Ga、Ba)は仮想光源付加処理部304へ出力される。仮想光源付加処理部304の処理は第1の実施形態と同様であるためここでの説明は省略する。
The reflection components (Ra, Ga, Ba) by the virtual light source calculated as described above are output to the virtual light source
以上説明した通り、第3の実施形態によれば、デジタルカメラ100は、リライティング処理を行う場合に、設定した複数の光源に対応する反射特性マップ生成する。そして、デジタルカメラ100は、生成した複数の反射特性マップを重み付きで合成することで、所望の反射特性マップを得る。これにより、複数の仮想光源個々に対応した反射色成分の演算を行うことなく高速な処理が可能となる。
As described above, according to the third embodiment, the
なお、上の説明では、拡散反射マップDと鏡面反射マップSをすべて合成して最終的な反射特性マップMを計算するものとしたが、拡散反射マップ、鏡面反射マップそれぞれの合成マップを生成し、最終的な反射色成分を計算する構成をとることも可能である。 In the above description, the diffuse reflection map D and the specular reflection map S are combined to calculate the final reflection characteristic map M. , to calculate the final reflected color component.
[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other embodiments]
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by processing to It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.
50…システム制御部、100…デジタルカメラ、105…画像処理部、202…リライティング処理部、301…反射特性マップ合成部、302…フィッティング処理部、303…仮想光源反射成分算出部、304…仮想光源付加処理部
50
Claims (13)
前記合成処理により得られた前記合成反射特性データが示す反射特性に基づいて、前記入力画像に含まれる被写体における反射成分を生成する生成手段と、
前記入力画像に対して、前記生成手段により生成された前記反射成分を付加する付加手段と、
を備えることを特徴とする画像処理装置。 Before adding the effect of the virtual light source to the input image, first reflection characteristic data indicating the reflection characteristic of a first virtual light source in a predetermined subject included in the input image, and a second virtual light source in the predetermined subject. Synthesizing means for acquiring synthetic reflection characteristic data by performing synthesis processing for synthesizing second reflection characteristic data indicating reflection characteristics of a light source;
generating means for generating a reflection component of a subject included in the input image based on the reflection characteristic indicated by the synthetic reflection characteristic data obtained by the synthesis processing;
adding means for adding the reflection component generated by the generating means to the input image;
An image processing device comprising:
ことを特徴とする請求項1に記載の画像処理装置。 2. The image processing apparatus according to claim 1, wherein said synthesizing means selects said first reflection characteristic data and said second reflection characteristic data from a plurality of reflection characteristic data.
前記合成手段は、前記補正モードに基づいて前記第1の反射特性データ及び前記第2の反射特性データを選択する
ことを特徴とする請求項2に記載の画像処理装置。 Further comprising determining means for determining the correction mode,
3. The image processing apparatus according to claim 2, wherein said synthesizing means selects said first reflection characteristic data and said second reflection characteristic data based on said correction mode.
ことを特徴とする請求項3に記載の画像処理装置。 4. The image processing apparatus according to claim 3, wherein said determining means determines said correction mode based on the luminance of said subject included in said input image.
ことを特徴とする請求項2に記載の画像処理装置。 3. The image processing apparatus according to claim 2, wherein said synthesizing means selects said first reflection characteristic data and said second reflection characteristic data according to a user instruction.
ことを特徴とする請求項1乃至5のいずれか1項に記載の画像処理装置。 6. The method according to any one of claims 1 to 5, wherein said synthesizing means multiplies said first reflection characteristic data by a first coefficient and multiplies said second reflection characteristic data by a second coefficient in said synthesizing process. The image processing device according to any one of items 1 and 2.
ことを特徴とする請求項6に記載の画像処理装置。 7. The image processing apparatus according to claim 6, wherein said synthesizing means determines said first coefficient and said second coefficient based on luminance of said subject included in said input image.
前記生成手段は、前記補正がなされた前記合成反射特性データに基づいて前記反射成分を生成する
ことを特徴とする請求項1乃至7のいずれか1項に記載の画像処理装置。 further comprising correction means for correcting the synthetic reflection characteristic data so as to compensate for a difference in shape between the predetermined subject and the subject included in the input image;
The image processing apparatus according to any one of claims 1 to 7, wherein the generating means generates the reflection component based on the corrected combined reflection characteristic data.
前記補正手段は、前記所定の被写体と前記入力画像に含まれる前記被写体との形状の相違を補償するように、前記反射特性画像を幾何学変換する
ことを特徴とする請求項8に記載の画像処理装置。 The synthetic reflection characteristic data includes a reflection characteristic image representing the reflection characteristic at each position of the predetermined subject,
9. The image according to claim 8, wherein said correction means geometrically transforms said reflection characteristic image so as to compensate for a difference in shape between said predetermined subject and said subject included in said input image. processing equipment.
ことを特徴とする請求項9に記載の画像処理装置。 10. The image processing apparatus according to claim 9, wherein said correction means further performs smoothing processing on said reflection characteristic image based on said input image.
前記入力画像を生成する撮像手段と、
を備えることを特徴とする撮像装置。 an image processing apparatus according to any one of claims 1 to 10;
imaging means for generating the input image;
An imaging device comprising:
入力画像に仮想光源の効果を付加する前に、前記入力画像に含まれる所定の被写体における第1の仮想光源の反射特性を示す第1の反射特性データと、前記所定の被写体における第2の仮想光源の反射特性を示す第2の反射特性データとを合成する合成処理を行うことにより、合成反射特性データを取得する合成工程と、
前記合成処理により得られた前記合成反射特性データが示す反射特性に基づいて、前記入力画像に含まれる被写体における反射成分を生成する生成工程と、
前記入力画像に対して、前記生成工程により生成された前記反射成分を付加する付加工程と、
を備えることを特徴とする画像処理方法。 An image processing method executed by an image processing device,
Before adding the effect of the virtual light source to the input image, first reflection characteristic data indicating the reflection characteristic of a first virtual light source in a predetermined subject included in the input image, and a second virtual light source in the predetermined subject. a synthesizing step of acquiring synthetic reflection characteristic data by performing a synthesis process of synthesizing second reflection characteristic data indicating reflection characteristics of a light source;
a generation step of generating reflection components of a subject included in the input image based on the reflection characteristics indicated by the synthetic reflection characteristic data obtained by the synthesis process;
an adding step of adding the reflection component generated by the generating step to the input image;
An image processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16/170,203 US11037279B2 (en) | 2017-10-31 | 2018-10-25 | Image processing apparatus, image capturing apparatus, image processing method, and storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017211209 | 2017-10-31 | ||
JP2017211209 | 2017-10-31 |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2019083008A JP2019083008A (en) | 2019-05-30 |
JP2019083008A5 JP2019083008A5 (en) | 2021-11-25 |
JP7169841B2 true JP7169841B2 (en) | 2022-11-11 |
Family
ID=66670459
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018197847A Active JP7169841B2 (en) | 2017-10-31 | 2018-10-19 | IMAGE PROCESSING DEVICE, IMAGING DEVICE, IMAGE PROCESSING METHOD, AND PROGRAM |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7169841B2 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015166684A1 (en) | 2014-04-30 | 2015-11-05 | ソニー株式会社 | Image processing apparatus and image processing method |
JP2016213718A (en) | 2015-05-11 | 2016-12-15 | キヤノン株式会社 | Image processing apparatus, image processing method, program, and storage medium |
JP2017147658A (en) | 2016-02-18 | 2017-08-24 | キヤノン株式会社 | Image processing apparatus, imaging apparatus, control method, and program |
-
2018
- 2018-10-19 JP JP2018197847A patent/JP7169841B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015166684A1 (en) | 2014-04-30 | 2015-11-05 | ソニー株式会社 | Image processing apparatus and image processing method |
JP2016213718A (en) | 2015-05-11 | 2016-12-15 | キヤノン株式会社 | Image processing apparatus, image processing method, program, and storage medium |
JP2017147658A (en) | 2016-02-18 | 2017-08-24 | キヤノン株式会社 | Image processing apparatus, imaging apparatus, control method, and program |
Non-Patent Citations (2)
Title |
---|
宮木 一,Phtometric Image-Based Renderingにおける拡散反射と鏡面反射の生成,電子情報通信学会技術研究報告 Vol.99 No.710 IEICE Technical Report,第99巻 第710号,日本,社団法人電子情報通信学会,2000年,81~88 |
池田 拓也,RGB-Dカメラを用いた動的光源環境へのリライティング Relighting with Dynamic Light Environments Using an RGB-D Camera,電子情報通信学会技術研究報告 Vol.113 No.403 IEICE Technical Report,第113巻 第403号,日本,一般社団法人電子情報通信学会,2014年,219~224 |
Also Published As
Publication number | Publication date |
---|---|
JP2019083008A (en) | 2019-05-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11503219B2 (en) | Image processing apparatus, image capture apparatus, and control method for adding an effect of a virtual light source to a subject | |
RU2528590C2 (en) | Image capturing device, method of controlling same and storage medium | |
JP5761946B2 (en) | Image processing apparatus, image processing method, and storage medium | |
JP5665436B2 (en) | Image processing apparatus, image processing method, and program | |
JP5743696B2 (en) | Image processing apparatus, image processing method, and program | |
JP6381404B2 (en) | Image processing apparatus and method, and imaging apparatus | |
JP2016213718A (en) | Image processing apparatus, image processing method, program, and storage medium | |
US11115637B2 (en) | Image processing apparatus, image capturing apparatus, image processing method, and storage medium | |
JP6425571B2 (en) | IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM | |
JP7114335B2 (en) | IMAGE PROCESSING DEVICE, CONTROL METHOD FOR IMAGE PROCESSING DEVICE, AND PROGRAM | |
JP7059076B2 (en) | Image processing device, its control method, program, recording medium | |
US11037279B2 (en) | Image processing apparatus, image capturing apparatus, image processing method, and storage medium | |
JP2017147568A (en) | Image processing apparatus, imaging apparatus, control method, and program | |
JP2017152866A (en) | Image processing system and image processing method | |
JP7277158B2 (en) | Setting device and method, program, storage medium | |
JP7199849B2 (en) | Image processing device, image processing method, and program | |
JP7169841B2 (en) | IMAGE PROCESSING DEVICE, IMAGING DEVICE, IMAGE PROCESSING METHOD, AND PROGRAM | |
JP5854716B2 (en) | Image processing apparatus, image processing method, and program | |
JP2019004290A (en) | Image processing apparatus, imaging apparatus, image processing method and program | |
JP7462464B2 (en) | Image processing device and method, program, and storage medium | |
JP7102192B2 (en) | Image processing device, its control method, program | |
JP7356255B2 (en) | Image processing device and its processing method, imaging device, program, storage medium | |
JP2020024581A (en) | Image processing apparatus, image processing method, and program | |
JP2021175036A (en) | Image processing apparatus and method, program, and storage medium | |
JP6021885B2 (en) | Image processing apparatus, image processing method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20210103 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210113 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211015 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20211015 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220922 |
|
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: 20220930 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20221031 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7169841 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |