[go: up one dir, main page]

JP2018010498A - Image processing device and method and control program - Google Patents

Image processing device and method and control program Download PDF

Info

Publication number
JP2018010498A
JP2018010498A JP2016139141A JP2016139141A JP2018010498A JP 2018010498 A JP2018010498 A JP 2018010498A JP 2016139141 A JP2016139141 A JP 2016139141A JP 2016139141 A JP2016139141 A JP 2016139141A JP 2018010498 A JP2018010498 A JP 2018010498A
Authority
JP
Japan
Prior art keywords
face
light source
image
virtual light
lighting
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
Application number
JP2016139141A
Other languages
Japanese (ja)
Inventor
千明 三河
Chiaki Mikawa
千明 三河
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2016139141A priority Critical patent/JP2018010498A/en
Publication of JP2018010498A publication Critical patent/JP2018010498A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To apply lighting by a virtual light source applied to the face of a first image to the face of a second image on the same condition, with a simple operation.SOLUTION: A CPU 101 detects the face from the first image of an HDD 105 and performs the lighting based on the virtual light source. A user can adjust the position of the virtual light source or the like by using an input device 106. The CPU 101 copies a relative position with respect to the face as the target of the virtual light source, according to the copy operation of the user. The CPU 101 detects the face from the second image, arranges the virtual light source in the same relative position with respect to the face of the second image on the basis of the relative position copied by the copy operation, according to the paste operation of the user, and performs the lighting to the face of the second image.SELECTED DRAWING: Figure 7

Description

本発明は、明るさ補正を行う画像処理装置及び方法並びに制御プログラムに関する。   The present invention relates to an image processing apparatus and method for performing brightness correction, and a control program.

画像中の被写体に対して仮想光源による照明効果を適用することで被写体の暗部の明るさを補正することが、知られている(例えば、特許文献1参照)。   It is known to correct the brightness of a dark part of a subject by applying a lighting effect by a virtual light source to the subject in the image (see, for example, Patent Document 1).

特開2016−072692号公報JP 2006-072692 A

特許文献1に記載される技術では、複数の画像の同様の被写体に同じ照明効果を与えるのが難しい。具体的には、第1の画像に含まれる人物の顔に対してユーザが所望の位置に仮想光源を設定した場合、他の画像に含まれる顔に対して仮想光源による同様の照明効果を当てるのが難しい。   With the technique described in Patent Document 1, it is difficult to give the same lighting effect to the same subject in a plurality of images. Specifically, when the user sets a virtual light source at a desired position on the face of a person included in the first image, the same lighting effect by the virtual light source is applied to the face included in the other image. It is difficult.

本発明は、ある画像の被写体に設定した仮想光源を別の画像の被写体にも同じ設定で適用できるようにした画像処理装置及び方法並びに制御プログラムを提示することを目的とする。   It is an object of the present invention to present an image processing apparatus and method, and a control program that can apply a virtual light source set to a subject of an image to a subject of another image with the same setting.

本発明に係る画像処理装置は、第1の画像および第2の画像から顔を検出する顔検出手段と、前記顔検出手段で検出される顔に仮想光源によるライティングを施すライティング手段と、前記第1の画像の顔に対する前記仮想光源の相対位置と同じ相対位置で前記第2の画像の顔に適用するように、前記ライティング手段において前記第1の画像に適用した仮想光源パラメータを前記第2の画像に適用する制御手段とを有することを特徴とする。   An image processing apparatus according to the present invention includes a face detection unit that detects a face from a first image and a second image, a lighting unit that performs lighting with a virtual light source on the face detected by the face detection unit, and the first The virtual light source parameter applied to the first image by the lighting means is applied to the second image face at the same relative position as the relative position of the virtual light source with respect to the face of the first image. And control means applied to the image.

本発明によれば、第1の画像に含まれる顔に適用されるライティングと同じ条件のライティングを、簡単な操作で第2の画像に含まれる顔に適用できる。   According to the present invention, lighting under the same conditions as lighting applied to the face included in the first image can be applied to the face included in the second image with a simple operation.

本発明の一実施例の概略構成ブロック図である。It is a schematic block diagram of one Example of this invention. 本実施例のユーザインターフェイス例である。It is an example of the user interface of a present Example. 本実施例のライティング工程を示すフローチャートである。It is a flowchart which shows the writing process of a present Example. 点光源の場合の法線ベクトルと仮想光源照射方向との関係を示す平面図である。It is a top view which shows the relationship between the normal vector in the case of a point light source, and a virtual light source irradiation direction. 面光源の場合の法線ベクトルと仮想光源照射方向との関係を示す平面図である。It is a top view which shows the relationship between the normal vector in the case of a surface light source, and a virtual light source irradiation direction. 本実施例の仮想光源パラメータのコピー処理のフローチャートである。It is a flowchart of a virtual light source parameter copy process of the present embodiment. 本実施例の仮想光源パラメータのペースト処理のフローチャートである。It is a flowchart of the paste process of the virtual light source parameter of a present Example. 顔検出結果を収納するテーブルの内容例である。It is an example of the content of the table which stores a face detection result. ペースト先の画像データに複数の顔がある場合のライティング工程のフローチャートである。It is a flowchart of a writing process when there are a plurality of faces in the image data of the paste destination.

以下、図面を参照して、本発明の実施例を詳細に説明する。なお,本明細書では、仮想光源を設定して疑似的なライティングを行う画像処理を以降、リライティングと記す。仮想光源の撮像装置の撮影光軸に対する水平方向の角度をlight_hと記し、撮影光軸と直角に交差する垂直軸に対する角度をlight_vと記す。仮想光源の位置の水平座標値をlight_x、垂直座標値をlight_y、奥行き座標値をlight_zと記す。仮想光源に関する、光のオンオフ情報、光源種類、光の強さ、光源の位置、角度及び光源色温度を総称して、以降、仮想光源パラメータと記す。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the present specification, image processing that performs virtual lighting by setting a virtual light source is hereinafter referred to as relighting. The angle of the virtual light source in the horizontal direction with respect to the photographing optical axis of the imaging device is denoted as light_h, and the angle with respect to the vertical axis that intersects the photographing optical axis at right angles is denoted as light_v. The horizontal coordinate value of the position of the virtual light source is denoted as light_x, the vertical coordinate value is denoted as light_y, and the depth coordinate value is denoted as light_z. The light on / off information, light source type, light intensity, light source position, angle, and light source color temperature related to the virtual light source are collectively referred to as virtual light source parameters hereinafter.

図1は、本発明に係る画像処理装置の一実施例の概略構成ブロック図を示す。図1に示す画像処理装置100の主要な機能は、コンピュータ上で動作するコンピュータプログラムにより実現される。   FIG. 1 shows a schematic block diagram of an embodiment of an image processing apparatus according to the present invention. The main functions of the image processing apparatus 100 shown in FIG. 1 are realized by a computer program that runs on a computer.

101は画像処理装置100の全体の制御を司るCPUである。102は、CPU101の動作処理手順(例えばコンピュータの立ち上げ処理や基本入出力処理等のプログラム)を記憶するROMである。103はRAMであり、CPU101のメインメモリとして機能する。RAM103には後述の処理を実現するための制御プログラムを含む各種プログラムがハードディスクドライブ105等からロードされ、CPU101によって実行される。RAM103は、CPU101が各種処理を実行する際のワークエリアを提供する。   A CPU 101 controls the entire image processing apparatus 100. Reference numeral 102 denotes a ROM that stores an operation processing procedure of the CPU 101 (for example, a program such as a computer startup process and a basic input / output process). Reference numeral 103 denotes a RAM that functions as a main memory of the CPU 101. Various programs including a control program for realizing processing to be described later are loaded into the RAM 103 from the hard disk drive 105 or the like and executed by the CPU 101. The RAM 103 provides a work area when the CPU 101 executes various processes.

104はディスプレイであり、CPU101の制御下で各種表示を行なう。105はハードディスクドライブ(以下、HDD)であり、アプリケーションプログラム、データ及びライブラリなどの保存に用いられる。リラインティん具の対象となる画像データは、HDD105に格納されている。   Reference numeral 104 denotes a display which performs various displays under the control of the CPU 101. A hard disk drive (hereinafter referred to as HDD) 105 is used for storing application programs, data, libraries, and the like. Image data that is a target of the reline tool is stored in the HDD 105.

106はポインティングデバイス及びキーボード等からなる入力装置である。107は記憶媒体を着脱可能な記憶媒体装着ユニット(メディアドライブ)である。記憶媒体は例えば、デジタルスチルカメラに着脱可能な、撮影画像を記憶するメモリカードである。   An input device 106 includes a pointing device and a keyboard. Reference numeral 107 denotes a storage medium mounting unit (media drive) to which the storage medium can be attached and detached. The storage medium is, for example, a memory card that stores a photographed image that can be attached to and detached from a digital still camera.

108はネットワークインターフェイスであり、通信回線110を介してコンピュータネットワーク111と接続する。CPU101は、ネットワークインターフェイス108により、コンピュータネットワーク111上の機器との間でデータを送受信する。   A network interface 108 is connected to the computer network 111 via the communication line 110. The CPU 101 transmits / receives data to / from devices on the computer network 111 via the network interface 108.

109は、上述した各ユニット間を接続するシステムバスであり、アドレスバス、データバスおよび制御バスからなる。   Reference numeral 109 denotes a system bus that connects the above-described units, and includes an address bus, a data bus, and a control bus.

図2は、画像処理装置100のユーザインターフェイスの一例である。図2を用いて、ユーザが仮想光源パラメータを設定する方法を説明する。   FIG. 2 is an example of a user interface of the image processing apparatus 100. A method of setting the virtual light source parameter by the user will be described with reference to FIG.

201は、ユーザが画像データのあるフォルダを選択するフォルダ選択エリアである。CPU101は、HDD105のフォルダ構成を読みとり、フォルダツリーを表示する。   Reference numeral 201 denotes a folder selection area where the user selects a folder with image data. The CPU 101 reads the folder structure of the HDD 105 and displays a folder tree.

202は、ユーザが選択したフォルダを示すフォルダフォーカス枠である。ユーザが入力装置106のポインティングデバイス等で所望のフォルダをクリックした場合、CPU101は、フォルダフォーカス枠202をそのフォルダの位置に描画する。その後、CPU101は、HDD105からそのフォルダ内の画像データを読み込む。   Reference numeral 202 denotes a folder focus frame indicating a folder selected by the user. When the user clicks a desired folder with the pointing device or the like of the input device 106, the CPU 101 draws the folder focus frame 202 at the position of the folder. Thereafter, the CPU 101 reads image data in the folder from the HDD 105.

203は、画像処理結果を表示するプレビューエリアである。204は、フォルダ選択エリア201でユーザが指定したフォルダ内の画像データを縮小画像で一覧表示するサムネイルエリアである。205は、サムネイルエリア204内にユーザが選択したフォルダ内の画像データを縮小画像で表示しきれない場合に、表示範囲を変更するためのサムネイルエリアスクロールバーである。サムネイルエリアスクロールバー205をユーザが操作すると、CPU101は、サムネイルエリア204の表示領域を変更すべくサムネイルエリア204の表示を更新する。   A preview area 203 displays the image processing result. A thumbnail area 204 displays a list of image data in a folder specified by the user in the folder selection area 201 as a reduced image. Reference numeral 205 denotes a thumbnail area scroll bar for changing the display range when image data in the folder selected by the user cannot be displayed as a reduced image in the thumbnail area 204. When the user operates the thumbnail area scroll bar 205, the CPU 101 updates the display of the thumbnail area 204 to change the display area of the thumbnail area 204.

206は、ユーザが画像処理対象として選択した画像データを示す画像フォーカス枠である。サムネイルエリア204内でユーザが所望の縮小画像を入力装置106のポインティングデバイス等でクリックした場合、CPU101は、ユーザから画像処理対象の画像データ指定があったものと判定する。そして、CPU101は、画像フォーカス枠206をユーザがクリックした位置の縮小画像を囲む形で描画すると共に、その縮小画像に対応する画像データを読み込み、プレビューエリア203に表示する。   Reference numeral 206 denotes an image focus frame indicating image data selected as an image processing target by the user. When the user clicks a desired reduced image in the thumbnail area 204 with the pointing device of the input device 106, the CPU 101 determines that the image data to be processed is designated by the user. Then, the CPU 101 draws the image focus frame 206 so as to surround the reduced image at the position where the user clicked, reads image data corresponding to the reduced image, and displays it in the preview area 203.

207は、ユーザが画像処理対象として選択した画像データの表示結果例である。208は、ユーザが設定した仮想光源を画像データに重畳して表示している例である。   Reference numeral 207 denotes a display result example of image data selected by the user as an image processing target. Reference numeral 208 denotes an example in which a virtual light source set by the user is displayed superimposed on the image data.

209は、光源のオンオフ指定ラジオボタンであり、仮想光源を疑似的に点灯するか否かをCPU101に指示するのに使用される。ユーザがONを押下した場合、CPU101は、ユーザから仮想光源点灯の操作があったと判定し、仮想光源が点灯しているものとして後述のリライティングを行う。ユーザがOFFを押下した場合、CPU101は、ユーザから仮想光源消灯の操作があったと判定して、仮想光源が消灯しているものとして、リライティングしない。リライティングの後ではリライティングの効果を消去する。   Reference numeral 209 denotes a light source on / off designation radio button, which is used to instruct the CPU 101 whether or not the virtual light source is lit in a pseudo manner. When the user presses ON, the CPU 101 determines that the operation of turning on the virtual light source is performed by the user, and performs relighting described later on the assumption that the virtual light source is turned on. When the user presses OFF, the CPU 101 determines that the user has performed an operation for turning off the virtual light source, and does not perform relighting assuming that the virtual light source is turned off. After rewriting, the effect of rewriting is deleted.

210は、光源種類選択リストボックスである。ユーザが光源種類選択リストボックス210の下矢印ボタンを押下すると、光源の種類として、点光源及び面光源がリストされる。そして、ユーザがいずれかを選択した場合、CPU101はユーザから仮想光源の種類を指定する操作があったと判定して、後述のリライティングを行う。211は、光の強さスライダである。ユーザがスライダ211のツマミを操作した場合、CPU101は、ユーザから仮想光源の光の強さの変更操作があったと判定して、つまみの位置に対応する光の強さで、後述のリライティングを行う。   210 is a light source type selection list box. When the user presses the down arrow button of the light source type selection list box 210, point light sources and surface light sources are listed as the light source types. When the user selects any of them, the CPU 101 determines that there is an operation for designating the type of the virtual light source from the user, and performs relighting described later. Reference numeral 211 denotes a light intensity slider. When the user operates the knob of the slider 211, the CPU 101 determines that the user has changed the light intensity of the virtual light source, and performs rewriting described later with the light intensity corresponding to the position of the knob. .

212は、光源水平座標値light_xを入力する水平座標入力エディットボックスである。仮想光源の水平座標値を数値で指定する。画像の中心座標を0、左方向の座標値を負値、右方向の座標値を正値とする。213は、光源垂直座標値light_yを入力する垂直座標入力エディットボックスである。仮想光源の垂直座標を数値で指定する。画像の中心座標を0、上方向の座標値を負値、下方向の座標値を正値とする。214は、光源奥行き座標値light_zを入力する奥行き座標入力エディットボックスである。仮想光源の奥行き座標値を数値で指定する。仮想空間上の撮像装置の位置を0、撮像装置から被写体に近づく方向の座標値を正値、遠ざかる方向の座標値を負値とする。エディットボックス212,213,214で指定された座標値を総称して、以降、仮想光源絶対座標値と記す。   Reference numeral 212 denotes a horizontal coordinate input edit box for inputting the light source horizontal coordinate value light_x. Specifies the horizontal coordinate value of the virtual light source as a numerical value. The center coordinate of the image is 0, the left coordinate value is a negative value, and the right coordinate value is a positive value. Reference numeral 213 denotes a vertical coordinate input edit box for inputting the light source vertical coordinate value light_y. Specifies the vertical coordinate of the virtual light source as a numerical value. The center coordinate of the image is 0, the upper coordinate value is a negative value, and the lower coordinate value is a positive value. Reference numeral 214 denotes a depth coordinate input edit box for inputting the light source depth coordinate value light_z. Specifies the depth coordinate value of the virtual light source as a numerical value. Assume that the position of the imaging device in the virtual space is 0, the coordinate value in the direction approaching the subject from the imaging device is a positive value, and the coordinate value in the direction away from the imaging device is a negative value. The coordinate values specified in the edit boxes 212, 213, and 214 are collectively referred to as virtual light source absolute coordinate values hereinafter.

215は、水平角度light_hを入力する水平角度入力エディットボックスである。仮想光源の撮像装置の撮影光軸に対する水平角度light_hを指定する。撮像装置の撮影光軸と平行な場合に0となり、撮影光軸よりも右方向に向いた場合に正値、左方向に向いた場合に負値とする。216は、垂直角度light_vを入力する垂直角度入力エディットボックスである。撮影光軸と直角に交差する垂直軸に対する角度(垂直角度)light_vを指定する。撮像装置の撮影光軸と平行な場合に0となり、上方向に向いた場合に正値、下方向に向いた場合に負値とする。   Reference numeral 215 denotes a horizontal angle input edit box for inputting a horizontal angle light_h. The horizontal angle light_h with respect to the imaging optical axis of the imaging device of the virtual light source is designated. It is 0 when parallel to the photographic optical axis of the imaging apparatus, positive value when it is directed rightward from the photographic optical axis, and negative value when it is directed leftward. Reference numeral 216 denotes a vertical angle input edit box for inputting a vertical angle light_v. An angle (vertical angle) light_v with respect to a vertical axis that intersects the imaging optical axis at a right angle is designated. It is 0 when parallel to the imaging optical axis of the imaging device, positive value when facing upward, and negative value when facing downward.

各エディットボックス212〜216の初期値は0とする。各エディットボックス212〜216でユーザが値を指定した場合、CPU101は、仮想光源の位置変更操作があったものとして、仮想空間上の仮想光源の位置および角度を入力値に応じて変更し、後述のリライティングを行う。   The initial value of each edit box 212 to 216 is set to zero. When the user designates a value in each of the edit boxes 212 to 216, the CPU 101 changes the position and angle of the virtual light source in the virtual space according to the input value, assuming that the position change operation of the virtual light source has been performed. Perform rewriting.

217は、光源色温度入力エディットボックスであり、2700K〜10000Kまでの値を入力可能とする。エディットボックス217の初期値は、白色蛍光ランプの色温度4500Kとする。ユーザが光源色温度入力エディットボックス217の値を変更した場合、CPU101はユーザから仮想光源の色温度の変更操作があったと判定して、指定された光源色温度で後述のリライティングを行う。   Reference numeral 217 denotes a light source color temperature input edit box, which allows input of values from 2700K to 10000K. The initial value of the edit box 217 is set to a color temperature of 4500 K of the white fluorescent lamp. When the user changes the value of the light source color temperature input edit box 217, the CPU 101 determines that the user has changed the color temperature of the virtual light source, and performs rewriting described later at the specified light source color temperature.

CPU101は、要素209〜217によりユーザが指定した仮想光源パラメータを、処理対象の画像データと関連付けて、RAM103に記憶する。いずれかの仮想光源パラメータに変更があった場合、CPU101は、RAM103の対応する記憶値を更新する。   The CPU 101 stores the virtual light source parameter specified by the user using the elements 209 to 217 in the RAM 103 in association with the image data to be processed. When any of the virtual light source parameters is changed, the CPU 101 updates the corresponding stored value in the RAM 103.

218は、仮想光源パラメータコピーボタンである。ユーザが仮想光源パラメータコピーボタン218を押下した場合、CPU101は、ユーザから仮想光源パラメータコピー指示があったと判定する。そして、CPU101は、仮想光源に関して要素209〜217で指定された各種設定情報を後述の方法で仮想光源パラメータを相対位置に変換して、RAM103に記憶する。   Reference numeral 218 denotes a virtual light source parameter copy button. When the user presses the virtual light source parameter copy button 218, the CPU 101 determines that there is a virtual light source parameter copy instruction from the user. Then, the CPU 101 converts various setting information designated by the elements 209 to 217 regarding the virtual light source into a relative position by converting the virtual light source parameter into a relative position by a method to be described later, and stores it in the RAM 103.

219は、仮想光源パラメータペーストボタンである。ユーザが仮想光源パラメータペーストボタン219を押下した場合、CPU101は、ユーザから仮想パラメータペースト指示があったと判定する。そして、CPU101は、RAM103に仮想光源パラメータが格納されている場合、後述の方法でその仮想光源パラメータを絶対座標に変換し、その後、処理対象の画像データに対してリライティングを行う。   Reference numeral 219 denotes a virtual light source parameter paste button. When the user presses the virtual light source parameter paste button 219, the CPU 101 determines that there is a virtual parameter paste instruction from the user. When the virtual light source parameter is stored in the RAM 103, the CPU 101 converts the virtual light source parameter into an absolute coordinate by a method described later, and then performs relighting on the image data to be processed.

220から224は、処理前または処理後の説明例の画像データである。例えば、画像データ220に対して仮想光源によるライティングした後に画像データ221に対して同様のライティング効果を得たいとする。この場合、ユーザは、画像データ220を選択した状態で仮想光源パラメータコピーボタン218を押下し、その後、画像データ221を選択し、仮想光源パラメータペーストボタン219を押下する。仮想光源パラメータのペースト先の画像データが、画像データ222,223のように複数の顔を含む場合、各顔に対してコピー元と同様のリライティングが適用される。仮想光源パラメータコピー処理および仮想光源パラメータペースト処理については、後述する。   Reference numerals 220 to 224 denote image data of an explanation example before or after processing. For example, assume that it is desired to obtain the same lighting effect on the image data 221 after lighting the image data 220 with a virtual light source. In this case, the user presses the virtual light source parameter copy button 218 with the image data 220 selected, and then selects the image data 221 and presses the virtual light source parameter paste button 219. When the virtual light source parameter paste destination image data includes a plurality of faces like the image data 222 and 223, the same relighting as that of the copy source is applied to each face. The virtual light source parameter copy process and the virtual light source parameter paste process will be described later.

225は、終了ボタンである。ユーザが終了ボタン225を押下した場合、CPU101は、ユーザから終了指示があったと判定し、RAM103に記憶している情報を破棄した後、画像処理装置100による画像処理を終了する。   Reference numeral 225 denotes an end button. When the user presses the end button 225, the CPU 101 determines that there is an end instruction from the user, discards the information stored in the RAM 103, and ends the image processing by the image processing apparatus 100.

図3は、ある画像データに設定された仮想光源パラメータに基づき他の画像に同様のライティングを施す本実施例の動作フローチャートである。CPU101が、RAM103に格納される制御プログラムを実行することにより、図3に示す処理を実現する。   FIG. 3 is an operation flowchart of the present embodiment in which similar lighting is performed on other images based on the virtual light source parameters set in certain image data. The CPU 101 executes the control program stored in the RAM 103, thereby realizing the processing shown in FIG.

ステップS300で、CPU101は、処理対象とする画像データと、その画像データと関連付けられた関連情報を読み込む。関連情報は、距離マップとして表現される、撮像時の撮像装置と被写体との間の距離情報を含む。距離マップは、処理対象として選択された画像データの撮像時に、被写体像の各画素に対して撮像素子から被写体までの物理的な距離を数値化した画像データである。距離マップは、撮像装置において、ぼけ方の異なる複数の画像から被写体距離を算出して生成され、画像データの関連情報として画像データと共に記憶媒体に記録される。距離マップの代わりに、ステレオカメラによる写真測量またはスポット光の照射もしくは走査による3次元計測などで得られる3次元形状データを使っても良い。   In step S300, the CPU 101 reads image data to be processed and related information associated with the image data. The related information includes distance information expressed as a distance map between the imaging device and the subject at the time of imaging. The distance map is image data obtained by quantifying the physical distance from the image sensor to the subject for each pixel of the subject image when the image data selected as the processing target is captured. The distance map is generated by calculating the subject distance from a plurality of images with different blurring in the imaging device, and is recorded on the storage medium together with the image data as related information of the image data. Instead of the distance map, three-dimensional shape data obtained by photogrammetry with a stereo camera or three-dimensional measurement by spot light irradiation or scanning may be used.

ステップS301で、CPU101は、RAM103から仮想光源パラメータを読み込む。仮想光源パラメータは、光のオンオフ情報、光源種類、光の強さ、仮想光源の位置、角度及び光源色温度の各設定値からなる。ユーザがサムネイルエリア204で未調整の画像データを選択した場合、CPU101は、初期値を読み込む。ユーザが要素209〜217で仮想光源パラメータを変更している場合、CPU101は、変更後の仮想光源パラメータを読み込む。ユーザが仮想光源パラメータペーストボタン219を押下したとき、CPU101は、ペースト処理で算出した仮想光源パラメータを読み込む。   In step S <b> 301, the CPU 101 reads virtual light source parameters from the RAM 103. The virtual light source parameter includes set values of light on / off information, light source type, light intensity, virtual light source position, angle, and light source color temperature. When the user selects unadjusted image data in the thumbnail area 204, the CPU 101 reads an initial value. When the user has changed the virtual light source parameter in the elements 209 to 217, the CPU 101 reads the changed virtual light source parameter. When the user presses the virtual light source parameter paste button 219, the CPU 101 reads the virtual light source parameter calculated by the paste process.

ステップS302で、CPU101は、処理対象となる画像データの被写体像内に含まれる人物の顔を検出する。CPU101はまず、顔の個数を検出し、検出した各顔に0から順のユニークな顔IDを割り振る。CPU101は、顔IDに対応付けられて、顔の中心座標、顔の大きさ、顔の角度及び顔向きを決定する。顔の中心座標値は、仮想光源の絶対座標と同じ座標系で出力される。   In step S302, the CPU 101 detects a human face included in the subject image of the image data to be processed. First, the CPU 101 detects the number of faces and assigns a unique face ID in order from 0 to each detected face. The CPU 101 determines the face center coordinates, face size, face angle, and face orientation in association with the face ID. The center coordinate value of the face is output in the same coordinate system as the absolute coordinates of the virtual light source.

ステップS303で、CPU101は、カウンタiに0を代入する。カウンタiは、ステップS305からS308までの処理を、顔の個数分繰り返すためのループ変数である。   In step S303, the CPU 101 assigns 0 to the counter i. The counter i is a loop variable for repeating the processing from step S305 to S308 for the number of faces.

ステップS304で、CPU101は、カウンタiが顔の個数よりも小さい値か否かを判定する。カウンタiが顔の個数よりも小さい値の場合、CPU101は、ステップS305に進む。カウンタiが顔の個数以上の値の場合、CPU101は、ステップS305〜S308の処理を顔の個数分繰り返したと判定し、ステップS309に進む。   In step S304, the CPU 101 determines whether or not the counter i is smaller than the number of faces. If the counter i is smaller than the number of faces, the CPU 101 proceeds to step S305. If the counter i is a value equal to or greater than the number of faces, the CPU 101 determines that the processes in steps S305 to S308 have been repeated for the number of faces, and proceeds to step S309.

ステップS305で、CPU101は、顔IDがiの顔に関して、撮像素子からの物理的距離を算出する。物理距離算出の為に、CPU101は、距離マップから顔の中心座標までの距離を取得する。   In step S <b> 305, the CPU 101 calculates a physical distance from the imaging device for the face with the face ID i. In order to calculate the physical distance, the CPU 101 acquires the distance from the distance map to the center coordinates of the face.

ステップS306で、CPU101は、顔IDがiの顔の顔器官を検出する。顔器官は、左右の目、鼻及び口である。CPU101は、顔器官の検出結果として、各顔器官の2次元の画像データ上での左右の端、及び、上下の端に該当する座標を出力する。   In step S306, the CPU 101 detects the facial organ of the face whose face ID is i. The facial organs are the left and right eyes, nose and mouth. The CPU 101 outputs the coordinates corresponding to the left and right ends and the upper and lower ends of the two-dimensional image data of each facial organ as the facial organ detection result.

ステップS307で、CPU101は、顔器官の検出結果から、顔の法線情報を生成する。CPU101は、被写体像の仮想空間上で顔の凹凸をシミュレートした結果から、顔の向き、則ち、顔の法線を決定する。CPU101は、顔の向きから既定のマスクに最も近いマスクを選択し、顔の大きさと顔器官の位置に合わせて、当該マスクを正面向きに変形する。   In step S307, the CPU 101 generates facial normal information from the detection result of the facial organs. The CPU 101 determines the direction of the face, that is, the normal of the face, from the result of simulating the unevenness of the face in the virtual space of the subject image. The CPU 101 selects the mask closest to the predetermined mask from the face orientation, and deforms the mask to the front according to the size of the face and the position of the facial organ.

ステップS308で、CPU101は、ステップS307で算出した顔法線情報を顔IDがiの顔法線情報としてRAM103に記憶する。   In step S308, the CPU 101 stores the face normal information calculated in step S307 in the RAM 103 as face normal information having a face ID i.

ステップS309で、CPU101は、RAM103から顔IDが0〜iまでの顔法線情報を読み込み、各顔の距離に合わせて距離マップの各顔の位置に合成し、顔の部分の距離精度が高い距離マップを生成する。   In step S309, the CPU 101 reads the face normal information with face IDs 0 to i from the RAM 103, and synthesizes the face normal information in the distance map according to the distance of each face, so that the distance accuracy of the face portion is high. Generate a distance map.

ステップS310で、CPU101は、仮想光源パラメータに基づいて出力画像データを生成する。仮想光源によって照射された処理対象の出力RGB値(Rout,Gout,Bout)は、下記式(1)で得られる。すなわち、
Rout=[Rt+A×cos(θ)×(1/D^2)×Rv]/M
Gout=[Gt+A×cos(θ)×(1/D^2)×Gv]/M (1)
Bout=[Bt+A×cos(θ)×(1/D^2)×Bv]/M
ここで、(Rt,Gt,Bt)は処理対象の入力画素値、Aは仮想光源の強度、Dは仮想光源とリライティング処理対象の被写体との距離、(Rv,Gv,Bv)は光源反射色を示す。Mは、リライティング後の出力RGB値を正規化するための予め設定された定数を示す。角度θは、仮想光源の照射方向と処理対象画素の被写体の法線ベクトルとがなす角度を示す。
In step S310, the CPU 101 generates output image data based on the virtual light source parameters. Output RGB values (Rout, Gout, Bout) of the processing target irradiated by the virtual light source are obtained by the following formula (1). That is,
Rout = [Rt + A × cos (θ) × (1 / D ^ 2) × Rv] / M
Gout = [Gt + A × cos (θ) × (1 / D ^ 2) × Gv] / M (1)
Bout = [Bt + A × cos (θ) × (1 / D ^ 2) × Bv] / M
Here, (Rt, Gt, Bt) is the input pixel value to be processed, A is the intensity of the virtual light source, D is the distance between the virtual light source and the subject to be relighted, and (Rv, Gv, Bv) is the light source reflection color. Indicates. M represents a preset constant for normalizing the output RGB value after relighting. The angle θ represents an angle formed by the irradiation direction of the virtual light source and the normal vector of the subject of the processing target pixel.

処理対象の入力画素値(Rt,Gt,Bt)は、ステップS300で読み込んだ画像データを構成する画素値である。仮想光源の強度Aは、光の強さスライダ211でユーザが指定する値である。ペースト時の強度は後述する。   The input pixel values (Rt, Gt, Bt) to be processed are pixel values constituting the image data read in step S300. The intensity A of the virtual light source is a value designated by the user with the light intensity slider 211. The strength at the time of pasting will be described later.

CPU101は、仮想光源とリライティング処理対象の被写体との距離Dを、ステップS309で算出した各画素の位置と仮想光源の絶対座標(light_x,light_y,light_z)から算出する。距離Dは、下記式(2)に従い算出される。すなわち、
D={(tP_x-light_x)2+(tP_y-light_y)2+(tP_z-light_z)2}1/2 (2)
ここで、(tP_x,tP_y,tP_z)は対象画像の座標位置を示す。
The CPU 101 calculates the distance D between the virtual light source and the subject to be relighted from the position of each pixel calculated in step S309 and the absolute coordinates of the virtual light source (light_x, light_y, light_z). The distance D is calculated according to the following formula (2). That is,
D = {(tP_x-light_x) 2 + (tP_y-light_y) 2 + (tP_z-light_z) 2 } 1/2 (2)
Here, (tP_x, tP_y, tP_z) indicates the coordinate position of the target image.

光源反射色(Rv,Gv,Bv)は、光源色温度入力エディットボックス217でユーザが指定する光源色温度に応じて決定される。色温度の値が低いほど、赤みがかった反射色となり、色温度が高いほど、青みがかった反射色となる。CPU101は、公知の変換テーブルを参照して、光源色温度を光源反射色(Rv,Gv,Bv)に変換する。   The light source reflection colors (Rv, Gv, Bv) are determined according to the light source color temperature specified by the user in the light source color temperature input edit box 217. The lower the color temperature value, the more reddish reflection color, and the higher the color temperature, the bluish reflection color. The CPU 101 refers to a known conversion table and converts the light source color temperature to the light source reflected color (Rv, Gv, Bv).

CPU101は、仮想光源の絶対位置と角度から仮想光の処理対象への照射方向を特定し、この照射方向と、ステップS309で算出した各画素の仮想空間上での法線ベクトルとから、角度θを算出する。   The CPU 101 identifies the irradiation direction of the virtual light processing target from the absolute position and angle of the virtual light source, and calculates the angle θ from the irradiation direction and the normal vector in the virtual space of each pixel calculated in step S309. Is calculated.

図4は、仮想光源が点光源の場合の、法線ベクトルと仮想光源照射方向との関係を示す概念図である。401は、仮想光源である。402は、仮想空間上の処理対象画素である。403は、処理対象画素402に仮想光源から照射された光の照射方向を示す直線である。点光源である仮想光源401は、出力光を放射状に照射するものとする。404は、処理対象画素402における法線ベクトルである。405は、法線ベクトル404と照射方向403が成す角度であり、処理対象画素402への入射角度θである。   FIG. 4 is a conceptual diagram showing the relationship between the normal vector and the virtual light source irradiation direction when the virtual light source is a point light source. 401 is a virtual light source. Reference numeral 402 denotes a processing target pixel in the virtual space. Reference numeral 403 denotes a straight line indicating the irradiation direction of light emitted from the virtual light source to the processing target pixel 402. The virtual light source 401, which is a point light source, radiates output light radially. Reference numeral 404 denotes a normal vector in the processing target pixel 402. Reference numeral 405 denotes an angle formed by the normal vector 404 and the irradiation direction 403, which is an incident angle θ on the processing target pixel 402.

図5は、仮想光源が面光源の場合の、法線ベクトルと仮想光源照射方向との関係を示す概念図である。501は、仮想光源である。仮想光源の位置を示す座標は、仮想光源501となる面光源の中央座標を示す。502は、仮想空間上の処理対象画素である。503は、処理対象画素502に仮想光源から照射された光の照射方向を示す直線である。面光源である仮想光源501は、その出力面から垂直に光を照射するものとする。504は、処理対象画素502における法線ベクトルである。505は、法線ベクトル504と照射方向503が成す角度であり、処理対象画素502への入射角度θである。   FIG. 5 is a conceptual diagram showing the relationship between the normal vector and the virtual light source irradiation direction when the virtual light source is a surface light source. Reference numeral 501 denotes a virtual light source. The coordinates indicating the position of the virtual light source indicate the central coordinates of the surface light source serving as the virtual light source 501. Reference numeral 502 denotes a processing target pixel in the virtual space. Reference numeral 503 denotes a straight line indicating the irradiation direction of light emitted from the virtual light source to the processing target pixel 502. The virtual light source 501 that is a surface light source irradiates light vertically from its output surface. Reference numeral 504 denotes a normal vector in the processing target pixel 502. Reference numeral 505 denotes an angle formed by the normal vector 504 and the irradiation direction 503, which is an incident angle θ on the processing target pixel 502.

図6は、仮想光源パラメータのコピー処理のフローチャートである。CPU101は、RAM103に格納された制御プログラムを実行することにより、図6に示す処理を実現する。図6を用いて、仮想光源パラメータのコピー処理において、絶対座標でRAM103に記憶されている仮想光源位置を顔に対する相対位置に変換する方法を説明する。   FIG. 6 is a flowchart of virtual light source parameter copy processing. The CPU 101 implements the processing shown in FIG. 6 by executing a control program stored in the RAM 103. A method of converting the virtual light source position stored in the RAM 103 in absolute coordinates into a relative position with respect to the face in the virtual light source parameter copy process will be described with reference to FIG.

ステップS601で、CPU101は、ユーザが仮想光源パラメータのコピー操作をしたか否かを判定する。ユーザが仮想光源パラメータコピーボタン218を押下した場合、CPU101は、コピー操作をしたと判定し、ステップS602に進む。ユーザが仮想光源パラメータコピーボタン218を押下していない場合、CPU101は、コピー操作がないと判定し、図6に示す処理を終了する。   In step S601, the CPU 101 determines whether or not the user has performed a virtual light source parameter copy operation. When the user presses the virtual light source parameter copy button 218, the CPU 101 determines that a copy operation has been performed, and proceeds to step S602. If the user has not pressed the virtual light source parameter copy button 218, the CPU 101 determines that there is no copy operation, and ends the processing shown in FIG.

ステップS602で、CPU101は、主被写体の顔の位置を読み込む。以降、主被写体の顔のことを主顔と記す。被写体像に顔が1つであった場合、CPU101は、その顔を主顔とする。被写体像に複数の顔が存在する場合、CPU101は、合焦距離に存在する顔の中で最も大きい顔を主顔とする。ステップS302およびステップS305での算出結果に従い、主顔の位置は予めRAM103に記憶されている。   In step S602, the CPU 101 reads the position of the face of the main subject. Hereinafter, the face of the main subject is referred to as the main face. If the subject image has one face, the CPU 101 sets that face as the main face. When there are a plurality of faces in the subject image, the CPU 101 sets the largest face among the faces existing at the in-focus distance as the main face. The position of the main face is stored in advance in the RAM 103 according to the calculation results in step S302 and step S305.

ステップS603で、CPU101は、RAM103に記憶されている仮想光源絶対座標と主顔の位置から、主顔に対する相対座標を算出する。仮想光源の相対座標(reLight_x,reLight_y,reLight_z)は、下記式3により算出される。則ち、
reLight_x=sFace_x-sLight_x
reLight_y=sFace_y-sLight_y (3)
reLight_z=sFace_z-sLight_z
ただし、パラメータコピー元の画像における仮想光源絶対座標を(sLight_x,sLight_y,sLight_z)とし、主顔の中心座標を(sFace_x,sFace_y,sFace_z)とする。
In step S <b> 603, the CPU 101 calculates relative coordinates with respect to the main face from the virtual light source absolute coordinates stored in the RAM 103 and the position of the main face. The relative coordinates (reLight_x, reLight_y, reLight_z) of the virtual light source are calculated by the following formula 3. That is,
reLight_x = sFace_x-sLight_x
reLight_y = sFace_y-sLight_y (3)
reLight_z = sFace_z-sLight_z
However, the virtual light source absolute coordinates in the parameter copy source image are (sLight_x, sLight_y, sLight_z), and the center coordinates of the main face are (sFace_x, sFace_y, sFace_z).

ステップS604で、CPU101は、コピーされた仮想光源パラメータをRAM103に記憶する。その際、CPU101は、仮想光源パラメータを構成する仮想光源の位置については、ステップS603で算出した相対座標を記憶する。それ以外の仮想光源パラメータに関しては、CPU101は、コピー元の画像データに適用されている値をそのまま記憶する。コピーされた仮想光源パラメータは、ユーザが異なる画像データを選択して、仮想光源パラメータコピーボタン218を押下するまで、または画像処理装置100が終了するまで、RAM103に保持される。   In step S <b> 604, the CPU 101 stores the copied virtual light source parameter in the RAM 103. At that time, the CPU 101 stores the relative coordinates calculated in step S603 for the position of the virtual light source constituting the virtual light source parameter. For other virtual light source parameters, the CPU 101 stores the values applied to the copy source image data as they are. The copied virtual light source parameter is held in the RAM 103 until the user selects different image data and presses the virtual light source parameter copy button 218 or the image processing apparatus 100 is terminated.

図7は、仮想光源パラメータのペースト処理を示すフローチャートである。CPU101は、RAM103に格納された制御プログラムを実行することにより、図7に示す処理を実現する。図7を用いて、仮想光源パラメータのペースト処理において、仮想光源相対座標をペースト先の画像の被写体像の仮想空間内における絶対座標に変換する方法を説明する。   FIG. 7 is a flowchart showing virtual light source parameter paste processing. The CPU 101 implements the processing shown in FIG. 7 by executing a control program stored in the RAM 103. A method of converting virtual light source relative coordinates to absolute coordinates in the virtual space of the subject image of the paste destination image in the virtual light source parameter paste processing will be described with reference to FIG.

ステップS700で、CPU101は、ユーザが仮想光源パラメータのペースト操作をしたか否かを判定する。ユーザが仮想光源パラメータペーストボタン219を押下した場合、CPU101は、ペースト操作をしたと判定し、ステップS702に進む。ユーザが仮想光源パラメータペーストボタン219を押下していない場合、CPU101は、ペースト操作は無かったと判定し、図7に示す処理を終了する。   In step S700, the CPU 101 determines whether or not the user has performed a paste operation of the virtual light source parameter. When the user presses the virtual light source parameter paste button 219, the CPU 101 determines that a paste operation has been performed, and proceeds to step S702. If the user has not pressed the virtual light source parameter paste button 219, the CPU 101 determines that there has been no paste operation, and ends the processing shown in FIG.

ステップS701で、CPU101は、RAM103内にコピーされた仮想光源パラメータがあるか否かを判定する。ある場合、CPU101は、ステップS702に進む。ない場合、CPU101は、ステップS708に進む。   In step S <b> 701, the CPU 101 determines whether there is a virtual light source parameter copied in the RAM 103. If there is, the CPU 101 proceeds to step S702. If not, the CPU 101 proceeds to step S708.

ステップS702で、CPU101は、RAM103内からコピーされた仮想光源パラメータを読み込む。   In step S <b> 702, the CPU 101 reads the virtual light source parameter copied from the RAM 103.

ステップS703で、CPU101は、ペースト先の画像における主顔の位置と距離を取得する。取得方法は、ステップS302およびステップS305と同様である。CPU101は、取得した主顔の位置と距離を、ライティングに備えてRAM103(またはHDD105)に保存する。   In step S703, the CPU 101 acquires the position and distance of the main face in the paste destination image. The acquisition method is the same as in steps S302 and S305. The CPU 101 stores the acquired position and distance of the main face in the RAM 103 (or HDD 105) in preparation for writing.

ステップS704で、CPU101は、仮想光源位置として記憶されている相対座標をペースト先の画像における絶対座標に変換する。仮想光源絶対座標(tLight_x,tLight_y,tLight_z)は、下記式(4)におより算出される。すなわち、
tLight_x=tFace_x-reLight_x
tLight_y=tFace_y-reLight_y (4)
tLight_z=tFace_z-reLight_z
ただし、主顔の中心座標を(tFace_x,tFace_y,tFace_z)、仮想光源の相対座標(reLight_x,reLight_y,reLight_z)とする。
In step S704, the CPU 101 converts the relative coordinates stored as the virtual light source position into absolute coordinates in the paste destination image. The virtual light source absolute coordinates (tLight_x, tLight_y, tLight_z) are calculated by the following equation (4). That is,
tLight_x = tFace_x-reLight_x
tLight_y = tFace_y-reLight_y (4)
tLight_z = tFace_z-reLight_z
However, the center coordinates of the main face are (tFace_x, tFace_y, tFace_z) and the relative coordinates of the virtual light source (reLight_x, reLight_y, reLight_z).

ステップS705で、CPU101は、ペースト先の画像と関連付けて、ステップS702で参照した仮想光源パラメータをコピーする。そして、CPU101は、仮想光源パラメータを構成する光源の位置を、ステップS704で算出した絶対座標に変更する。これにより、ペースト先の画像の顔に対して、コピー元の画像の顔に対するのと同じ相対位置に、仮想光源を配置できる。   In step S705, the CPU 101 copies the virtual light source parameter referenced in step S702 in association with the paste destination image. Then, the CPU 101 changes the position of the light source constituting the virtual light source parameter to the absolute coordinates calculated in step S704. Thereby, the virtual light source can be arranged at the same relative position as the face of the copy source image with respect to the face of the paste destination image.

ステップS706で、CPU101は、ペースト先の画像に対してライティングを実行する。ステップS707で、CPU101は、プレビューエリア203とサムネイルエリア204の対象画像の表示をライティング結果による出力画像データで更新する。ステップS707の後、CPU101は、図7に示す処理を終了する。   In step S706, the CPU 101 performs writing on the paste destination image. In step S707, the CPU 101 updates the display of the target image in the preview area 203 and the thumbnail area 204 with the output image data based on the lighting result. After step S707, the CPU 101 ends the process shown in FIG.

ステップS708で、CPU101は、ペーストする仮想光源パラメータがない旨をユーザに通知する警告を表示し、図7に示す処理を終了する。   In step S708, the CPU 101 displays a warning notifying the user that there is no virtual light source parameter to be pasted, and ends the process shown in FIG.

図8は、CPU101がステップS302およびステップS305で顔検出した結果の一例である。CPU101は、この顔検出結果をRAM103(またはHDD105)に格納する。   FIG. 8 shows an example of the result of CPU 101 detecting faces in steps S302 and S305. The CPU 101 stores the face detection result in the RAM 103 (or HDD 105).

801は、検出した顔を一意に特定するための顔Noである。顔No801は、複数画像から検出した結果の顔毎にインクリメントされた連続番号からなる。複数画像から検出した複数の顔を管理するために用いる。
802は、顔検出を行った画像データのファイル名である。
803は、主顔かどうかの判定結果である。主顔かどうかの判定方法は前述の通りである。
804は、顔IDである。対象となる画像データ毎に0から割り振られる値からなる。
805は、画像データにおける水平方向の顔の中心座標である。806は、画像データにおける垂直方向の顔の中心座標である。807は、顔の距離である。撮像素子から被写体の顔の物理的な距離を数値化したものである。
808は、画像データにおける顔の大きさである。
809は、撮像装置の光軸を軸とした顔の角度である。
810は、顔の向きである。顔の正面が撮像装置の方向を向いている場合に0となる。
Reference numeral 801 denotes a face number for uniquely identifying the detected face. The face No. 801 includes a serial number incremented for each face as a result of detection from a plurality of images. Used to manage a plurality of faces detected from a plurality of images.
Reference numeral 802 denotes a file name of image data subjected to face detection.
Reference numeral 803 denotes a determination result as to whether the face is a main face. The method for determining whether the face is a main face is as described above.
Reference numeral 804 denotes a face ID. It consists of a value assigned from 0 for each target image data.
Reference numeral 805 denotes center coordinates of the face in the horizontal direction in the image data. Reference numeral 806 denotes center coordinates of the face in the vertical direction in the image data. Reference numeral 807 denotes a face distance. This is a numerical representation of the physical distance of the subject's face from the image sensor.
Reference numeral 808 denotes a face size in the image data.
Reference numeral 809 denotes a face angle with the optical axis of the imaging apparatus as an axis.
Reference numeral 810 denotes a face direction. It is 0 when the front of the face is facing the imaging device.

811から817は顔毎の検出結果例を示すエントリまたはレコードである。エントリ811は、画像例220に対する結果を示す。エントリ812は画像例221に対する結果を示す。エントリ813,814は、画像例222に対する結果を示す。エントリ815,816は、画像例223に対する結果を示す。エントリ817は、画像例224に対する結果を示す。   Reference numerals 811 to 817 denote entries or records indicating examples of detection results for each face. An entry 811 shows the result for the image example 220. An entry 812 shows the result for the image example 221. Entries 813 and 814 show results for the image example 222. Entries 815 and 816 indicate the results for the image example 223. An entry 817 indicates the result for the image example 224.

上記説明では、リライティングの処理工程および仮想光源パラメータペースト処理工程において顔を検出した。この代わりに、フォルダ選択エリア201で処理対象となる画像データが含まれるフォルダが選択された時点で、顔検出および顔距離取得をしてもよい。この場合、リライティング処理工程および仮想光源パラメータペースト処理における顔検出および顔距離取得は、顔検出結果読み込み処理で代替できる。   In the above description, the face is detected in the relighting process and the virtual light source parameter paste process. Instead, face detection and face distance acquisition may be performed when a folder including image data to be processed is selected in the folder selection area 201. In this case, face detection and face distance acquisition in the relighting process and the virtual light source parameter paste process can be replaced by a face detection result reading process.

上記説明では、合焦時に用いた測距離枠位置から主顔を決定したが、ユーザ指示またはユーザが仮想光源を設定したときに一番近くの顔を主顔にするようにしてもよい。こうすることにより、ユーザが主被写体と指定した顔や一番手間をかけて輝度を調整した顔に対する疑似的なライティング処理を、他の画像の顔に適用できる。   In the above description, the main face is determined from the distance measurement frame position used at the time of focusing. However, when the user instruction or the user sets the virtual light source, the closest face may be set as the main face. By doing this, it is possible to apply pseudo lighting processing to the face of the other image, for the face designated as the main subject by the user or the face whose brightness is adjusted with the most effort.

上記説明では、仮想光源パラメータをコピーする際に、相対位置に変換した仮想光源パラメータをRAM103に記憶した。この代わりに、HDD105に画像ファイルとは別ファイルとして記憶してもよいし、画像ファイルのヘッダまたはフッダに付与して記憶してもよい。この場合、コピー元の画像ファイルとペースト先の画像ファイルが異なる機器間でも、ファイルを介して同様のリライティング処理を行うことが可能となる。   In the above description, the virtual light source parameter converted into the relative position is stored in the RAM 103 when the virtual light source parameter is copied. Instead, it may be stored in the HDD 105 as a separate file from the image file, or may be stored in the image file header or footer. In this case, it is possible to perform the same relighting process via a file even between devices having different copy source image files and paste destination image files.

仮想光源が1つの場合を説明したが、これは理解を容易にするためである。複数の仮想光源を利用できる場合でも、コピー元の画像の主顔に対する相対位置とペースト先の主顔に対する相対位置が同じになるように、個々の光源位置を変換することで、同様のリライティング処理を行うことが可能である。   Although the case where there is one virtual light source has been described, this is for ease of understanding. Even when multiple virtual light sources can be used, the same relighting process is performed by converting the individual light source positions so that the relative position of the copy source image to the main face is the same as the relative position of the paste destination main face. Can be done.

本実施例によれば、被写体像の平面上の位置だけではなく、撮像素子から被写体の顔までの物理的な距離も算出する。これにより、仮想光源パラメータコピー元の画像(第1の画像)に含まれる顔と、仮想光源パラメータペースト先の画像(第2の画像)に含まれる顔とで奥行き方向の位置が異なっても、第2の画像に第1の画像と同様のライティング効果を与えることができる。   According to this embodiment, not only the position of the subject image on the plane but also the physical distance from the image sensor to the subject's face is calculated. Thereby, even if the position in the depth direction differs between the face included in the virtual light source parameter copy source image (first image) and the face included in the virtual light source parameter paste destination image (second image), A lighting effect similar to that of the first image can be given to the second image.

第2の画像に複数の顔が含まれていても、その中で主顔を特定し、第1の画像の主顔と仮想光源の相対位置が同じになるように第2の画像の主顔における仮想光源位置を決定する。これにより、第1の画像に含まれる主顔と同様のライティングを第2の画像の主顔に適用できる。第1及び第2の画像における主顔の向きをも加味して、第2の画像の主顔に対する仮想光源位置を決定しても良い。こうすることで、第1の画像の主顔に対するのと同じ照射方向のライティングを第2の画像の主顔に適用できる。   Even if the second image includes a plurality of faces, the main face is specified in the second image, and the main face of the second image is set so that the relative position of the main face of the first image and the virtual light source is the same. The virtual light source position at is determined. Accordingly, the same lighting as the main face included in the first image can be applied to the main face of the second image. The virtual light source position with respect to the main face of the second image may be determined in consideration of the orientation of the main face in the first and second images. By doing so, lighting in the same irradiation direction as that for the main face of the first image can be applied to the main face of the second image.

第1の画像に対する仮想光源パラメータをコピーする際に位置情報を相対値に変換した上でコピーし、第2の画像に対してペーストの際に主顔と同じ座標上の絶対値に変換するので、第2の画像に対して同じライティング環境を実現できる。コピーした仮想光源のパラメータを保持することにより、複数の第2の画像に対して同じライティング環境を実現できる。   When the virtual light source parameter for the first image is copied, the position information is converted into a relative value and then copied, and when the second image is pasted, it is converted into an absolute value on the same coordinates as the main face. The same lighting environment can be realized for the second image. By holding the copied virtual light source parameters, the same lighting environment can be realized for a plurality of second images.

仮想光源パラメータのペースト先の画像の複数の顔のそれぞれにコピー元と同じライティングを実現する実施例2を説明する。図9は、その動作フローチャートを示す。CPU101が、RAM103に格納される制御プログラムを実行することにより、図9に示す処理を実現する。例えば、仮想光源パラメータのコピー先の画像における各顔に、ステップS702〜S706で説明した処理を適用する。   A second embodiment in which the same lighting as the copy source is realized on each of the plurality of faces of the virtual light source parameter paste destination image will be described. FIG. 9 shows a flowchart of the operation. The CPU 101 executes the control program stored in the RAM 103, thereby realizing the processing shown in FIG. For example, the processing described in steps S702 to S706 is applied to each face in the copy destination image of the virtual light source parameter.

なお、図9に示す処理を実行する前の仮想光源パラメータコピー時に、CPU101は、コピー元の画像における、主顔のリライティング前の顔輝度とリライティング後の顔輝度を、予めRAM103に記憶しておく。以降、リライティング前の顔輝度を基準顔輝度、リライティング後の顔輝度を目標顔輝度と記す。基準顔輝度は、リライティング前の画像データにおける顔位置の平均輝度とする。目標顔輝度は、リライティング後の画像データにおける顔位置の平均輝度とする。CPU101は、基準顔輝度と目標顔輝度をステップS603とS604の間で求め、ステップS604において、仮想光源パラメータと共に、RAM103に記憶する。   When copying the virtual light source parameter before executing the processing shown in FIG. 9, the CPU 101 stores in advance in the RAM 103 the face brightness before rewriting of the main face and the face brightness after rewriting in the copy source image. . Hereinafter, the face brightness before rewriting is referred to as reference face brightness, and the face brightness after rewriting is referred to as target face brightness. The reference face luminance is the average luminance of the face position in the image data before relighting. The target face luminance is the average luminance of the face position in the rewritten image data. The CPU 101 obtains the reference face luminance and the target face luminance between steps S603 and S604, and stores them in the RAM 103 together with the virtual light source parameters in step S604.

ステップS901,S902,S903の処理はそれぞれ、ステップS702,S302,S303と同様なので、説明を省略する。   Since the processing of steps S901, S902, and S903 is the same as that of steps S702, S302, and S303, description thereof will be omitted.

ステップS904で、CPU101は、カウンタiが顔数FaceNumよりも小さい値か否かを判定する。カウンタiが顔数FaceNumよりも小さい値の場合、CPU101は、ステップS905に進む。カウンタiが顔数FaceNum以上の値の場合、CPU101は、ステップS905からS912までの処理を顔数FaceNumだけ繰り返したと判定し、ステップS913に進む。ステップS905からS907の処理は、ステップS305からS307の処理と同様なので、詳細な説明を省略する。   In step S904, the CPU 101 determines whether or not the counter i is smaller than the face number FaceNum. When the counter i is smaller than the face number FaceNum, the CPU 101 proceeds to step S905. When the counter i is greater than or equal to the face number FaceNum, the CPU 101 determines that the processing from step S905 to S912 has been repeated by the face number FaceNum, and the process proceeds to step S913. Since the processing from step S905 to S907 is the same as the processing from step S305 to S307, detailed description thereof is omitted.

ステップS908で、CPU101は、顔IDがiである顔に関して顔の輝度を取得する。CPU101はまず、顔の中心座標および顔の大きさから、注目する顔の含まれる画像データの範囲を算出し、算出した範囲の平均輝度を顔の輝度とする。   In step S908, the CPU 101 obtains the brightness of the face regarding the face having the face ID i. First, the CPU 101 calculates the range of image data including the face of interest from the center coordinates of the face and the size of the face, and sets the average luminance of the calculated range as the luminance of the face.

ステップS909で、CPU101は、仮想光源位置として記憶されている相対座標を、顔IDがiである顔に対して仮想光源の相対位置が同じになるように絶対座標に変換する。仮想光源絶対座標(tLight_x,tLight_y,tLight_z)は、先に説明した式(4)で算出できる。式(4)において、顔IDがiの顔の中心座標を(tFace_x,tFace_y,tFace_z)とし、仮想光源の相対座標(reLight_x,reLight_y,reLight_z)とする。   In step S909, the CPU 101 converts the relative coordinates stored as the virtual light source position into absolute coordinates so that the relative position of the virtual light source is the same with respect to the face whose face ID is i. The virtual light source absolute coordinates (tLight_x, tLight_y, tLight_z) can be calculated by Equation (4) described above. In the equation (4), the center coordinates of the face with the face ID i are (tFace_x, tFace_y, tFace_z), and the relative coordinates of the virtual light source (reLight_x, reLight_y, reLight_z).

ステップS910で、CPU101は、顔IDがiである顔についてライティング後の顔輝度が目標顔輝度と同じになる、仮想光源の光強度を算出する。目標輝度と同じになる光強度outAは、式(5)により算出でできる。すなわち、
outA = (tLumi-b2Lumi)×inA/(tLumi-b1Lumi) (5)
ただし、基準顔輝度をb1Lumiとし、目標顔輝度をtLumiとし、ステップS901で読み込んだ仮想光源パラメータの光強度をinA、ステップS908で取得した顔輝度をb2Lumiとする。ステップS908で取得した顔輝度b2Lumiが目標顔輝度tLumiよりも大きい場合、光強度outAを0にする。
In step S <b> 910, the CPU 101 calculates the light intensity of the virtual light source such that the face brightness after lighting is the same as the target face brightness for the face with the face ID i. The light intensity outA that is the same as the target luminance can be calculated by Expression (5). That is,
outA = (tLumi-b2Lumi) x inA / (tLumi-b1Lumi) (5)
However, the reference face luminance is b1Lumi, the target face luminance is tLumi, the light intensity of the virtual light source parameter read in step S901 is inA, and the face luminance acquired in step S908 is b2Lumi. When the face luminance b2Lumi acquired in step S908 is larger than the target face luminance tLumi, the light intensity outA is set to zero.

ステップS911で、CPU101は、顔IDがiである顔に対して、ステップS909で算出した光源絶対座標とステップS910で算出した光強度を用いて、出力画像を生成する。出力画像の算出方法は、ステップS310と同様であるので、詳細な説明を省略する。   In step S911, the CPU 101 generates an output image for the face with the face ID i using the light source absolute coordinates calculated in step S909 and the light intensity calculated in step S910. Since the output image calculation method is the same as that in step S310, detailed description thereof is omitted.

ステップS912で、CPU101は、顔IDがiであることと、ステップS912で生成した出力画像を関連付けてRAM103に記憶する。   In step S <b> 912, the CPU 101 associates the face ID with i with the output image generated in step S <b> 912 and stores it in the RAM 103.

ステップS913で、CPU101は、顔ID=0から顔ID=(FaceNum-1)に関連付けられた出力画像を、各顔の元々の位置で合成する。   In step S913, the CPU 101 synthesizes the output image associated with the face ID = 0 to the face ID = (FaceNum-1) at the original position of each face.

実施例2では、仮想光源パラメータのペースト先の画像(第2の画像)に含まれる各顔に対して、仮想光源パラメータのコピー元の画像(第1の画像)の主顔に対するのと同じ相対関係で仮想光源を設定して同じライティングを適用できる。   In the second embodiment, for each face included in the virtual light source parameter paste destination image (second image), the same relative to the main face of the virtual light source parameter copy source image (first image). The same lighting can be applied by setting a virtual light source in relation.

第2の画像に第1の画像の主顔と同じ顔が含まれる場合、第2の画像のその顔には、第1の画像の主顔と同じ照射方向でのライティングを適用するようにしてもよい。   When the same face as the main face of the first image is included in the second image, lighting in the same irradiation direction as that of the main face of the first image is applied to the face of the second image. Also good.

また、第1の画像の主顔の輝度と、第2の画像に含まれる各顔の輝度の違いに応じて、仮想光源の光強度を変更するので、第2の画像の各顔について、輝度が同じになるライティングを適用できる。加えて、ストロボ発光撮影において撮像装置から遠い顔ほど顔輝度が暗くなってしまっている場合にも、暗い顔ほど仮想光源の光強度が強くなるので、暗い顔ほど明るくなるという明るさ補正の効果も得られる。   Further, since the light intensity of the virtual light source is changed according to the difference between the luminance of the main face of the first image and the luminance of each face included in the second image, the luminance of each face of the second image You can apply lighting that makes the same. In addition, even when the face is farther away from the imaging device in flash photography, the brightness of the virtual light source becomes stronger as the face becomes darker. Can also be obtained.

以上、本発明をその好適な実施形態に基づいて詳述してきたが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。上述の実施形態の一部を適宜組み合わせてもよい。   Although the present invention has been described in detail based on preferred embodiments thereof, the present invention is not limited to these specific embodiments, and various forms within the scope of the present invention are also included in the present invention. included. A part of the above-described embodiments may be appropriately combined.

また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。   The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (9)

第1の画像および第2の画像から顔を検出する顔検出手段と、
前記顔検出手段で検出される顔に仮想光源によるライティングを施すライティング手段と、
前記第1の画像の顔に対する前記仮想光源の相対位置と同じ相対位置で前記第2の画像の顔に適用するように、前記ライティング手段において前記第1の画像に適用した仮想光源パラメータを前記第2の画像に適用する制御手段
とを有することを特徴とする画像処理装置。
Face detection means for detecting a face from the first image and the second image;
Writing means for performing lighting with a virtual light source on the face detected by the face detection means;
The virtual light source parameter applied to the first image in the lighting means is applied to the face of the second image at the same relative position as the relative position of the virtual light source with respect to the face of the first image. And an image processing apparatus having a control unit applied to the second image.
前記仮想光源パラメータが、仮想光源の位置と角度であることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the virtual light source parameter is a position and an angle of a virtual light source. 前記仮想光源パラメータは更に、仮想光源のオンオフ、光強度、光源種類及び光源色温度の1つ以上を含むこと特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the virtual light source parameter further includes one or more of on / off of a virtual light source, light intensity, light source type, and light source color temperature. さらに、前記第1の画像及び前記第2の画像の撮像時に撮像装置からの距離を示す距離情報を取得し、前記顔検出手段の検出結果および前記距離情報を用いて、撮像装置から前記顔検出手段で検出される顔までの距離を算出する手段を有することを特徴とする請求項1に記載の画像処理装置。   Further, distance information indicating a distance from the imaging device is acquired at the time of capturing the first image and the second image, and the face detection is performed from the imaging device using the detection result of the face detection unit and the distance information. 2. The image processing apparatus according to claim 1, further comprising means for calculating a distance to the face detected by the means. 前記ライティング手段は、前記第2の画像の顔へのライティング後の顔輝度が、前記第1の画像の顔へのライティング後の顔輝度と同じになるように、前記第2の画像の顔に適用する仮想光源の光強度を調整することを特徴とする請求項1から4のいずれか1項に記載の画像処理装置。   The writing means applies the facial brightness of the second image to the face of the second image so that the facial brightness after writing to the face of the second image is the same as the facial brightness after writing to the face of the first image. The image processing apparatus according to claim 1, wherein the light intensity of a virtual light source to be applied is adjusted. 前記ライティング手段は、前記第2の画像の複数の顔のそれぞれに、前記第1の画像の顔に適用した仮想光源に基づくライティングを施すことを特徴とする請求項1から5のいずれか1項に記載の画像処理装置。   6. The lighting device according to claim 1, wherein each of the plurality of faces of the second image performs lighting based on a virtual light source applied to the face of the first image. An image processing apparatus according to 1. 第1の画像から顔を検出する第1の顔検出ステップと、
前記第1の顔検出ステップで検出された顔に仮想光源によるライティングを施す第1のライティングステップと、
第2の画像から顔を検出する第2の顔検出ステップと、
前記第2の画像から検出された顔に、前記第1の画像の顔に対する前記仮想光源の相対位置と同じ相対位置でライティングを施す第2のライティングステップ
とを有することを特徴とする画像処理方法。
A first face detection step of detecting a face from the first image;
A first lighting step of performing lighting with a virtual light source on the face detected in the first face detecting step;
A second face detection step of detecting a face from the second image;
An image processing method comprising: a second lighting step of performing lighting on the face detected from the second image at the same relative position as the relative position of the virtual light source with respect to the face of the first image. .
第1の画像から顔を検出する第1の顔検出ステップと、
前記第1の顔検出ステップで検出された顔に仮想光源によるライティングを施す第1のライティングステップと、
前記第1のライティングステップで前記第1の顔検出ステップで検出された顔に適用される前記仮想光源の、前記第1の顔検出ステップで検出された顔に対する相対位置をコピーするコピーステップと、
第2の画像から顔を検出する第2の顔検出ステップと、
前記第2の画像から検出された顔に対して前記コピーステップでコピーされた前記相対位置に仮想光源を置き、前記第2の画像から検出された顔にライティングを施す第2のライティングステップ
とを有することを特徴とする画像処理方法。
A first face detection step of detecting a face from the first image;
A first lighting step of performing lighting with a virtual light source on the face detected in the first face detecting step;
A copy step of copying a relative position of the virtual light source applied to the face detected in the first face detection step in the first lighting step with respect to the face detected in the first face detection step;
A second face detection step of detecting a face from the second image;
A second lighting step of placing a virtual light source at the relative position copied in the copy step with respect to the face detected from the second image, and lighting the face detected from the second image; An image processing method comprising:
画像から顔を検出する顔検出手段と、対象に仮想光源に基づくライティングを施すライティング手段と、操作手段と、制御手段とを有する画像処理装置において、前記制御手段により実行される制御する制御プログラムであって、
前記顔検出手段に第1の画像から顔を検出させる第1の顔検出ステップと、
前記第1の顔検出ステップで検出された顔を前記対象として前記ライティング手段に供給し、前記ライティング手段に仮想光源によるライティングを施させる第1のライティングステップと、
前記第1のライティングステップにおける前記仮想光源の仮想光源パラメータの変更を前記操作手段から受け付けるステップと、
前記操作手段によるコピー操作に従い、前記第1のライティングステップで前記第1の顔検出ステップで検出された顔に適用される前記仮想光源の、前記第1の顔検出ステップで検出された顔に対する相対位置をコピーするコピーステップと、
前記顔検出手段に第2の画像から顔を検出させる第2の顔検出ステップと、
前記第2の顔検出ステップで検出される顔を前記ライティング手段に供給するステップと、
前記ライティング手段に対し、前記操作手段によるペースト操作に従い、前記第2の画像から検出された顔に対して前記コピーステップでコピーされた前記相対位置に仮想光源を配置する配置ステップと、
前記ライティング手段に、前記配置ステップで配置された仮想光源によるライティングを第2の画像から検出された顔にライティングを施させる第2のライティングステップ
とを有することを特徴とする画像処理装置の制御プログラム。
In a control program executed by the control means in an image processing apparatus having a face detection means for detecting a face from an image, a lighting means for lighting a target based on a virtual light source, an operation means, and a control means There,
A first face detection step for causing the face detection means to detect a face from a first image;
Supplying the face detected in the first face detection step as the target to the writing means, and causing the writing means to perform lighting by a virtual light source;
Receiving a change in the virtual light source parameter of the virtual light source in the first lighting step from the operation means;
Relative to the face detected in the first face detection step of the virtual light source applied to the face detected in the first face detection step in the first writing step according to the copy operation by the operation means A copy step to copy the position;
A second face detection step of causing the face detection means to detect a face from a second image;
Supplying the lighting means with the face detected in the second face detection step;
An arrangement step of arranging a virtual light source at the relative position copied in the copy step with respect to the face detected from the second image in accordance with a paste operation by the operation unit with respect to the writing unit;
A control program for an image processing apparatus, comprising: a second writing step for causing the lighting unit to perform lighting on a face detected from a second image by lighting using the virtual light source arranged in the arranging step. .
JP2016139141A 2016-07-14 2016-07-14 Image processing device and method and control program Pending JP2018010498A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016139141A JP2018010498A (en) 2016-07-14 2016-07-14 Image processing device and method and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016139141A JP2018010498A (en) 2016-07-14 2016-07-14 Image processing device and method and control program

Publications (1)

Publication Number Publication Date
JP2018010498A true JP2018010498A (en) 2018-01-18

Family

ID=60994305

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016139141A Pending JP2018010498A (en) 2016-07-14 2016-07-14 Image processing device and method and control program

Country Status (1)

Country Link
JP (1) JP2018010498A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020160945A (en) * 2019-03-27 2020-10-01 キヤノン株式会社 Image processing device, image processing method, program, and storage medium
JP2021069004A (en) * 2019-10-23 2021-04-30 キヤノン株式会社 Image processing device, image processing method, and program
JP7565762B2 (en) 2020-11-16 2024-10-11 キヤノン株式会社 Information processing device, imaging device, control method and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020160945A (en) * 2019-03-27 2020-10-01 キヤノン株式会社 Image processing device, image processing method, program, and storage medium
JP7311995B2 (en) 2019-03-27 2023-07-20 キヤノン株式会社 IMAGE PROCESSING APPARATUS AND IMAGE PROCESSING METHOD, PROGRAM, STORAGE MEDIUM
JP2021069004A (en) * 2019-10-23 2021-04-30 キヤノン株式会社 Image processing device, image processing method, and program
JP7565762B2 (en) 2020-11-16 2024-10-11 キヤノン株式会社 Information processing device, imaging device, control method and program

Similar Documents

Publication Publication Date Title
KR102338576B1 (en) Electronic device which stores depth information associating with image in accordance with Property of depth information acquired using image and the controlling method thereof
US8774562B2 (en) Systems, methods, and media for creating multiple layers from an image
JP6576083B2 (en) Image processing apparatus, image processing method, and program
JP6027581B2 (en) Image composition device, image composition method, control program for image composition device, and recording medium storing the program
JP2017083550A (en) Information processing apparatus, image projection system, and program
JP2018163648A (en) Image processing apparatus, image processing method, and program
JP2016086246A (en) Image processing apparatus and method, and imaging device
JP6028527B2 (en) Display processing apparatus, display processing method, and program
JP2018010498A (en) Image processing device and method and control program
JP2017138927A (en) Image processing device, imaging apparatus, control method and program thereof
CN108282622B (en) Photo shooting method and device
JP7462464B2 (en) Image processing device and method, program, and storage medium
JP6896811B2 (en) Image processing equipment, image processing methods, and programs
JP2020024581A (en) Image processing apparatus, image processing method, and program
JP2012195760A (en) Shooting setting adjustment system, information processing unit, and control method and control program therefor
JP2008067093A (en) Camera system, image processing apparatus, and image processing program
JP6100086B2 (en) Image processing apparatus and image processing method
JP6995554B2 (en) Imaging device and imaging method
JP2015045958A (en) Display processing unit, display processing method, and program
JP2008140107A (en) Image processing apparatus, image processing method, control program, and recording medium
JP2021069004A (en) Image processing device, image processing method, and program
JP7654390B2 (en) Image processing device and control method thereof, imaging device, and program
JP7565762B2 (en) Information processing device, imaging device, control method and program
WO2012074505A1 (en) System and method for creating a three-dimensional image file
JP7169841B2 (en) IMAGE PROCESSING DEVICE, IMAGING DEVICE, 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: 20180227