JP7311995B2 - IMAGE PROCESSING APPARATUS AND IMAGE PROCESSING METHOD, PROGRAM, STORAGE MEDIUM - Google Patents
IMAGE PROCESSING APPARATUS AND IMAGE PROCESSING METHOD, PROGRAM, STORAGE MEDIUM Download PDFInfo
- Publication number
- JP7311995B2 JP7311995B2 JP2019061357A JP2019061357A JP7311995B2 JP 7311995 B2 JP7311995 B2 JP 7311995B2 JP 2019061357 A JP2019061357 A JP 2019061357A JP 2019061357 A JP2019061357 A JP 2019061357A JP 7311995 B2 JP7311995 B2 JP 7311995B2
- Authority
- JP
- Japan
- Prior art keywords
- information
- color
- image processing
- subject
- light source
- 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
Landscapes
- Image Processing (AREA)
- Processing Of Color Television Signals (AREA)
- Image Analysis (AREA)
Description
本発明は、入力された画像に、仮想的な光源の影響を反映させる画像処理装置に関するものである。 The present invention relates to an image processing apparatus that reflects the influence of a virtual light source on an input image.
従来より、撮影後の画像中の被写体に対して、仮想的な光源からの光を照射し、リライティングを行う技術が知られている。これにより、ユーザーは、画像中の被写体に任意の陰影の付与、ならびに仮想光源色の付与を行うことができる。 2. Description of the Related Art Conventionally, there has been known a technique of performing relighting by irradiating light from a virtual light source to a subject in an image after photographing. This allows the user to add arbitrary shadows and virtual light source colors to the subject in the image.
例えば、特許文献1では、被写体の陰影情報を解析し、あらかじめ定めた目標条件を満たすように、照射する仮想光源の向きを定めている。これにより、ユーザーが直接仮想光源の向きを指定することなく、自動的にあらかじめ定めた条件に合う陰影を持つ被写体の画像を得ることができる。 For example, in Patent Document 1, shadow information of a subject is analyzed, and the direction of a virtual light source for irradiation is determined so as to satisfy a predetermined target condition. This makes it possible to automatically obtain an image of a subject having shadows that match predetermined conditions without the user having to directly specify the direction of the virtual light source.
しかしながら、特許文献1に記載のリライティング手法では、予め定められた光源色の仮想光源を照射することしかできなかった。例えば撮影した画像中の被写体に、複数の、それぞれ色の異なる光源から光が照射されている場合、被写体は複数の色が混ざり合った状態になり、その中の特定の色の光源から照射された光によって被写体の印象が悪くなることがある。このような例のように、被写体の領域ごとに色味が異なる場合に、特許文献1に記載の技術では対応することができない。 However, in the relighting method described in Patent Document 1, only a virtual light source with a predetermined light source color can be applied. For example, if a subject in a photographed image is illuminated by multiple light sources of different colors, the subject will be in a state where multiple colors are mixed, and the subject will be illuminated by a light source of a specific color. The bright light may give a bad impression of the subject. As in such an example, the technique described in Japanese Patent Application Laid-Open No. 2002-200013 cannot handle the case where the color tone differs for each area of the subject.
本発明は上述した課題に鑑みてなされたものであり、その目的は、例えば色の異なる複数の環境光源下で撮影された被写体を、好ましい印象に補正することができる画像処理装置を提供することである。 SUMMARY OF THE INVENTION The present invention has been made in view of the problems described above, and its object is to provide an image processing apparatus capable of correcting a subject photographed under a plurality of environmental light sources having different colors so as to have a favorable impression. is.
本発明に係わる画像処理装置は、入力画像から被写体を選択する選択手段と、選択した前記被写体の色情報を取得する色情報取得手段と、選択した前記被写体の立体形状情報を取得する形状情報取得手段と、選択した前記被写体について目標とする色情報を取得する目標色取得手段と、選択した前記被写体に対し、仮想光源からの光を加算または減算する補正を行う補正手段と、前記補正手段による補正を行う場合に、補正した前記被写体の色情報が前記目標とする色情報に近づくように、前記立体形状情報を用いて前記仮想光源の少なくとも色と向きとを設定する設定手段と、を備え、前記設定手段は、前記目標とする色情報に基づいて、前記仮想光源の強度をさらに設定し、前記立体形状情報は、前記被写体の表面に対する法線方向の情報である法線情報であり、前記設定手段は、前記被写体における画素ごとに、前記法線情報と前記色情報とを取得し、各画素の色情報に応じて各画素の法線情報に重みをつけた情報に基づいて、前記仮想光源の向きを設定することを特徴とする。 An image processing apparatus according to the present invention comprises selection means for selecting a subject from an input image, color information acquisition means for acquiring color information on the selected subject, and shape information acquisition for acquiring three-dimensional shape information on the selected subject. target color acquisition means for acquiring target color information for the selected subject; correction means for performing correction by adding or subtracting light from a virtual light source to the selected subject; and setting means for setting at least the color and orientation of the virtual light source using the three-dimensional shape information so that the corrected color information of the subject approaches the target color information when correction is performed. , the setting means further sets the intensity of the virtual light source based on the target color information , and the three-dimensional shape information is normal information that is information of a normal direction to the surface of the subject; The setting means acquires the normal line information and the color information for each pixel in the subject, and based on the information obtained by weighting the normal line information of each pixel according to the color information of each pixel, determines the It is characterized by setting the direction of the virtual light source .
本発明によれば、例えば色の異なる複数の環境光源下で撮影された被写体を、好ましい印象に補正することが可能となる。 According to the present invention, it is possible to correct a subject photographed under, for example, a plurality of environmental light sources with different colors so that the subject has a favorable impression.
以下、添付図面を参照して実施形態を詳しく説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. In addition, the following embodiments do not limit the invention according to the scope of claims. Although multiple features are described in the embodiments, not all of these multiple features are essential to the invention, and multiple features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same or similar configurations are denoted by the same reference numerals, and redundant description is omitted.
図1は、本発明の画像処理装置の一実施形態であるデジタルカメラ100の構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a
本実施形態におけるデジタルカメラ100は、光学系101、撮像素子102、A/D変換部103、画像処理部104、測距部105、顔検出部106、記録部107、制御部108、メモリ109、操作部110、表示部111を備える。光学系101にはフォーカスレンズや絞り、シャッターが含まれる。光学系101は、撮影時には、フォーカスレンズを駆動し被写体のピント合わせを行うとともに、絞りやシャッターを制御することにより露光量の調節を行う。撮像素子102は、光学系101により結像された被写体像を光電変換によってアナログの電気信号に変換するCCDやCMOSセンサ等からなる。
The
A/D変換部103は、入力されたアナログの電気信号をデジタル信号に変換する。デジタル信号に変換された画像信号は、画像処理部104において、同時化処理、ホワイトバランス補正処理、合焦度算出処理、リライティング処理、ガンマ処理などが施され、記録部107に出力される。測距部105は、撮影時の被写体までの距離情報を取得し、距離マップを生成する。距離マップとは、撮影した画像の画素単位での被写体までの距離情報を示す二次元配列情報である。
The A/
顔検出部106は、画像処理部104で行うリライティング処理の被写体領域を決めるため、撮影画像中の人物の顔領域を検出する。この時、右目、左目、口などの顔器官の座標を検出し、右目と左目の距離など各顔器官同士の距離を算出する。その各顔器官同士の距離に基づいて、背景領域を含まないように、各器官の座標の重心座標を中心とする楕円領域を設定し、それを顔領域として検出する。記録部107は、画像処理部104から出力された画像信号をJPEG等の形式に変換し、記録する。
A
制御部108は、本実施形態の撮像装置100全体の動作制御を行う。例えば、撮影直前の被写体の明るさから、目標とする露光量を算出する。他にも、撮影した画像に基づいて所定の評価値を算出し、画像処理部104で行う画像処理のパラメータを決定する。メモリ109は、画像処理部104で用いる情報ならびに撮影時の設定や照明条件などが記憶されており、必要に応じて画像処理部104にその情報を出力する。操作部110は、ユーザーが撮像装置に対し操作指示を行うスイッチなどの複数の部材を有する。表示部111は、例えばカメラ背面に設置された液晶ディスプレイ等であり、撮影時の操作の補助を行うための画面や、記録部107に保存されている画像等を表示する。
The
図2は、本実施形態における画像処理部104の構成を示すブロック図である。画像処理部104は、同時化処理部201、ホワイトバランス補正処理部202、リライティング処理部203、ガンマ処理部204を備える。
FIG. 2 is a block diagram showing the configuration of the
画像処理部104の処理の流れについて説明する。A/D変換部103でデジタル信号に変換された、ベイヤー配列の映像信号が画像処理部104に入力される。画像処理部104に入力された映像信号は同時化処理部201に入力され、入力されたベイヤー配列のRGB信号に対して同時化処理が行われ、色信号R,G,Bが生成される。生成されたR,G,Bの色信号はホワイトバランス補正処理部202に入力され、制御部107が算出したホワイトバランスゲイン値に基づいてRGBの色信号にゲインがかけられ、ホワイトバランスが調整される。
A processing flow of the
ホワイトバランスが調整された色信号RGBはリライティング処理部203に出力される。リライティング処理部203では、ホワイトバランス補正処理部202から色信号RGB、測距部105から距離マップD_MAP、顔検出部106から画像内の顔の座標や大きさを示した情報を受ける。そして、色信号R,G,Bに対して、仮想光源を照射した画像を生成し、処理後の色信号R_out,G_out,B_outをガンマ処理部204に出力する。ガンマ処理部204は、リライティング処理後の信号R_out,G_out,B_outが入力され、入力された信号にガンマ処理を施し、ガンマ処理後の色信号Rg,Gg,Bgを記録部107に出力する。
The color signals RGB whose white balance has been adjusted are output to the
続いて、図3はリライティング処理部203の構成を示すブロック図である。
Next, FIG. 3 is a block diagram showing the configuration of the
リライティング処理部203は、法線取得部301、仮想光源情報算出部302、仮想光源拡散反射成分算出部303、仮想光源付加処理部304を備える。リライティング処理部203には、測距部105から距離情報が入力され、ホワイトバランス補正処理部202から色信号R,G,Bが入力され、顔検出部106から顔領域情報が入力される。
The
法線取得部301は、顔検出部106から入力された顔座標位置における被写体の表面の法線方向を取得する。本実施形態では、法線取得部301は、測距部105で計測した距離情報を参照し、被写体領域の法線情報を算出する(立体形状情報取得)。このようにして取得した法線情報Nを仮想光源情報算出部302と、仮想光源拡散反射成分算出部303へ出力する。
The
仮想光源情報算出部302には、ホワイトバランス処理部202からの色信号R,G,B(色情報取得)と、法線取得部301からの法線Nの情報が入力される。仮想光源情報算出部302は、後述する手法により、仮想光源の向きを示す3次元方向ベクトルL、仮想光源照射強度を示すα、光源色成分Rw,Gw,Bwを算出し、仮想光源拡散反射成分算出部303へ出力する。
The virtual light source
仮想光源拡散反射成分算出部303は、拡散反射成分Rd,Gd,Bdを算出する。拡散反射成分の求め方について、図4を用いて説明する。
The virtual light source diffuse
図4は撮影時のデジタルカメラ100、被写体401、仮想光源402の位置関係と、仮想光源の反射特性を示した図である。
FIG. 4 is a diagram showing the positional relationship among the
カメラ100で撮影された撮影画像の水平画素位置H1(垂直画素位置は説明を分かりやすくするために省略)における拡散反射成分は、カメラ座標H1における法線N1と仮想光源の方向ベクトルL1の内積に比例し、仮想光源と被写体位置の距離K1の二乗に反比例する値となる。仮想光源による拡散反射成分強度Pdは(式1)で表すことができ、色ごとの拡散反射成分Rd,Gd,Bdは(式2)で表すことができる。
The diffuse reflection component at the horizontal pixel position H1 (the vertical pixel position is omitted for the sake of clarity) of the captured image captured by the
Rd=Pd×Rw×R
Gd=Pd×Gw×G
Bd=Pd×Bw×B …(式2)
ここで、(式1)におけるNは被写体の3次元法線ベクトル、Kは仮想光源と被写体の距離である。kdは被写体の拡散反射率である。α、Lはそれぞれ仮想光源情報算出部302から入力された仮想光源の強さ、仮想光源の3次元方向ベクトルである。また(式2)におけるR,G,Bはホワイトバランス補正処理部202から入力された色信号R,G,Bである。Rw,Gw,Bwは仮想光源の色を示すパラメータである。これらパラメータの算出方法は後述する。
Rd = Pd x Rw x R
Gd = Pd x Gw x G
Bd=Pd×Bw×B (Formula 2)
Here, N in (Equation 1) is the three-dimensional normal vector of the subject, and K is the distance between the virtual light source and the subject. kd is the diffuse reflectance of the object. α and L are the intensity of the virtual light source input from the virtual light source
仮想光源付加処理部304は、仮想光源拡散反射成分算出部303で算出した拡散反射成分Rd,Gd,Bdを入力色信号R,G,Bに付加する処理を行う。仮想光源照射後色信号R_out,G_out,B_outは(式3)のように表すことができる。
A virtual light source
R_out=R+Rd
G_out=G+Gd
B_out=B+Bd …(式3)
このように算出した仮想光源照射後色信号R_out,G_out,B_outを
ガンマ処理部205へ出力する。
R_out = R + Rd
G_out=G+Gd
B_out=B+Bd (Formula 3)
The post-irradiation color signals R_out, G_out, and B_out calculated in this manner are output to the
次に、図5は仮想光源情報算出部302の処理を示すフローチャートである。
Next, FIG. 5 is a flowchart showing processing of the virtual light source
S501において、仮想光源情報算出部302は、顔検出部106から顔検出情報を、ホワイトバランス補正処理部202から入力画像の色信号R,G,Bを、法線取得部301から顔領域法線情報を取得する。
In step S<b>501 , the virtual light source
S502において、顔検出部106から取得した顔領域内における目標とする肌色である補正目標色Rt,Gt,Btを算出する(目標色取得)。補正目標色Rt,Gt,Btは、たとえば、顔領域内の色信号R,G,Bそれぞれの平均値であるが、この他にも、顔領域内の色信号R,G,Bそれぞれの中央値や最頻値といった統計的に処理した値を用いることができる。
In S502, correction target colors Rt, Gt, and Bt, which are target skin colors in the face area acquired from the
S503において、顔検出部106から取得した顔領域内における補正対象色Rs,Gs,Bsを取得する。ここで補正対象色Rs,Gs,Bsは撮影時の環境光源下での肌色のバランスを示すものであり、Rs+Gs+Bs=1の関係を満たすものとする。補正対象色Rs,Gs,Bsは、補正対象となる光源色が既知である場合、予めメモリ109に格納された既知光源色の値を参照することにより取得する。補正対象となる光源色はメモリ109に格納された撮影時の照明条件を参照すること、もしくは操作部110でユーザーから色の入力を受けることで知ることができる。
In S503, the correction target colors Rs, Gs, and Bs in the face area obtained from the
補正対象となる光源が未知の場合は、顔検出部106から取得した顔領域内の各画素の色信号R,G,Bのうち、補正目標色Rt,Gt,Btから最も異なる色信号R,G,Bに基づいて(式4)のように定める。(式4)におけるRe,Ge,Beとは、顔領域内の色信号R,G,Bのうち、補正目標色Rt,Gt,Btと最も異なる色信号R,G,Bの値である。色信号同士の比較方法は公知の方法であり、たとえば、注目画素の色信号R,G,Bと補正目標色Rt,Gt,Btのユークリッド距離が最も大きくなる画素の色信号R,G,Bの値をRe,Ge,Beとすればよい。
If the light source to be corrected is unknown, among the color signals R, G, and B of each pixel in the face region acquired from the
Rs=Re/(Re+Ge+Be)
Gs=Ge/(Re+Ge+Be)
Bs=Be/(Re+Ge+Be) …(式4)
S504において、各画素の補正対象色重みCwを取得する。補正対象色重みCwは、各画素の色信号R,G,Bが補正対象色Rs,Gs,Bsの成分をどれだけ有しているかを示す値であり、(式5)のように表す。(式5)は注目画素の色信号R,G,Bと補正対象色Rs,Gs,Bsの内積値を補正対象色重みCwとすることを示している。
Rs=Re/(Re+Ge+Be)
Gs=Ge/(Re+Ge+Be)
Bs=Be/(Re+Ge+Be) (Formula 4)
In S504, the correction target color weight Cw of each pixel is acquired. The correction target color weight Cw is a value that indicates how much the color signals R, G, and B of each pixel have the components of the correction target colors Rs, Gs, and Bs, and is expressed as in (Equation 5). (Equation 5) indicates that the inner product value of the color signals R, G, B of the target pixel and the correction target colors Rs, Gs, Bs is used as the correction target color weight Cw.
Cw=R×Rs+G×Gs+B×Bs …(式5)
S505において、仮想光源の照射方向ベクトルLを算出する。仮想光源の照射ベクトルLは(式6)のように表す。(式6)は顔検出部106から取得した顔領域内の各画素1~mの法線ベクトルN1~Nmを各画素の補正対象色重みCw1~Cwmを重みとする加算平均で得られる方向ベクトルを仮想光源の照射ベクトルLとすることを示している。
Cw=R×Rs+G×Gs+B×Bs (Formula 5)
In S505, the irradiation direction vector L of the virtual light source is calculated. The irradiation vector L of the virtual light source is expressed as in (Equation 6). (Equation 6) is a directional vector obtained by averaging the normal vectors N1 to Nm of pixels 1 to m in the face region obtained from the
S506において、仮想光源の強度αを算出する。仮想光源の強度αは(式7)のように表す。(式7)は、仮想光源を照射することにより被写体を補正目標色Rt,Gt,Btに近づけるような補正強度αを算出することを目的とした式である。仮想光源の強度αは正の値と負の値の両方を持つことがあり、正の値を持つ場合は、仮想光源による光の加算効果を付与し、負の値を持つ場合は、仮想光源による光の減算効果を付与する。 In S506, the intensity α of the virtual light source is calculated. The intensity α of the virtual light source is represented by (Equation 7). (Formula 7) is a formula for the purpose of calculating the correction intensity α that brings the subject closer to the correction target colors Rt, Gt, and Bt by irradiating the virtual light source. The intensity α of the virtual light source can have both positive and negative values. Adds a light subtraction effect.
α=-1×Ct/(Cmax-Ct) …(式7)
(式7)において、Ctとは補正目標色Rt,Gt,Btが、補正対象色Rs,Gs,Bsの成分をどれだけ有しているかを示す値であり、補正目標色Rt,Gt,Btと補正対象色Rs,Gs,Bsの内積値である。Cmaxとは顔検出部106から取得した顔領域内において、補正対象色Rs,Gs,Bsの成分を多く有し、補正目標色Rt,Gt,Btから最も異なる画素のCwの値である。本実施形態では、Cmaxの値は、各画素の色信号R,G,Bと補正対象色Rs,Gs,Bsの内積値CwとCtの差分絶対値が最大となるCwの値である。これにより、Cmaxの値がCtより小さい場合、αは正の値をとり、補正目標値に近づくように仮想光源による照射効果を加算できる。また、Cmaxの値がCtより大きい場合、αは負の値をとり、補正目標に近づくように仮想光源による照射効果を減算することができる。
α = -1 × Ct / (Cmax - Ct) ... (Equation 7)
In (Equation 7), Ct is a value indicating how much the correction target colors Rt, Gt, and Bt have the components of the correction target colors Rs, Gs, and Bs. and the inner product value of the correction target colors Rs, Gs, and Bs. Cmax is the value of Cw of a pixel that has many components of the correction target colors Rs, Gs, and Bs in the face area obtained from the
S507では、α<0か否かが判断される。α<0の場合はS508に進み、α<0でない場合はS509に進む。 In S507, it is determined whether or not α<0. If α<0, proceed to S508; otherwise, proceed to S509.
S508においては、α<0の場合の仮想光源色Rw,Gw,Bwを算出する。仮想光源色Rw,Gw,Bwは仮想光源の色バランスを示し、Rw+Gw+Bw=1となる特性を持つ。 In S508, virtual light source colors Rw, Gw, and Bw are calculated when α<0. The virtual light source colors Rw, Gw, and Bw indicate the color balance of the virtual light sources, and have the characteristic of Rw+Gw+Bw=1.
α<0の場合、仮想光源によって、補正色成分を減算することにより補正目標色に近づけるため、(式8)に示すように仮想光源色Rw,Gw,Bwは補正対象色Rs,Gs,Bsと等価でよい。 When α<0, the virtual light source colors Rw, Gw, and Bw are corrected to the correction target colors Rs, Gs, and Bs as shown in (Equation 8) because the correction target colors are approximated by subtracting the correction color components. can be equivalent to
Rw=Rs
Gw=Gs
Bw=Bs …(式8)
S509においては、α≧0の場合の仮想光源色Rw,Gw,Bwを算出する。α≧0の場合、仮想光源における照射効果を加算することにより補正目標色に近づけるため、(式9)に示すように仮想光源色Rw,Gw,Bwは補正対象色Rs,Gs,Bsと対称となる色バランスを有する。(式9)におけるMAX(Rs,Gs,Bs)とは補正対象色Rs,Gs,Bsのうち最大値を選択する関数である。
Rw = Rs
Gw = Gs
Bw=Bs (Formula 8)
In S509, virtual light source colors Rw, Gw, and Bw are calculated when α≧0. When α≧0, since the correction target color is approximated by adding the irradiation effect in the virtual light source, the virtual light source colors Rw, Gw, and Bw are symmetrical with the correction target colors Rs, Gs, and Bs as shown in (Equation 9). It has a color balance of MAX(Rs, Gs, Bs) in (Expression 9) is a function that selects the maximum value among the correction target colors Rs, Gs, and Bs.
Rw’=max(Rs,Gs,Bs)-Rs
Gw’=max(Rs,Gs,Bs)-Gs
Bw’=max(Rs,Gs,Bs)-Bs
Rw=Rw’/(Rw’+Gw’+Bw’)
Gw=Gw’/(Rw’+Gw’+Bw’)
Bw=Bw’/(Rw’+Gw’+Bw’) …(式9)
S510において、上記のように算出した仮想光源の方向ベクトルL、仮想光源の強度α、仮想光源の色Rw,Gw,Bwを仮想光源拡散反射成分算出部303へ出力する。
Rw'=max(Rs, Gs, Bs)-Rs
Gw'=max(Rs, Gs, Bs)-Gs
Bw'=max(Rs, Gs, Bs)-Bs
Rw=Rw'/(Rw'+Gw'+Bw')
Gw=Gw'/(Rw'+Gw'+Bw')
Bw=Bw'/(Rw'+Gw'+Bw') ... (Formula 9)
In S 510 , the direction vector L of the virtual light source, the intensity α of the virtual light source, and the colors Rw, Gw, and Bw of the virtual light source calculated as described above are output to the virtual light source diffuse
このようにして撮影時に被写体に照射された光源の色により悪くなった印象を、好ましい印象となるように補正する仮想光源を設定することができる。 In this way, it is possible to set a virtual light source that corrects the bad impression caused by the color of the light source that illuminates the subject at the time of photographing so as to obtain a favorable impression.
なお、本実施形態では、法線情報をメモリ109から直接取得する例について説明したが、法線情報ではなくても、被写体の立体形状を示すものであればどのような情報であってもかまわない。例えば、被写体の立体形状を示す3次元のワイヤーフレーム情報であってもかまわない。この場合、ワイヤーフレームの各点の角度情報から法線情報を算出することができる。
In this embodiment, an example of directly acquiring normal line information from the
(他の実施形態)
また本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現できる。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現できる。
(Other embodiments)
In addition, the present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in the computer of the system or apparatus reads the program. It can also be realized by executing processing. It can also be implemented by a circuit (eg, ASIC) that implements one or more functions.
発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the embodiments described above, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the claims are appended to make public the scope of the invention.
100:デジタルカメラ、101:光学系、102:撮像素子、104:画像処理部、105:測距部、106:顔検出部、108:制御部 100: Digital camera, 101: Optical system, 102: Imaging element, 104: Image processing unit, 105: Distance measurement unit, 106: Face detection unit, 108: Control unit
Claims (14)
選択した前記被写体の色情報を取得する色情報取得手段と、
選択した前記被写体の立体形状情報を取得する形状情報取得手段と、
選択した前記被写体について目標とする色情報を取得する目標色取得手段と、
選択した前記被写体に対し、仮想光源からの光を加算または減算する補正を行う補正手段と、
前記補正手段による補正を行う場合に、補正した前記被写体の色情報が前記目標とする色情報に近づくように、前記立体形状情報を用いて前記仮想光源の少なくとも色と向きとを設定する設定手段と、を備え、
前記設定手段は、前記目標とする色情報に基づいて、前記仮想光源の強度をさらに設定し、
前記立体形状情報は、前記被写体の表面に対する法線方向の情報である法線情報であり、
前記設定手段は、前記被写体における画素ごとに、前記法線情報と前記色情報とを取得し、各画素の色情報に応じて各画素の法線情報に重みをつけた情報に基づいて、前記仮想光源の向きを設定することを特徴とする画像処理装置。 a selection means for selecting a subject from an input image;
a color information obtaining means for obtaining color information of the selected subject;
shape information acquiring means for acquiring three-dimensional shape information of the selected subject;
target color acquisition means for acquiring target color information about the selected subject;
correction means for correcting the selected subject by adding or subtracting light from a virtual light source;
setting means for setting at least the color and direction of the virtual light source using the three-dimensional shape information so that the corrected color information of the subject approaches the target color information when the correction is performed by the correction means; and
The setting means further sets the intensity of the virtual light source based on the target color information ,
the three-dimensional shape information is normal information that is information about a normal direction to the surface of the subject;
The setting means acquires the normal line information and the color information for each pixel in the subject, and based on the information obtained by weighting the normal line information of each pixel according to the color information of each pixel, determines the An image processing device that sets the direction of a virtual light source .
選択した前記被写体の色情報を取得する色情報取得工程と、
選択した前記被写体の立体形状情報を取得する形状情報取得手段と、
選択した前記被写体について目標とする色情報を取得する目標色取得工程と、
選択した前記被写体に対し、仮想光源からの光を加算または減算する補正を行う補正工程と、
前記補正工程において補正を行う場合に、補正した前記被写体の色情報が前記目標とする色情報に近づくように、前記立体形状情報を用いて前記仮想光源の少なくとも色と向きとを設定する設定工程と、を有し、
前記設定工程では、前記目標とする色情報に基づいて、前記仮想光源の強度をさらに設定し、
前記立体形状情報は、前記被写体の表面に対する法線方向の情報である法線情報であり、
前記設定工程では、前記被写体における画素ごとに、前記法線情報と前記色情報とを取得し、各画素の色情報に応じて各画素の法線情報に重みをつけた情報に基づいて、前記仮想光源の向きを設定することを特徴とする画像処理方法。 a selection step of selecting a subject from the input image;
a color information acquisition step of acquiring color information of the selected subject;
shape information acquiring means for acquiring three-dimensional shape information of the selected subject;
a target color acquisition step of acquiring target color information about the selected subject;
a correction step of correcting the selected subject by adding or subtracting light from a virtual light source;
A setting step of setting at least the color and orientation of the virtual light source using the three-dimensional shape information so that the corrected color information of the subject approaches the target color information when correction is performed in the correcting step. and
In the setting step, further setting the intensity of the virtual light source based on the target color information ,
the three-dimensional shape information is normal information that is information about a normal direction to the surface of the subject;
In the setting step, the normal information and the color information are acquired for each pixel of the subject, and based on the information obtained by weighting the normal information of each pixel according to the color information of each pixel, the An image processing method characterized by setting the direction of a virtual light source .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019061357A JP7311995B2 (en) | 2019-03-27 | 2019-03-27 | IMAGE PROCESSING APPARATUS AND IMAGE PROCESSING METHOD, PROGRAM, STORAGE MEDIUM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019061357A JP7311995B2 (en) | 2019-03-27 | 2019-03-27 | IMAGE PROCESSING APPARATUS AND IMAGE PROCESSING METHOD, PROGRAM, STORAGE MEDIUM |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020160945A JP2020160945A (en) | 2020-10-01 |
JP7311995B2 true JP7311995B2 (en) | 2023-07-20 |
Family
ID=72639512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019061357A Active JP7311995B2 (en) | 2019-03-27 | 2019-03-27 | IMAGE PROCESSING APPARATUS AND IMAGE PROCESSING METHOD, PROGRAM, STORAGE MEDIUM |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7311995B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112258622A (en) * | 2020-10-26 | 2021-01-22 | 北京字跳网络技术有限公司 | Image processing method, image processing device, readable medium and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006222928A (en) | 2004-09-30 | 2006-08-24 | Fuji Photo Film Co Ltd | Image processing apparatus and method, and image processing program |
JP2017152866A (en) | 2016-02-23 | 2017-08-31 | キヤノン株式会社 | Image processing system and image processing method |
JP2018010498A (en) | 2016-07-14 | 2018-01-18 | キヤノン株式会社 | Image processing device and method and control program |
CN107610080A (en) | 2017-09-11 | 2018-01-19 | 广东欧珀移动通信有限公司 | Image processing method and device, electronic installation and computer-readable recording medium |
JP2019004290A (en) | 2017-06-14 | 2019-01-10 | キヤノン株式会社 | Image processing apparatus, imaging apparatus, image processing method and program |
-
2019
- 2019-03-27 JP JP2019061357A patent/JP7311995B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006222928A (en) | 2004-09-30 | 2006-08-24 | Fuji Photo Film Co Ltd | Image processing apparatus and method, and image processing program |
JP2017152866A (en) | 2016-02-23 | 2017-08-31 | キヤノン株式会社 | Image processing system and image processing method |
JP2018010498A (en) | 2016-07-14 | 2018-01-18 | キヤノン株式会社 | Image processing device and method and control program |
JP2019004290A (en) | 2017-06-14 | 2019-01-10 | キヤノン株式会社 | Image processing apparatus, imaging apparatus, image processing method and program |
CN107610080A (en) | 2017-09-11 | 2018-01-19 | 广东欧珀移动通信有限公司 | Image processing method and device, electronic installation and computer-readable recording medium |
Also Published As
Publication number | Publication date |
---|---|
JP2020160945A (en) | 2020-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10997696B2 (en) | Image processing method, apparatus and device | |
US11503219B2 (en) | Image processing apparatus, image capture apparatus, and control method for adding an effect of a virtual light source to a subject | |
JP6381404B2 (en) | Image processing apparatus and method, and imaging apparatus | |
JP6412386B2 (en) | Image processing apparatus, control method therefor, program, and recording medium | |
JP7179472B2 (en) | Processing device, processing system, imaging device, processing method, program, and recording medium | |
US9894339B2 (en) | Image processing apparatus, image processing method and program | |
JP2018163648A (en) | Image processor, method for image processing, and program | |
US11893716B2 (en) | Image processing apparatus and image processing method, and image capturing apparatus | |
JP7311995B2 (en) | IMAGE PROCESSING APPARATUS AND IMAGE PROCESSING METHOD, PROGRAM, STORAGE MEDIUM | |
JP2017147568A (en) | Image processing apparatus, imaging apparatus, control method, and program | |
JP2019179463A (en) | Image processing device, control method thereof, program, and recording medium | |
JP2019205055A (en) | Image processing apparatus, image processing apparatus control method, and program | |
JP6917796B2 (en) | Image processing equipment, imaging equipment, image processing methods, and programs | |
JP2017138927A (en) | Image processing device, imaging apparatus, control method and program thereof | |
JP2019129469A (en) | Image processing device | |
JP2019149719A (en) | Image processing apparatus and method, and imaging apparatus | |
JP7462464B2 (en) | Image processing device and method, program, and storage medium | |
JP7356255B2 (en) | Image processing device and its processing method, imaging device, program, storage medium | |
JP7455578B2 (en) | Image processing device and image processing method | |
JP2021064884A (en) | Image processing apparatus, imaging apparatus, control method, program, and imaging system | |
JP6429655B2 (en) | Image processing apparatus, image processing method, and program | |
JP2023090494A (en) | Imaging apparatus, control method for the same, program, and storage medium | |
JP2024017210A (en) | Information processing apparatus, head-mounted display device, method for controlling information processing apparatus, program, and storage medium | |
JP2019003694A (en) | Image processing apparatus, control method of the same, and program | |
JP2021005418A (en) | Image processing apparatus and control method for the same, 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 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220328 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230127 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230210 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230406 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230421 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230529 |
|
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: 20230609 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230707 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7311995 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |