JP2018010497A - Image processing apparatus - Google Patents

Image processing apparatus Download PDF

Info

Publication number
JP2018010497A
JP2018010497A JP2016139140A JP2016139140A JP2018010497A JP 2018010497 A JP2018010497 A JP 2018010497A JP 2016139140 A JP2016139140 A JP 2016139140A JP 2016139140 A JP2016139140 A JP 2016139140A JP 2018010497 A JP2018010497 A JP 2018010497A
Authority
JP
Japan
Prior art keywords
subject
light source
image
virtual light
processing apparatus
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.)
Granted
Application number
JP2016139140A
Other languages
Japanese (ja)
Other versions
JP6942445B2 (en
Inventor
松山 一郎
Ichiro Matsuyama
一郎 松山
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 JP2016139140A priority Critical patent/JP6942445B2/en
Publication of JP2018010497A publication Critical patent/JP2018010497A/en
Priority to JP2021146150A priority patent/JP2022000778A/en
Application granted granted Critical
Publication of JP6942445B2 publication Critical patent/JP6942445B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To simply adjust a position and light intensity of a virtual light source for relighting.SOLUTION: A camera signal processing unit 108 stores an image captured by an imaging sensor 109 in a DRAM 106. A subject detection unit 111 detects a subject to be subjected to relighting, from the captured image. A control microcomputer 101 displays the detected subject and an operation object to operate a position and light intensity of a virtual light source with respect to the subject, on an LCD of an LCD touch panel 116. A user operates the operation object by means of a touch panel of the LCD touch panel 116. The control microcomputer 101 controls a relighting processing unit 112 to execute relighting processing on the subject with the virtual light source, in response to an operation on the operation object, and displays a result of execution on the LCD.SELECTED DRAWING: Figure 1

Description

本発明は、画像処理装置に関し、特に、入力画像の明るさを補正する画像処理装置に関する。   The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus that corrects the brightness of an input image.

従来、撮影後の画像中の被写体に対して、仮想的な光源(仮想光源)からの光を照射したように画像の明るさを補正するリライティング処理が知られている。この処理により、環境光によって生じる被写体の陰影がより望ましい状態となるよう撮影画像の明るさを部分的に補正できる。   Conventionally, there has been known a relighting process for correcting the brightness of an image so that a subject in a captured image is irradiated with light from a virtual light source (virtual light source). By this processing, the brightness of the captured image can be partially corrected so that the shadow of the subject caused by the ambient light becomes more desirable.

特許文献1には、撮影画像における被写体の陰影状態に応じて、環境光に対する仮想光源の配置を決め、リライティング処理を行う画像処理装置が記載されている。   Patent Document 1 describes an image processing apparatus that determines the arrangement of a virtual light source with respect to ambient light according to the shadow state of a subject in a captured image and performs relighting processing.

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

被写体にどのような陰影が付くことが望ましいかは、ユーザによって異なるのが一般的である。すなわち、被写体の陰影状態から自動的に仮想光源の配置を決定した場合、多くの人にとっては望ましい結果であっても、あるユーザにとっては期待と異なる結果である場合がある。   In general, what kind of shading should be applied to the subject differs depending on the user. That is, when the arrangement of the virtual light source is automatically determined from the shaded state of the subject, a result that is desirable for many people may be different from an expectation for a certain user.

本発明では、ユーザが被写体の陰影状態を容易に調整できる画像処理装置を提示することを目的とする。   An object of the present invention is to present an image processing apparatus that allows a user to easily adjust the shadow state of a subject.

本発明に係る画像処理装置は、画像を入力する入力手段と、前記画像からリライティング処理の対象となる被写体を検出する被写体検出手段と、仮想光源による前記被写体にリライティング処理を施すリライティング処理手段と、前記被写体に対する前記仮想光源の位置と光強度を操作する操作オブジェクトを前記被写体と共に表示する表示手段と、前記操作オブジェクトを操作する操作手段と、前記操作オブジェクトの操作に応じて、前記リライティング処理手段に前記リライティング処理を実行させ、前記表示手段の表示を更新させる制御手段とを有することを特徴とする。   An image processing apparatus according to the present invention includes an input unit that inputs an image, a subject detection unit that detects a subject to be relighted from the image, a relighting processing unit that performs a relighting process on the subject using a virtual light source, A display means for displaying an operation object for operating the position and light intensity of the virtual light source with respect to the subject together with the subject, an operation means for operating the operation object, and a relighting processing means according to an operation of the operation object. Control means for executing the relighting process and updating the display of the display means.

本発明によれば、ユーザが容易に被写体の陰影状態を簡単な操作で調整できるようになる。   According to the present invention, the user can easily adjust the shadow state of the subject with a simple operation.

本発明の一実施例の概略構成ブロック図である。It is a schematic block diagram of one Example of this invention. 本実施例の外観斜視図である。It is an external appearance perspective view of a present Example. リライティング処理の画像例である。It is an example of an image of a relighting process. 処理対象の被写体と仮想光源との位置関係の説明図である。It is explanatory drawing of the positional relationship of the to-be-processed object and a virtual light source. リライティング処理の仮想光源の位置と光強度を操作する画面例である。It is an example of a screen which operates the position and light intensity of the virtual light source of a relighting process. 水平スライドバーと仮想光源の水平位置との関係の説明図である。It is explanatory drawing of the relationship between a horizontal slide bar and the horizontal position of a virtual light source. リライティング処理のプレビュー画像生成に使用するテンプレート画像の説明図である。It is explanatory drawing of the template image used for the preview image generation of a relighting process. プレビュー画像生成の説明図である。It is explanatory drawing of preview image generation. 本実施例のリライティング処理のフローチャートである。It is a flowchart of the relighting process of a present Example. 被写体の傾きに応じた、仮想光源の位置と光強度を操作する画面例である。It is an example of a screen which operates the position and light intensity of a virtual light source according to the inclination of the subject. 複数の被写体に対する、仮想光源の位置と光強度を操作する画面例である。It is an example of a screen for operating the position and light intensity of a virtual light source for a plurality of subjects. 複数の仮想光源を設定する、仮想光源の位置と光強度を操作する画面例である。It is an example of a screen which operates the position and light intensity of a virtual light source which set a some virtual light source. 仮想光源の位置と光強度を円形オブジェクトで操作する別の画面例と説明の図である。It is a figure of another example of a screen which operates the position and light intensity of a virtual light source with a circular object, and description.

以下、図面を参照して、本発明の実施例を詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明に係る画像処理装置の一実施例を採用するデジタルカメラの概略構成ブロック図を示す。   FIG. 1 shows a schematic block diagram of a digital camera that employs an embodiment of an image processing apparatus according to the present invention.

デジタルカメラ100において、101は、内部バス102で接続された各ブロックを制御するマイクロコンピュータ(以下、「制御マイコン」という。)である。   In the digital camera 100, reference numeral 101 denotes a microcomputer (hereinafter referred to as “control microcomputer”) that controls each block connected by the internal bus 102.

103は、制御マイコン101からの要求に基づき、フラッシュメモリ104へのデータの読み書きを制御するフラッシュメモリコントローラである。制御マイコン101は、フラッシュメモリ104に格納されたプログラムを読み込み実行することで、デジタルカメラ100を制御する。   Reference numeral 103 denotes a flash memory controller that controls reading / writing of data from / to the flash memory 104 based on a request from the control microcomputer 101. The control microcomputer 101 controls the digital camera 100 by reading and executing a program stored in the flash memory 104.

105は、制御マイコン101を含む所定のブロックからの要求に基づきDRAM106へのデータの読み書きを制御するDRAMコントローラである。制御マイコン101を含む所定のブロックは、動作中の一時データまたは画像データなどをDRAM106に格納する。   Reference numeral 105 denotes a DRAM controller that controls reading / writing of data from / to the DRAM 106 based on a request from a predetermined block including the control microcomputer 101. A predetermined block including the control microcomputer 101 stores temporary data or image data during operation in the DRAM 106.

107は、デジタルカメラ100の外装に設けられたシャッタボタン及び再生ボタン等で構成される操作部である。操作部107は、ユーザによる操作を制御マイコン101に伝達する。   An operation unit 107 includes a shutter button, a playback button, and the like provided on the exterior of the digital camera 100. The operation unit 107 transmits a user operation to the control microcomputer 101.

108はカメラ信号処理部である。カメラ信号処理部108は、制御マイコン101の指示に基づき撮像センサ109が撮影した画像信号を処理して、得られた画像データをDRAM106に格納する。カメラ信号処理部108及び撮像センサ109は、画像データを画像処理装置に入力する画像入力手段として機能する。カメラ信号処理部108はまた、画像データを制御マイコン101から指定されたサイズに変倍して、記録用画像データとしてDRAM106に格納する。カメラ信号処理部108はまた、画像データを表示用画像データに変倍し、DRAM106の表示用フレームメモリに格納する。カメラ信号処理部108はまた、制御マイコン101から指定された比率で2枚の画像データを合成し、得られた合成画像データをDRAM106に格納する。   Reference numeral 108 denotes a camera signal processing unit. The camera signal processing unit 108 processes an image signal captured by the image sensor 109 based on an instruction from the control microcomputer 101 and stores the obtained image data in the DRAM 106. The camera signal processing unit 108 and the imaging sensor 109 function as an image input unit that inputs image data to the image processing apparatus. The camera signal processing unit 108 also scales the image data to a size designated by the control microcomputer 101 and stores it in the DRAM 106 as recording image data. The camera signal processing unit 108 also scales the image data into display image data and stores it in the display frame memory of the DRAM 106. The camera signal processing unit 108 also synthesizes two pieces of image data at a ratio specified by the control microcomputer 101 and stores the obtained synthesized image data in the DRAM 106.

110はレンズユニットである。レンズユニット110は、ズームレンズ、フォーカシングレンズ及び絞りにより構成され、制御マイコン101の指示に基づきレンズ位置及び絞りを調整可能である。レンズユニット110を介して受光した被写体からの光が、撮像センサ109の受光面上に入射する。   Reference numeral 110 denotes a lens unit. The lens unit 110 includes a zoom lens, a focusing lens, and a diaphragm, and can adjust the lens position and the diaphragm based on instructions from the control microcomputer 101. Light from the subject received through the lens unit 110 enters the light receiving surface of the image sensor 109.

111は被写体検出部である。被写体検出部111は、DRAM106に格納された画像データから人物の顔を検出し、それらの位置と大きさ並びに眼及び口などの器官の位置を検出して制御マイコン101に伝達する。   Reference numeral 111 denotes a subject detection unit. The subject detection unit 111 detects human faces from the image data stored in the DRAM 106, detects their positions and sizes, and positions of organs such as eyes and mouth, and transmits them to the control microcomputer 101.

112はリライティング処理部である。リライティング処理部112は、DRAM106に格納された画像データに対して、制御マイコン101の指示に基づき仮想光源を設定し、指定の被写体をリライティング処理した結果の画像データをDRAM106に格納する。   Reference numeral 112 denotes a relighting processing unit. The relighting processing unit 112 sets a virtual light source for the image data stored in the DRAM 106 based on an instruction from the control microcomputer 101, and stores the image data obtained as a result of the relighting process for the specified subject in the DRAM 106.

113はメモリカードコントローラである。メモリカードコントローラ113は、DRAM106に格納された記録用画像データをデジタルカメラ100に接続されたメモリカード150に記録する。   Reference numeral 113 denotes a memory card controller. The memory card controller 113 records the recording image data stored in the DRAM 106 on the memory card 150 connected to the digital camera 100.

114はグラフィック描画部である。グラフィック描画部114は、制御マイコン101の指示に基づき、ユーザに通知する文字情報、及び、操作に用いるアイコンなどのオブジェクトを、DRAM106の表示用フレームメモリに描画する。   Reference numeral 114 denotes a graphic drawing unit. Based on an instruction from the control microcomputer 101, the graphic drawing unit 114 draws character information to be notified to the user and objects such as icons used for operation in the display frame memory of the DRAM 106.

115は、LCD(Liquid Crystal Display)コントローラである。LCDコントローラ115は、DRAM106の表示用フレームメモリの記憶データを読みだして、LCDタッチパネル116のLCD部に供給して表示させる。117はタッチパネルコントローラである。タッチパネルコントローラ117は、LCDタッチパネル116のタッチパネルに対するユーザのタッチ操作を検出し、そのタッチ位置等を制御マイコン101に伝達する。   Reference numeral 115 denotes an LCD (Liquid Crystal Display) controller. The LCD controller 115 reads the data stored in the display frame memory of the DRAM 106 and supplies it to the LCD unit of the LCD touch panel 116 for display. 117 is a touch panel controller. The touch panel controller 117 detects a user's touch operation on the touch panel of the LCD touch panel 116 and transmits the touch position and the like to the control microcomputer 101.

図2は、デジタルカメラ100の外観図であって、図2(a)はデジタルカメラ100を正面側から見た外観斜視図を示し、図2(b)は背面側から見た概観斜視図を示す。図2(a)に示す曜日、デジタルカメラ100は正面にレンズユニット110を備え、上面に操作部107を構成するシャッタボタン201を備えている。また、図2(b)に示すように、デジタルカメラ100の背面にLCDタッチパネル116と、操作部107を構成する再生ボタン202が配置されている。   2A and 2B are external views of the digital camera 100. FIG. 2A is an external perspective view of the digital camera 100 viewed from the front side, and FIG. 2B is an external perspective view of the digital camera 100 viewed from the back side. Show. On the day of the week shown in FIG. 2A, the digital camera 100 includes a lens unit 110 on the front surface and a shutter button 201 constituting the operation unit 107 on the upper surface. As shown in FIG. 2B, an LCD touch panel 116 and a playback button 202 constituting the operation unit 107 are disposed on the back of the digital camera 100.

図3及び図4を参照して、リライティング処理の概要を説明する。図3(a)は人物300に対するリライティング処理前の画像例を示し、図3(b)は、処理後の画像例を示す。   The outline of the relighting process will be described with reference to FIGS. FIG. 3A shows an example of an image before the relighting process for the person 300, and FIG. 3B shows an example of an image after the process.

図3(a)に示す処理前画像302では、人物300の顔の左側部分304が環境光に照らされて明るく、右側部分306が、相対的に暗くなっている。ここでは図を単純化するため、明部(左側部分304)と暗部(右側部分306)に分けて図示しているが、実際には、顔の表面形状に応じて明るさは連続的に変化する。   In the pre-processing image 302 shown in FIG. 3A, the left part 304 of the face of the person 300 is brightened by the ambient light, and the right part 306 is relatively dark. Here, in order to simplify the figure, the light portion (left portion 304) and the dark portion (right portion 306) are shown separately, but in reality, the brightness changes continuously according to the surface shape of the face. To do.

図3(b)に示す処理後画像310では、人物300に対して環境光の反対側に仮想光源を配置している。仮想光源により、右側部分306が処理前より明るくなると共に、左側部分304に少し暗くなる部分312ができる。なお、仮想光源による明るさの加算により元から明るい部分の白飛びが起きることを防ぐためのゲイン調整により、処理前よりも暗くなる部分ができる。顎の下の、環境光と仮想光源のどちらからの影になる部分314は、暗くなる。   In the post-processing image 310 shown in FIG. 3B, a virtual light source is arranged on the opposite side of the ambient light with respect to the person 300. With the virtual light source, the right portion 306 becomes brighter than before processing, and the left portion 304 has a portion 312 that is slightly darker. Note that a portion that becomes darker than before processing can be formed by gain adjustment for preventing the bright portion from being overexposed by the addition of the brightness by the virtual light source. The portion 314 under the chin that is shaded from either the ambient light or the virtual light source is darkened.

リライティング処理の前提として、顔の凹凸を決定する必要がある。制御マイコン101は、被写体検出部111の検出した人物300の顔の位置と大きさ、並びに目や口などの器官の位置をもとに、顔の奥行き方向の表面形状を推定する。または、画像の撮影時に位相差検出方式などの測距手段によって、処理対象となる部分の奥行き方向の距離を検出または推定することができ、この距離データを使っても凹凸形状を決定できる。   As a premise of the relighting process, it is necessary to determine the unevenness of the face. The control microcomputer 101 estimates the surface shape in the depth direction of the face based on the position and size of the face of the person 300 detected by the subject detection unit 111 and the positions of organs such as eyes and mouth. Alternatively, the distance in the depth direction of the portion to be processed can be detected or estimated by distance measuring means such as a phase difference detection method at the time of image capture, and the uneven shape can be determined using this distance data.

例えば、図4に示すように、人物300の顔に対して矩形410乃至429で示す水平位置の奥行き方向の表面形状を曲線420のように推定する。制御マイコン101は、こうして得られた曲線420において、矩形410〜429と対応する表面部分の法線ベクトル450〜469を求める。制御マイコン101は、人物300の顔の中心470を、曲線420の中央表面から奥行き方向に所定距離を設けた位置に設定する。仮想光源471が、図4では、中心470に対して十分遠い距離に配置されているものとする。仮想光源471から中心470に向かうベクトル472は、仮想光源471から放たれる仮想的な光線の光軸を示す。各矩形410〜429に対応する表面部分の法線ベクトル450〜469とベクトル472の成す角度が90度から270度の範囲内である場合、制御マイコン101は、180度に近い矩形領域ほど明るく補正する。制御マイコン101は、これらの処理を画素単位で、リライティング処理の対象となる被写体の全体に対して実行する。   For example, as shown in FIG. 4, the surface shape in the depth direction of the horizontal position indicated by rectangles 410 to 429 with respect to the face of the person 300 is estimated as a curve 420. The control microcomputer 101 obtains normal vectors 450 to 469 of the surface portions corresponding to the rectangles 410 to 429 in the curve 420 thus obtained. The control microcomputer 101 sets the center 470 of the face of the person 300 at a position where a predetermined distance is provided in the depth direction from the center surface of the curve 420. It is assumed that the virtual light source 471 is disposed at a sufficiently long distance from the center 470 in FIG. A vector 472 from the virtual light source 471 toward the center 470 indicates the optical axis of a virtual light beam emitted from the virtual light source 471. When the angle formed by the normal vectors 450 to 469 of the surface portions corresponding to the respective rectangles 410 to 429 and the vector 472 is within the range of 90 degrees to 270 degrees, the control microcomputer 101 corrects the rectangular area closer to 180 degrees brighter. To do. The control microcomputer 101 performs these processes on the entire subject to be relighted in units of pixels.

図5は、仮想光源の位置と強さを変更するユーザインターフェースとなる画面例を示す。図5(a)は、リライティング処理前にLCDタッチパネル116のLCDに表示される画像例を示し、図5(b)は、仮想光源を操作する要素を追加表示する画像例を示す。   FIG. 5 shows an example of a screen serving as a user interface for changing the position and intensity of the virtual light source. FIG. 5A shows an example of an image displayed on the LCD of the LCD touch panel 116 before the relighting process, and FIG. 5B shows an example of an image additionally displaying elements for operating the virtual light source.

ユーザが再生ボタン202を押下することで、制御マイコン101はデジタルカメラ100を再生モードとし、メモリカード150に格納された画像データをLCDタッチパネル116のLCDに再生表示する。図5(a)は、このようにLCDに再生表示される画像例500を示す。画像例500では、人物300の向かって右側の手前に窓502があり、そこからの環境光が人物300の顔の左側を明るく照らしている。制御マイコン101は、グラフィック描画部114によって画面の左上に歯車様のアイコン504を表示する。ユーザがこのアイコン504をタッチすると、制御マイコン101は所定のメニューを表示し、ユーザはそのメニュー上でリライティング処理を選択できる。   When the user presses the playback button 202, the control microcomputer 101 sets the digital camera 100 in the playback mode, and plays back and displays the image data stored in the memory card 150 on the LCD of the LCD touch panel 116. FIG. 5A shows an example image 500 reproduced and displayed on the LCD in this way. In the example image 500, a window 502 is in front of the right side of the person 300, and the ambient light from there illuminates the left side of the face of the person 300 brightly. The control microcomputer 101 displays a gear-like icon 504 on the upper left of the screen by the graphic drawing unit 114. When the user touches this icon 504, the control microcomputer 101 displays a predetermined menu, and the user can select a relighting process on the menu.

ユーザがメニュー上でリライティング処理を選択すると、制御マイコン101は、図5(b)に示す画像例505のように、被写体検出により処理対象として人物の顔の部分を示す枠506を追加的に表示する。制御マイコン101は、仮想光源の位置を水平方向で操作する水平スライドバー508とつまみ510、及び、仮想光源の出力光強度を垂直方向で操作する垂直スライドバー512とつまみ514を追加表示する。制御マイコン101は更に、画面左上にキャンセルボタン516を表示し、画面右上に決定ボタン518を表示する。ユーザは、LCDタッチパネル116のタッチパネルに対してつまみ510をタッチしたまま左右にスライドさせることで仮想光源の水平位置を変更でき、つまみ514をタッチしたまま上下にスライドさせることで仮想光源の強さを変更できる。   When the user selects the relighting process on the menu, the control microcomputer 101 additionally displays a frame 506 indicating a face portion of a person as a processing target by subject detection as in an image example 505 illustrated in FIG. To do. The control microcomputer 101 additionally displays a horizontal slide bar 508 and a knob 510 for operating the position of the virtual light source in the horizontal direction, and a vertical slide bar 512 and a knob 514 for operating the output light intensity of the virtual light source in the vertical direction. The control microcomputer 101 further displays a cancel button 516 on the upper left of the screen and a determination button 518 on the upper right of the screen. The user can change the horizontal position of the virtual light source by sliding left and right while touching the knob 510 with respect to the touch panel of the LCD touch panel 116, and can increase the strength of the virtual light source by sliding up and down while touching the knob 514. Can be changed.

図6を参照して、水平スライドバー508上でのつまみ510の位置と、仮想光源の位置とのの関係を説明する。図6(a)は、スライドバー508のつまみ510の操作に対する仮想光源471の可動範囲601を示す。制御マイコン101は、つまみ510の操作に応じて、対象の中心470から一定距離Rの円周上で仮想光源471を移動させる。ただし、制御マイコン101は、常に中心470に向いた状態に仮想光源471を維持する。図6(b)に示すように、水平スライドバー508の全長Hを等分割した個々の範囲が、可動範囲角θを等分割した個々の範囲に対応する。   The relationship between the position of the knob 510 on the horizontal slide bar 508 and the position of the virtual light source will be described with reference to FIG. FIG. 6A shows the movable range 601 of the virtual light source 471 with respect to the operation of the knob 510 of the slide bar 508. In response to the operation of the knob 510, the control microcomputer 101 moves the virtual light source 471 on the circumference of a certain distance R from the target center 470. However, the control microcomputer 101 always maintains the virtual light source 471 so as to face the center 470. As shown in FIG. 6B, each range obtained by equally dividing the entire length H of the horizontal slide bar 508 corresponds to each range obtained by equally dividing the movable range angle θ.

図7及び図8を参照して、リライティング処理のプレビュー画像の生成方法を説明する。図7はプレビュー画像例を示し、図8は、処理前画像と2つのテンポラリ画像の合成処理を示す。   A method of generating a preview image for relighting processing will be described with reference to FIGS. FIG. 7 shows an example of a preview image, and FIG. 8 shows a synthesis process of an image before processing and two temporary images.

リライティング処理のユーザインターフェースにおいて、制御マイコン101は、スライドバーのつまみの動きに追従して仮想光源の位置と強さを変更した結果をLCDタッチパネル116のLCDに表示する。すなわち、制御マイコン101は、スライドバーのつまみが操作された、その操作に応じた仮想光源の位置及び光強度のリライティング処理をリライティング処理部112に実行させる。そして、制御マイコン101は、リライティングの処理結果または以下に説明するプレビュー画像でLCDの表示を更新する。   In the user interface of the relighting process, the control microcomputer 101 displays the result of changing the position and intensity of the virtual light source following the movement of the knob of the slide bar on the LCD of the LCD touch panel 116. That is, the control microcomputer 101 causes the relighting processing unit 112 to perform relighting processing of the position and light intensity of the virtual light source according to the operation of the slide bar knob. Then, the control microcomputer 101 updates the display on the LCD with the result of the relighting process or a preview image described below.

つまみの位置に対する操作速度に対して、リライティング処理に時間がかかる場合がある。本実施例では、これに対処するため、制御マイコン101は、予め作成した複数のテンポラリ画像を合成したプレビュー画像を生成して先に表示する。   The relighting process may take time with respect to the operation speed for the position of the knob. In the present embodiment, in order to cope with this, the control microcomputer 101 generates a preview image obtained by combining a plurality of previously created temporary images and displays it first.

図7(a)に示す画像701は、リライティング処理を行う前の画像を示す。P0は画像701を構成する画素の1つである。図7(b)に示す画像702は、仮想光源を可動範囲601の最も左の位置712に設定してリライティング処理を行った第1のテンポラリ画像である。P1は処理前の画像701における画素P0に対応する画素である。図7(c)に示す画像703は、仮想光源を可動範囲601の最も右の位置713に設定してリライティング処理を行った第2のテンポラリ画像である。P2は、処理前の画像701の画素P0に対応する画素である。   An image 701 shown in FIG. 7A shows an image before the relighting process is performed. P0 is one of the pixels constituting the image 701. An image 702 shown in FIG. 7B is a first temporary image obtained by performing the relighting process with the virtual light source set at the leftmost position 712 of the movable range 601. P1 is a pixel corresponding to the pixel P0 in the image 701 before processing. An image 703 shown in FIG. 7C is a second temporary image that has been relighted with the virtual light source set at the rightmost position 713 of the movable range 601. P2 is a pixel corresponding to the pixel P0 of the image 701 before processing.

図8は、処理前画像701と2つのテンポラリ画像702,703の合成関係を示す。制御マイコン101は、まず2つのテンポラリ画像702,703をカメラ信号処理部108またはリライティング処理部112に合成させることで、仮プレビュー画像704を生成させる。Ptは、処理前の画像701の画素P0に対応する仮プレビュー画像704の画素である。画素Ptの画素値ptは、水平スライドバー508のつまみ510の位置aに応じて、式1により得られる。すなわち、
pt=a×p1+(1−a)×p2・・・(1)
ここで、p1,p2はそれぞれ画素P1,P2の画素値である。aはつまみ4610の位置に比例して変化し、水平スライドバー508の左端に位置したときに0、右端に位置したときに1となる。
FIG. 8 shows a composition relationship between the pre-processing image 701 and the two temporary images 702 and 703. The control microcomputer 101 first generates a temporary preview image 704 by combining the two temporary images 702 and 703 with the camera signal processing unit 108 or the relighting processing unit 112. Pt is a pixel of the temporary preview image 704 corresponding to the pixel P0 of the image 701 before processing. The pixel value pt of the pixel Pt is obtained by Expression 1 according to the position a of the knob 510 of the horizontal slide bar 508. That is,
pt = a * p1 + (1-a) * p2 (1)
Here, p1 and p2 are pixel values of the pixels P1 and P2, respectively. a changes in proportion to the position of the knob 4610, and becomes 0 when positioned at the left end of the horizontal slide bar 508, and becomes 1 when positioned at the right end.

さらに、制御マイコン101は、生成した仮プレビュー画像704と処理前の画像701をカメラ信号処理部108またはリライティング処理部112により合成させることで、プレビュー画像805を生成させる。プレビュー画像805のPは、処理前の画像701の画素P0に対応する画素である。画素Pの画素値pは、垂直スライドバー512のつまみ514の位置bに応じて、式2により得られる。すなわち、
p=b×pt+(1−b)×p0
=b×(a×p1+(1−a)×p2)+(1−b)×p0・・・(2)
ここで、bはつまみ514の位置に比例して変化し、垂直スライドバー512の上端に位置したときに0、下端に位置したときに1となる。この合成処理をリライティング処理の対象となる被写体の全画素に対して行うことで、スライドバーのつまみの動きに追従したプレビュー画像が生成される。
Further, the control microcomputer 101 causes the camera signal processing unit 108 or the relighting processing unit 112 to combine the generated temporary preview image 704 and the unprocessed image 701 to generate a preview image 805. P in the preview image 805 is a pixel corresponding to the pixel P0 of the image 701 before processing. The pixel value p of the pixel P is obtained by Expression 2 according to the position b of the knob 514 of the vertical slide bar 512. That is,
p = b * pt + (1-b) * p0
= B * (a * p1 + (1-a) * p2) + (1-b) * p0 (2)
Here, b changes in proportion to the position of the knob 514, and becomes 0 when positioned at the upper end of the vertical slide bar 512, and becomes 1 when positioned at the lower end. By performing this synthesis process on all the pixels of the subject to be relighted, a preview image that follows the movement of the slide bar knob is generated.

仮想光源の複数の位置についてテンポラリ画像を生成したが、2つの光強度についてテンポラリ画像を生成し、同様の手順で仮プレビュー画像及びプレビュー画像を生成し、仮想光源の操作中の表示に使用するようにしてもよい。   Temporary images are generated for a plurality of positions of the virtual light source, but temporary images are generated for two light intensities, a temporary preview image and a preview image are generated in the same procedure, and used for display during operation of the virtual light source. It may be.

図9は、本実施例のリライティング処理のフローチャートを示す。制御マイコン101は、図9に対応する制御プログラムをフラッシュメモリ104から読み込み実行することで、図9に示す処理を実現する。図4を参照して説明したように、画像再生中にメニュー表示からリライティング処理をユーザが選択すると、制御マイコン101が、図9に示す処理を実行する。   FIG. 9 shows a flowchart of the relighting process of this embodiment. The control microcomputer 101 implements the processing shown in FIG. 9 by reading the control program corresponding to FIG. 9 from the flash memory 104 and executing it. As described with reference to FIG. 4, when the user selects the relighting process from the menu display during the image reproduction, the control microcomputer 101 executes the process shown in FIG.

ステップS901で、制御マイコン101は、被写体検出部111により、再生中の画像から人物の顔を検出させ、リライティング処理の対象となる主被写体を決定する。   In step S <b> 901, the control microcomputer 101 causes the subject detection unit 111 to detect the face of a person from the image being reproduced, and determines a main subject to be rewritten.

ステップS902で、制御マイコン101は、ステップS901で主被写体を決定できたかどうかを判定する。制御マイコン101は、主被写体を決定できている場合、ステップS904に進み、決定できていない場合、S903に進む。   In step S902, the control microcomputer 101 determines whether the main subject has been determined in step S901. If the main subject has been determined, the control microcomputer 101 proceeds to step S904, and if not, proceeds to step S903.

ステップS903で、制御マイコン101は、LCDタッチパネル116のLCDに中断メッセージを表示する。ユーザがLCDタッチパネル116のタッチパネルをタッチしたら、制御マイコン101は、中断メッセージの表示をクリアして、図9に示すリライティング処理を終了する。   In step S <b> 903, the control microcomputer 101 displays an interruption message on the LCD of the LCD touch panel 116. When the user touches the touch panel of the LCD touch panel 116, the control microcomputer 101 clears the display of the interruption message and ends the relighting process shown in FIG.

ステップS904で、制御マイコン101は、図7及び図8を参照して説明したように、2つのテンポラリ画像を生成する。ステップS905で、制御マイコン101は、グラフィック描画部114によりDRAM106の表示用フレームメモリに対して操作オブジェクトを描画させる。描画オブジェクトは、主被写体を囲む枠506、水平スライドバー508とつまみ510、垂直スライドバー512とつまみ514、並びに、決定ボタン518及びキャンセルボタン516といった操作用オブジェクトからなる。   In step S904, the control microcomputer 101 generates two temporary images as described with reference to FIGS. In step S <b> 905, the control microcomputer 101 causes the graphic drawing unit 114 to draw an operation object in the display frame memory of the DRAM 106. The drawing object includes operation objects such as a frame 506 surrounding the main subject, a horizontal slide bar 508 and a knob 510, a vertical slide bar 512 and a knob 514, and a determination button 518 and a cancel button 516.

ステップS906で、制御マイコン101は、記録用の画像の生成を開始する。具体的には、制御マイコン101は、処理前の画像に対して、現在のスライドバーのつまみの位置に応じたリライティング処理を開始する。   In step S906, the control microcomputer 101 starts generating a recording image. Specifically, the control microcomputer 101 starts a relighting process corresponding to the current position of the knob of the slide bar on the image before processing.

ステップS907で、制御マイコン101は、図7及び図8を参照して説明したように、処理前画像701と2つのテンポラリ画像702,703を合成してプレビュー画像705を生成し、LCDタッチパネル116のLCDに表示する。   In step S907, the control microcomputer 101 generates a preview image 705 by synthesizing the pre-processing image 701 and the two temporary images 702 and 703 as described with reference to FIGS. Display on LCD.

ステップS908で、制御マイコン101は、決定ボタン518にタッチされたか否かを判定する。制御マイコン101は、決定ボタン518にタッチされている場合、ステップS909に進み、タッチされていない場合、ステップS912に進む。   In step S908, the control microcomputer 101 determines whether or not the determination button 518 has been touched. If the determination button 518 is touched, the control microcomputer 101 proceeds to step S909. If not, the control microcomputer 101 proceeds to step S912.

ステップS909で、制御マイコン101は、ステップS906で開始した記録用の画像の生成が完了するのを待つ。完了するか、または既に完了している場合、制御マイコン101は、ステップS910に進む。ステップS910で、制御マイコン101は、生成した記録用の画像をメモリカード150に記録する。ステップS911で、制御マイコン101は、生成したテンポラリ画像及びプレビュー画像並びに描画した操作用オブジェクトなどを削除してリライティング処理の開始前の状態に戻す終了処理を行い、図9に示す処理を終了する。   In step S909, the control microcomputer 101 waits for the completion of the recording image generation started in step S906. If completed or already completed, the control microcomputer 101 proceeds to step S910. In step S <b> 910, the control microcomputer 101 records the generated recording image on the memory card 150. In step S911, the control microcomputer 101 performs an end process for deleting the generated temporary image and preview image, the drawn operation object, and the like to return to the state before the start of the relighting process, and ends the process shown in FIG.

ステップS912で、制御マイコン101は、中断ボタンにタッチされたか否かを判定する。制御マイコン101は、中断ボタンにタッチされている場合、ステップS913に進み、タッチされていない場合、ステップS914に進む。   In step S912, the control microcomputer 101 determines whether or not the interruption button has been touched. If the interrupt button is touched, the control microcomputer 101 proceeds to step S913. If not, the control microcomputer 101 proceeds to step S914.

ステップS913で、制御マイコン101は、記録用の画像の生成が継続中か否かを確認し、継続していれば生成を中断して、ステップS911に進む。ステップS911で、制御マイコン101は、先に説明したように終了処理を実行して、図9に示す処理を終了する。   In step S913, the control microcomputer 101 confirms whether or not the generation of the recording image is continuing. If it continues, the generation is interrupted, and the process proceeds to step S911. In step S911, the control microcomputer 101 executes an end process as described above, and ends the process shown in FIG.

ステップS914で、制御マイコン101は、スライドバーのつまみの位置が変化したか否かを判定する。制御マイコン101は、つまみの位置に変化がある場合、ステップS915に進み、変化が無い場合、ステップS916に進む。   In step S914, the control microcomputer 101 determines whether or not the position of the slide bar knob has changed. If there is a change in the position of the knob, the control microcomputer 101 proceeds to step S915. If there is no change, the control microcomputer 101 proceeds to step S916.

ステップS915で、制御マイコン101は、ステップS913と同様に、記録画像の生成が継続中かどうかを確認し、継続している場合にその生成を中断して、ステップS906に戻る。   In step S915, as in step S913, the control microcomputer 101 confirms whether or not the generation of the recorded image is continuing. If the recording image is continued, the control microcomputer 101 interrupts the generation and returns to step S906.

ステップS916で、制御マイコン101は、記録用の画像の生成が完了したかどうかを確認する。記録用画像の生成が完了していて、プレビュー画像の表示に利用可能なとき、制御マイコン101は、ステップS917に進む。記録用画像の生成が完了していないか、既に記録用の画像が表示に用いられている場合、制御マイコン101は、ステップS908に戻る。   In step S916, the control microcomputer 101 confirms whether the generation of the recording image is completed. When the generation of the recording image is completed and can be used for displaying the preview image, the control microcomputer 101 proceeds to step S917. If the generation of the recording image has not been completed or if the recording image has already been used for display, the control microcomputer 101 returns to step S908.

ステップS917で、制御マイコン101は、LCDタッチパネル116のLCDに表示すべき画像を、プレビュー画像から記録用の画像に差し替えて、ステップS908に戻る。   In step S917, the control microcomputer 101 replaces the image to be displayed on the LCD of the LCD touch panel 116 with a recording image from the preview image, and returns to step S908.

以上のように、本実施例によれば、ユーザが簡単な操作で被写体の陰影状態を調整できる。   As described above, according to the present embodiment, the user can adjust the shadow state of the subject with a simple operation.

リライティング処理の対象となる主被写体が傾いていても良い。このような傾きに対応する実施例2を説明する。   The main subject to be rewritten may be tilted. A second embodiment corresponding to such an inclination will be described.

図10は、主被写体の傾きに応じたユーザインターフェースの画面構成例を示す。制御マイコン101は、メニューからリライティング処理をユーザが選択したときに、LCDタッチパネル116のLCDに図10に示すような画面を表示する。ここで処理対象としている画像は、リライティング処理の対象となる人物300の顔がLCDタッチパネル116のLCDの画面に対して傾いている点が、図5(b)の表示例とは異なる。   FIG. 10 shows a screen configuration example of the user interface according to the inclination of the main subject. When the user selects the relighting process from the menu, the control microcomputer 101 displays a screen as shown in FIG. 10 on the LCD of the LCD touch panel 116. The image to be processed here is different from the display example in FIG. 5B in that the face of the person 300 to be rewritten is tilted with respect to the LCD screen of the LCD touch panel 116.

制御マイコン101は、主被写体300に対して、顔部分を覆う枠1006を主被写体300の傾きに合わせて表示する。制御マイコン101は、枠1006の下の水平スライドバー1008と、右側の垂直スライドバー1012も、顔部分の傾きに合わせて傾けて表示する。水平スライドバー1008に対するつまみ1010と、垂直スライドバー1012に対するつまみ1014は、それぞれ、水平スライドバー1008及び垂直スライドバー1012に沿って移動可能に配置される。水平スライドバー1008のつまみにより仮想光源の水平位置を調整でき、垂直スライドバー1012のつまみ1014により、仮想光源の光強度を調整できるのは、図4の場合と同じである。仮想光源の可動範囲も、顔部分の傾きに応じて傾ける。   The control microcomputer 101 displays a frame 1006 covering the face portion on the main subject 300 in accordance with the inclination of the main subject 300. The control microcomputer 101 also displays the horizontal slide bar 1008 below the frame 1006 and the vertical slide bar 1012 on the right side in accordance with the inclination of the face portion. A knob 1010 for the horizontal slide bar 1008 and a knob 1014 for the vertical slide bar 1012 are movably disposed along the horizontal slide bar 1008 and the vertical slide bar 1012, respectively. The horizontal position of the virtual light source can be adjusted by the knob of the horizontal slide bar 1008, and the light intensity of the virtual light source can be adjusted by the knob 1014 of the vertical slide bar 1012, as in FIG. The movable range of the virtual light source is also tilted according to the tilt of the face portion.

以上のように、実施例2によれば、画像中の人物の顔の傾きに応じて顔の左右方向から仮想光源を照射して、その陰影状態を調整できる。   As described above, according to the second embodiment, the shadow state can be adjusted by irradiating the virtual light source from the left and right directions of the face according to the inclination of the face of the person in the image.

1つの画像内にリライティング処理の対象となる被写体が複数ある場合に、仮想光源をまとめて設定するか、被写体毎に仮想光源を設定する実施例3を説明する。   A third embodiment will be described in which virtual light sources are set together or virtual light sources are set for each subject when there are a plurality of subjects to be relighted in one image.

図11は、実施例3におけるLCDタッチパネル116のLCDに表示する画面例を示す。図11では、人物300に加えて、人物1100が、1つの撮像画像に含まれている。図11(a)は、人物300,1100の両方に同じ設定の仮想光源によるリライティング処理を適用する一括適用モードの画面例を示し、図11(b)は、人物300,1100のそれぞれに個別に仮想光源を設定する個別適用モードの画面例を示す。人物1100に対しては、その顔の部分を囲む枠1106が、人物300に対する枠506と同様に表示される。   FIG. 11 shows an example of a screen displayed on the LCD of the LCD touch panel 116 in the third embodiment. In FIG. 11, in addition to the person 300, a person 1100 is included in one captured image. FIG. 11A shows a screen example of a batch application mode in which the relighting process using the virtual light source having the same setting is applied to both of the persons 300 and 1100, and FIG. 11B shows each of the persons 300 and 1100 individually. The example of a screen of individual application mode which sets a virtual light source is shown. For the person 1100, a frame 1106 surrounding the face portion is displayed in the same manner as the frame 506 for the person 300.

一括適用モードでは、制御マイコン101は、図11(a)に示すような画像をLCDタッチパネル116のLCDに表示する。すなわち、制御マイコン101は、片方の人物300に対し、図5と同様に、枠506、水平スライドバー508とつまみ510及び垂直スライドバー512とつまみ514を表示する。ユーザは、つまみ510,514により、人物300に対する仮想光源の位置(角度)と光強度を調整できる。制御マイコン101は、人物300に対する仮想光源の設定と同じ設定を他の人物1100にも適用する。これにより、2つの人物300,1100に対して同じ設定の仮想光源によるリライティング処理が適用される。キャンセルボタン1116と決定ボタン1118の機能はそれぞれ、キャンセルボタン516及び決定ボタン518と同じである。   In the collective application mode, the control microcomputer 101 displays an image as shown in FIG. 11A on the LCD of the LCD touch panel 116. That is, the control microcomputer 101 displays the frame 506, the horizontal slide bar 508 and the knob 510, and the vertical slide bar 512 and the knob 514 for one person 300 as in FIG. The user can adjust the position (angle) of the virtual light source with respect to the person 300 and the light intensity using the knobs 510 and 514. The control microcomputer 101 applies the same setting as the setting of the virtual light source for the person 300 to the other person 1100. Accordingly, the relighting process using the virtual light source having the same setting is applied to the two persons 300 and 1100. The functions of the cancel button 1116 and the enter button 1118 are the same as those of the cancel button 516 and the enter button 518, respectively.

図11(a)に示す画面において、他の人物1100の枠1106の左上には、仮想光源を個別に設定するモードへの切替えを制御マイコン101に指示する十字様の切替えアイコン1120が表示される。ユーザが切替えアイコン1120をタップすると、制御マイコン101は、図11(b)に示す画面例の個別適用のモードに切り替える。   In the screen shown in FIG. 11A, a cross-shaped switching icon 1120 for instructing the control microcomputer 101 to switch to a mode in which virtual light sources are individually set is displayed at the upper left of the frame 1106 of another person 1100. . When the user taps the switching icon 1120, the control microcomputer 101 switches to the individual application mode of the screen example shown in FIG.

個別的用モードでは、図11(b)に示すように、制御マイコン101は、人物1100にも、顔部分を囲む枠1106、水平スライドバー1108とつまみ1110及び垂直スライドバー1112とつまみ1114を表示する。ユーザは、つまみ1110,1114により、人物1100に対する仮想光源の位置(角度)と光強度を、人物300に対する仮想光源とは別に調整できる。制御マイコン101は、人物1100の顔を囲う枠1106の左上には、マイナス字状の切替えアイコン1122を描画する。ユーザが、アイコン1122をタッチすると、制御マイコン101は、 図11(a)に示す一括適用モードの画面に切り替える。   In the individual mode, as shown in FIG. 11B, the control microcomputer 101 also displays a frame 1106 surrounding the face portion, a horizontal slide bar 1108 and a knob 1110, and a vertical slide bar 1112 and a knob 1114 on the person 1100. To do. The user can adjust the position (angle) and light intensity of the virtual light source with respect to the person 1100 separately from the virtual light source with respect to the person 300 using the knobs 1110 and 1114. The control microcomputer 101 draws a minus-shaped switching icon 1122 on the upper left of a frame 1106 that surrounds the face of the person 1100. When the user touches the icon 1122, the control microcomputer 101 switches to a screen in the batch application mode shown in FIG.

実施例3では、画像中の複数の人物の顔に対し、仮想光源の設定を一括適用するか、個別に適用するかを簡単な操作で切り替えることが出来る。   In the third embodiment, it is possible to switch between applying a virtual light source setting to a plurality of human faces in an image at once or applying them individually with a simple operation.

1つの主被写体に複数の仮想光源を設定できる実施例4を説明する。図12は、そのユーザインターフェースとなる画面例を示す。図12(a)は、リライティング処理を選択したときの初期画面例を示し、図12(b)は、2つ目の仮想光源を操作する操作要素を表示する画面例を示す。   An embodiment 4 in which a plurality of virtual light sources can be set for one main subject will be described. FIG. 12 shows an example of a screen serving as the user interface. FIG. 12A shows an example of an initial screen when the relighting process is selected, and FIG. 12B shows an example of a screen that displays an operation element for operating the second virtual light source.

図12(a)に示す初期画面では、制御マイコン101は、図5に示す例と同様に、人物300に対し、枠506、水平スライドバー508とつまみ510及び垂直スライドバー512とつまみ514を表示する。キャンセルボタン516と決定ボタン518と同様に表示される。本実施例では、制御マイコン101は、仮想光源の追加を指示する追加アイコン1220を表示する。ユーザが追加アイコン1220をタッチすると、制御マイコン101は、図12(b)に示す画面例のように、2つ目の仮想光源に対する水平スライドバー1238とつまみ1240及び垂直スライドバー1242とつまみ1244を表示する。更に、制御マイコン101は、仮想光源削除のアイコン1222も表示する。ユーザが仮想光源削除アイコン1222をタッチすると、制御マイコン101は、その時点で選択されていたつまみ510,514,1240,1244に対応する仮想光源を削除する。   In the initial screen shown in FIG. 12A, the control microcomputer 101 displays a frame 506, a horizontal slide bar 508 and a knob 510, and a vertical slide bar 512 and a knob 514 for the person 300 as in the example shown in FIG. To do. Displayed in the same manner as the cancel button 516 and the enter button 518. In this embodiment, the control microcomputer 101 displays an add icon 1220 for instructing addition of a virtual light source. When the user touches the add icon 1220, the control microcomputer 101 sets the horizontal slide bar 1238 and the knob 1240 and the vertical slide bar 1242 and the knob 1244 for the second virtual light source as shown in the screen example of FIG. indicate. Further, the control microcomputer 101 also displays a virtual light source deletion icon 1222. When the user touches the virtual light source deletion icon 1222, the control microcomputer 101 deletes the virtual light source corresponding to the knobs 510, 514, 1240, and 1244 selected at that time.

実施例4では、複数の仮想光源を設定して人物の顔の陰影状態を調整することができる。   In the fourth embodiment, a plurality of virtual light sources can be set to adjust the shadow state of the person's face.

上記各実施例では、スライドバートつまみにより、仮想光源の位置と光強度を変更したが、仮想光源自体をイメージしたオブジェクトで位置または光強度を変更できるようにしてもよい。図13(a)は、そのような実施例5の画面例1301を示し、図13(b)は仮想光源の照射状態の斜視図を示す。   In each of the embodiments described above, the position and light intensity of the virtual light source are changed by the slide bar knob. However, the position or light intensity may be changed by an object that is an image of the virtual light source itself. FIG. 13A shows such a screen example 1301 of Example 5, and FIG. 13B shows a perspective view of the irradiation state of the virtual light source.

制御マイコン101は、メニューからリライティング処理を選択した際のLCDタッチパネル116のLCDに、図13(a)に示す初期画面1301を表示する。図5(b)に示す画面例と比べて、人物300の顔を囲う枠と、スライドバーが無くなり、円形オブジェクト1311が追加されている。円形オブジェクト1311は、その中心位置で仮想光源の位置を示し、その半径で光強度を示す。ユーザは、円形オブジェクト1311をタッチしてスライドすることで、位置を変更でき、円形オブジェクト1311の付近でピンチインまたはピンチアウトを行うことで半径(光強度)を変更できる。例えば、円形オブジェクト1311の半径が大きいほど、仮想光源の出力光強度が強くなる。仮想光源の出力光強度に応じて、円形オブジェクト1311の色、または半径と色を変更しても良い。   The control microcomputer 101 displays an initial screen 1301 shown in FIG. 13A on the LCD of the LCD touch panel 116 when the relighting process is selected from the menu. Compared to the screen example shown in FIG. 5B, the frame surrounding the face of the person 300 and the slide bar are eliminated, and a circular object 1311 is added. The circular object 1311 indicates the position of the virtual light source at the center position, and indicates the light intensity at the radius. The user can change the position by touching and sliding the circular object 1311, and can change the radius (light intensity) by performing pinch-in or pinch-out in the vicinity of the circular object 1311. For example, the larger the radius of the circular object 1311, the stronger the output light intensity of the virtual light source. The color or radius and color of the circular object 1311 may be changed according to the output light intensity of the virtual light source.

図13(b)は、円形オブジェクト1311の表示位置と、仮想光源の位置との関係を示す。1320は表示画面1301上の、人物300の顔の中心を示す。1321は表示画面1101と垂直に顔の中心1320から伸ばした線分Loの先にあり、人物300の顔の中心1320の仮想的な奥行き方向の位置を示す。1322は仮想光源(の位置)を示す。仮想光源1322は、奥行き方向も考慮した位置1321を中心とする半径Rの球面上の任意の位置に移動可能である。1323は、仮想光源1322から表示画面1301に対して垂直に伸ばした線分Laと表示画面1301との交点であり、この交点1323を中心に円形オブジェクト1311が描画される。半径Rは固定値であり、位置1321を中心とした半径Rの球面を表示画面1301に投影した範囲に、円形オブジェクト1311の可動範囲は限定される。もちろん、ユーザの操作によって半径Rを変更可能に構成しても良い。   FIG. 13B shows the relationship between the display position of the circular object 1311 and the position of the virtual light source. Reference numeral 1320 denotes the center of the face of the person 300 on the display screen 1301. 1321 is ahead of the line segment Lo extended from the face center 1320 perpendicular to the display screen 1101 and indicates the position of the face center 1320 of the person 300 in the virtual depth direction. Reference numeral 1322 denotes a virtual light source (position). The virtual light source 1322 can be moved to an arbitrary position on a spherical surface having a radius R with the position 1321 as a center in consideration of the depth direction. Reference numeral 1323 denotes an intersection of a line segment La extending vertically from the virtual light source 1322 with respect to the display screen 1301 and the display screen 1301, and the circular object 1311 is drawn around the intersection 1323. The radius R is a fixed value, and the movable range of the circular object 1311 is limited to a range in which a spherical surface with the radius R centered on the position 1321 is projected on the display screen 1301. Of course, the radius R may be changed by the user's operation.

実施例5によれば、仮想光源の位置や強さを、視覚的に容易に把握しながら、人物の顔の陰影状態を調整することができる。   According to the fifth embodiment, it is possible to adjust the shadow state of the person's face while easily grasping the position and strength of the virtual light source visually.

仮想光源の位置(または照明角度)を水平面内で調節できる実施例を説明したが、垂直面内の位置(仰俯角)も同様のインターフェースで変更できることはあきらかである。   Although the embodiment in which the position (or illumination angle) of the virtual light source can be adjusted in the horizontal plane has been described, it is obvious that the position in the vertical plane (elevation angle) can be changed by a similar interface.

上記各実施例では、人物の顔をリライティング処理の対象としたが、他にも、他の種類の被写体をリライティング処理の対象としても良いし、背景を含む画像全体をリライティング処理の対象としても良い。画像の撮影時に位相差検出方式などの測距手段によって処理対象部分の奥行き方向の距離を検出または推定し、この距離データを使って1または所定数の画素の領域毎に表面部分の法線ベクトルを求めることができる。この法線ベクトルを参照することで、上述のように、仮想光源による明るさ補正を実行できる。   In each of the above embodiments, the face of a person is the target of the relighting process, but other types of subjects may be the target of the relighting process, or the entire image including the background may be the target of the relighting process. . The distance in the depth direction of the processing target portion is detected or estimated by distance measuring means such as a phase difference detection method at the time of image shooting, and the normal vector of the surface portion for each one or a predetermined number of pixel regions using this distance data Can be requested. By referring to this normal vector, brightness correction by a virtual light source can be executed as described above.

本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。   The present invention supplies a program that realizes 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 a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

本発明の目的は、前述した実施例の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を装置に供給することによっても、達成される。このとき、供給された装置の制御部を含むコンピュータ(またはCPUやMPU)は、記憶媒体に格納されたプログラムコードを読み出し実行する。記憶媒体から読み出されたプログラムコード自体が、上述の実施例の機能を実現することになり、プログラムコード自体及びそのプログラムコードを記憶した記憶媒体は、本発明を構成することになる。   The object of the present invention can also be achieved by supplying a storage medium storing software program codes for realizing the functions of the above-described embodiments to the apparatus. At this time, the computer (or CPU or MPU) including the control unit of the supplied apparatus reads and executes the program code stored in the storage medium. The program code itself read from the storage medium realizes the functions of the above-described embodiments, and the program code itself and the storage medium storing the program code constitute the present invention.

プログラムコードを供給するための記憶媒体としては、例えば、磁気ディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード又はROM等を用いることができる。   As a storage medium for supplying the program code, for example, a magnetic disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, or a ROM can be used.

上述のプログラムコードの指示に基づき、装置上で稼動しているOS(基本システムやオペレーティングシステム)などが処理の一部又は全部を行い、その処理によって前述した実施例の機能が実現される場合も含まれる。   In some cases, an OS (basic system or operating system) running on the apparatus performs part or all of the processing based on the above-described program code instructions, and the functions of the above-described embodiments are realized by the processing. included.

さらに、記憶媒体から読み出されたプログラムコードが、装置に挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれ、前述した実施形態の機能が実現される場合も含まれる。このとき、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部又は全部を行う。   Furthermore, the case where the program code read from the storage medium is written in a memory provided in a function expansion board inserted into the apparatus or a function expansion unit connected to a computer, and the functions of the above-described embodiments are realized. It is. At this time, based on the instruction of the program code, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing.

以上、本発明の好ましい実施例を説明したが、本発明は、これらの実施例に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。   As mentioned above, although the preferable Example of this invention was described, this invention is not limited to these Examples, A various deformation | transformation and change are possible within the range of the summary.

Claims (12)

画像を入力する画像入力手段と、
前記画像からリライティング処理の対象となる被写体を検出する被写体検出手段と、
仮想光源による前記被写体にリライティング処理を施すリライティング処理手段と、
前記被写体に対する前記仮想光源の位置と光強度を操作する操作オブジェクトを前記被写体と共に表示する表示手段と、
前記操作オブジェクトを操作する操作手段と、
前記操作オブジェクトの操作に応じて、前記リライティング処理手段に前記リライティング処理を実行させ、前記表示手段の表示を更新させる制御手段
とを有することを特徴とする画像処理装置。
An image input means for inputting an image;
Subject detection means for detecting a subject to be relighted from the image;
Relighting processing means for performing relighting processing on the subject by a virtual light source;
Display means for displaying, together with the subject, an operation object for manipulating the position and light intensity of the virtual light source with respect to the subject;
An operation means for operating the operation object;
An image processing apparatus comprising: a control unit that causes the relighting processing unit to execute the relighting processing and update the display of the display unit in response to an operation of the operation object.
前記操作オブジェクトは、水平方向にスライドする水平スライドバーと、垂直方向にスライドする垂直スライドバーとを有することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the operation object includes a horizontal slide bar that slides in a horizontal direction and a vertical slide bar that slides in a vertical direction. 前記水平スライドバーにより、前記被写体に対する前記仮想光源の水平面内での位置を操作できることを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein a position of the virtual light source in the horizontal plane with respect to the subject can be operated by the horizontal slide bar. 前記水平スライドバーにより、前記被写体に対する前記仮想光源の前記光強度を操作できることを特徴とする請求項2または3に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the light intensity of the virtual light source with respect to the subject can be operated by the horizontal slide bar. 前記操作オブジェクトが円形のオブジェクトからなり、前記円形のオブジェクトの中心が前記被写体に対する前記仮想光源の位置を示し、前記円形の半径が前記仮想光源の光強度を示すことを特徴とする請求項1に記載の画像処理装置。   The operation object is formed of a circular object, the center of the circular object indicates the position of the virtual light source with respect to the subject, and the radius of the circular indicates the light intensity of the virtual light source. The image processing apparatus described. さらに、前記リライティング処理手段により処理された被写体を含む前記画像を記録する記録手段を有することを特徴とする請求項1から5のいずれか1項に記載の画像処理装置。   6. The image processing apparatus according to claim 1, further comprising a recording unit that records the image including the subject processed by the relighting processing unit. 前記被写体検出手段は、前記画像における前記被写体の傾きを検出し、
前記表示手段は、前記操作オブジェクトを前記被写体の傾きに応じた位置と方向で表示する
ことを特徴とする請求項1から6のいずれか1項に記載の画像処理装置。
The subject detection means detects the inclination of the subject in the image;
The image processing apparatus according to claim 1, wherein the display unit displays the operation object at a position and a direction according to an inclination of the subject.
前記制御手段は、前記被写体が複数ある場合に、主たる被写体に対する仮想光源を他の被写体に適用するように前記リライティング処理手段を制御することを特徴とする請求項1から7のいずれか1項に記載の画像処理装置。   8. The control unit according to claim 1, wherein the control unit controls the relighting processing unit to apply a virtual light source for the main subject to another subject when there are a plurality of the subjects. 9. The image processing apparatus described. 前記表示手段は、前記被写体が複数ある場合に、各被写体に対して前記仮想光源の位置と光強度を操作する操作オブジェクトを表示することを特徴とする請求項1から7のいずれか1項に記載の画像処理装置。   The said display means displays the operation object which operates the position and light intensity of the said virtual light source with respect to each to-be-photographed object, when there are two or more said to-be-photographed objects. The image processing apparatus described. 前記表示手段は、被写体に対し複数の仮想光源の操作オブジェクトを表示できることを特徴とする請求項1から9のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the display unit can display an operation object of a plurality of virtual light sources on a subject. 更に、
前記仮想光源の異なる2つの位置に対するリライティング処理の結果となる2つのテンポラリ画像を生成する手段と、
前記2つのテンポラリ画像を、前記仮想光源の操作に従って合成してプレビュー画像を生成する手段
とを有することを特徴とする請求項1から10のいずれか1項に記載の画像処理装置。
Furthermore,
Means for generating two temporary images resulting from a relighting process for two different positions of the virtual light source;
11. The image processing apparatus according to claim 1, further comprising: a unit that generates a preview image by combining the two temporary images in accordance with an operation of the virtual light source.
前記画像入力手段が撮像手段であることを特徴とする請求項1から11のいずれか1項に記載の画像処理装置   The image processing apparatus according to claim 1, wherein the image input unit is an imaging unit.
JP2016139140A 2016-07-14 2016-07-14 Image processing device, its control method, program Active JP6942445B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2016139140A JP6942445B2 (en) 2016-07-14 2016-07-14 Image processing device, its control method, program
JP2021146150A JP2022000778A (en) 2016-07-14 2021-09-08 Image processing device, control method thereof, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016139140A JP6942445B2 (en) 2016-07-14 2016-07-14 Image processing device, its control method, program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2021146150A Division JP2022000778A (en) 2016-07-14 2021-09-08 Image processing device, control method thereof, and program

Publications (2)

Publication Number Publication Date
JP2018010497A true JP2018010497A (en) 2018-01-18
JP6942445B2 JP6942445B2 (en) 2021-09-29

Family

ID=60994360

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2016139140A Active JP6942445B2 (en) 2016-07-14 2016-07-14 Image processing device, its control method, program
JP2021146150A Pending JP2022000778A (en) 2016-07-14 2021-09-08 Image processing device, control method thereof, and program

Family Applications After (1)

Application Number Title Priority Date Filing Date
JP2021146150A Pending JP2022000778A (en) 2016-07-14 2021-09-08 Image processing device, control method thereof, and program

Country Status (1)

Country Link
JP (2) JP6942445B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019145097A (en) * 2018-02-21 2019-08-29 キヤノン株式会社 Setting device and method, program, and storage medium
JP2020126582A (en) * 2019-02-06 2020-08-20 キヤノン株式会社 Information processor, information processing method, and program
JP2020190937A (en) * 2019-05-22 2020-11-26 凸版印刷株式会社 Light source position control method, apparatus therefor, program therefor, and computer-readable recording medium
US11151779B2 (en) 2018-11-02 2021-10-19 Canon Kabushiki Kaisha Information processing apparatus, information processing method, and storage medium for image display and virtual light source representation
JP2021170222A (en) * 2020-04-15 2021-10-28 キヤノン株式会社 Image processing apparatus and method, program, and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006004158A (en) * 2004-06-17 2006-01-05 Olympus Corp Image processing program, image processing method, image processor, and recording medium
JP2008017165A (en) * 2006-07-06 2008-01-24 Sony Corp Device and method for generating operation screen, printer, imaging apparatus, and program
JP2012204175A (en) * 2011-03-25 2012-10-22 Toshiba Lighting & Technology Corp Lighting device and lighting control system including the same
JP2014089697A (en) * 2012-10-05 2014-05-15 Fine Co Ltd Architectural image display device, architectural image display method, and computer program
JP2015056143A (en) * 2013-09-13 2015-03-23 ソニー株式会社 Information processing device and information processing method
JP2015119277A (en) * 2013-12-17 2015-06-25 オリンパスイメージング株式会社 Display apparatus, display method, and display program
JP2015201839A (en) * 2014-03-31 2015-11-12 キヤノン株式会社 Image processing system and control method and program of the same

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006004158A (en) * 2004-06-17 2006-01-05 Olympus Corp Image processing program, image processing method, image processor, and recording medium
JP2008017165A (en) * 2006-07-06 2008-01-24 Sony Corp Device and method for generating operation screen, printer, imaging apparatus, and program
JP2012204175A (en) * 2011-03-25 2012-10-22 Toshiba Lighting & Technology Corp Lighting device and lighting control system including the same
JP2014089697A (en) * 2012-10-05 2014-05-15 Fine Co Ltd Architectural image display device, architectural image display method, and computer program
JP2015056143A (en) * 2013-09-13 2015-03-23 ソニー株式会社 Information processing device and information processing method
JP2015119277A (en) * 2013-12-17 2015-06-25 オリンパスイメージング株式会社 Display apparatus, display method, and display program
JP2015201839A (en) * 2014-03-31 2015-11-12 キヤノン株式会社 Image processing system and control method and program of the same

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019145097A (en) * 2018-02-21 2019-08-29 キヤノン株式会社 Setting device and method, program, and storage medium
JP7277158B2 (en) 2018-02-21 2023-05-18 キヤノン株式会社 Setting device and method, program, storage medium
US11151779B2 (en) 2018-11-02 2021-10-19 Canon Kabushiki Kaisha Information processing apparatus, information processing method, and storage medium for image display and virtual light source representation
JP2020126582A (en) * 2019-02-06 2020-08-20 キヤノン株式会社 Information processor, information processing method, and program
JP7422454B2 (en) 2019-02-06 2024-01-26 キヤノン株式会社 Information processing device, information processing method and program
JP2020190937A (en) * 2019-05-22 2020-11-26 凸版印刷株式会社 Light source position control method, apparatus therefor, program therefor, and computer-readable recording medium
JP7377407B2 (en) 2019-05-22 2023-11-10 Toppanホールディングス株式会社 Light source position control method, device, program and computer readable recording medium
JP2021170222A (en) * 2020-04-15 2021-10-28 キヤノン株式会社 Image processing apparatus and method, program, and storage medium
JP7462464B2 (en) 2020-04-15 2024-04-05 キヤノン株式会社 Image processing device and method, program, and storage medium

Also Published As

Publication number Publication date
JP6942445B2 (en) 2021-09-29
JP2022000778A (en) 2022-01-04

Similar Documents

Publication Publication Date Title
US10547778B2 (en) Image display device for displaying an image in an image display area, and storage medium storing image display program for displaying an image in an image display area
JP2022000778A (en) Image processing device, control method thereof, and program
CN107306332B (en) Occlusive direct view augmented reality system, computing device and method
JP6525617B2 (en) Image processing apparatus and control method thereof
JP2009031334A (en) Projector and projection method for projector
JP2022528011A (en) User interface for capturing and managing visual media
WO2021243788A1 (en) Screenshot method and apparatus
KR20150119621A (en) display apparatus and image composition method thereof
JP7318670B2 (en) Display method and display system
JP2018010496A (en) Image processing apparatus, control method thereof, and program
WO2018010440A1 (en) Projection picture adjusting method and apparatus, and projection terminal
JP7422457B2 (en) Display control device and its control method
US11763727B2 (en) Display method and display system
JP5319999B2 (en) Lighting device
US10349022B2 (en) Image processing apparatus, projector, image processing method, and storage medium storing image processing program
JP2000013680A (en) Red-eye preventing method and image processor
JP2021086586A (en) Display control apparatus and control method thereof
JP2010146328A (en) Projector, and method and program for controlling the same
US9959637B2 (en) Method and apparatus for processing border of computer figure to be merged into background image
JP2006054824A (en) Projection image display device
JP2011254268A (en) Imaging apparatus, imaging method, and program
JP6773057B2 (en) Image processing equipment, image processing methods and programs
JP7374739B2 (en) Display control device and its control method
JP7458756B2 (en) Display control device and its control method
JP2019016141A (en) Input device and input method

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20180227

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190712

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200716

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200728

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200924

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201117

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210202

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210331

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210908

R151 Written notification of patent or utility model registration

Ref document number: 6942445

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151