JP2020173590A - Processing device, processing system, imaging apparatus, processing method, and program - Google Patents

Processing device, processing system, imaging apparatus, processing method, and program Download PDF

Info

Publication number
JP2020173590A
JP2020173590A JP2019074720A JP2019074720A JP2020173590A JP 2020173590 A JP2020173590 A JP 2020173590A JP 2019074720 A JP2019074720 A JP 2019074720A JP 2019074720 A JP2019074720 A JP 2019074720A JP 2020173590 A JP2020173590 A JP 2020173590A
Authority
JP
Japan
Prior art keywords
light source
condition
source condition
image
maximum value
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
JP2019074720A
Other languages
Japanese (ja)
Other versions
JP7309425B2 (en
Inventor
祐一 楠美
Yuichi Kusumi
祐一 楠美
智暁 井上
Tomoaki Inoue
智暁 井上
義明 井田
Yoshiaki Ida
義明 井田
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 JP2019074720A priority Critical patent/JP7309425B2/en
Publication of JP2020173590A publication Critical patent/JP2020173590A/en
Application granted granted Critical
Publication of JP7309425B2 publication Critical patent/JP7309425B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Generation (AREA)

Abstract

To provide a processing device capable of generating a high-quality rendering image.SOLUTION: A processing device (400) includes: a normal information acquisition unit (104b) that acquires a piece of normal information of a subject; a light source condition acquisition unit (104c) that acquires either of virtual light source angle or virtual light source intensity as a first light source condition when rendering, determines a maximal value of the other of the virtual light source angle or the virtual light source intensity as the maximal value of a second light source condition based on the first light source condition, and acquires a second light source condition smaller than the maximal value; and a rendering unit (104d) that generates a rendering image based on the first light source condition and the second light source condition. The light source condition acquisition unit acquires the larger the first light source condition, the smaller the maximal value of the second light source condition.SELECTED DRAWING: Figure 3

Description

本発明は、レンダリング画像を生成する処理装置に関する。 The present invention relates to a processing device that produces a rendered image.

被写体に関するより多くの物理情報を取得することにより、撮像後の画像処理において、物理モデルに基づく画像生成を行うことができる。例えば、被写体の見えを変更した画像をレンダリング処理により生成することが可能となる。被写体の見えは、被写体の形状情報、被写体の反射率情報、および、光源情報等で決定される。 By acquiring more physical information about the subject, it is possible to generate an image based on the physical model in the image processing after imaging. For example, it is possible to generate an image in which the appearance of the subject is changed by a rendering process. The appearance of the subject is determined by the shape information of the subject, the reflectance information of the subject, the light source information, and the like.

特許文献1には、被写体の形状情報としての法線(面法線)を取得(計測)する方法として照度差ステレオ法が開示されている。 Patent Document 1 discloses an illuminance difference stereo method as a method for acquiring (measuring) a normal (plane normal) as shape information of a subject.

特開2010−122158号公報JP-A-2010-122158

デジタルカメラなどの撮像装置において照度差ステレオ法により被写体の法線を取得する際、互いに位置の異なる複数の光源位置からの光を被写体に照射する必要がある。光源の位置が固定されている場合、被写体が遠くなるほど、撮像装置が備える撮像光学系の光軸(あるいは視線)と光源から被写体への光とのなす角度(照射角度)は小さくなる。複数の光源位置における輝度変化から被写体の法線を決定する照度差ステレオ法では、照射角度が小さくなると輝度変化が低下し、撮像装置内でのノイズの影響が強くなる。その結果、算出される法線にばらつきが生じる。 When acquiring the normal of a subject by the illuminance difference stereo method in an imaging device such as a digital camera, it is necessary to irradiate the subject with light from a plurality of light source positions having different positions from each other. When the position of the light source is fixed, the farther the subject is, the smaller the angle (irradiation angle) between the optical axis (or line of sight) of the imaging optical system included in the imaging device and the light from the light source to the subject. In the illuminance difference stereo method in which the normal of the subject is determined from the brightness changes at a plurality of light source positions, the brightness change decreases as the irradiation angle decreases, and the influence of noise in the image pickup apparatus becomes stronger. As a result, the calculated normals vary.

また、照度差ステレオ法で法線を算出した場合、仮定した反射特性とは異なる反射特性の被写体については法線誤差が生じる。このため、誤差が生じた法線を用いてレンダリング画像を生成すると、レンダリング画像にも誤差が生じる。例えば、ランバート拡散反射モデルを仮定した照度差ステレオ法で金属や透明体等の拡散反射が少ない被写体の法線を算出すると、特に大きな法線誤差が生じる。このため、取得した法線を用いてレンダリング画像を生成すると、レンダリング画像に破綻が生じる。また、レンダリング画像を生成する際の仮想光源の角度が大きくなると、仮想光源下での見えの変化は大きくなるが、法線誤差の影響も大きくなる。 Further, when the normal is calculated by the illuminance difference stereo method, a normal error occurs for a subject having a reflection characteristic different from the assumed reflection characteristic. Therefore, if a rendered image is generated using the normal with an error, an error also occurs in the rendered image. For example, when the normal of a subject having little diffuse reflection such as a metal or a transparent body is calculated by the illuminance difference stereo method assuming a Lambert diffuse reflection model, a particularly large normal error occurs. Therefore, when a rendered image is generated using the acquired normals, the rendered image breaks down. Further, when the angle of the virtual light source when generating the rendered image becomes large, the change in appearance under the virtual light source becomes large, but the influence of the normal error also becomes large.

そこで本発明は、高品位なレンダリング画像を生成可能な処理装置、処理システム、撮像装置、処理方法、および、プログラムを提供することを目的とする。 Therefore, an object of the present invention is to provide a processing device, a processing system, an imaging device, a processing method, and a program capable of generating a high-quality rendered image.

本発明の一側面としての処理装置は、被写体の法線情報を取得する法線情報取得部と、レンダリング時の第一の光源条件として仮想光源角度または仮想光源強度の一方を取得し、前記第一の光源条件に基づいて、レンダリング時の第二の光源条件の最大値として前記仮想光源角度または前記仮想光源強度の他方の最大値を決定し、前記最大値以下の前記第二の光源条件を取得する光源条件取得部と、前記第一の光源条件および前記第二の光源条件に基づいてレンダリング画像を生成するレンダリング部とを有し、前記光源条件取得部は、前記第一の光源条件が大きいほど前記第二の光源条件の前記最大値を小さくする。 The processing apparatus as one aspect of the present invention acquires either a virtual light source angle or a virtual light source intensity as the first light source condition at the time of rendering, and the normal light information acquisition unit that acquires the normal line information of the subject. Based on one light source condition, the virtual light source angle or the other maximum value of the virtual light source intensity is determined as the maximum value of the second light source condition at the time of rendering, and the second light source condition equal to or less than the maximum value is set. The light source condition acquisition unit to acquire has a light source condition acquisition unit and a rendering unit that generates a rendered image based on the first light source condition and the second light source condition, and the light source condition acquisition unit has the first light source condition. The larger the value, the smaller the maximum value of the second light source condition.

本発明の他の側面としての処理システムは、光源部と、前記処理装置とを有する。 A processing system as another aspect of the present invention includes a light source unit and the processing apparatus.

本発明の他の側面としての撮像装置は、被写体を撮像する撮像部と、前記処理装置とを有する。 An imaging device as another aspect of the present invention includes an imaging unit that images a subject and the processing device.

本発明の他の側面としての処理方法は、被写体の法線情報を取得する法線情報取得ステップと、レンダリング時の第一の光源条件として仮想光源角度または仮想光源強度の一方を取得し、前記第一の光源条件に基づいて、レンダリング時の第二の光源条件の最大値として前記仮想光源角度または前記仮想光源強度の他方の最大値を決定し、前記最大値以下の前記第二の光源条件を取得する光源条件取得ステップと、前記第一の光源条件および前記第二の光源条件に基づいてレンダリング画像を生成する画像生成ステップとを有し、前記光源条件取得ステップにおいて、前記第一の光源条件が大きいほど前記第二の光源条件の前記最大値を小さくする。 In the processing method as another aspect of the present invention, one of the normal light source information acquisition step for acquiring the normal line information of the subject and the virtual light source angle or the virtual light source intensity is acquired as the first light source condition at the time of rendering. Based on the first light source condition, the virtual light source angle or the other maximum value of the virtual light source intensity is determined as the maximum value of the second light source condition at the time of rendering, and the second light source condition equal to or less than the maximum value. It has a light source condition acquisition step for acquiring the above, and an image generation step for generating a rendered image based on the first light source condition and the second light source condition. In the light source condition acquisition step, the first light source The larger the condition, the smaller the maximum value of the second light source condition.

本発明の他の側面としてのプログラムは、前記処理方法をコンピュータに実行させる。 A program as another aspect of the present invention causes a computer to execute the processing method.

本発明の他の目的及び特徴は、以下の実施例において説明される。 Other objects and features of the present invention will be described in the following examples.

本発明によれば、高品位なレンダリング画像を生成可能な処理装置、処理システム、撮像装置、処理方法、および、プログラムを提供することができる。 According to the present invention, it is possible to provide a processing device, a processing system, an imaging device, a processing method, and a program capable of generating a high-quality rendered image.

実施例1における撮像装置の外観図である。It is an external view of the image pickup apparatus in Example 1. FIG. 実施例1における撮像装置のブロック図である。It is a block diagram of the image pickup apparatus in Example 1. FIG. 実施例1における処理システムのブロック図である。It is a block diagram of the processing system in Example 1. FIG. 実施例1における処理方法を示すフローチャートである。It is a flowchart which shows the processing method in Example 1. FIG. 実施例1における第一の光源条件と第二の光源条件の最大値との関係を示す図である。It is a figure which shows the relationship between the 1st light source condition and the maximum value of the 2nd light source condition in Example 1. FIG. 実施例2における撮像装置のブロック図である。It is a block diagram of the image pickup apparatus in Example 2. FIG. 実施例2における処理方法を示すフローチャートである。It is a flowchart which shows the processing method in Example 2. 実施例2における撮像素子の受光部と撮像光学系の瞳との関係を示す図である。It is a figure which shows the relationship between the light receiving part of the image pickup device in Example 2 and the pupil of an image pickup optical system. 実施例2における撮像部の模式図である。It is a schematic diagram of the imaging unit in Example 2. 実施例2における撮像装置の他の例を示す図である。It is a figure which shows another example of the image pickup apparatus in Example 2. FIG. 実施例2における撮影条件と第一の光源条件の最大値との関係を示す図である。It is a figure which shows the relationship between the photographing condition in Example 2 and the maximum value of the first light source condition. 実施例3における撮像装置のブロック図である。It is a block diagram of the image pickup apparatus in Example 3. FIG. 実施例3における処理方法を示すフローチャートである。It is a flowchart which shows the processing method in Example 3. FIG. 実施例3における法線信頼度と第一の光源条件の最大値との関係を示す図である。It is a figure which shows the relationship between the normal reliability in Example 3 and the maximum value of the first light source condition. 実施例4における処理システムの外観図である。It is an external view of the processing system in Example 4. FIG. Torrance−Sparrowモデルの説明図である。It is explanatory drawing of the Torrance-Sparrow model.

以下、本発明の実施例について、図面を参照しながら詳細に説明する。各図において、同一の部材については同一の参照番号を付し、重複する説明は省略する。 Hereinafter, examples of the present invention will be described in detail with reference to the drawings. In each figure, the same member is given the same reference number, and duplicate description is omitted.

照度差ステレオ法は、被写体の法線(面法線)と被写体から光源への方向に基づく被写体の反射特性を仮定し、複数の光源位置での被写体の輝度情報と仮定した反射特性から法線を算出する方法である。反射特性は、所定の法線と光源の位置が与えられたときに反射率が一意に定まらない場合、ランバートの余弦則に従うランバート反射モデルで近似すればよい。図15は、Torrance−Sparrowモデルの説明図である。図15に示されるように、鏡面反射成分は、光源ベクトルsと視線方向ベクトルvの2等分線と、法線nのなす角αに依存する。したがって、反射特性は、視線方向に基づく特性としてもよい。また、輝度情報は、光源が点灯している場合と消灯している場合のそれぞれの被写体を撮像し、これらの差分をとることで環境光等の光源以外の光源による影響を除いてもよい。 The illuminance difference stereo method assumes the subject's normal (surface normal) and the subject's reflection characteristics based on the direction from the subject to the light source, and the normal is based on the reflection characteristics assumed to be the subject's brightness information at multiple light source positions. Is a method of calculating. The reflection characteristics can be approximated by a Lambertian reflection model that follows Lambert's cosine law if the reflectance is not uniquely determined given a given normal and light source position. FIG. 15 is an explanatory diagram of the Torrance-Sparrow model. As shown in FIG. 15, the specular reflection component depends on the bisector of the light source vector s and the line-of-sight direction vector v and the angle α formed by the normal line n. Therefore, the reflection characteristic may be a characteristic based on the line-of-sight direction. Further, the luminance information may be obtained by photographing each subject when the light source is on and when the light source is off and taking the difference between them to remove the influence of a light source other than the light source such as ambient light.

以下、ランバート反射モデルで反射特性を仮定した場合について説明する。反射光の輝度値をi、物体のランバート拡散反射率をρ、入射光の強さをE、物体から光源への方向(光源方向)を示す単位ベクトル(光源方向ベクトル)をs、物体の単位法線ベクトルをnとする。このとき、輝度値iは、ランバートの余弦則より、以下の式(1)のように表される。 Hereinafter, the case where the reflection characteristics are assumed in the Lambertian reflection model will be described. The brightness value of the reflected light is i, the Lambert diffuse reflectance of the object is ρ d , the intensity of the incident light is E, the unit vector (light source direction vector) indicating the direction from the object to the light source (light source direction) is s, and the object Let n be the unit normal vector. At this time, the luminance value i is expressed by the following equation (1) from Lambert's cosine law.

ここで、異なるM個(M≧3)の光源ベクトルの各成分をs、s、…、s、光源ベクトルの各成分の輝度値をi、i、・・・iとすると、式(1)は以下の式(2)のように表される。 Here, the respective components of the different M (M ≧ 3) light source vectors are s 1 , s 2 , ..., S M , and the luminance values of each component of the light source vector are i 1 , i 2 , ... i M. Then, the equation (1) is expressed as the following equation (2).

式(2)において、左辺はM行1列の輝度ベクトル、右辺の[s 、…s ]はM行3列の光源方向を示す入射光行列S、nは3行1列の単位法線ベクトルである。M=3の場合は、入射光行列Sの逆行列S−1を用いることにより、Eρnは以下の式(3)のように表される。 In equation (2), the left side is the luminance vector of M rows and 1 column, the right side [s 1 T , ... s M T ] is the incident light matrix S indicating the light source direction of M rows and 3 columns, and n is the 3 rows and 1 column. It is an identity normal vector. When M = 3, Eρ d n is expressed by the following equation (3) by using the inverse matrix S -1 of the incident light matrix S.

式(3)の左辺のベクトルのノルムが入射光の強さEとランバート拡散反射率ρとの積であり、正規化したベクトルが物体の法線ベクトルとして算出される。すなわち、入射光の強さEとランバート拡散反射率ρは積の形でのみ条件式に現れるため、Eρを1つの変数とすると、式(3)は単位法線ベクトルnの2自由度と合わせて未知の3変数を決定する連立方程式とみなせる。したがって、少なくとも3つの光源を用いて輝度情報を取得することで、各変数を決定することができる。なお、入射光行列Sが正則行列でない場合は逆行列が存在しないため、入射光行列Sが正則行列となるように入射光行列Sの各成分s〜sを選択する必要がある。すなわち、成分sを成分s、sに対して線形独立に選択することが好ましい。 The norm of the vector on the left side of the equation (3) is the product of the intensity E of the incident light and the Lambert diffuse reflectance ρ d , and the normalized vector is calculated as the normal vector of the object. That is, since the intensity E of the incident light and the Lambert diffuse reflectance ρ d appear in the conditional equation only in the form of a product, if Eρ d is one variable, the equation (3) has two degrees of freedom of the unit normal vector n. Together with, it can be regarded as a simultaneous equation that determines three unknown variables. Therefore, each variable can be determined by acquiring the luminance information using at least three light sources. If the incident light matrix S is not a regular matrix, there is no inverse matrix. Therefore, it is necessary to select each component s 1 to s 3 of the incident light matrix S so that the incident light matrix S becomes a regular matrix. That is, it is preferable to select the component s 3 linearly independently of the components s 1 and s 2 .

M>3の場合、求める未知変数より多い条件式が得られる。このため、任意に選択した3つの条件式から、M=3の場合と同様の方法で単位法線ベクトルnを算出すればよい。4つ以上の条件式を用いる場合、入射光行列Sが正則行列ではなくなるため、例えば、Moore−Penrose疑似逆行列を使って近似解を算出すればよい。また、フィッティング手法や最適化手法によって単位法線ベクトルnを算出してもよい。 When M> 3, more conditional expressions than the unknown variables to be obtained can be obtained. Therefore, the unit normal vector n may be calculated from the three conditional expressions arbitrarily selected by the same method as in the case of M = 3. When four or more conditional equations are used, the incident light matrix S is no longer an invertible matrix. Therefore, for example, the Moore-Penrose pseudo-inverse matrix may be used to calculate the approximate solution. Further, the unit normal vector n may be calculated by a fitting method or an optimization method.

被写体の反射特性をランバート反射モデルとは異なるモデルで仮定すると、条件式が単位法線ベクトルnの各成分に対する線形方程式と異なる場合がある。この場合、未知変数以上の条件式が得られれば、フィッティング手法や最適化手法を用いることができる。 Assuming that the reflection characteristics of the subject are different from the Lambertian reflection model, the conditional equation may differ from the linear equation for each component of the unit normal vector n. In this case, if a conditional expression equal to or greater than the unknown variable is obtained, a fitting method or an optimization method can be used.

またM>3の場合、3以上M−1以下の複数の条件式が得られるため、単位法線ベクトルnの複数の解の候補を求めることができる。この場合、さらに別の条件を用いて複数の解の候補から解を選択すればよい。例えば、単位法線ベクトルnの連続性を条件として用いることができる。単位法線nを撮像装置の1画素ごとに算出する場合、画素(x、y)での法線をn(x、y)として、n(x−1、y)が既知であれば、以下の式(4)で表される評価関数が最小となる解を選択すればよい。 Further, when M> 3, since a plurality of conditional expressions of 3 or more and M-1 or less can be obtained, a plurality of solution candidates of the unit normal vector n can be obtained. In this case, a solution may be selected from a plurality of solution candidates using yet another condition. For example, the continuity of the unit normal vector n can be used as a condition. When calculating the unit normal n for each pixel of the image pickup apparatus, the normal at the pixel (x, y) is n (x, y), and if n (x-1, y) is known, the following The solution that minimizes the evaluation function represented by Eq. (4) may be selected.

また、n(x+1、y)やn(x、y±1)も既知であれば、以下の式(5)が最小となる解を選択すればよい。 If n (x + 1, y) and n (x, y ± 1) are also known, the solution in which the following equation (5) is minimized may be selected.

既知の法線がなく、全画素位置で法線の不定性があるとすれば、以下の式(6)で示されるように、式(5)の全画素での総和が最小となるように解を選択してもよい。 If there is no known normal and there is indefiniteness of the normal at all pixel positions, the sum of all pixels in equation (5) should be minimized, as shown in equation (6) below. You may choose a solution.

なお、最近傍以外の画素での法線を用いることや、注目する画素位置からの距離に応じて重み付けした評価関数を用いてもよい。また、別の条件として、任意の光源位置での輝度情報を用いてもよい。ランバート反射モデルに代表される拡散反射モデルでは、単位法線ベクトルと光源方向ベクトルが近いほど反射光の輝度が大きくなる。よって、複数の光源方向での輝度値のうち最も輝度値が大きくなる光源方向ベクトルに近い解を選択することで、単位法線ベクトルを決定することができる。 It should be noted that the normals of pixels other than the nearest neighbor may be used, or an evaluation function weighted according to the distance from the pixel position of interest may be used. Further, as another condition, the luminance information at an arbitrary light source position may be used. In the diffuse reflection model represented by the Lambertian reflection model, the closer the unit normal vector and the light source direction vector are, the greater the brightness of the reflected light. Therefore, the unit normal vector can be determined by selecting a solution close to the light source direction vector having the largest brightness value among the brightness values in a plurality of light source directions.

また、鏡面反射モデルでは、光源ベクトルをs、物体からカメラへの方向の単位ベクトル(カメラの視線ベクトル)をvとすると、以下の式(7)が成り立つ。 Further, in the specular reflection model, if the light source vector is s and the unit vector in the direction from the object to the camera (camera line-of-sight vector) is v, the following equation (7) holds.

式(7)で表されるように、光源方向ベクトルsとカメラの視線ベクトルvが既知であれば、単位法線ベクトルnを算出することができる。表面に粗さがある場合、鏡面反射も出射角の広がりを持つが、平滑面として求めた解の付近に広がるため、複数の解の候補うち最も平滑面に対する解に近い候補を選択すればよい。また、複数の解の候補の平均によって真の解を決定してもよい。 As represented by the equation (7), if the light source direction vector s and the camera line-of-sight vector v are known, the unit normal vector n can be calculated. When the surface is rough, the specular reflection also has a widening of the emission angle, but it spreads near the solution obtained as a smooth surface, so it is sufficient to select the candidate closest to the solution for the smooth surface from among the multiple solution candidates. .. In addition, the true solution may be determined by averaging a plurality of solution candidates.

以上の照度差ステレオ法によって法線nおよび反射率ρ(=Eρ)を取得すると、式(1)に対して任意の光源ベクトルsを与えることにより、任意の光源下での輝度値iを算出することができる。すなわち、任意の光源下での見えを再現したレンダリング画像を生成することが可能となる。式(1)ではランバート拡散反射でのレンダリング画像を生成するが、その他の拡散反射特性やそれに加えて鏡面反射特性でのレンダリング画像を生成することもできる。 When the normal line n and the reflectance ρ (= Eρ d ) are obtained by the above illuminance difference stereo method, the brightness value i under an arbitrary light source can be obtained by giving an arbitrary light source vector s to the equation (1). Can be calculated. That is, it is possible to generate a rendered image that reproduces the appearance under an arbitrary light source. In equation (1), a rendered image with Lambert diffuse reflection is generated, but a rendered image with other diffuse reflection characteristics and specular reflection characteristics can also be generated.

次に、図1および図2Aを参照して、本発明の実施例1における撮像装置について説明する。図1は、本実施例における撮像装置1の外観図である。図2Aは、撮像装置1のブロック図である。 Next, the image pickup apparatus according to the first embodiment of the present invention will be described with reference to FIGS. 1 and 2A. FIG. 1 is an external view of the image pickup apparatus 1 in this embodiment. FIG. 2A is a block diagram of the image pickup apparatus 1.

撮像装置1は、レンダリング処理を行ってレンダリング画像(リライティング画像)を生成する。図1に示されるように、撮像装置1は、被写体を撮像する撮像部100および光源部200を有する。図2Aに示されるように、撮像部100は、撮像光学系101および撮像素子102を有する。光源部200は、互いに異なる複数の位置からの光を被写体に光を照射可能に構成されている。本実施例において、光源部200は8つの光源200a〜200hを有するが、これに限定されるものではない。照度差ステレオ法を実施する際に必要な光源は少なくとも3個であるため、入力画像を取得するために少なくとも3つ以上の光源を備えていればよい。また本実施例において、撮像部100を構成する撮像光学系の光軸OAから等距離の位置に同心円状に8つの光源を等間隔で配置しているが、これに限定されるものではない。また本実施例において、光源部200は、撮像装置1に内蔵されているが、これに限定されるものではない。光源部200は、撮像装置1に着脱可能に取り付けられるように構成されていてもよい。 The image pickup apparatus 1 performs a rendering process to generate a rendered image (rewriting image). As shown in FIG. 1, the image pickup apparatus 1 has an image pickup unit 100 and a light source unit 200 for photographing a subject. As shown in FIG. 2A, the image pickup unit 100 includes an image pickup optical system 101 and an image pickup element 102. The light source unit 200 is configured to be able to irradiate the subject with light from a plurality of positions different from each other. In this embodiment, the light source unit 200 has eight light sources 200a to 200h, but is not limited thereto. Since at least three light sources are required when performing the illuminance difference stereo method, it is sufficient to provide at least three or more light sources for acquiring an input image. Further, in the present embodiment, eight light sources are arranged concentrically at equal distances from the optical axis OA of the imaging optical system constituting the imaging unit 100, but the present invention is not limited to this. Further, in this embodiment, the light source unit 200 is built in the image pickup apparatus 1, but the light source unit 200 is not limited thereto. The light source unit 200 may be configured to be detachably attached to the image pickup apparatus 1.

撮像光学系101は、絞り101aを備え、被写体からの光を撮像素子102上に結像させる。撮像素子102は、CCDセンサやCMOSセンサ等の光電変換素子により構成され、被写体を撮像する。すなわち撮像素子102は、撮像光学系101により形成された被写体の像(光学像)を光電変換し、アナログ電気信号(入力画像に対応する画像データ)を生成する。A/Dコンバータ103は、撮像素子102の光電変換により生成されたアナログ信号をデジタル信号に変換し、デジタル信号を画像処理部104に出力する。 The image pickup optical system 101 includes a diaphragm 101a, and forms an image of light from a subject on the image pickup element 102. The image sensor 102 is composed of a photoelectric conversion element such as a CCD sensor or a CMOS sensor, and images a subject. That is, the image sensor 102 photoelectrically converts the image (optical image) of the subject formed by the image pickup optical system 101 to generate an analog electric signal (image data corresponding to the input image). The A / D converter 103 converts the analog signal generated by the photoelectric conversion of the image sensor 102 into a digital signal, and outputs the digital signal to the image processing unit 104.

画像処理部(処理装置)104は、A/Dコンバータ103から入力されたデジタル信号に対して、各種の画像処理を行う。また本実施例において、画像処理部104は、被写体の法線情報を算出し、任意の光源下でのレンダリング画像を生成する。画像処理部104は、入力画像取得部104a、法線情報取得部104b、光源条件取得部104c、および、レンダリング部104dを有する。 The image processing unit (processing device) 104 performs various image processing on the digital signal input from the A / D converter 103. Further, in this embodiment, the image processing unit 104 calculates the normal information of the subject and generates a rendered image under an arbitrary light source. The image processing unit 104 includes an input image acquisition unit 104a, a normal information acquisition unit 104b, a light source condition acquisition unit 104c, and a rendering unit 104d.

画像処理部104により処理された出力画像は、半導体メモリや光ディスク等の画像記録部109に保存される。また、出力画像を表示部(ディスプレイ)105に表示してもよい。本実施例において、入力画像取得部104a、法線情報取得部104b、光源条件取得部104c、および、レンダリング部104dは、撮像装置1に内蔵されている。ただし本発明は、これに限定されるものではなく、前述の各部の少なくとも一部を撮像装置1とは別に設けてもよい。 The output image processed by the image processing unit 104 is stored in an image recording unit 109 such as a semiconductor memory or an optical disk. Further, the output image may be displayed on the display unit (display) 105. In this embodiment, the input image acquisition unit 104a, the normal information acquisition unit 104b, the light source condition acquisition unit 104c, and the rendering unit 104d are built in the image pickup apparatus 1. However, the present invention is not limited to this, and at least a part of each of the above-mentioned parts may be provided separately from the image pickup apparatus 1.

情報入力部108は、ユーザにより選択された撮影条件(絞り値、露出時間、ISO感度、および、焦点距離など)をシステムコントローラ110に供給する。撮像制御部107は、システムコントローラ110からの情報に基づいて、ユーザが選択した所望の撮影条件で画像を取得する。照射光源制御部106は、システムコントローラ110の制御指示に応じて光源部200の発光状態を制御する。また情報入力部108は、ユーザにより選択された光源条件(仮想光源角度、仮想光源強度、および、仮想光源色など)をシステムコントローラ110に供給する。画像処理部104は、システムコントローラ110からの情報に基づいて、ユーザが選択した所望の仮想光源条件でレンダリング画像(リライティング画像)を生成する。なお本実施例において、撮像光学系101は、撮像装置1と一体的に構成されているが、これに限定されるものではない。本発明は、撮像素子を有する撮像装置本体と、撮像装置本体に着脱可能な撮像光学系(交換レンズ)とを備えて構成される一眼レフカメラやミラーレスカメラ等のカメラシステムにも適用可能である。 The information input unit 108 supplies the shooting conditions (aperture value, exposure time, ISO sensitivity, focal length, etc.) selected by the user to the system controller 110. The image pickup control unit 107 acquires an image under desired shooting conditions selected by the user based on the information from the system controller 110. The irradiation light source control unit 106 controls the light emitting state of the light source unit 200 in response to a control instruction from the system controller 110. Further, the information input unit 108 supplies the system controller 110 with the light source conditions (virtual light source angle, virtual light source intensity, virtual light source color, etc.) selected by the user. The image processing unit 104 generates a rendered image (rewriting image) under desired virtual light source conditions selected by the user based on the information from the system controller 110. In this embodiment, the imaging optical system 101 is integrally configured with the imaging device 1, but the present invention is not limited to this. The present invention can also be applied to a camera system such as a single-lens reflex camera or a mirrorless camera, which is composed of an image pickup device main body having an image pickup element and an image pickup optical system (interchangeable lens) attached to and detachable from the image pickup device main body. is there.

次に、図3および図4を参照して、本実施例におけるレンダリング処理(処理方法)について説明する。図3は、レンダリング処理を示すフローチャートである。本実施例のレンダリング処理は、システムコントローラ110および画像処理部104により、コンピュータプログラムとしての処理プログラムに従って実行される。なお処理プログラムは、例えば、コンピュータに読み取り可能な記憶媒体(システムコントローラ110の内部メモリ等)に記憶されている。 Next, the rendering process (processing method) in this embodiment will be described with reference to FIGS. 3 and 4. FIG. 3 is a flowchart showing the rendering process. The rendering process of this embodiment is executed by the system controller 110 and the image processing unit 104 according to a processing program as a computer program. The processing program is stored in, for example, a computer-readable storage medium (such as the internal memory of the system controller 110).

まず、ステップS101において、入力画像取得部104aは、互いに位置の異なる複数の光源位置で被写体の撮像を行うことで撮像部100により取得された複数の入力画像を取得する。複数の入力画像は、単一の光源の位置を(駆動部などを用いて)変更しながら単一の光源からの光を順次照射することで取得することができる。または、複数の入力画像を、それぞれ位置の異なる複数の光源(例えば、図1に示される8つの光源200a〜200h)からの光を順次照射して取得してもよい。 First, in step S101, the input image acquisition unit 104a acquires a plurality of input images acquired by the imaging unit 100 by imaging the subject at a plurality of light source positions having different positions from each other. A plurality of input images can be acquired by sequentially irradiating light from a single light source while changing the position of a single light source (using a drive unit or the like). Alternatively, the plurality of input images may be acquired by sequentially irradiating light from a plurality of light sources having different positions (for example, the eight light sources 200a to 200h shown in FIG. 1).

また、後述するステップS102にてランバート反射等の拡散反射モデルを仮定した照度差ステレオ法で法線情報を取得する場合、入力画像として撮影画像から鏡面反射成分を除去した複数の拡散反射画像を用いてもよい。画像から鏡面反射成分を除去した拡散反射画像を取得するため、例えば、2色性反射モデルによる手法を用いることができる。ただし、画像から鏡面反射成分を除去する手法はこれに限定されるものではなく、種々の手法を用いることが可能である。 Further, when the normal information is acquired by the illuminance difference stereo method assuming a diffuse reflection model such as Lambertian reflection in step S102 described later, a plurality of diffuse reflection images obtained by removing the specular reflection component from the captured image are used as the input image. You may. In order to acquire a diffuse reflection image in which the specular reflection component is removed from the image, for example, a method using a bicolor reflection model can be used. However, the method for removing the specular reflection component from the image is not limited to this, and various methods can be used.

続いてステップS102において、法線情報取得部104bは、法線情報を取得する。本実施例において、具体的には、法線情報取得部104bは、互いに位置の異なる複数の光源位置で被写体の撮像を行うことで取得された複数の入力画像を用いて、被写体の法線情報および反射率を取得する。法線情報および反射率は、照度差ステレオ法を用いて、光源位置による輝度情報の変化に基づいて算出される。なお本実施例において、法線情報取得部104bは、複数の入力画像に基づいて法線情報および反射率を算出するが、他のユニットが算出した法線情報や反射率を取得してもよく、入力画像を取得しなくてもよい。 Subsequently, in step S102, the normal information acquisition unit 104b acquires the normal information. In this embodiment, specifically, the normal information acquisition unit 104b uses a plurality of input images acquired by imaging the subject at a plurality of light source positions having different positions from each other, and uses the normal information of the subject. And get the reflectance. The normal information and the reflectance are calculated based on the change in the luminance information depending on the position of the light source by using the illuminance difference stereo method. In this embodiment, the normal information acquisition unit 104b calculates the normal information and the reflectance based on a plurality of input images, but the normal information and the reflectance calculated by another unit may be acquired. , It is not necessary to acquire the input image.

ここで、取得した法線情報には、前述のように種々の要因により誤差が生じている。例えば、被写体までの距離が遠くなるほど、撮像装置1が備える撮像光学系101の光軸(あるいは視線)と光源から被写体への光がなす角度(照射角度)が小さくなる。複数の光源位置での輝度変化から被写体の法線を決定する照度差ステレオ法では、照射角度が小さくなると輝度変化が低下し、撮像装置1内でのノイズの影響が強くなる。その結果、算出される法線にばらつきが生じる。さらに、照度差ステレオ法で面法線を算出した場合、仮定した反射特性とは異なる反射特性の被写体については法線誤差が生じる。そのため、誤差が生じた面法線を用いてレンダリング画像を生成すると、レンダリング画像にも誤差が生じる。例えば、ランバート拡散反射モデルを仮定した照度差ステレオ法で金属や透明体等の拡散反射が少ない被写体の面法線を算出すると、特に大きな法線誤差が生じる。このため、取得した面法線を用いてレンダリング画像を生成すると、レンダリング画像に破綻が生じる。 Here, the acquired normal information has an error due to various factors as described above. For example, as the distance to the subject increases, the angle (irradiation angle) formed by the optical axis (or line of sight) of the imaging optical system 101 included in the imaging device 1 and the light from the light source to the subject becomes smaller. In the illuminance difference stereo method in which the normal of the subject is determined from the brightness changes at a plurality of light source positions, the brightness change decreases as the irradiation angle becomes smaller, and the influence of noise in the image pickup apparatus 1 becomes stronger. As a result, the calculated normals vary. Further, when the surface normal is calculated by the illuminance difference stereo method, a normal error occurs for a subject having a reflection characteristic different from the assumed reflection characteristic. Therefore, when a rendered image is generated using the surface normal in which an error occurs, an error also occurs in the rendered image. For example, when the surface normal of a subject having little diffuse reflection such as a metal or a transparent body is calculated by the illuminance difference stereo method assuming a Lambert diffuse reflection model, a particularly large normal error occurs. Therefore, when a rendered image is generated using the acquired surface normal, the rendered image is broken.

また、レンダリング時の仮想光源角度が大きくなると、仮想光源下での見えの変化は大きくなるが、法線誤差がレンダリング画像に与える影響が大きくなる。式(1)で示されるように、レンダリング画像は法線ベクトルと仮想光源ベクトルの内積、つまり法線ベクトルと仮想光源ベクトルのなす角の余弦にしたがって変化する。法線ベクトルに誤差が生じると、法線ベクトルと仮想光源ベクトルのなす角が90°に近づくにつれ、レンダリング画像における誤差が大きくなる。また、照度差ステレオ法においては、互いに異なる複数の光源位置における輝度変化から法線情報を算出しているため、レンダリング時の仮想光源が撮影時の光源位置から離れるほどレンダリング画像における誤差が大きくなる。 Further, when the virtual light source angle at the time of rendering becomes large, the change in appearance under the virtual light source becomes large, but the influence of the normal error on the rendered image becomes large. As shown by the equation (1), the rendered image changes according to the inner product of the normal vector and the virtual light source vector, that is, the cosine of the angle formed by the normal vector and the virtual light source vector. When an error occurs in the normal vector, the error in the rendered image increases as the angle formed by the normal vector and the virtual light source vector approaches 90 °. Further, in the illuminance difference stereo method, since the normal information is calculated from the brightness changes at a plurality of different light source positions, the error in the rendered image increases as the virtual light source at the time of rendering moves away from the light source position at the time of shooting. ..

続いてステップS103において、光源条件取得部104cは、レンダリング画像を生成するための(レンダリング時の)第一の光源条件を取得する。ここで、第一の光源条件は、仮想光源角度または仮想光源強度の一方である。第一の光源条件は、ユーザが指定した仮想光源角度や仮想光源強度とすることができ、例えば撮影シーン毎等で予め決められた仮想光源条件であってもよい。ユーザによって選択された第一の光源条件は、情報入力部108からシステムコントローラ110に供給され、光源条件取得部104cがシステムコントローラ110からの情報に基づいて第一の光源条件を取得する。 Subsequently, in step S103, the light source condition acquisition unit 104c acquires the first light source condition (at the time of rendering) for generating the rendered image. Here, the first light source condition is one of the virtual light source angle and the virtual light source intensity. The first light source condition can be a virtual light source angle or a virtual light source intensity specified by the user, and may be, for example, a virtual light source condition predetermined for each shooting scene or the like. The first light source condition selected by the user is supplied from the information input unit 108 to the system controller 110, and the light source condition acquisition unit 104c acquires the first light source condition based on the information from the system controller 110.

ここで、仮想光源角度とは、視線ベクトルまたは光軸とレンダリング時の仮想光源ベクトルとのなす角度である。仮想光源強度は、仮想光源下での見えを再現したレンダリング画像の強度であり、式(1)で生成されるレンダリング画像を1として考えた場合の、生成するレンダリング画像の割合である。すなわち仮想光源強度は、レンダリング画像におけるベース画像の割合に基づいて決定される。例えば、仮想光源強度が0.5である場合には式(1)を用いて生成されるレンダリング画像を0.5倍したものが設定した仮想光源強度におけるレンダリング画像として生成される。また、入力画像等のベース画像に仮想光源下での見えを再現したレンダリング画像を加算あるいは加重平均してレンダリング画像を生成する場合、最終的なレンダリング画像のうち仮想光源下での見えを再現したレンダリング画像の割合を仮想光源強度としてもよい。したがって、仮想光源強度が大きいほど、仮想光源下での見えの変化は大きくなるが、法線誤差がレンダリング画像に与える影響が大きくなる。 Here, the virtual light source angle is an angle formed by the line-of-sight vector or the optical axis and the virtual light source vector at the time of rendering. The virtual light source intensity is the intensity of the rendered image that reproduces the appearance under the virtual light source, and is the ratio of the rendered image to be generated when the rendered image generated by the equation (1) is considered as 1. That is, the virtual light source intensity is determined based on the proportion of the base image in the rendered image. For example, when the virtual light source intensity is 0.5, the rendered image generated by using the equation (1) multiplied by 0.5 is generated as a rendered image at the set virtual light source intensity. In addition, when a rendered image that reproduces the appearance under the virtual light source is added to or weighted averaged to the base image such as the input image to generate the rendered image, the appearance under the virtual light source of the final rendered image is reproduced. The ratio of the rendered image may be used as the virtual light source intensity. Therefore, the greater the intensity of the virtual light source, the greater the change in appearance under the virtual light source, but the greater the effect of the normal error on the rendered image.

続いてステップS104において、光源条件取得部104cは、ステップS103にて取得した第一の光源条件に基づいて、レンダリング画像を生成するための(レンダリング時の)第二の光源条件の範囲(最大値)を決定する。ここで、第二の光源条件は、第一の光源条件として取得した仮想光源角度または仮想光源強度の他方である。すなわち、第一の光源条件が仮想光源角度である場合、第二の光源条件は仮想光源強度である。また、第一の光源条件が仮想光源強度である場合、第二の光源条件は仮想光源角度である。 Subsequently, in step S104, the light source condition acquisition unit 104c has a range (maximum value) of the second light source condition (at the time of rendering) for generating a rendered image based on the first light source condition acquired in step S103. ) Is determined. Here, the second light source condition is the other of the virtual light source angle or the virtual light source intensity acquired as the first light source condition. That is, when the first light source condition is the virtual light source angle, the second light source condition is the virtual light source intensity. When the first light source condition is the virtual light source intensity, the second light source condition is the virtual light source angle.

前述のように、レンダリング時の仮想光源角度(第一の光源条件)が大きくなると、仮想光源下での見えの変化は大きくなるが、法線誤差がレンダリング画像に与える影響が大きくなる。したがって、仮想光源角度が大きいほど仮想光源強度を小さくすればよい。すなわち、仮想光源角度が大きいほど仮想光源強度の最大値(画像全体の最大強度)が小さくなるように制限する。仮想光源角度が大きいほど仮想光源強度の範囲を小さく制限することで、仮想光源角度を大きくした際に法線誤差がレンダリング画像に与える影響を低減することができる。 As described above, when the virtual light source angle (first light source condition) at the time of rendering becomes large, the change in appearance under the virtual light source becomes large, but the influence of the normal error on the rendered image becomes large. Therefore, the larger the virtual light source angle, the smaller the virtual light source intensity. That is, the larger the virtual light source angle, the smaller the maximum value of the virtual light source intensity (maximum intensity of the entire image). By limiting the range of the virtual light source intensity to be smaller as the virtual light source angle is larger, it is possible to reduce the influence of the normal error on the rendered image when the virtual light source angle is increased.

ステップS103にて第一の光源条件として仮想光源強度を取得した場合、仮想光源強度が大きいほど仮想光源角度の最大値が小さくなるように制限する。仮想光源強度が大きいほど仮想光源角度の範囲を小さく制限することで、法線誤差がレンダリング画像に与える影響を低減することができる。ここで、光源条件の範囲を決定する際の仮想光源角度は、視線ベクトルもしくは光軸とレンダリング時の仮想光源ベクトルのなす角、または、撮影時の光源ベクトルとレンダリング時の仮想光源ベクトルとのなす角である。または、仮想光源角度は、撮影時の複数の光源ベクトルとレンダリング時の仮想光源ベクトルとのなす角の最小値としてもよい。 When the virtual light source intensity is acquired as the first light source condition in step S103, the larger the virtual light source intensity, the smaller the maximum value of the virtual light source angle is limited. By limiting the range of the virtual light source angle to a smaller value as the virtual light source intensity increases, the influence of the normal error on the rendered image can be reduced. Here, the virtual light source angle when determining the range of the light source condition is the angle formed by the line-of-sight vector or the optical axis and the virtual light source vector at the time of rendering, or the light source vector at the time of shooting and the virtual light source vector at the time of rendering. It is a horn. Alternatively, the virtual light source angle may be the minimum value of the angle formed by the plurality of light source vectors at the time of shooting and the virtual light source vector at the time of rendering.

図4は、第一の光源条件と第二の光源条件の最大値との関係を示す図である。図4において、横軸は第一の光源条件、縦軸は第二の光源条件の最大値をそれぞれ示す。例えば、図4に示されるように、第一の光源条件が大きくなるほど第二の光源条件の最大値を小さくする。なお図4では第一の光源条件に対して第二の光源条件の最大値が線形になるように決定しているが、本発明はこれに限定されるものではない。第一の光源条件に対して第二の光源条件の最大値が非線形あってもよい。また、第一の光源条件に対する第二の光源条件の最大値の関係を関数として記憶しておくこともでき、または、第一の光源条件に対する第二の光源条件の最大値を離散的にテーブルとして記憶しておいてもよい。 FIG. 4 is a diagram showing the relationship between the first light source condition and the maximum value of the second light source condition. In FIG. 4, the horizontal axis represents the maximum value of the first light source condition, and the vertical axis represents the maximum value of the second light source condition. For example, as shown in FIG. 4, the larger the first light source condition, the smaller the maximum value of the second light source condition. Although it is determined in FIG. 4 that the maximum value of the second light source condition is linear with respect to the first light source condition, the present invention is not limited to this. The maximum value of the second light source condition may be non-linear with respect to the first light source condition. Further, the relationship between the maximum value of the second light source condition and the first light source condition can be stored as a function, or the maximum value of the second light source condition with respect to the first light source condition can be discretely tabled. You may remember as.

続いて、図3のステップS105において、光源条件取得部104cは、ステップS104にて決定された第二の光源条件の範囲(最大値)に基づいて、第二の光源条件を取得する。ステップS103にて第一の光源条件として仮想光源角度を取得した場合、ステップS104において第二の光源条件としての仮想光源強度の範囲を決定し、その範囲に基づいて仮想光源強度を取得する。決定した仮想光源強度の範囲内で仮想光源強度を設定できるようにしてもよい。または、範囲外の仮想光源強度を設定した場合(光源条件取得部104cが第二の光源条件の最大値よりも大きい第二の光源条件の値を取得した場合)、警告を表示させるようにしてもよい。 Subsequently, in step S105 of FIG. 3, the light source condition acquisition unit 104c acquires the second light source condition based on the range (maximum value) of the second light source condition determined in step S104. When the virtual light source angle is acquired as the first light source condition in step S103, the range of the virtual light source intensity as the second light source condition is determined in step S104, and the virtual light source intensity is acquired based on the range. The virtual light source intensity may be set within the determined virtual light source intensity range. Alternatively, when the virtual light source intensity outside the range is set (when the light source condition acquisition unit 104c acquires the value of the second light source condition larger than the maximum value of the second light source condition), a warning is displayed. May be good.

ステップS103にて第一の光源条件として仮想光源強度を取得した場合、ステップS104において第二の光源条件としての仮想光源角度の範囲を決定し、その範囲に基づいて仮想光源角度を取得する。決定した光源角度の範囲内で光源角度を設定できるようにしてもよく、または、範囲外の仮想光源角度を設定した場合には警告を表示させるようにしてもよい。第二の光源条件の取得は、第一の光源条件と同様に、ユーザが指定した仮想光源角度または仮想光源強度としてもよいし、設定できる最大の仮想光源条件にするなどして自動で決められた仮想光源条件であってもよい。ユーザによって選択された第二の光源条件も第一の光源条件と同様にして情報入力部108からシステムコントローラ110に供給され、光源条件取得部104cがシステムコントローラ110からの情報に基づいて第二の光源条件を取得する。 When the virtual light source intensity is acquired as the first light source condition in step S103, the range of the virtual light source angle as the second light source condition is determined in step S104, and the virtual light source angle is acquired based on the range. The light source angle may be set within the determined range of the light source angle, or a warning may be displayed when a virtual light source angle outside the range is set. The acquisition of the second light source condition may be the virtual light source angle or the virtual light source intensity specified by the user as in the case of the first light source condition, or is automatically determined by setting the maximum virtual light source condition that can be set. It may be a virtual light source condition. The second light source condition selected by the user is also supplied from the information input unit 108 to the system controller 110 in the same manner as the first light source condition, and the light source condition acquisition unit 104c is the second based on the information from the system controller 110. Get the light source condition.

続いてステップS106において、レンダリング部104dは、ステップS103およびステップS105にて取得した第一の光源条件および第二の光源条件に基づいて、レンダリング画像を生成する。レンダリング画像は、光源条件に基づいて生成した仮想光源下での見えを再現したレンダリング画像のみでもよく、または、入力画像等のベース画像に対して加算や加重平均したものでもよい。いずれの場合でも、ステップS105にて取得した仮想光源強度となるレンダリング画像を生成する。ベース画像としては、前述のように光源位置を変化させて取得した入力画像(少なくとも3つの異なる光源位置で撮影された複数の撮影画像である入力画像に基づく画像)を用いることができる。または、ベース画像として、光源を照射せずに撮影して得られた環境光画像など、光源環境が異なる画像を用いてもよい。また、レンダリング画像の生成においては、ステップS102の法線情報算出において仮定した反射特性でなくてもよく、または、その他の拡散反射特性やそれに加えて鏡面反射特性でのレンダリング画像を生成してもよい。また、入力画像やベース画像を反射率とみなしてレンダリング画像を生成してもよい。 Subsequently, in step S106, the rendering unit 104d generates a rendered image based on the first light source condition and the second light source condition acquired in step S103 and step S105. The rendered image may be only a rendered image that reproduces the appearance under a virtual light source generated based on the light source condition, or may be an addition or weighted averaging of a base image such as an input image. In either case, a rendered image having the virtual light source intensity acquired in step S105 is generated. As the base image, an input image (an image based on an input image which is a plurality of captured images taken at at least three different light source positions) obtained by changing the light source position as described above can be used. Alternatively, as the base image, an image having a different light source environment, such as an ambient light image obtained by taking a picture without irradiating the light source, may be used. Further, in the generation of the rendered image, the reflection characteristics assumed in the calculation of the normal information in step S102 may not be used, or the rendered image with other diffuse reflection characteristics and in addition to the specular reflection characteristics may be generated. Good. Further, the rendered image may be generated by regarding the input image or the base image as the reflectance.

このように本実施例において、処理装置(画像処理部104)は、法線情報取得部104b、光源条件取得部104c、および、レンダリング部104dを有する。法線情報取得部は、被写体の法線情報を取得する。光源条件取得部は、レンダリング時の第一の光源条件として仮想光源角度または仮想光源強度の一方を取得する。そして光源条件取得部は、取得した第一の光源条件に基づいて、レンダリング時の第二の光源条件の最大値として仮想光源角度または仮想光源強度の他方の最大値を決定し、最大値以下の第二の光源条件を取得する。レンダリング部は、第一の光源条件および第二の光源条件に基づいてレンダリング画像を生成する。また光源条件取得部は、第一の光源条件が大きいほど第二の光源条件の最大値を小さくする。 As described above, in this embodiment, the processing device (image processing unit 104) has a normal information acquisition unit 104b, a light source condition acquisition unit 104c, and a rendering unit 104d. The normal information acquisition unit acquires the normal information of the subject. The light source condition acquisition unit acquires either the virtual light source angle or the virtual light source intensity as the first light source condition at the time of rendering. Then, the light source condition acquisition unit determines the virtual light source angle or the other maximum value of the virtual light source intensity as the maximum value of the second light source condition at the time of rendering based on the acquired first light source condition, and is equal to or less than the maximum value. Get the second light source condition. The rendering unit generates a rendered image based on the first light source condition and the second light source condition. Further, the light source condition acquisition unit reduces the maximum value of the second light source condition as the first light source condition becomes larger.

なお本実施例では、撮像装置1を用いて被写体の面法線を算出してレンダリング画像を生成しているが、これに限定されるものではない。例えば図2Bに示されるように、撮像装置1とは異なる処理システム2を用いて処理を行ってもよい。図2Bは、処理システム2のブロック図である。処理システム2は、処理装置500、撮像部501、および光源部502を有する。処理装置500は、入力画像取得部500a、法線情報取得部500b、光源条件取得部500c、および、レンダリング部500dを有する。 In this embodiment, the image pickup apparatus 1 is used to calculate the surface normal of the subject to generate a rendered image, but the present embodiment is not limited to this. For example, as shown in FIG. 2B, processing may be performed using a processing system 2 different from that of the imaging device 1. FIG. 2B is a block diagram of the processing system 2. The processing system 2 includes a processing device 500, an imaging unit 501, and a light source unit 502. The processing device 500 includes an input image acquisition unit 500a, a normal information acquisition unit 500b, a light source condition acquisition unit 500c, and a rendering unit 500d.

処理システム2を用いてレンダリング画像を生成する場合、まず、入力画像取得部500aが互いに位置の異なる複数の光源位置で被写体の撮像を行うことで取得された複数の入力画像を取得する。次に、法線情報取得部500bは、複数の入力画像に基づいて被写体の法線情報および反射率を算出する。そして光源条件取得部500cは、レンダリング画像を生成するための第一の光源条件を取得し、第一の光源条件に基づいて第二の光源条件の範囲(最大値)を決定し、第二の光源条件の範囲に基づいて第二の光源条件を取得する。そしてレンダリング部500dは、取得した光源条件に基づいてレンダリング画像を生成する。なお、撮像部501および光源部502はそれぞれ、個別の装置であってもよいし、光源部502が撮像部501に内蔵されていてもよい。 When a rendered image is generated using the processing system 2, first, the input image acquisition unit 500a acquires a plurality of input images acquired by imaging a subject at a plurality of light source positions having different positions from each other. Next, the normal information acquisition unit 500b calculates the normal information and the reflectance of the subject based on the plurality of input images. Then, the light source condition acquisition unit 500c acquires the first light source condition for generating the rendered image, determines the range (maximum value) of the second light source condition based on the first light source condition, and the second Obtain a second light source condition based on the range of light source conditions. Then, the rendering unit 500d generates a rendered image based on the acquired light source conditions. The image pickup unit 501 and the light source unit 502 may be individual devices, or the light source unit 502 may be built in the image pickup unit 501.

本実施例によれば、第一の光源条件に基づいて第二の光源条件の範囲(最大値)を決定することで、高品位なレンダリング画像を生成することができる。 According to this embodiment, a high-quality rendered image can be generated by determining the range (maximum value) of the second light source condition based on the first light source condition.

次に、本発明の実施例2について説明する。本実施例の撮像装置1aは、実施例1の撮像装置1と同様に、被写体の法線を取得し、高品位なレンダリング画像を生成する。また本実施例の撮像装置1aは、撮影条件に基づいて第一の光源条件の範囲(最大値)を決定し、決定した範囲に基づいて第一の光源条件を取得する。 Next, Example 2 of the present invention will be described. The imaging device 1a of the present embodiment acquires the normal of the subject and generates a high-quality rendered image, similarly to the imaging device 1 of the first embodiment. Further, the image pickup apparatus 1a of the present embodiment determines the range (maximum value) of the first light source condition based on the imaging conditions, and acquires the first light source condition based on the determined range.

図5は、本実施例における撮像装置1aのブロック図である。図6は、本実施例におけるレンダリング処理(処理方法)を示すフローチャートである。本実施例のレンダリング処理は、実施例1と同様に、システムコントローラ110および撮像制御部107により、コンピュータプログラムとしての画像処理プログラムに従って実行される。 FIG. 5 is a block diagram of the image pickup apparatus 1a in this embodiment. FIG. 6 is a flowchart showing a rendering process (processing method) in this embodiment. The rendering process of this embodiment is executed by the system controller 110 and the image pickup control unit 107 according to the image processing program as a computer program, as in the first embodiment.

画像処理部104は、デジタル信号に対して一般的に行われる画像処理と併せて、被写体の法線情報を取得し、レンダリング画像を生成する。図5に示されるように、画像処理部104は、入力画像取得部104a、法線情報取得部104b、光源条件取得部104c、レンダリング部104d、および、撮影条件取得部104eを有する。なお、図6のステップS201、S203、およびS206〜S208は、実施例1のステップS101、S102、およびS104〜S106とそれぞれ同様であるため、それらの詳細な説明は省略する。 The image processing unit 104 acquires the normal information of the subject and generates a rendered image in addition to the image processing generally performed on the digital signal. As shown in FIG. 5, the image processing unit 104 includes an input image acquisition unit 104a, a normal information acquisition unit 104b, a light source condition acquisition unit 104c, a rendering unit 104d, and a shooting condition acquisition unit 104e. Since steps S201, S203, and S206 to S208 in FIG. 6 are the same as steps S101, S102, and S104 to S106 of the first embodiment, detailed description thereof will be omitted.

図6のステップS202において、撮影条件取得部104eは、入力画像を取得した際の撮影条件を取得する。撮影条件取得部104eは、例えば、撮影条件として被写体までの距離情報(被写体距離)を取得する。本実施例において、距離情報は、ステップS201にて取得された入力画像が撮影された際のオートフォーカス、またはユーザが手動でフォーカスを行った際のフォーカスレンズの位置から取得される。また、異なる視点から撮影した複数の視差画像を取得するステレオ法によって距離情報を取得してもよい。ステレオ法では、取得した複数の視差画像中の被写体の対応点の視差量と撮影した各視点の位置情報および光学系の焦点距離から三角測量によって奥行きを取得する。距離情報は、被写体の対応点で算出された奥行きの平均値としてもよく、または、被写体の特定の点における奥行きとしてもよい。 In step S202 of FIG. 6, the shooting condition acquisition unit 104e acquires the shooting conditions when the input image is acquired. The shooting condition acquisition unit 104e acquires distance information (subject distance) to the subject as shooting conditions, for example. In this embodiment, the distance information is acquired from the autofocus when the input image acquired in step S201 is taken, or the position of the focus lens when the user manually focuses. Further, the distance information may be acquired by the stereo method of acquiring a plurality of parallax images taken from different viewpoints. In the stereo method, the depth is acquired by triangulation from the amount of parallax of the corresponding point of the subject in the acquired plurality of parallax images, the position information of each viewpoint taken, and the focal length of the optical system. The distance information may be the average value of the depths calculated at the corresponding points of the subject, or may be the depth at a specific point of the subject.

視差画像から距離情報を取得する場合、複数の視差画像の撮像部(撮像系)100は、図7に示されるように、撮像光学系101の瞳のうち互いに異なる領域P1、P2を通過した複数の光束を撮像素子102の互いに異なる受光部(画素)に導いて光電変換を行う。 When acquiring distance information from a parallax image, a plurality of image pickup units (imaging systems) 100 of the plurality of parallax images have passed through different regions P1 and P2 of the pupils of the image pickup optical system 101, as shown in FIG. The luminous flux of the image sensor 102 is guided to different light receiving units (pixels) of the image sensor 102 to perform photoelectric conversion.

図7は、撮像素子102の受光部と撮像光学系101の瞳との関係を示す図である。撮像素子102には、受光部であるG1画素とG2画素の対(画素対)が複数配列されている。複数のG1画素をまとめてG1画素群といい、複数のG2画素をまとめてG2画素群という。対のG1画素とG2画素は、共通の(すなわち、画素対ごとに1つずつ設けられた)マイクロレンズMLを介して撮像光学系101の射出瞳EXPと共役な関係を有する。また、マイクロレンズMLと受光部との間には、カラーフィルタCFが設けられている。 FIG. 7 is a diagram showing the relationship between the light receiving portion of the image sensor 102 and the pupil of the image pickup optical system 101. A plurality of pairs (pixel pairs) of G1 pixels and G2 pixels, which are light receiving units, are arranged on the image sensor 102. A plurality of G1 pixels are collectively referred to as a G1 pixel group, and a plurality of G2 pixels are collectively referred to as a G2 pixel group. The pair of G1 pixels and the G2 pixel have a conjugate relationship with the exit pupil EXP of the imaging optical system 101 via a common microlens ML (that is, one is provided for each pixel pair). Further, a color filter CF is provided between the microlens ML and the light receiving portion.

図8は、射出瞳EXPの位置に薄肉レンズがあると仮定した場合の撮像部(撮像系)の模式図である。G1画素は射出瞳EXPのうち領域P1を通過した光束を受光し、G2画素は射出瞳EXPのうち領域P2を通過した光束を受光する。撮像している物点OSPには必ずしも物体が存在している必要はなく、物点OSPを通った光束は通過する瞳内での領域(位置)に応じてG1画素またはG2画素に入射する。瞳内の互いに異なる領域を光束が通過することは、物点OSPからの入射光が角度(視差)によって分離されることに相当する。すなわち、マイクロレンズMLごとに設けられたG1画素およびG2画素のうち、G1画素からの出力信号を用いて生成された画像とG2画素からの出力信号を用いて生成された画像とが、互いに視差を有する複数(ここでは一対)の視差画像となる。以下の説明において、瞳内の互いに異なる領域を通過した光束を互いに異なる受光部(画素)により受光することを瞳分割という。 FIG. 8 is a schematic view of an imaging unit (imaging system) assuming that a thin-walled lens is located at the position of the exit pupil EXP. The G1 pixel receives the luminous flux that has passed through the region P1 of the exit pupil EXP, and the G2 pixel receives the luminous flux that has passed through the region P2 of the exit pupil EXP. An object does not necessarily have to exist in the object point OSP being imaged, and the luminous flux passing through the object point OSP is incident on the G1 pixel or the G2 pixel depending on the region (position) in the pupil through which the object is being imaged. The passage of the luminous flux through different regions in the pupil corresponds to the separation of the incident light from the object point OSP by the angle (parallax). That is, among the G1 pixels and G2 pixels provided for each microlens ML, the image generated by using the output signal from the G1 pixel and the image generated by using the output signal from the G2 pixel are separated from each other. It becomes a plurality of (here, a pair) parallax images having. In the following description, receiving light flux passing through different regions in the pupil by different light receiving portions (pixels) is referred to as pupil division.

図7および図8において、射出瞳EXPの位置がずれる等して、上述した共役関係が完全ではなくなった場合や、領域P1と領域P2とが部分的にオーバーラップする場合でも、得られた複数の画像を視差画像として扱うことができる。 In FIGS. 7 and 8, even when the above-mentioned conjugate relationship is not perfect due to the position of the exit pupil EXP being displaced, or when the regions P1 and P2 partially overlap, the plurality of obtained regions are obtained. Image can be treated as a parallax image.

図9は、撮像装置の他の例を示す図である。図9に示されるように、1つの撮像装置に複数の撮像光学系OSj(j=1、2)を設けることで視差画像を取得することができる。また、複数のカメラを用いて同一被写体を撮像する場合も視差画像が得られる。 FIG. 9 is a diagram showing another example of the imaging device. As shown in FIG. 9, a parallax image can be acquired by providing a plurality of imaging optical systems OSj (j = 1, 2) in one imaging device. A parallax image can also be obtained when the same subject is imaged using a plurality of cameras.

また本実施例において、撮影条件としてISO感度やノイズ量を取得してもよい。または、入力画像を取得した際の互いに異なる複数の光源位置からの光の発光(光量)ばらつきを撮影条件として取得してもよい。 Further, in this embodiment, ISO sensitivity and noise amount may be acquired as imaging conditions. Alternatively, variations in light emission (light intensity) from a plurality of different light source positions when the input image is acquired may be acquired as an imaging condition.

図6のステップS204において、光源条件取得部104cは、ステップS202にて取得した撮影条件に基づいて、第一の光源条件の範囲(最大値)を決定する。光源の位置が固定されている場合、被写体が遠くなるほど、撮像光学系101の光軸(あるいは視線)と光源方向がなす角(照射角度)が小さくなる。複数の光源位置での輝度変化から被写体の法線を算出する照度差ステレオ法では、照射角度が小さくなると輝度変化が低下し、ノイズの影響が強くなる。ノイズの影響が強くなると、算出される法線にばらつきが生じる。ばらついた法線を用いてレンダリング画像を生成すると、ノイズが増幅されてしまう。したがって、被写体までの距離(被写体距離)が遠くノイズの影響が強くなる場合、第一の光源条件の範囲(最大値)を小さくする。 In step S204 of FIG. 6, the light source condition acquisition unit 104c determines the range (maximum value) of the first light source condition based on the shooting conditions acquired in step S202. When the position of the light source is fixed, the farther the subject is, the smaller the angle (irradiation angle) formed by the optical axis (or line of sight) of the imaging optical system 101 and the direction of the light source. In the illuminance difference stereo method in which the normal of the subject is calculated from the brightness changes at a plurality of light source positions, the brightness change decreases and the influence of noise becomes stronger as the irradiation angle becomes smaller. When the influence of noise becomes strong, the calculated normals vary. When a rendered image is generated using scattered normals, the noise is amplified. Therefore, when the distance to the subject (subject distance) is long and the influence of noise becomes strong, the range (maximum value) of the first light source condition is reduced.

第一の光源条件が仮想光源角度である場合、被写体までの距離が遠いほど仮想光源角度の最大値を小さくする。第一の光源条件が仮想光源強度である場合、距離が遠いほど仮想光源強度の最大値を小さくする。被写体までの距離が遠いほど第一の光源条件の範囲を制限することで、被写体までの距離が遠くなった際にノイズが法線やレンダリング画像に与える影響を低減できる。また、撮影条件としてISO感度やノイズ量を取得した場合、ノイズ量が多くなる条件ほど第一の光源条件の範囲を小さくする。すなわち、ISO感度が高いほど第一の光源条件の範囲を小さくする。また、撮影条件として入力画像を取得した際の複数の光源の発光ばらつきを取得した場合、発光ばらつきが大きいほど第一の光源条件の範囲を小さくする。 When the first light source condition is the virtual light source angle, the maximum value of the virtual light source angle is reduced as the distance to the subject increases. When the first light source condition is the virtual light source intensity, the maximum value of the virtual light source intensity is reduced as the distance increases. By limiting the range of the first light source condition as the distance to the subject increases, it is possible to reduce the influence of noise on the normal and the rendered image when the distance to the subject increases. Further, when the ISO sensitivity and the amount of noise are acquired as the shooting conditions, the range of the first light source condition is reduced as the amount of noise increases. That is, the higher the ISO sensitivity, the smaller the range of the first light source condition. Further, when the emission variation of a plurality of light sources when the input image is acquired as the shooting condition is acquired, the larger the emission variation is, the smaller the range of the first light source condition is.

互いに位置の異なる複数の光源位置で被写体の撮像を行って得られた撮影画像を入力画像として取得する際に、複数の光源位置からの光量にばらつきが大きいほど法線誤差が生じるため、第一の光源条件の範囲を小さくすればよい。前述の撮影条件が大きいほど第一の光源条件の範囲を制限することで、ノイズや発光ばらつきが法線やレンダリング画像に与える影響を低減することができる。 When a photographed image obtained by imaging a subject at a plurality of light source positions having different positions is acquired as an input image, the greater the variation in the amount of light from the plurality of light source positions, the greater the normal error. The range of the light source condition of is reduced. By limiting the range of the first light source condition as the above-mentioned shooting condition is larger, it is possible to reduce the influence of noise and emission variation on the normal and the rendered image.

図10は、本実施例における撮影条件と第一の光源条件の最大値との関係を示す図である。図10において、横軸は撮影条件(距離、ISO感度、ノイズ量、発光ばらつき)、縦軸は第一の光源条件の最大値をそれぞれ示す。例えば、図10に示されるように、前述の距離情報等の撮影条件が大きくなるほど第一の光源条件の最大値を小さくする。図10では撮影条件に対して第一の光源条件の最大値が線形になるように決定しているが、本実施例はこれに限定されるものではない。撮影条件に対して第一の光源条件の最大値が非線形あってもよい。また、撮影条件に対する第一の光源条件の最大値の関係を関数として記憶しておいてもよく、または、撮影条件に対する第一の光源条件の最大値を離散的にテーブルとして記憶しておいてもよい。また、レンダリング画像における領域毎に第一の光源条件の範囲を決定してもよい。例えば、被写体までの距離が遠い領域ほど仮想光源強度の最大値を小さくする。 FIG. 10 is a diagram showing the relationship between the photographing conditions and the maximum value of the first light source condition in this embodiment. In FIG. 10, the horizontal axis represents the shooting conditions (distance, ISO sensitivity, noise amount, emission variation), and the vertical axis represents the maximum value of the first light source condition. For example, as shown in FIG. 10, the maximum value of the first light source condition is reduced as the shooting conditions such as the above-mentioned distance information become larger. In FIG. 10, it is determined that the maximum value of the first light source condition is linear with respect to the photographing condition, but this embodiment is not limited to this. The maximum value of the first light source condition may be non-linear with respect to the shooting condition. Further, the relationship between the maximum value of the first light source condition with respect to the shooting condition may be stored as a function, or the maximum value of the first light source condition with respect to the shooting condition may be stored discretely as a table. May be good. Further, the range of the first light source condition may be determined for each region in the rendered image. For example, the farther the distance to the subject is, the smaller the maximum value of the virtual light source intensity is.

続いて、図6のステップS205において、光源条件取得部104cは、ステップS204にて決定された第一の光源条件の範囲(最大値)に基づいて、第一の光源条件を取得する。第一の光源条件として仮想光源角度を取得する場合、ステップS204にて仮想光源角度の範囲(最大値)を決定し、その範囲に基づいて仮想光源角度を取得する。決定した仮想光源角度の範囲内で仮想光源角度を設定できるようにしてもよく、または、範囲外の仮想光源角度を設定した場合には警告を表示させるようにしてもよい。第一の光源条件として仮想光源強度を取得する場合、ステップS204にて仮想光源強度の範囲(最大値)を決定し、その範囲に基づいて仮想光源強度を取得する。決定した仮想光源強度の範囲内で仮想光源強度を設定できるようにしてもよく、または、範囲外の仮想光源強度を設定した場合には警告を表示させるようにしてもよい。 Subsequently, in step S205 of FIG. 6, the light source condition acquisition unit 104c acquires the first light source condition based on the range (maximum value) of the first light source condition determined in step S204. When acquiring the virtual light source angle as the first light source condition, the range (maximum value) of the virtual light source angle is determined in step S204, and the virtual light source angle is acquired based on the range. The virtual light source angle may be set within the range of the determined virtual light source angle, or a warning may be displayed when the virtual light source angle outside the range is set. When acquiring the virtual light source intensity as the first light source condition, the range (maximum value) of the virtual light source intensity is determined in step S204, and the virtual light source intensity is acquired based on the range. The virtual light source intensity may be set within the determined virtual light source intensity range, or a warning may be displayed when the virtual light source intensity outside the range is set.

第一の光源条件は、ユーザが指定した仮想光源角度や仮想光源強度としてもよく、または、設定できる最大の光源条件にするなどして自動で決められた光源条件であってもよい。ユーザによって選択された第一の光源条件は、情報入力部108からシステムコントローラ110に供給され、光源条件取得部104cがシステムコントローラ110からの情報に基づいて第一の光源条件を取得する。 The first light source condition may be a virtual light source angle or a virtual light source intensity specified by the user, or may be a light source condition automatically determined by setting the maximum light source condition that can be set. The first light source condition selected by the user is supplied from the information input unit 108 to the system controller 110, and the light source condition acquisition unit 104c acquires the first light source condition based on the information from the system controller 110.

このように本実施例において、撮影条件取得部104eは、入力画像が撮影された際の撮影条件を取得する。光源条件取得部104cは、撮影条件に基づいて第一の光源条件の最大値を決定する。好ましくは、撮影条件は、入力画像が撮影された際の被写体距離である。より好ましくは、光源条件取得部は、被写体距離が遠いほど第一の光源条件の最大値を小さくする。また好ましくは、撮影条件は、入力画像におけるノイズ量、入力画像が撮影された際のISO感度、および、入力画像が撮影された際の発光ばらつきの少なくとも一つである。また好ましくは、光源条件取得部は、レンダリング画像の領域毎に第一の光源条件の最大値を決定する。 As described above, in this embodiment, the shooting condition acquisition unit 104e acquires the shooting conditions when the input image is shot. The light source condition acquisition unit 104c determines the maximum value of the first light source condition based on the photographing condition. Preferably, the shooting condition is the subject distance when the input image is shot. More preferably, the light source condition acquisition unit reduces the maximum value of the first light source condition as the subject distance increases. Further, preferably, the shooting conditions are at least one of the amount of noise in the input image, the ISO sensitivity when the input image is shot, and the emission variation when the input image is shot. Further, preferably, the light source condition acquisition unit determines the maximum value of the first light source condition for each region of the rendered image.

本実施例によれば、第一の光源条件に基づいて第二の光源条件の範囲を決定することで、高品位なレンダリング画像を生成することができる。また本実施例によれば、撮影条件に基づいて第一の光源条件の範囲を決定し、決定した範囲に基づいて第一の光源条件を取得することで、高品位なレンダリング画像を生成することができる。 According to this embodiment, a high-quality rendered image can be generated by determining the range of the second light source condition based on the first light source condition. Further, according to this embodiment, a high-quality rendered image is generated by determining the range of the first light source condition based on the shooting conditions and acquiring the first light source condition based on the determined range. Can be done.

次に、本発明の実施例3について説明する。本実施例の撮像装置1bは、実施例1の撮像装置1と同様に、被写体の法線を取得し、高品位なレンダリング画像を生成する。また本実施例の撮像装置1bは、法線信頼度に基づいて第一の光源条件の範囲(最大値)を決定し、決定した範囲に基づいて第一の光源条件を取得する。 Next, Example 3 of the present invention will be described. The image pickup apparatus 1b of the present embodiment acquires the normal of the subject and generates a high-quality rendered image, similarly to the image pickup apparatus 1 of the first embodiment. Further, the image pickup apparatus 1b of the present embodiment determines the range (maximum value) of the first light source condition based on the normal reliability, and acquires the first light source condition based on the determined range.

図11は、本実施例における撮像装置1bのブロック図である。図12は、本実施例におけるレンダリング処理(処理方法)を示すフローチャートである。本実施例のレンダリング処理は、実施例1と同様に、システムコントローラ110および撮像制御部107により、コンピュータプログラムとしての画像処理プログラムに従って実行される。 FIG. 11 is a block diagram of the image pickup apparatus 1b in this embodiment. FIG. 12 is a flowchart showing a rendering process (processing method) in this embodiment. The rendering process of this embodiment is executed by the system controller 110 and the image pickup control unit 107 according to the image processing program as a computer program, as in the first embodiment.

画像処理部104は、デジタル信号に対して一般的に行われる画像処理と併せて、被写体の法線情報を取得し、レンダリング画像を生成する。図11に示されるように、画像処理部104は、入力画像取得部104a、法線情報取得部104b、光源条件取得部104c、レンダリング部104d、および、法線信頼度取得部104fを有する。なお、図12のステップS301、S302、およびS306〜S308は、実施例1のステップS101、S102、およびS104〜S106とそれぞれ同様であるため、それらの詳細な説明は省略する。 The image processing unit 104 acquires the normal information of the subject and generates a rendered image in addition to the image processing generally performed on the digital signal. As shown in FIG. 11, the image processing unit 104 includes an input image acquisition unit 104a, a normal information acquisition unit 104b, a light source condition acquisition unit 104c, a rendering unit 104d, and a normal reliability acquisition unit 104f. Since steps S301, S302, and S306 to S308 in FIG. 12 are the same as steps S101, S102, and S104 to S106 of the first embodiment, detailed description thereof will be omitted.

ステップS303において、法線信頼度取得部104fは、ステップS302にて取得した法線情報および反射率とステップS301にて取得した入力画像が撮影された際の光源条件に基づいて、再現レンダリング画像を生成する。すなわち法線信頼度取得部104fは、取得した法線情報および反射率を用いて、入力画像を再現したレンダリング画像を生成する。再現レンダリング画像の生成は、ステップS302にて法線情報を算出する際に仮定した反射特性を用いてレンダリング処理により行う。ランバート拡散を仮定して法線情報を算出した場合、式(1)に従って、複数の再現レンダリング画像を生成する。また、再現レンダリング画像は、複数の入力画像のうち一部の入力画像に対応したレンダリング画像としてもよく、または、複数の入力画像の全てに対応する複数のレンダリング画像としてもよい。 In step S303, the normal reliability acquisition unit 104f produces a reproduced rendered image based on the normal information and reflectance acquired in step S302 and the light source conditions when the input image acquired in step S301 is captured. Generate. That is, the normal reliability acquisition unit 104f uses the acquired normal information and reflectance to generate a rendered image that reproduces the input image. The reproduction rendered image is generated by the rendering process using the reflection characteristic assumed when calculating the normal information in step S302. When the normal information is calculated assuming Lambert diffusion, a plurality of reproduced rendered images are generated according to the equation (1). Further, the reproduced rendered image may be a rendered image corresponding to a part of the input images among the plurality of input images, or may be a plurality of rendered images corresponding to all of the plurality of input images.

また法線信頼度取得部104fは、ステップS301にて取得した入力画像とステップS303にて取得した再現レンダリング画像とに基づいて、法線情報の信頼度である法線信頼度を取得する。前述のように、照度差ステレオ法で面法線を算出した場合、仮定した反射特性とは異なる反射特性の被写体については法線誤差が生じる。このため、誤差が生じた面法線を用いてレンダリング画像を生成すると、レンダリング画像にも誤差が生じる。 Further, the normal reliability acquisition unit 104f acquires the normal reliability, which is the reliability of the normal information, based on the input image acquired in step S301 and the reproduced rendered image acquired in step S303. As described above, when the surface normal is calculated by the illuminance difference stereo method, a normal error occurs for a subject having a reflection characteristic different from the assumed reflection characteristic. Therefore, when a rendered image is generated using the surface normal in which an error occurs, an error also occurs in the rendered image.

そこで法線信頼度取得部104fは、ステップS301にて取得した入力画像とステップS303にて取得した再現レンダリング画像との差分に基づいて、法線信頼度を取得する。差分が大きいほど法線信頼度が低いことを意味する。法線信頼度は、入力画像とステップS303にて取得した再現レンダリング画像との差分としてもよい。または、法線信頼度は、差分を反射率で除した正規化差分を法線信頼度としてもよく、または、差分を入力画像や複数の入力画像の平均値または中央値等の入力画像に基づく画像で除した正規化差分を法線信頼度として用いてもよい。差分を反射率や入力画像で除することで、算出した差分から明るさの影響を除外することができる。 Therefore, the normal reliability acquisition unit 104f acquires the normal reliability based on the difference between the input image acquired in step S301 and the reproduced rendered image acquired in step S303. The larger the difference, the lower the normal reliability. The normal reliability may be the difference between the input image and the reproduced rendered image acquired in step S303. Alternatively, the normal reliability may be a normalized difference obtained by dividing the difference by the reflectance as the normal reliability, or the difference is based on an input image such as an input image or an average value or a median value of a plurality of input images. The normalized difference divided by the image may be used as the normal reliability. By dividing the difference by the reflectance or the input image, the influence of brightness can be excluded from the calculated difference.

または、複数の入力画像と複数の再現レンダリング画像との複数の差分における最大値である最大差分または平均値である平均差分を法線信頼度としてもよい。また、最大差分や平均差分を反射率で除した正規化最大差分または正規化平均差分を法線信頼度としてもよい。あるいは、最大差分や平均差分を入力画像や複数の入力画像の平均値または中央値等の入力画像に基づいた画像で除した正規化最大差分や正規化平均差分を法線信頼度としてもよい。 Alternatively, the maximum difference, which is the maximum value in the plurality of differences between the plurality of input images and the plurality of reproduced rendered images, or the average difference, which is the average value, may be used as the normal reliability. Further, the normalized maximum difference or the normalized average difference obtained by dividing the maximum difference or the average difference by the reflectance may be used as the normal reliability. Alternatively, the normal maximum difference or the normalized average difference obtained by dividing the maximum difference or the average difference by an image based on the input image such as the input image or the average value or the median value of the input image or a plurality of input images may be used as the normal reliability.

また、法線情報を用いたレンダリング処理では、光が遮られて発生する影を再現することができない。したがって、入力画像と再現レンダリング画像との差分をとった際に入力画像における影領域で差分が大きくなり、法線情報が正確であってもエラー領域と検出されてしまう。そこで、法線情報に加えて形状情報を用いて影まで再現した再現レンダリング画像を生成することが好ましい。形状情報がない場合、入力画像における影領域を検出し、検出した影領域においては差分をとらないようにするとよい。入力画像における影領域は、輝度値がしきい値以下である領域とすればよい。あるいは、入力画像と再現レンダリング画像との差分と符号に基づいて法線信頼度を取得するとよい。例えば、入力画像における影領域では、入力画像から再現レンダリング画像を引いた値が負となるため、負の差分領域は差分が大きく(信頼度が低く)ならないようにする。 In addition, the rendering process using the normal information cannot reproduce the shadow generated by blocking the light. Therefore, when the difference between the input image and the reproduced rendered image is taken, the difference becomes large in the shadow area in the input image, and even if the normal information is accurate, it is detected as an error area. Therefore, it is preferable to generate a reproduced rendered image that reproduces shadows by using shape information in addition to normal information. When there is no shape information, it is preferable to detect a shadow area in the input image and not to take a difference in the detected shadow area. The shadow area in the input image may be an area where the brightness value is equal to or less than the threshold value. Alternatively, the normal reliability may be obtained based on the difference and the code between the input image and the reproduced rendered image. For example, in the shadow area of the input image, the value obtained by subtracting the reproduction rendered image from the input image is negative, so that the difference is not large (reliability is low) in the negative difference area.

また、入力画像とステップS303にて取得した再現レンダリング画像との差分に基づいた法線信頼度をしきい値処理したものを法線信頼度としてもよい。具体的には、入力画像と再現レンダリング画像との差分に対して、しきい値以上の差分である領域は信頼度なし領域とし、しきい値より小さい差分である領域は信頼度あり領域とする。なお本実施例では、入力画像と再現レンダリング画像との差分に基づいて法線信頼度を取得する。ただし本実施例は、これに限定されるものではなく、複数の入力画像における輝度値をフィッティングすることで法線情報を取得し、得られたフィッティング誤差やその誤差をしきい値処理したものを法線信頼度として取得してもよい。 Further, the normal reliability obtained by threshold-processing the normal reliability based on the difference between the input image and the reproduced rendered image acquired in step S303 may be used as the normal reliability. Specifically, with respect to the difference between the input image and the reproduced rendered image, the area where the difference is greater than or equal to the threshold value is regarded as the unreliable area, and the area where the difference is smaller than the threshold value is defined as the area with reliability. .. In this embodiment, the normal reliability is acquired based on the difference between the input image and the reproduced rendered image. However, this embodiment is not limited to this, and the normal information is acquired by fitting the luminance values in a plurality of input images, and the obtained fitting error and the threshold value processing of the obtained fitting error are obtained. It may be acquired as normal reliability.

続いてステップS304において、光源条件取得部104cは、ステップS303にて取得した法線信頼度に基づいて、第一の光源条件の範囲(最大値)を決定する。法線信頼度が低い場合、第一の光源条件の範囲を小さくする。具体的には、法線信頼度である入力画像と再現レンダリング画像との差分の平均値や中央値、最大値が大きく、信頼度が低いほど第一の光源条件の範囲を小さくする。または、法線信頼度がない領域の画素数が多いほど第一の光源条件の範囲を小さくする。例えば、第一の光源条件が仮想光源角度である場合、法線信頼度が低いほど仮想光源角度の最大値を小さくする。または、第一の光源条件が仮想光源強度である場合、法線信頼度が低いほど仮想光源強度の最大値を小さくする。法線信頼度が低いほど第一の光源条件の範囲を制限することで、法線誤差がレンダリング画像に与える影響を低減することができる。 Subsequently, in step S304, the light source condition acquisition unit 104c determines the range (maximum value) of the first light source condition based on the normal reliability acquired in step S303. If the normal reliability is low, reduce the range of the first light source condition. Specifically, the average value, the median value, and the maximum value of the difference between the input image and the reproduced rendered image, which are the normal reliability, are large, and the lower the reliability, the smaller the range of the first light source condition. Alternatively, the larger the number of pixels in the region without normal reliability, the smaller the range of the first light source condition. For example, when the first light source condition is the virtual light source angle, the lower the normal reliability, the smaller the maximum value of the virtual light source angle. Alternatively, when the first light source condition is the virtual light source intensity, the lower the normal reliability, the smaller the maximum value of the virtual light source intensity. By limiting the range of the first light source condition as the normal reliability is lower, the influence of the normal error on the rendered image can be reduced.

図13は、本実施例における法線信頼度と第一の光源条件の最大値との関係を示す図である。図13において、横軸は法線信頼度、縦軸は第一の光源条件の最大値をそれぞれ示す。例えば、図13に示されるように、法線信頼度が低くなるほど第一の光源条件の最大値を小さくする。図13では法線信頼度に対して第一の光源条件の最大値が線形になるように決定しているが、本実施例はこれに限定されるものではない。法線信頼度に対して第一の光源条件の最大値が非線形あってもよい。また、法線信頼度に対する第一の光源条件の最大値の関係を関数として記憶しておいてもよく、または、法線信頼度に対する第一の光源条件の最大値を離散的にテーブルとして記憶しておいてもよい。 FIG. 13 is a diagram showing the relationship between the normal reliability and the maximum value of the first light source condition in this embodiment. In FIG. 13, the horizontal axis represents the normal reliability and the vertical axis represents the maximum value of the first light source condition. For example, as shown in FIG. 13, the lower the normal reliability, the smaller the maximum value of the first light source condition. In FIG. 13, it is determined that the maximum value of the first light source condition is linear with respect to the normal reliability, but this embodiment is not limited to this. The maximum value of the first light source condition may be non-linear with respect to the normal reliability. Further, the relationship between the maximum value of the first light source condition with respect to the normal reliability may be stored as a function, or the maximum value of the first light source condition with respect to the normal reliability may be stored discretely as a table. You may leave it.

続いてステップS305において、光源条件取得部104cは、ステップS304にて決定された第一の光源条件の範囲(最大値)に基づいて、第一の光源条件を取得する。第一の光源条件として仮想光源角度を取得する場合、ステップS304にて仮想光源角度の範囲(最大値)を決定し、その範囲に基づいて仮想光源角度を取得する。決定した仮想光源角度の範囲内で仮想光源角度を設定できるようにしてもよく、または、範囲外の仮想光源角度を設定した場合には警告を表示させるようにしてもよい。第一の光源条件として仮想光源強度を取得する場合、ステップS304にて仮想光源強度の範囲(最大値)を決定し、その範囲に基づいて仮想光源強度を取得する。決定した仮想光源強度の範囲内で仮想光源強度を設定できるようにしてもよく、または、範囲外の仮想光源強度を設定した場合には警告を表示させるようにしてもよい。 Subsequently, in step S305, the light source condition acquisition unit 104c acquires the first light source condition based on the range (maximum value) of the first light source condition determined in step S304. When acquiring the virtual light source angle as the first light source condition, the range (maximum value) of the virtual light source angle is determined in step S304, and the virtual light source angle is acquired based on the range. The virtual light source angle may be set within the range of the determined virtual light source angle, or a warning may be displayed when the virtual light source angle outside the range is set. When acquiring the virtual light source intensity as the first light source condition, the range (maximum value) of the virtual light source intensity is determined in step S304, and the virtual light source intensity is acquired based on the range. The virtual light source intensity may be set within the determined virtual light source intensity range, or a warning may be displayed when the virtual light source intensity outside the range is set.

第一の光源条件は、ユーザが指定した仮想光源角度や仮想光源強度としてもよく、または、設定できる最大の光源条件にするなどして自動で決められた光源条件であってもよい。ユーザによって選択された第一の光源条件は、情報入力部108からシステムコントローラ110に供給され、光源条件取得部104cがシステムコントローラ110からの情報に基づいて第一の光源条件を取得する。 The first light source condition may be a virtual light source angle or a virtual light source intensity specified by the user, or may be a light source condition automatically determined by setting the maximum light source condition that can be set. The first light source condition selected by the user is supplied from the information input unit 108 to the system controller 110, and the light source condition acquisition unit 104c acquires the first light source condition based on the information from the system controller 110.

なお本実施例では、法線信頼度に基づいて第一の光源条件の範囲(最大値)を決定し、決定した範囲に基づいて第一の光源条件を取得したが、実施例2で説明したような撮影条件にも基づいて第一の光源条件の範囲を決定してもよい。法線信頼度および撮影条件に基づいて第一の光源条件を決定する場合、撮影条件が大きく、法線信頼度が低いほど第一の光源条件の範囲を小さくすればよい。または、撮影条件に基づいて決定された第一の光源条件の範囲と、法線信頼度に基づいて決定された第一の光源条件の範囲とで、より小さい範囲を採用するあるいは平均の範囲を採用する等してもよい。 In this embodiment, the range (maximum value) of the first light source condition was determined based on the normal reliability, and the first light source condition was acquired based on the determined range, which was described in Example 2. The range of the first light source condition may be determined based on such shooting conditions. When determining the first light source condition based on the normal reliability and the imaging condition, the range of the first light source condition may be reduced as the imaging condition is larger and the normal reliability is lower. Alternatively, a smaller range is adopted or an average range is adopted between the range of the first light source condition determined based on the shooting conditions and the range of the first light source condition determined based on the normal reliability. It may be adopted.

このように本実施例において、法線信頼度取得部104fは、法線情報の信頼度である法線信頼度を取得する。光源条件取得部104cは、法線信頼度に基づいて第一の光源条件の最大値を決定する。好ましくは、光源条件取得部は、法線信頼度がないと判定される領域に基づいて、第一の光源条件の最大値を決定する。より好ましくは、光源条件取得部は、法線信頼度がないと判定される領域が多いほど第一の光源条件の最大値を小さくする。また好ましくは、光源条件取得部は、法線信頼度が小さいほど第一の光源条件の最大値を小さくする。また好ましくは、法線信頼度取得部は、少なくとも3つの異なる光源位置で撮影された複数の撮影画像である入力画像と、入力画像の少なくとも一つと同じ光源条件下での見えを再現した再現レンダリング画像とに基づいて、法線信頼度を取得する。 As described above, in this embodiment, the normal reliability acquisition unit 104f acquires the normal reliability, which is the reliability of the normal information. The light source condition acquisition unit 104c determines the maximum value of the first light source condition based on the normal reliability. Preferably, the light source condition acquisition unit determines the maximum value of the first light source condition based on the region determined to have no normal reliability. More preferably, the light source condition acquisition unit reduces the maximum value of the first light source condition as the number of regions determined to have no normal reliability increases. Further, preferably, the light source condition acquisition unit reduces the maximum value of the first light source condition as the normal reliability becomes smaller. Further, preferably, the normal reliability acquisition unit reproduces the input image, which is a plurality of captured images taken at at least three different light source positions, and the appearance under the same light source conditions as at least one of the input images. Obtain the normal reliability based on the image.

本実施例によれば、第一の光源条件に基づいて第二の光源条件の範囲を決定することで、高品位なレンダリング画像を生成することができる。また本実施例によれば、法線信頼度に基づいて第一の光源条件の範囲を決定し、決定した範囲に基づいて第一の光源条件を取得することで、高品位なレンダリング画像を生成することができる。 According to this embodiment, a high-quality rendered image can be generated by determining the range of the second light source condition based on the first light source condition. Further, according to this embodiment, a high-quality rendered image is generated by determining the range of the first light source condition based on the normal reliability and acquiring the first light source condition based on the determined range. can do.

次に、図14を参照して、本発明の実施例4について説明する。実施例1〜3では、光源を内蔵した撮像装置について説明したが、本実施例では撮像装置と光源ユニットとから構成される処理システムについて説明する。図14は、処理システム3の外観図である。処理システム3は、被写体303を撮像する撮像装置301、および、複数の光源ユニット302を備えて構成される。本実施例の撮像装置301は、実施例1の撮像装置1と同様の構成であるが、光源部として照度差ステレオ法用の複数の光源を内蔵する必要はない。 Next, Example 4 of the present invention will be described with reference to FIG. In Examples 1 to 3, the image pickup apparatus having a built-in light source has been described, but in this embodiment, a processing system including the image pickup apparatus and the light source unit will be described. FIG. 14 is an external view of the processing system 3. The processing system 3 includes an image pickup device 301 that captures an image of the subject 303, and a plurality of light source units 302. The image pickup device 301 of this embodiment has the same configuration as the image pickup device 1 of Example 1, but it is not necessary to incorporate a plurality of light sources for the illuminance difference stereo method as a light source unit.

光源ユニット302は、撮像装置301と有線または無線で接続され、撮像装置301からの情報に基づいて制御できることが好ましい。また、照度差ステレオ法では少なくとも3つの光源を順次照射して撮像された画像が必要であるが、光源が移動可能に構成された光源ユニットを使用する場合、少なくとも一つの光源ユニットを備えていればよい。ただし、光源を移動させて、少なくとも互いに異なる3つの光源位置で撮像を行う必要がある。なお、光源ユニット302が自動で光源位置を変更できない場合や光源ユニット302が撮像装置301により制御できない場合、撮像装置301の表示部に表示される光源位置に位置するようにユーザに光源ユニット302を調整させてもよい。なお、本実施例の法線算出処理は、実施例1〜3の処理と同様であるため、詳細な説明は省略する。 It is preferable that the light source unit 302 is connected to the image pickup device 301 by wire or wirelessly and can be controlled based on the information from the image pickup device 301. Further, in the illuminance difference stereo method, an image captured by sequentially irradiating at least three light sources is required, but when a light source unit configured so that the light source can be moved is used, at least one light source unit should be provided. Just do it. However, it is necessary to move the light sources and perform imaging at at least three different light source positions. If the light source unit 302 cannot automatically change the light source position or if the light source unit 302 cannot be controlled by the image pickup device 301, the light source unit 302 is provided to the user so as to be located at the light source position displayed on the display unit of the image pickup device 301. It may be adjusted. Since the normal calculation process of this embodiment is the same as the process of Examples 1 to 3, detailed description thereof will be omitted.

本実施例では、第一の光源条件に基づいて第二の光源条件の範囲(最大値)を決定することで、高品位なレンダリング画像を生成することができる。 In this embodiment, a high-quality rendered image can be generated by determining the range (maximum value) of the second light source condition based on the first light source condition.

(その他の実施例)
本発明は、上述の実施例の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other Examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

各実施例によれば、高品位なレンダリング画像を生成可能な処理装置、処理システム、撮像装置、処理方法、および、プログラムを提供することができる。 According to each embodiment, it is possible to provide a processing device, a processing system, an imaging device, a processing method, and a program capable of generating a high-quality rendered image.

以上、本発明の好ましい実施例について説明したが、本発明はこれらの実施例に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。例えば、第二の光源条件等の範囲は、最大値と最小値との間の範囲であるが、最大値と最小値とが等しい(1つの値のみを有する)場合であってもよい。 Although preferable examples of the present invention have been described above, the present invention is not limited to these examples, and various modifications and modifications can be made within the scope of the gist thereof. For example, the range of the second light source condition or the like is a range between the maximum value and the minimum value, but may be a case where the maximum value and the minimum value are equal (have only one value).

104 画像処理部(処理装置)
104b 法線情報取得部
104c 光源条件取得部
104d レンダリング部
104 Image processing unit (processing device)
104b Normal information acquisition unit 104c Light source condition acquisition unit 104d Rendering unit

Claims (25)

被写体の法線情報を取得する法線情報取得部と、
レンダリング時の第一の光源条件として仮想光源角度または仮想光源強度の一方を取得し、前記第一の光源条件に基づいて、レンダリング時の第二の光源条件の最大値として前記仮想光源角度または前記仮想光源強度の他方の最大値を決定し、前記最大値以下の前記第二の光源条件を取得する光源条件取得部と、
前記第一の光源条件および前記第二の光源条件に基づいてレンダリング画像を生成するレンダリング部と、を有し、
前記光源条件取得部は、前記第一の光源条件が大きいほど前記第二の光源条件の前記最大値を小さくすることを特徴とする処理装置。
The normal information acquisition unit that acquires the normal information of the subject,
Obtain either the virtual light source angle or the virtual light source intensity as the first light source condition at the time of rendering, and based on the first light source condition, the virtual light source angle or the above as the maximum value of the second light source condition at the time of rendering. A light source condition acquisition unit that determines the other maximum value of the virtual light source intensity and acquires the second light source condition equal to or less than the maximum value.
It has a rendering unit that generates a rendered image based on the first light source condition and the second light source condition.
The light source condition acquisition unit is a processing device characterized in that the larger the first light source condition is, the smaller the maximum value of the second light source condition is.
少なくとも3つの異なる光源位置で撮影された複数の撮影画像を入力画像として取得する入力画像取得部を更に有し、
前記法線情報取得部は、前記入力画像を用いて前記被写体の前記法線情報を取得することを特徴とする請求項1に記載の処理装置。
It also has an input image acquisition unit that acquires a plurality of captured images taken at at least three different light source positions as input images.
The processing device according to claim 1, wherein the normal information acquisition unit acquires the normal information of the subject using the input image.
前記第一の光源条件は、レンダリング時の前記仮想光源角度であることを特徴とする請求項1または2に記載の処理装置。 The processing apparatus according to claim 1 or 2, wherein the first light source condition is the virtual light source angle at the time of rendering. 前記仮想光源角度は、光軸または視線ベクトルとレンダリング時の仮想光源ベクトルとのなす角であることを特徴とする請求項3に記載の処理装置。 The processing apparatus according to claim 3, wherein the virtual light source angle is an angle formed by an optical axis or a line-of-sight vector and a virtual light source vector at the time of rendering. 前記仮想光源角度は、入力画像を撮影した際の光源ベクトルとレンダリング時の仮想光源ベクトルとのなす角であることを特徴とする請求項3に記載の処理装置。 The processing apparatus according to claim 3, wherein the virtual light source angle is an angle formed by a light source vector when an input image is taken and a virtual light source vector when rendering. 前記仮想光源角度は、入力画像を撮影した際の複数の光源ベクトルとレンダリング時の仮想光源ベクトルとのなす角の最小値であることを特徴とする請求項5に記載の処理装置。 The processing apparatus according to claim 5, wherein the virtual light source angle is the minimum value of an angle formed by a plurality of light source vectors when an input image is taken and a virtual light source vector at the time of rendering. 前記第一の光源条件は、レンダリング時の仮想光源強度であることを特徴とする請求項1または2に記載の処理装置。 The processing apparatus according to claim 1 or 2, wherein the first light source condition is a virtual light source intensity at the time of rendering. 前記仮想光源強度は、レンダリング画像におけるベース画像の割合に基づいて決定されることを特徴とする請求項7に記載の処理装置。 The processing apparatus according to claim 7, wherein the virtual light source intensity is determined based on the ratio of the base image in the rendered image. 前記ベース画像は、少なくとも3つの異なる光源位置で撮影された複数の撮影画像である入力画像に基づく画像であることを特徴とする請求項8に記載の処理装置。 The processing apparatus according to claim 8, wherein the base image is an image based on an input image which is a plurality of captured images captured at at least three different light source positions. 前記ベース画像は、環境光画像であることを特徴とする請求項8に記載の処理装置。 The processing apparatus according to claim 8, wherein the base image is an ambient light image. 入力画像が撮影された際の撮影条件を取得する撮影条件取得部を有し、
前記光源条件取得部は、前記撮影条件に基づいて第一の光源条件の最大値を決定することを特徴とする請求項1乃至10のいずれか一項に記載の処理装置。
It has a shooting condition acquisition unit that acquires the shooting conditions when the input image is shot.
The processing apparatus according to any one of claims 1 to 10, wherein the light source condition acquisition unit determines the maximum value of the first light source condition based on the photographing condition.
前記撮影条件は、前記入力画像が撮影された際の被写体距離であることを特徴とする請求項11に記載の処理装置。 The processing device according to claim 11, wherein the shooting condition is a subject distance when the input image is shot. 前記光源条件取得部は、前記被写体距離が遠いほど前記第一の光源条件の前記最大値を小さくすることを特徴とする請求項12に記載の処理装置。 The processing apparatus according to claim 12, wherein the light source condition acquisition unit reduces the maximum value of the first light source condition as the subject distance increases. 前記撮影条件は、前記入力画像におけるノイズ量、前記入力画像が撮影された際のISO感度、および、前記入力画像が撮影された際の発光ばらつきの少なくとも一つであることを特徴とする請求項11に記載の処理装置。 The claim is characterized in that the shooting condition is at least one of a noise amount in the input image, an ISO sensitivity when the input image is shot, and a light emission variation when the input image is shot. 11. The processing apparatus according to 11. 前記光源条件取得部は、前記レンダリング画像の領域毎に前記第一の光源条件の最大値を決定することを特徴とする請求項11に記載の処理装置。 The processing device according to claim 11, wherein the light source condition acquisition unit determines the maximum value of the first light source condition for each region of the rendered image. 前記法線情報の信頼度である法線信頼度を取得する法線信頼度取得部を有し、
前記光源条件取得部は、前記法線信頼度に基づいて前記第一の光源条件の最大値を決定することを特徴とする請求項1乃至15のいずれか一項に記載の処理装置。
It has a normal reliability acquisition unit that acquires the normal reliability, which is the reliability of the normal information.
The processing apparatus according to any one of claims 1 to 15, wherein the light source condition acquisition unit determines a maximum value of the first light source condition based on the normal reliability.
前記光源条件取得部は、前記法線信頼度がないと判定される領域に基づいて、前記第一の光源条件の前記最大値を決定することを特徴とする請求項16に記載の処理装置。 The processing apparatus according to claim 16, wherein the light source condition acquisition unit determines the maximum value of the first light source condition based on a region determined to have no normal reliability. 前記光源条件取得部は、前記法線信頼度がないと判定される領域が多いほど前記第一の光源条件の前記最大値を小さくすることを特徴とする請求項17に記載の処理装置。 The processing apparatus according to claim 17, wherein the light source condition acquisition unit reduces the maximum value of the first light source condition as the number of regions determined to have no normal reliability increases. 前記光源条件取得部は、前記法線信頼度が小さいほど前記第一の光源条件の前記最大値を小さくすることを特徴とする請求項16に記載の処理装置。 The processing apparatus according to claim 16, wherein the light source condition acquisition unit reduces the maximum value of the first light source condition as the normal reliability becomes smaller. 前記法線信頼度取得部は、少なくとも3つの異なる光源位置で撮影された複数の撮影画像である入力画像と、前記入力画像の少なくとも一つと同じ光源条件下での見えを再現した再現レンダリング画像とに基づいて、前記法線信頼度を取得することを特徴とする請求項16乃至19のいずれか一項に記載の処理装置。 The normal reliability acquisition unit includes an input image which is a plurality of captured images taken at at least three different light source positions, and a reproduced rendered image which reproduces the appearance under the same light source conditions as at least one of the input images. The processing apparatus according to any one of claims 16 to 19, wherein the normal reliability is acquired based on the above. 光源部と、
請求項1乃至20のいずれか一項に記載の処理装置と、を有することを特徴とする処理システム。
Light source and
A processing system comprising the processing apparatus according to any one of claims 1 to 20.
前記光源部は、それぞれ位置が異なる3つ以上の光源を備えることを特徴とする請求項21に記載の処理システム。 The processing system according to claim 21, wherein the light source unit includes three or more light sources having different positions. 被写体を撮像する撮像部と、
請求項1乃至20のいずれか一項に記載の処理装置と、を有することを特徴とする撮像装置。
An imaging unit that captures the subject and
An imaging device comprising the processing device according to any one of claims 1 to 20.
被写体の法線情報を取得する法線情報取得ステップと、
レンダリング時の第一の光源条件として仮想光源角度または仮想光源強度の一方を取得し、前記第一の光源条件に基づいて、レンダリング時の第二の光源条件の最大値として前記仮想光源角度または前記仮想光源強度の他方の最大値を決定し、前記最大値以下の前記第二の光源条件を取得する光源条件取得ステップと、
前記第一の光源条件および前記第二の光源条件に基づいてレンダリング画像を生成する画像生成ステップと、を有し、
前記光源条件取得ステップにおいて、前記第一の光源条件が大きいほど前記第二の光源条件の前記最大値を小さくすることを特徴とする処理方法。
The normal information acquisition step to acquire the normal information of the subject, and
Obtain either the virtual light source angle or the virtual light source intensity as the first light source condition at the time of rendering, and based on the first light source condition, the virtual light source angle or the above as the maximum value of the second light source condition at the time of rendering. A light source condition acquisition step of determining the other maximum value of the virtual light source intensity and acquiring the second light source condition equal to or less than the maximum value.
It has an image generation step of generating a rendered image based on the first light source condition and the second light source condition.
In the light source condition acquisition step, the processing method is characterized in that the larger the first light source condition is, the smaller the maximum value of the second light source condition is.
請求項24に記載の処理方法をコンピュータに実行させることを特徴とするプログラム。 A program comprising causing a computer to execute the processing method according to claim 24.
JP2019074720A 2019-04-10 2019-04-10 Processing device, processing system, imaging device, processing method, and program Active JP7309425B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019074720A JP7309425B2 (en) 2019-04-10 2019-04-10 Processing device, processing system, imaging device, processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019074720A JP7309425B2 (en) 2019-04-10 2019-04-10 Processing device, processing system, imaging device, processing method, and program

Publications (2)

Publication Number Publication Date
JP2020173590A true JP2020173590A (en) 2020-10-22
JP7309425B2 JP7309425B2 (en) 2023-07-18

Family

ID=72831321

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019074720A Active JP7309425B2 (en) 2019-04-10 2019-04-10 Processing device, processing system, imaging device, processing method, and program

Country Status (1)

Country Link
JP (1) JP7309425B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018163648A (en) * 2017-03-27 2018-10-18 キヤノン株式会社 Image processor, method for image processing, and program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018163648A (en) * 2017-03-27 2018-10-18 キヤノン株式会社 Image processor, method for image processing, and program

Also Published As

Publication number Publication date
JP7309425B2 (en) 2023-07-18

Similar Documents

Publication Publication Date Title
JP6786225B2 (en) Image processing equipment, imaging equipment and image processing programs
US10902570B2 (en) Processing apparatus, processing system, imaging apparatus, processing method, and storage medium
JP6877936B2 (en) Processing equipment, processing systems, imaging equipment, processing methods, programs, and recording media
JP6671915B2 (en) Processing device, processing system, imaging device, processing method, program, and recording medium
KR20150047112A (en) Imaging apparatus and its control method, and storage medium
JP2017102637A (en) Processing apparatus, processing system, imaging device, processing method, program, and recording medium
US10939090B2 (en) Control apparatus, imaging apparatus, illumination apparatus, image processing apparatus, image processing method, and storage medium
JP6425571B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM
US10965853B2 (en) Control apparatus, accessory, imaging apparatus, and imaging system capable of switching light emission modes for imaging
CN110662013B (en) Image pickup apparatus, image processing method, and storage medium
JP6679289B2 (en) Processing device, processing system, imaging device, processing method, processing program, and recording medium
JP2004328657A (en) Image input device, image input method and program
JP7106259B2 (en) Image processing device, imaging device, and image processing method
JP7309425B2 (en) Processing device, processing system, imaging device, processing method, and program
JP7213686B2 (en) Shape measuring device, control method and program
JP2018054413A (en) Processing device, processing system, imaging device, processing method, program, and recording medium
JP2020173591A (en) Processing device, processing system, imaging apparatus, processing method, and program
JP6910763B2 (en) Processing equipment, processing systems, imaging equipment, processing methods, programs, and recording media
JP7490457B2 (en) Processing device, processing system, imaging device, processing method, and program
JP7210170B2 (en) Processing device, processing system, imaging device, processing method, program, and recording medium
JP6862114B2 (en) Processing equipment, processing systems, imaging equipment, processing methods, programs, and recording media
JP2020076590A (en) Processing apparatus, processing system, imaging apparatus, processing method, program, and recording medium
JP2020095454A (en) Processing device, imaging device, processing system, processing method, program, and storage medium
JP2018022937A (en) Imaging system, method for controlling the same, and computer program
JP2022076368A (en) Image processing device, imaging device, information processing device, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220331

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230302

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230328

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230523

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230705

R151 Written notification of patent or utility model registration

Ref document number: 7309425

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151