JP7508230B2 - IMAGE PROCESSING APPARATUS, IMAGE PROCESSING SYSTEM, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD - Google Patents

IMAGE PROCESSING APPARATUS, IMAGE PROCESSING SYSTEM, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD Download PDF

Info

Publication number
JP7508230B2
JP7508230B2 JP2020012469A JP2020012469A JP7508230B2 JP 7508230 B2 JP7508230 B2 JP 7508230B2 JP 2020012469 A JP2020012469 A JP 2020012469A JP 2020012469 A JP2020012469 A JP 2020012469A JP 7508230 B2 JP7508230 B2 JP 7508230B2
Authority
JP
Japan
Prior art keywords
image
information
image processing
correction
reflectance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020012469A
Other languages
Japanese (ja)
Other versions
JP2021117884A (en
JP2021117884A5 (en
Inventor
祐一 楠美
義明 井田
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 JP2020012469A priority Critical patent/JP7508230B2/en
Publication of JP2021117884A publication Critical patent/JP2021117884A/en
Publication of JP2021117884A5 publication Critical patent/JP2021117884A5/ja
Application granted granted Critical
Publication of JP7508230B2 publication Critical patent/JP7508230B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Image Generation (AREA)

Description

本発明は、撮像により取得された被写体の法線情報や反射率情報を用いて画像を生成する技術に関する。 The present invention relates to a technology for generating an image using normal information and reflectance information of a subject obtained by imaging.

被写体を撮像して得られた画像から被写体の法線情報や反射率情報を取得し、これらの情報を用いて、被写体の見えを変更したレンダリング画像を生成することが可能である。特許文献1には、照度差ステレオ法が開示されている。照度差ステレオ法は、複数の光源位置での被写体の輝度情報とランバート拡散反射モデル等を用いて仮定した反射特性とから、被写体の法線情報および反射率情報を取得する方法である。 It is possible to obtain normal information and reflectance information of a subject from an image obtained by capturing the subject, and use this information to generate a rendering image in which the appearance of the subject is modified. Patent Document 1 discloses photometric stereo. Photometric stereo is a method for obtaining normal information and reflectance information of a subject from luminance information of the subject at multiple light source positions and reflection characteristics assumed using a Lambertian diffuse reflection model or the like.

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

ただし、実際の被写体の反射特性が、照度差ステレオ法において仮定した反射特性と異なると、取得された法線情報や反射率情報に誤差が生じ、その結果、レンダリング画像にも誤差が生じる。例えば、金属や透明体等の拡散反射が少ない被写体の法線情報や反射率情報に大きな誤差が生じる。このため、取得した法線情報や反射率情報において誤差が大きい対象領域をその周囲の情報を用いて補正することが望ましい。 However, if the reflectance characteristics of an actual subject differ from those assumed in photometric stereo, errors will occur in the acquired normal information and reflectance information, and as a result, errors will also occur in the rendered image. For example, large errors will occur in the normal information and reflectance information of subjects with little diffuse reflection, such as metals and transparent objects. For this reason, it is desirable to correct target areas with large errors in the acquired normal information and reflectance information using information from the surrounding area.

しかしながら、反射率情報はレンダリング画像の元となる構造を含むため、反射率情報に対して補正を行うと、対象領域の構造が失われて良好なレンダリング画像を生成することができなくなる。 However, because reflectance information contains the structure that is the basis of the rendered image, if corrections are made to the reflectance information, the structure of the target area is lost, making it impossible to generate a good rendered image.

本発明は、良好なレンダリング画像を生成可能な画像処理装置等を提供する。 The present invention provides an image processing device capable of generating good rendering images.

本発明の一側面としての画像処理装置は、被写体を撮像して得られる入力画像を用いて算出される被写体の第1の法線情報及び反射率情報を取得する第1の取得手段と、反射率情報を用いて、第1の補正情報を取得する第2の取得手段と、入力画像と第1の法線情報とを用いて対象領域を検出する検出手段と、対象領域における第1の補正情報を補正することで第2の補正情報を取得する補正手段と、入力画像に基づいて得られる第1の画像と第1の法線情報と第2の補正情報を用いて第2の画像を生成する生成手段とを有することを特徴とする。
また、本発明の他の一側面としての画像処理装置は、被写体を撮像して得られる入力画像を用いて算出される被写体の反射率情報及び第1の法線情報を取得する第1の取得手段と、反射率情報に基づいて第1の補正情報を取得する第2の取得手段と、入力画像と第1の法線情報とに基づいて対象領域を検出する検出手段と、入力画像と第1の補正情報と対象領域とに基づいてレンダリング画像を生成する生成手段とを有することを特徴とする。
なお、上記画像処理装置を有する撮像装置も、本発明の他の一側面を構成する。また、被写体に互いに異なる複数の位置から照明光を順次照射する光源手段と、上記画像処理装置とを有することを画像処理システムも、本発明の他の一側面を構成する。
An image processing device as one aspect of the present invention is characterized by having a first acquisition means for acquiring first normal information and reflectance information of a subject calculated using an input image obtained by imaging the subject, a second acquisition means for acquiring first correction information using the reflectance information, a detection means for detecting a target area using the input image and the first normal information, a correction means for acquiring second correction information by correcting the first correction information in the target area, and a generation means for generating a second image using a first image obtained based on the input image , the first normal information, and the second correction information.
Furthermore, an image processing device as another aspect of the present invention is characterized in having a first acquisition means for acquiring reflectance information and first normal information of a subject calculated using an input image obtained by capturing an image of the subject, a second acquisition means for acquiring first correction information based on the reflectance information, a detection means for detecting a target area based on the input image and the first normal information, and a generation means for generating a rendering image based on the input image, the first correction information, and the target area.
In addition, an imaging device having the above-mentioned image processing device also constitutes another aspect of the present invention. In addition, an image processing system having a light source means for sequentially irradiating a subject with illumination light from a plurality of different positions and the above-mentioned image processing device also constitutes another aspect of the present invention.

また、本発明の他の一側面としての画像処理方法は、被写体を撮像して得られる入力画像を用いて算出される被写体の第1の法線情報及び反射率情報を取得するステップと、反射率情報を用いて第1の補正情報を取得するステップと、入力画像と第1の法線情報とを用いて対象領域を検出するステップと、対象領域における第1の補正情報を補正することで第2の補正情報を取得するステップと、入力画像に基づいて得られる第1の画像と第1の法線情報と第2の補正情報を用いて第2の画像を生成するステップとを有することを特徴とする。なお、コンピュータに上記画像処理方法に従う処理を実行させることをコンピュータプログラムも、本発明の他の一側面を構成する。 In addition, an image processing method according to another aspect of the present invention includes the steps of: acquiring first normal information and reflectance information of a subject calculated using an input image obtained by capturing an image of the subject; acquiring first correction information using the reflectance information; detecting a target area using the input image and the first normal information; acquiring second correction information by correcting the first correction information in the target area; and generating a second image using the first image obtained based on the input image, the first normal information, and the second correction information. Note that a computer program for causing a computer to execute processing according to the image processing method also constitutes another aspect of the present invention.

本発明は、良好なレンダリング画像を生成することができる。 The present invention can generate good rendering images.

実施例1である撮像装置の外観図。1 is an external view of an imaging apparatus according to a first embodiment. 実施例1の撮像装置の構成を示すブロック図。FIG. 1 is a block diagram showing a configuration of an imaging apparatus according to a first embodiment. 実施例1における画像処理システムの構成を示すブロック図。FIG. 1 is a block diagram showing a configuration of an image processing system according to a first embodiment. 実施例1における画像処理方法を示すフローチャート。4 is a flowchart showing an image processing method according to the first embodiment. 実施例1における画像処理方法(ステップS101~S104)を説明する図。5A to 5C are views for explaining an image processing method (steps S101 to S104) in the first embodiment. 実施例1における画像処理方法(ステップS106)を説明する図。5A to 5C are views for explaining an image processing method (step S106) in the first embodiment. 実施例1における画像処理方法(ステップS106)を説明する別の図。FIG. 11 is another diagram for explaining the image processing method (step S106) in the first embodiment. 実施例1における画像処理方法(ステップS107)を説明する図。5A to 5C are views for explaining an image processing method (step S107) in the first embodiment. 実施例2における画像処理システムの外観図。FIG. 11 is an external view of an image processing system according to a second embodiment. Torrance-Sparrowモデルを説明する図。FIG. 1 is a diagram for explaining the Torrance-Sparrow model.

以下、本発明の実施例について図面を参照しながら説明する。
まず具体的な実施例の説明に先立って、照度差ステレオ法による被写体の法線情報を取得する方法について説明する。照度差ステレオ法は、被写体の面法線と被写体からの光源の方向とに基づく被写体の反射特性を仮定し、複数の光源位置での被写体の輝度情報と仮定した反射特性とから被写体の面法線の情報である法線情報を算出する方法である。反射特性は、所定の面法線と光源の位置が与えられたときに反射率が一意に定まらない場合に、ランバートの余弦則に従うランバート反射モデルを用いて近似する。図9は、Torrance-Sparrowモデルを示している。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
First, before describing specific examples, a method for acquiring normal information of an object using photometric stereo will be described. Photometric stereo is a method in which the reflection characteristics of an object are assumed based on the surface normal of the object and the direction of the light source from the object, and normal information, which is information on the surface normal of the object, is calculated from the luminance information of the object at a plurality of light source positions and the assumed reflection characteristics. When the reflectance is not uniquely determined when a predetermined surface normal and the position of the light source are given, the reflection characteristics are approximated using a Lambert reflection model that follows Lambert's cosine law. FIG. 9 shows the Torrance-Sparrow model.

図9に示されるように、鏡面反射成分は、光源ベクトルsと視線方向ベクトルvの2等分線と、面法線nのなす角αに依存する。したがって、反射特性は、視線方向に基づく特性としてもよい。また、輝度情報は、光源が点灯している場合と消灯している場合のそれぞれの被写体を撮像し、これらの差分をとることで環境光等の光源以外の光源による影響を除いてもよい。 As shown in FIG. 9, the specular reflection component depends on the angle α between the bisector of the light source vector s and the line of sight vector v, and the surface normal n. Therefore, the reflection characteristics may be characteristics based on the line of sight. In addition, the luminance information may be obtained by capturing images of the subject when the light source is on and when it is off, and taking the difference between these images to eliminate the effects of light sources other than the light source, such as ambient light.

以下、ランバート反射モデルで反射特性を仮定した場合について説明する。反射光の輝度値をi、物体のランバート拡散反射率をρd、入射光の強さをE、物体から光源への方向(光源方向)を示す単位ベクトル(光源方向ベクトル)を太字のs、物体の単位面法線ベクトルを太字のnとする。このとき、輝度値iは、ランバートの余弦則より、以下の式(1)のように表される。 Below, we will explain the case where reflection characteristics are assumed to be based on the Lambertian reflection model. The luminance value of the reflected light is i, the Lambertian 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 (in bold), and the unit surface normal vector of the object is n (in bold). In this case, the luminance value i is expressed by the following equation (1) according to Lambert's cosine law.

ここで、異なるM個(M≧3)の光源ベクトルの各成分をs1、s2、…、sM、光源ベクトルの各成分の輝度値をi1、i2、・・・iMとすると、式(1)は以下の式(2)のように表される。 Here, if the components of the M different (M≧3) light source vectors are s1, s2, ..., sM, and the luminance values of the components of the light source vectors are i1, i2, ..., iM, then equation (1) can be expressed as the following equation (2).

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

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

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

光源ベクトルの各成分の輝度値のうち、陰影や輝度飽和により正確な値を取得できない輝度値を使用して単位面法線ベクトルnを算出した場合、正確な法線ベクトルを算出することが困難となる。したがって、陰影や輝度飽和により正確な値が取得できなかった輝度値は使用せずに単位面法線ベクトルnを算出してもよい。すなわち、M=mの光源ベクトルsmで得られた輝度値imが陰影や輝度飽和である場合、光源ベクトルsmおよび輝度値imを式(3)から除外して単位面法線ベクトルnを算出する。除外する輝度値は所定の閾値に基づく判定により決定すればよい。
ただし、上述したように少なくとも3つの輝度情報が必要である。被写体の反射特性をランバート反射モデルとは異なるモデルで仮定すると、条件式が単位面法線ベクトルnの各成分に対する線形方程式と異なる場合がある。この場合、未知変数以上の条件式が得られれば、フィッティング手法や最適化手法を用いることができる。
If the unit surface normal vector n is calculated using a luminance value that cannot be accurately obtained due to shading or luminance saturation among the luminance values of each component of the light source vector, it becomes difficult to calculate an accurate normal vector. Therefore, the unit surface normal vector n may be calculated without using a luminance value that cannot be accurately obtained due to shading or luminance saturation. In other words, if the luminance value im obtained with the light source vector sm of M=m is a shading or luminance saturation, the light source vector sm and the luminance value im are excluded from the formula (3) to calculate the unit surface normal vector n. The luminance value to be excluded may be determined by a judgment based on a predetermined threshold value.
However, as described above, at least three pieces of luminance information are required. If the reflection characteristics of the subject are assumed to be based on a model other than the Lambertian reflection model, the conditional equation may differ from the linear equation for each component of the unit surface normal vector n. In this case, if a conditional equation with more than the unknown variables 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)で表される評価関数が最小となる解を選択すればよい。 When M>3, multiple conditional expressions between 3 and M-1 can be obtained, so multiple candidate solutions for the unit surface normal vector n can be found. In this case, a solution can be selected from the multiple candidate solutions using an additional condition. For example, the continuity of the unit surface normal vector n can be used as a condition. When calculating the unit surface normal vector n for each pixel of the imaging device, the unit surface normal vector at pixel (x, y) is n(x, y), and if n(x-1, y) is known, the solution that minimizes the evaluation function expressed by the following equation (4) can be selected.

また、n(x+1,y)やn(x,y±1)も既知であれば、以下の式(5)が最小となる解を選択すればよい。 Also, if n(x+1,y) and n(x,y±1) are known, then the solution that minimizes the following equation (5) can be selected.

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

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

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

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

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

図1および図2Aを参照して、本発明の実施例1における撮像装置について説明する。図1は、本実施例における撮像装置1の外観を示している。図2Aは、撮像装置1の構成を示している。 The imaging device according to the first embodiment of the present invention will be described with reference to Figs. 1 and 2A. Fig. 1 shows the external appearance of the imaging device 1 according to the first embodiment. Fig. 2A shows the configuration of the imaging device 1.

撮像装置1は、レンダリング処理を行ってレンダリング画像(リライティング画像)を生成する。図1に示されるように、撮像装置1は、被写体を撮像する撮像部(撮像手段)100および光源部200を有する。図2Aに示されるように、撮像部100は、撮像光学系101および撮像素子102を有する。本実施例において、光源部200は8つの光源200a~200hを有する。ただし、照度差ステレオ法を実施する際に必要な光源は少なくとも3つであるため、入力画像を取得するために少なくとも3つ以上の光源を備えていればよい。 The imaging device 1 performs rendering processing to generate a rendering image (relighting image). As shown in FIG. 1, the imaging device 1 has an imaging section (imaging means) 100 that images a subject, and a light source section 200. As shown in FIG. 2A, the imaging section 100 has an imaging optical system 101 and an image sensor 102. In this embodiment, the light source section 200 has eight light sources 200a to 200h. However, since at least three light sources are required to perform photometric stereo, it is sufficient to have at least three or more light sources to acquire an input image.

また本実施例においては、撮像部100を構成する撮像光学系の光軸OAから等距離の位置に同心円状に8つの光源200a~200hを等間隔で配置している。ただし、他の配置であってもよい。さらに本実施例において、光源部200は、撮像装置1に内蔵されているが、撮像装置1に着脱可能に取り付けられてもよい。 In this embodiment, eight light sources 200a to 200h are arranged at equal intervals in a concentric pattern at positions equidistant from the optical axis OA of the imaging optical system that constitutes the imaging unit 100. However, other arrangements are also possible. Furthermore, in this embodiment, the light source unit 200 is built into the imaging device 1, but it may be detachably attached to the imaging device 1.

撮像光学系101は、絞り101aを備え、被写体からの光を撮像素子102上に結像させる。撮像素子102は、CCDセンサやCMOSセンサ等の光電変換素子により構成され、被写体を撮像する。すなわち撮像素子102は、撮像光学系101により形成された被写体の像(光学像)を光電変換し、アナログ電気信号を生成する。 The imaging optical system 101 includes an aperture 101a, and focuses light from a subject onto the imaging element 102. The imaging element 102 is made up of photoelectric conversion elements such as a CCD sensor or a CMOS sensor, and captures an image of the subject. That is, the imaging element 102 photoelectrically converts the image (optical image) of the subject formed by the imaging optical system 101, and generates an analog electrical signal.

A/Dコンバータ103は、撮像素子102の光電変換により生成されたアナログ信号をデジタル信号に変換し、デジタル信号を画像処理部104に出力する。 The A/D converter 103 converts the analog signal generated by 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、第1レンダリング部104c、領域検出部104d、補正係数取得部104e、補正部104fおよび第2レンダリング部104gを有する。被写体情報取得部104bが第1の取得手段に、第1レンダリング部104cおよび領域検出部104dが検出手段に、補正係数取得部104eが第2の取得手段に、補正部104fが補正手段に、第2レンダリング部104gが生成手段に相当する。 The image processing unit (image processing device) 104 performs various image processing on the digital signal input from the A/D converter 103. The image processing unit 104 also calculates (acquires) normal information and reflectance information of the subject, and generates a rendering image under an arbitrary light source. The image processing unit 104 has an input image acquisition unit 104a, a subject information acquisition unit 104b, a first rendering unit 104c, an area detection unit 104d, a correction coefficient acquisition unit 104e, a correction unit 104f, and a second rendering unit 104g. The subject information acquisition unit 104b corresponds to the first acquisition means, the first rendering unit 104c and the area detection unit 104d correspond to the detection means, the correction coefficient acquisition unit 104e corresponds to the second acquisition means, the correction unit 104f corresponds to the correction means, and the second rendering unit 104g corresponds to the generation means.

画像処理部104により生成されたレンダリング画像としての出力画像は、半導体メモリや光ディスク等の画像記録部109に保存される。また、出力画像を表示部(ディスプレイ)105に表示してもよい。本実施例において、入力画像取得部104a、被写体情報取得部104b、第1レンダリング部104c、領域検出部104d、補正係数取得部104e、補正部104fおよび第2レンダリング部104gは撮像装置1に内蔵されている。ただし、これらの少なくとも一部を撮像装置1とは別に設けてもよい。例えば、入力画像取得部104a、被写体情報取得部104b、第1レンダリング部104c、領域検出部104d、補正係数取得部104e、補正部104fおよび第2レンダリング部104gをパーソナルコンピュータに設けてもよい。 The output image as a rendering image generated by the image processing unit 104 is stored in the image recording unit 109 such as a semiconductor memory or an optical disk. The output image may also be displayed on the display unit (display) 105. In this embodiment, the input image acquisition unit 104a, the subject information acquisition unit 104b, the first rendering unit 104c, the area detection unit 104d, the correction coefficient acquisition unit 104e, the correction unit 104f, and the second rendering unit 104g are built into the imaging device 1. However, at least some of these may be provided separately from the imaging device 1. For example, the input image acquisition unit 104a, the subject information acquisition unit 104b, the first rendering unit 104c, the area detection unit 104d, the correction coefficient acquisition unit 104e, the correction unit 104f, and the second rendering unit 104g may be provided in a personal computer.

情報入力部108は、ユーザにより選択された撮像条件(絞り値、露出時間および焦点距離等)をシステムコントローラ110に供給する。撮像制御部107は、システムコントローラ110からの情報に基づいて、ユーザが選択した撮像条件で撮像を行うことで画像を取得する。照射光源制御部106は、システムコントローラ110からの制御指示に応じて光源部200の発光状態を制御する。情報入力部108は、ユーザにより選択された光源条件(光源位置、光源強度および光源色等)をシステムコントローラ110に供給する。画像処理部104は、システムコントローラ110からの情報に基づいて、ユーザが選択した光源条件でレンダリング画像を生成する。 The information input unit 108 supplies the imaging conditions (aperture value, exposure time, focal length, etc.) selected by the user to the system controller 110. The imaging control unit 107 acquires an image by capturing an image under the imaging conditions selected by the user based on information from the system controller 110. The illumination light source control unit 106 controls the light emission state of the light source unit 200 in response to a control instruction from the system controller 110. The information input unit 108 supplies the light source conditions (light source position, light source intensity, light source color, etc.) selected by the user to the system controller 110. The image processing unit 104 generates a rendering image under the light source conditions selected by the user based on information from the system controller 110.

なお、本実施例における撮像光学系101は、撮像装置1と一体的に構成されているが、撮像装置1の本体に対して着脱(交換)可能であってもよい。 In this embodiment, the imaging optical system 101 is configured integrally with the imaging device 1, but may be detachable (replaceable) from the main body of the imaging device 1.

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

図4は、レンダリング処理のうち図3のステップS101~S104を説明する図である。ステップS101~S104は、法線情報における誤差が大きい対象領域(エラー領域)を検出するステップである。図5、図6および図7は、レンダリング処理のうち図3のステップS106~S107を説明する図である。ステップS106~S108は、取得した法線情報および反射率補正係数を補正し、補正した法線情報と反射率補正係数を用いることで高品位なレンダリング画像を生成するステップである。 Figure 4 is a diagram explaining steps S101 to S104 in Figure 3 of the rendering process. Steps S101 to S104 are steps for detecting target areas (error areas) with large errors in the normal information. Figures 5, 6, and 7 are diagrams explaining steps S106 to S107 in Figure 3 of the rendering process. Steps S106 to S108 are steps for correcting the acquired normal information and reflectance correction coefficients, and generating a high-quality rendering image by using the corrected normal information and reflectance correction coefficients.

まず、図3のステップS101において、入力画像取得部104aは、互いに異なる複数の光源位置で撮像部100により被写体を撮像することで得られる複数の入力画像120を取得する。複数の入力画像120は、それぞれ異なる位置に配置された複数の光源(例えば8つの光源200a~200h)からの照明光を被写体に順次照射して撮像を行うことで取得することができる。また、複数の入力画像120は、単一の光源の位置を変更しながら該光源からの照明光を被写体に順次照射して撮像を行うことで取得してもよい。図4に示すように、本実施例の入力画像120は、被写体として、拡散特性を有する拡散板120aと金属板120bとを含む。 First, in step S101 of FIG. 3, the input image acquisition unit 104a acquires multiple input images 120 obtained by capturing images of a subject using the imaging unit 100 at multiple different light source positions. The multiple input images 120 can be acquired by capturing images by sequentially irradiating the subject with illumination light from multiple light sources (e.g., eight light sources 200a to 200h) arranged at different positions. The multiple input images 120 may also be acquired by capturing images by sequentially irradiating the subject with illumination light from a single light source while changing the position of the light source. As shown in FIG. 4, the input image 120 of this embodiment includes a diffusion plate 120a having diffusion properties and a metal plate 120b as the subject.

また、次に説明するステップS102にてランバート反射等の拡散反射モデルを仮定した照度差ステレオ法で法線情報を取得する場合に、複数の入力画像として、撮像画像から鏡面反射成分を除去した複数の拡散反射画像を用いてもよい。撮像画像から鏡面反射成分を除去した拡散反射画像を取得するために、2色性反射モデルを用いた手法等の種々の手法を用いることができる。 In addition, when normal information is acquired using photometric stereo assuming a diffuse reflection model such as Lambertian reflection in step S102 described next, multiple diffuse reflection images in which specular reflection components have been removed from the captured image may be used as multiple input images. In order to acquire a diffuse reflection image in which specular reflection components have been removed from the captured image, various methods such as a method using a dichromatic reflection model can be used.

続いてステップS102において、被写体情報取得部104bは、第1の法線情報と反射率情報を取得する。具体的には、被写体情報取得部104bは、複数の入力画像120を用いて、被写体の各部の単位面法線ベクトル(以下、単に面法線という)nの情報である第1の法線情報と被写体の各部の反射率ρの情報である反射率情報とを含む被写体情報121を取得する。面法線nと反射率ρは、照度差ステレオ法を用いて、光源位置による輝度情報の変化に基づいて算出することができる。なお本実施例では、被写体情報取得部104bが第1の法線情報と反射率情報を算出するが、他の装置が算出した第1の法線情報や反射率情報を取得してもよい。また被写体情報取得部104bは、ステップS101にて取得した複数の入力画像120とは異なる光源条件での撮像により取得された画像を用いて第1の法線情報と反射率情報を算出してもよい。 Next, in step S102, the subject information acquisition unit 104b acquires first normal information and reflectance information. Specifically, the subject information acquisition unit 104b acquires subject information 121 including first normal information, which is information on unit surface normal vectors (hereinafter simply referred to as surface normals) n of each part of the subject, and reflectance information, which is information on the reflectance ρ of each part of the subject, using multiple input images 120. The surface normal n and the reflectance ρ can be calculated based on changes in luminance information due to the light source position using photometric stereo. In this embodiment, the subject information acquisition unit 104b calculates the first normal information and reflectance information, but the first normal information and reflectance information calculated by another device may be acquired. The subject information acquisition unit 104b may also calculate the first normal information and reflectance information using images acquired by imaging under light source conditions different from those of the multiple input images 120 acquired in step S101.

入力画像120中の拡散板120aについては、被写体の反射特性を拡散反射と仮定した照度差ステレオ法で第1の法線情報と反射率情報を取得することが可能である。一方、金属板120bについては、第1の法線情報と反射率情報に大きな誤差(エラー)が生じる。
なお、入力画像として、元の入力画像120を縮小した画像を用いて第1の法線情報と反射率情報を取得するようにしてもよい。入力画像を縮小した画像を用いる場合には、以降の処理においても入力画像を縮小した画像を用いる。
For the diffuser 120a in the input image 120, it is possible to obtain the first normal information and reflectance information by photometric stereo assuming that the reflection characteristics of the subject are diffuse reflection. On the other hand, for the metal plate 120b, a large error occurs in the first normal information and reflectance information.
Note that the first normal information and the reflectance information may be obtained by using, as the input image, an image obtained by reducing the size of the original input image 120. When using an image obtained by reducing the size of the input image, the image obtained by reducing the size of the input image is also used in the subsequent processing.

続いてステップS103において、第1レンダリング部104cは、第1の法線情報および反射率情報と、複数の入力画像120が撮像された際の複数の光源条件のうち少なくとも1つである第1の光源条件とに基づいて、入力画像120を再現した第1の仮レンダリング画像(仮画像)を生成する。第1の仮レンダリング画像122は、入力画像120が撮像されたときの光源条件と同一の光源条件でレンダリングされた画像である。 Next, in step S103, the first rendering unit 104c generates a first provisional rendering image (provisional image) that reproduces the input image 120 based on the first normal information and reflectance information and a first light source condition that is at least one of the multiple light source conditions when the multiple input images 120 were captured. The first provisional rendering image 122 is an image rendered under the same light source conditions as the light source conditions when the input image 120 was captured.

第1の仮レンダリング画像122は、ステップS102にて第1の法線情報や反射率情報を算出する際に仮定した反射特性を用いてレンダリング処理により生成される。ランバート拡散を仮定して第1の法線情報や反射率情報を算出した場合は、第1レンダリング部104cは、前述した式(1)に従って複数の第1の仮レンダリング画像を生成することができる。なお、第1の仮レンダリング画像122は、複数の入力画像120のうち一部の入力画像に対応する仮レンダリング画像または複数の入力画像120の全ての入力画像に対応する複数の仮レンダリング画像のいずれであってもよい。 The first provisional rendering image 122 is generated by a rendering process using the reflectance characteristics assumed when calculating the first normal information and reflectance information in step S102. When the first normal information and reflectance information are calculated assuming Lambertian diffusion, the first rendering unit 104c can generate multiple first provisional rendering images according to the above-mentioned formula (1). Note that the first provisional rendering image 122 may be either a provisional rendering image corresponding to a portion of the multiple input images 120 or multiple provisional rendering images corresponding to all of the multiple input images 120.

なお、「仮レンダリング画像」とは、本実施例の処理において最終的に生成される出力画像であるレンダリング画像(第2の画像)とは異なるレンダリング画像である。すなわち、仮レンダリング画像は、後述するように、被写体の材質によって破綻した(低品位の)レンダリング画像領域を含み得る。 Note that the "provisional rendering image" is a rendering image that is different from the rendering image (second image) that is the output image that is ultimately generated in the processing of this embodiment. In other words, the provisional rendering image may include a rendering image area that is corrupted (low quality) due to the material of the subject, as described below.

続いてステップS104において、領域検出部104dは、ステップS101で取得された入力画像120とステップS103で生成された第1の仮レンダリング画像122とを用いて、第1の法線情報および反射率情報における対象領域としてのエラー領域を検出し、さらに該エラー領域の分布を示すエラー領域マップ124を検出する。エラー領域は、面法線や反射率の誤差が周囲と比べて大きい領域である。前述したように、照度差ステレオ法で法線情報や反射率情報を算出した場合、仮定した反射特性とは異なる反射特性の被写体については面法線エラーや反射率エラーが生じる。 Next, in step S104, the area detection unit 104d uses the input image 120 acquired in step S101 and the first provisional rendering image 122 generated in step S103 to detect error areas as target areas in the first normal information and reflectance information, and further detects an error area map 124 indicating the distribution of the error areas. An error area is an area in which the errors in the surface normals and reflectance are larger than those in the surrounding area. As described above, when normal information and reflectance information are calculated using photometric stereo, surface normal errors and reflectance errors occur for subjects with reflectance characteristics different from the assumed reflectance characteristics.

エラーが生じた面法線や反射率を用いてレンダリング画像を生成すると、レンダリング画像にもエラーが生じる。特に、拡散反射モデルを仮定した照度差ステレオ法で金属板120bの面法線や反射率を算出すると、大きな誤差が生じる。この場合、取得した面法線を用いて第1の仮レンダリング画像122を生成すると、該第1の仮レンダリング画像122における金属板120bに対応する斜線領域122bにおいて高品位なレンダリング画像を生成することができない。 If a rendering image is generated using an erroneous surface normal or reflectance, an error will also occur in the rendering image. In particular, if the surface normal or reflectance of the metal plate 120b is calculated using photometric stereo assuming a diffuse reflection model, a large error will occur. In this case, if the first provisional rendering image 122 is generated using the acquired surface normal, a high-quality rendering image cannot be generated in the shaded area 122b in the first provisional rendering image 122 that corresponds to the metal plate 120b.

そこで領域検出部104dは、ステップS101にて取得された入力画像120とステップS103にて生成された第1の仮レンダリング画像122との差分(差分画像)123に基づいて、エラー領域を検出する。例えば入力画像120のうちの1つと、該入力画像120の撮像時の光源条件を再現した第1の仮レンダリング画像122との差分123が大きい領域は、照度差ステレオ法で仮定した反射特性とは異なる反射特性の被写体である可能性が高い。 Therefore, the area detection unit 104d detects an error area based on the difference (difference image) 123 between the input image 120 acquired in step S101 and the first provisional rendering image 122 generated in step S103. For example, an area in which the difference 123 between one of the input images 120 and the first provisional rendering image 122 that reproduces the light source conditions when the input image 120 was captured is large is likely to be an object with reflection characteristics different from the reflection characteristics assumed by the photometric stereo method.

具体的には、領域検出部104dは、入力画像120と第1の仮レンダリング画像122との差分123が所定の閾値以上である領域をエラー領域として検出する。好ましくは、領域検出部104dは、差分123を反射率ρで除した正規化差分に基づいてエラー領域を決定する。また領域検出部104dは、差分123を入力画像120または複数の入力画像120の平均値の画像もしくは中央値の画像等、入力画像120に基づく画像で除した正規化差分に基づいてエラー領域を決定してもよい。差分123を反射率ρや入力画像120に基づく画像で除することにより、算出した差分123から明るさの影響を低減(好ましくは除外)することができる。 Specifically, the region detection unit 104d detects, as an error region, a region where the difference 123 between the input image 120 and the first provisional rendering image 122 is equal to or greater than a predetermined threshold. Preferably, the region detection unit 104d determines the error region based on a normalized difference obtained by dividing the difference 123 by the reflectance ρ. The region detection unit 104d may also determine the error region based on a normalized difference obtained by dividing the difference 123 by the input image 120 or an image based on the input image 120, such as an image of the average value or median value of multiple input images 120. By dividing the difference 123 by the reflectance ρ or an image based on the input image 120, the effect of brightness can be reduced (preferably excluded) from the calculated difference 123.

また領域検出部104dは、複数の入力画像120と複数の第1の仮レンダリング画像122との複数の差分123のうち最大値である最大差分または複数の差分123の平均値である平均差分に基づいて、エラー領域を決定してもよい。好ましくは、領域検出部104dは、最大差分や平均差分を反射率ρで除した正規化最大差分または正規化平均差分に基づいてエラー領域を決定してもよい。さらに領域検出部104dは、最大差分や平均差分を、入力画像120または複数の入力画像120の平均値の画像もしくは中央値の画像等、入力画像に基づく画像で除した正規化最大差分や正規化平均差分に基づいてエラー領域を決定してもよい。 The region detection unit 104d may also determine the error region based on a maximum difference, which is the maximum value among the multiple differences 123 between the multiple input images 120 and the multiple first provisional rendering images 122, or an average difference, which is the average value of the multiple differences 123. Preferably, the region detection unit 104d may determine the error region based on a normalized maximum difference or a normalized average difference obtained by dividing the maximum difference or the average difference by the reflectance ρ. Furthermore, the region detection unit 104d may determine the error region based on a normalized maximum difference or a 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 120 or an image of the average value or the median value of the multiple input images 120.

また、法線情報を用いたレンダリング処理では、光が遮られて発生する影を再現することができない。したがって、差分123a中に示されるように、入力画像120と第1の仮レンダリング画像122との差分123をとった際に入力画像120における影領域120cにおいて差分123cが大きくなる。このため、領域検出部104dは、差分123cに関して、面法線nや反射率ρが正確であってもエラー領域と検出する可能性がある。
そこで、第1の法線情報に加えて形状情報を用いて、影を再現したレンダリング画像を生成することが好ましい。形状情報がない場合は、入力画像120における影領域120cを検出し、差分123bに示されるように検出した影領域においては差分をとらないようにすることが好ましい。入力画像120における影領域120cは、輝度値が所定の閾値以下である領域として検出することができる。
Furthermore, in a rendering process using normal information, it is not possible to reproduce a shadow that occurs when light is blocked. Therefore, as shown in the difference 123a, when the difference 123 between the input image 120 and the first provisional rendering image 122 is taken, the difference 123c becomes large in the shadow region 120c in the input image 120. For this reason, the region detection unit 104d may detect the difference 123c as an error region even if the surface normal n and the reflectance ρ are accurate.
Therefore, it is preferable to generate a rendering image that reproduces a shadow by using shape information in addition to the first normal information. In the absence of shape information, it is preferable to detect a shadow region 120c in the input image 120 and not take a difference in the detected shadow region as shown by difference 123b. The shadow region 120c in the input image 120 can be detected as a region whose luminance value is equal to or less than a predetermined threshold value.

また、入力画像120と第1の仮レンダリング画像122との差分とその符号とからエラー領域を検出してもよい。例えば、入力画像120における影領域120cでは、入力画像120から第1の仮レンダリング画像122を引いた値が負となるため、負の差分領域はエラー領域として検出しないようにする。 Also, an error region may be detected from the difference between the input image 120 and the first provisional rendering image 122 and its sign. For example, in the shadow region 120c in the input image 120, the value obtained by subtracting the first provisional rendering image 122 from the input image 120 is negative, so the negative difference region is not detected as an error region.

領域検出部104dは、差分123bに対して閾値処理を行うことにより、検出されたエラー領域のうち黒く表示される領域を最終的なエラー領域として取得することができる。本実施例において、領域検出部104dは入力画像120と第1の仮レンダリング画像122との差分123に基づいてエラー領域を検出するが、他の方法を用いてもよい。例えば、複数の入力画像120における輝度値をフィッティングすることで面法線nを取得し、得られたフィッティング誤差をエラー領域を検出する際の差分として用いてもよい。 The area detection unit 104d performs threshold processing on the difference 123b, and can obtain the area displayed in black among the detected error areas as the final error area. In this embodiment, the area detection unit 104d detects the error area based on the difference 123 between the input image 120 and the first provisional rendering image 122, but other methods may be used. For example, the surface normal n may be obtained by fitting the luminance values in multiple input images 120, and the obtained fitting error may be used as the difference when detecting the error area.

続いてステップS105において、補正係数取得部104eは、ステップS102にて取得した反射率情報を用いて反射率補正係数(第1の補正情報)を取得する。反射率情報は、レンダリング画像の元となる構造を含む。このため、反射率情報のエラー領域に対して後述するような補正を行ってレンダリング画像を生成すると、画像としての構造が崩れやすい。したがって、反射率情報そのものを補正するのではなく、例えば、ベース画像(第1の画像)を反射率情報に変換するための反射率補正係数(第1の補正情報)を補正することが好ましい。つまり、ベース画像×反射率補正係数=反射率情報とするときの反射率補正係数におけるエラー領域を補正する。 Next, in step S105, the correction coefficient acquisition unit 104e acquires a reflectance correction coefficient (first correction information) using the reflectance information acquired in step S102. The reflectance information includes the structure that is the basis of the rendering image. For this reason, if an error area of the reflectance information is corrected as described below to generate a rendering image, the structure of the image is likely to collapse. Therefore, rather than correcting the reflectance information itself, it is preferable to correct, for example, the reflectance correction coefficient (first correction information) for converting the base image (first image) into reflectance information. In other words, the error area in the reflectance correction coefficient when base image x reflectance correction coefficient = reflectance information is corrected.

ベース画像は、レンダリング画像を生成する際にベースとして用いる画像であって、例えば複数の入力画像120のうちの1つの画像であってもよいし、複数の入力画像120の平均値等を示す1つの画像であってもよい。好ましくは、ベース画像は、複数の入力画像120のうち同一座標の輝度値が最大の画像である最大輝度値画像とするとよい。最大輝度値画像には影が含まれにくいため、反射率補正係数を取得するのに適しているだけでなく、後述するガイド画像として用いるのにも適している。 The base image is an image used as a base when generating a rendering image, and may be, for example, one image of the multiple input images 120, or may be one image showing the average value of the multiple input images 120. Preferably, the base image is a maximum luminance value image, which is an image of the multiple input images 120 that has the maximum luminance value at the same coordinates. Since a maximum luminance value image is less likely to contain shadows, it is not only suitable for obtaining a reflectance correction coefficient, but is also suitable for use as a guide image, which will be described later.

反射率補正係数は、反射率情報/ベース画像で生成することができる。ベース画像が画像の構造を含むため、反射率補正係数を大きく補正したとしても、ベース画像×反射率補正係数で取得できる反射率情報における構造は保たれる。なお、ステップS105は、ステップS102~ステップS106までの間であればどの段階で行ってもよい。
続いてステップS106およびステップS107において、補正部104fは、第1の法線情報と反射率補正係数におけるエラー領域に対して補正処理を行う。まずステップS106において、補正部104fは、ステップS104にて検出されたエラー領域に基づいて参照画素を選択する。参照画素は、後述するステップS107にてエラー領域内のエラー画素(対象画素)の法線情報と反射率補正係数を補正するために用いられる画素であり、エラー画素の周囲から選択される。
The reflectance correction coefficient can be generated by reflectance information/base image. Since the base image contains the image structure, even if the reflectance correction coefficient is greatly corrected, the structure in the reflectance information obtained by base image x reflectance correction coefficient is maintained. Note that step S105 may be performed at any stage between steps S102 to S106.
Next, in steps S106 and S107, the correction unit 104f performs a correction process on the error region in the first normal information and the reflectance correction coefficient. First, in step S106, the correction unit 104f selects a reference pixel based on the error region detected in step S104. The reference pixel is a pixel used to correct the normal information and the reflectance correction coefficient of an error pixel (target pixel) in the error region in step S107 described later, and is selected from the periphery of the error pixel.

図5および図6は、ステップS106における参照画素の選択方法を示している。ここでは、第1の法線情報と反射率補正係数(図7に符号127を付す)におけるエラー画素を中心とした7×7画素の範囲に着目して説明する。 Figures 5 and 6 show the method for selecting reference pixels in step S106. Here, the explanation focuses on a 7 x 7 pixel range centered on the error pixel in the first normal information and the reflectance correction coefficient (denoted by reference numeral 127 in Figure 7).

図5において、エラー領域マップ124は、着目範囲におけるエラー領域124aの分布を示す。エラー領域マップ124において、エラー領域(エラー画素)124aは黒く示されている。補正部104fは、エラー領域124aの周囲の画素を参照画素として選択する。図5において、参照領域マップ125は、着目範囲において選択された参照画素の領域を示す。参照領域マップ125において、参照画素は斜線で示されている。 In FIG. 5, the error region map 124 shows the distribution of error regions 124a in the range of interest. In the error region map 124, the error regions (error pixels) 124a are shown in black. The correction unit 104f selects pixels surrounding the error region 124a as reference pixels. In FIG. 5, the reference region map 125 shows the region of the reference pixels selected in the range of interest. In the reference region map 125, the reference pixels are shown with diagonal lines.

このように、補正部104fは、エラー領域124aの分布に基づいて、エラー領域124a外の領域の画素を参照画素として選択する。自然なレンダリング画像が得られるように法線情報と反射率補正係数の補正を行うには、エラー領域124a外の参照画素を用いてエラー領域124aの法線情報と反射率補正係数を補正する必要があるためである。 In this way, the correction unit 104f selects pixels in the area outside the error area 124a as reference pixels based on the distribution of the error area 124a. This is because, in order to correct the normal information and reflectance correction coefficient so as to obtain a natural rendering image, it is necessary to correct the normal information and reflectance correction coefficient of the error area 124a using reference pixels outside the error area 124a.

図6に示すように、補正部104fは、エラー領域マップ124とガイド画像126とに基づいて参照画素を選択してもよい。ガイド画像とは、参照画素を選択する際に用いられる被写体に関する画像である。ガイド画像は、ベース画像と同様に、複数の入力画像120のうちの1つの画像であってもよいし、複数の入力画像120の平均値等を示す1つの画像であってもよい。また好ましくは、複数の入力画像120のうち同一座標の輝度値が最大である最大輝度値画像であってもよいし、複数の入力画像120のうち複数の同一座標における大きい輝度値を平均化した画像を用いてもよい。さらに、エラー画素ごとにガイド画像を変更してもよい。例えば、複数の入力画像120のうちエラー画素が最大輝度値を有する入力画像を選択して用いてもよい。また、前述したように、ガイド画像126として、ベース画像を用いてもよい。 As shown in FIG. 6, the correction unit 104f may select a reference pixel based on the error region map 124 and the guide image 126. The guide image is an image related to a subject used when selecting a reference pixel. The guide image may be one of the multiple input images 120, as with the base image, or may be one image showing the average value of the multiple input images 120. Preferably, the guide image may be a maximum luminance value image in which the luminance value at the same coordinates is the maximum among the multiple input images 120, or an image obtained by averaging the large luminance values at the same coordinates among the multiple input images 120 may be used. Furthermore, the guide image may be changed for each error pixel. For example, an input image in which the error pixel has the maximum luminance value among the multiple input images 120 may be selected and used. As described above, the base image may be used as the guide image 126.

図6は、エラー領域マップ124に基づいて選択された参照画素(斜線で示す)125aと、ガイド画像126に基づいて選択された参照画素(斜線で示す)125bとの共通画素を含む領域を参照領域マップ125とすることを示している。 Figure 6 shows that the reference region map 125 is an area that includes common pixels between a reference pixel (shown with diagonal lines) 125a selected based on the error region map 124 and a reference pixel (shown with diagonal lines) 125b selected based on the guide image 126.

参照画素125bは、例えば、ガイド画像126におけるエラー画素と該エラー画素を中心とする7×7画素の着目範囲内の他の画素との色差に基づいて選択される。具体的には、ガイド画像126におけるエラー画素とその周辺の画素との色差が閾値としての所定の色差以下である画素を参照画素125bとして選択することができる。所定の色差としては、LAB色空間におけるユークリッド距離を色差としたときの丁度可知差異(just noticeable difference:例えば2.3)を用いればよい。ただし、所定の色差として他の色差を用いてもよい。なお、ガイド画像126におけるRGB間の相互の信号値の比(輝度比)を色差として用いてもよい。 The reference pixel 125b is selected, for example, based on the color difference between the error pixel in the guide image 126 and other pixels within a 7 x 7 pixel range of interest centered on the error pixel. Specifically, a pixel in the guide image 126 where the color difference between the error pixel and its surrounding pixels is equal to or less than a predetermined color difference as a threshold can be selected as the reference pixel 125b. The predetermined color difference may be a just noticeable difference (e.g., 2.3) when the Euclidean distance in the LAB color space is used as the color difference. However, other color differences may also be used as the predetermined color difference. Note that the ratio (luminance ratio) of the signal values between RGB in the guide image 126 may also be used as the color difference.

また、参照画素125bは、ガイド画像126におけるエラー画素とその周辺の画素との輝度差に基づいて選択されてもよい。具体的には、ガイド画像126におけるエラー画素とその周辺の画素との輝度差が閾値としての所定の輝度差以下である画素を参照画素125bとして選択することができる。 The reference pixel 125b may also be selected based on the luminance difference between the error pixel and its surrounding pixels in the guide image 126. Specifically, a pixel in which the luminance difference between the error pixel and its surrounding pixels in the guide image 126 is equal to or less than a predetermined luminance difference as a threshold value can be selected as the reference pixel 125b.

また、ガイド画像126に影や輝度飽和等が存在して法線情報や反射率補正係数の補正が困難になる場合がある。この場合は、ガイド画像126の輝度値に基づいて参照画素を選択してもよい。具体的には、ガイド画像126において輝度値とその閾値とに基づいて参照画素を選択することができる。影の影響を除外するには、ガイド画像126において輝度値が閾値以上である画素を参照画素として選択する。輝度飽和の影響を除外するには、ガイド画像126において輝度値が閾値よりも小さい画素を参照画素として選択すればよい。 In addition, there may be cases where shadows, brightness saturation, etc. are present in the guide image 126, making it difficult to correct the normal information and reflectance correction coefficient. In such cases, reference pixels may be selected based on the brightness values of the guide image 126. Specifically, reference pixels may be selected in the guide image 126 based on the brightness values and their threshold values. To eliminate the effects of shadows, pixels in the guide image 126 whose brightness values are equal to or greater than the threshold value are selected as reference pixels. To eliminate the effects of brightness saturation, pixels in the guide image 126 whose brightness values are smaller than the threshold value may be selected as reference pixels.

参照画素の選択に際しては、第1の法線情報の取得方法とは異なる方法で取得された被写体の形状に関する情報を用いてもよい。被写体の形状に関する情報としては、例えば、撮像位置から被写体までの距離情報や、被写体の凹凸(高さ)に関する情報である。距離情報や凹凸に関する情報は、レーザ光を用いた三角測量や2眼ステレオ等の種々の距離計測手法を用いて取得すればよい。また、被写体の形状に関する情報として、第1の法線情報の取得方法とは異なる方法で取得された法線情報を用いてもよい。これらの被写体の形状に関する情報におけるエラー画素に対応する位置とその周辺の位置との形状差を比較することによって、参照画素を選択することができる。具体的には、エラー画素に対応する位置とその周辺の位置との形状差が閾値以下である位置に対応する画素を参照画素として選択する。 When selecting a reference pixel, information on the shape of the subject acquired by a method other than the first normal information acquisition method may be used. Information on the shape of the subject is, for example, information on the distance from the imaging position to the subject and information on the unevenness (height) of the subject. Distance information and unevenness information may be acquired using various distance measurement methods such as triangulation using laser light and two-eye stereo. Furthermore, normal information acquired by a method other than the first normal information acquisition method may be used as information on the shape of the subject. A reference pixel can be selected by comparing the shape difference between a position corresponding to an error pixel and its surrounding positions in the information on the shape of the subject. Specifically, a pixel corresponding to a position where the shape difference between the position corresponding to the error pixel and its surrounding positions is equal to or less than a threshold is selected as a reference pixel.

さらに参照画素の選択に際して、被写体の意味的領域分割マップ(セグメンテーションマップ)を用いてもよい。例えば、意味的領域分割マップにおけるエラー画素に対応する位置の周辺に、エラー画素に対応する位置と同じ意味を持つ領域がある場合には、該領域に対応する画素を参照画素として選択することができる。なお、意味的領域分割マップは、種々の手法を用いて取得することができる。このとき、被写体ごとまたはその素材ごとに領域が分割されていることが好ましい。なお、上述した種々の参照画素の選択方法を複数、組み合わせて用いてもよい。 Furthermore, when selecting reference pixels, a semantic region division map (segmentation map) of the subject may be used. For example, if there is an area around the position corresponding to the error pixel in the semantic region division map that has the same meaning as the position corresponding to the error pixel, the pixel corresponding to that area can be selected as a reference pixel. Note that the semantic region division map can be obtained using various techniques. In this case, it is preferable that the area is divided for each subject or for each material. Note that a combination of multiple of the various reference pixel selection methods described above may be used.

上述したように参照画素を選択することで、より自然なレンダリング画像が得られるように第1の法線情報と反射率補正係数127とを補正することができる。なお、本実施例では、エラー画素を中心とする7×7画素の着目範囲において参照画素を選択したが、これは例に過ぎず、様々なサイズや形状の着目範囲を用いることができる。 By selecting the reference pixel as described above, the first normal information and the reflectance correction coefficient 127 can be corrected so as to obtain a more natural rendering image. Note that in this embodiment, the reference pixel is selected in a 7 x 7 pixel range of interest centered on the error pixel, but this is merely an example, and ranges of interest of various sizes and shapes can be used.

続いて、図3のステップS107において、補正部104fは、図7に示すように、第1の法線情報と反射率補正係数127におけるステップS106で得られた参照領域マップ125に基づいて、エラー画素の法線情報と反射率補正係数127を補正する。具体的には、エラー画素の法線情報と反射率補正係数の補正は、参照画素127exの法線情報と反射率補正係数とを用いて行われる。複数の参照画素が存在する場合には、参照画素127exの法線情報の平均値と反射率補正係数の平均値を、エラー画素の法線情報と反射率補正係数とすればよい。 Next, in step S107 of FIG. 3, the correction unit 104f corrects the normal information and reflectance correction coefficient 127 of the error pixel based on the reference area map 125 obtained in step S106 in the first normal information and reflectance correction coefficient 127, as shown in FIG. 7. Specifically, the correction of the normal information and reflectance correction coefficient of the error pixel is performed using the normal information and reflectance correction coefficient of the reference pixel 127ex. When there are multiple reference pixels, the average value of the normal information and the average value of the reflectance correction coefficients of the reference pixels 127ex may be set as the normal information and reflectance correction coefficient of the error pixel.

続いて補正部104fは、ステップS106およびステップS107の処理をエラー領域の全てのエラー画素に対して行ったか否かを判定する。まだ全てのエラー画素に対する補正が完了していない場合はステップS106に戻って残りのエラー画素に対する補正を行う。この際、前回のステップS106とステップS107で補正されたエラー画素を参照画素として用いてもよい。 Then, the correction unit 104f determines whether the processes of steps S106 and S107 have been performed on all error pixels in the error region. If correction has not yet been completed for all error pixels, the process returns to step S106 and correction is performed on the remaining error pixels. At this time, the error pixels corrected in the previous steps S106 and S107 may be used as reference pixels.

一方、エラー領域の全てに対する補正が完了した場合はステップS108に進む。これにより補正部104fは、面法線と反射率の誤差が低減された高品位なレンダリング画像を生成するために必要な、補正された法線情報(第2の法線情報)と反射率補正係数(第2の補正情報)129とを取得する。なお、法線情報と反射率補正係数の補正は、上述した方法に限らず、種々のインペインティング手法を用いて行ってもよい。 On the other hand, if correction has been completed for all error regions, the process proceeds to step S108. As a result, the correction unit 104f acquires corrected normal information (second normal information) and reflectance correction coefficient (second correction information) 129, which are necessary to generate a high-quality rendering image in which errors in the surface normal and reflectance are reduced. Note that the correction of the normal information and reflectance correction coefficient is not limited to the method described above, and various inpainting techniques may also be used.

ステップS108では、第2レンダリング部104gは、補正された第2の法線情報と反射率補正係数を用いて、面法線と反射率の誤差が低減された高品位なレンダリング画像(第2の画像)を生成する。例えば、ユーザによって選択された光源条件(光源位置、光源強度、光源色等)におけるレンダリング画像を生成する。レンダリング画像においては、ステップS102での第1の法線情報の算出において仮定した反射特性を用いなくてもよく、他の拡散反射特性や、それに加えた鏡面反射特性でのレンダリング画像を生成してもよい。 In step S108, the second rendering unit 104g uses the corrected second normal information and the reflectance correction coefficient to generate a high-quality rendering image (second image) in which the error between the surface normal and the reflectance is reduced. For example, a rendering image is generated under light source conditions (light source position, light source intensity, light source color, etc.) selected by the user. The rendering image does not need to use the reflection characteristics assumed in the calculation of the first normal information in step S102, and a rendering image with other diffuse reflection characteristics or specular reflection characteristics added thereto may be generated.

また、前述したベース画像にゲインマップを適用することでレンダリング画像を生成するようにしてもよい。ゲインマップは、補正された第2の法線情報と光源条件とに基づいて取得する。第2レンダリング部104gは、反射率を1(または定数)としたときの第2の仮レンダリング画像をゲインマップとして取得してもよい。さらに、ベース画像に補正された反射率補正係数を適用し、さらにゲインマップを適用することで高品位なレンダリング画像を生成することができる。ステップS102において入力画像を縮小した画像を用いて第1の法線情報を取得した場合には、第1の法線情報、ゲインマップ、反射率情報および反射率補正係数のいずれかを拡大、すなわち(1/縮小率)倍して用いてもよい。ベース画像にゲインマップを適用する場合には、ベース画像として縮小していない入力画像に基づいた画像を用いることが好ましい。 The rendering image may be generated by applying a gain map to the base image described above. The gain map is obtained based on the corrected second normal information and the light source conditions. The second rendering unit 104g may obtain a second provisional rendering image when the reflectance is set to 1 (or a constant) as the gain map. Furthermore, a high-quality rendering image can be generated by applying a corrected reflectance correction coefficient to the base image and then applying the gain map. When the first normal information is obtained using an image obtained by reducing the input image in step S102, any of the first normal information, the gain map, the reflectance information, and the reflectance correction coefficient may be enlarged, i.e., multiplied by (1/reduction rate). When applying a gain map to the base image, it is preferable to use an image based on the input image that is not reduced as the base image.

また、法線情報、ゲインマップ、反射率情報および反射率補正係数のいずれかに対してノイズ低減処理を行った後にレンダリング画像を生成するようにしてもよい。好ましくは、法線情報、ゲインマップおよび反射率補正係数のいずれかに対してノイズ低減処理を行うとよい。画像の構造を含むレンダリング画像や反射率情報に対してノイズ低減処理を行うと画像の構造に劣化が生じるが、法線情報、ゲインマップおよび反射率補正係数のいずれかに対してノイズ低減処理を行う場合には、レンダリング画像の構造を保つことができる。 A rendering image may also be generated after noise reduction processing is performed on any of the normal information, the gain map, the reflectance information, and the reflectance correction coefficient. It is preferable to perform noise reduction processing on any of the normal information, the gain map, and the reflectance correction coefficient. When noise reduction processing is performed on a rendering image or reflectance information that includes the image structure, the image structure is deteriorated, but when noise reduction processing is performed on any of the normal information, the gain map, and the reflectance correction coefficient, the structure of the rendering image can be maintained.

本実施例では、照度差ステレオ法を用いて第1の法線情報を取得し、該第1の法線情報を補正して得られた第2の法線情報を用いてレンダリング画像を取得する場合について説明した。しかし、照度差ステレオ法とは異なる方法で高精度な第1の法線情報が取得できる場合には、該第1の法線情報を第2の法線情報として用いてもよい。 In this embodiment, a case has been described in which first normal information is obtained using photometric stereo, and a rendering image is obtained using second normal information obtained by correcting the first normal information. However, if highly accurate first normal information can be obtained using a method other than photometric stereo, the first normal information may be used as the second normal information.

また本実施例では、撮像装置1を用いて被写体の面法線を算出してレンダリング画像を生成する場合について説明したが、例えば図2Bに構成を示した、撮像装置1とは異なる画像処理システム2を用いてレンダリング画像を生成してもよい。画像処理システム2は、画像処理装置500、撮像部501および光源部(光源手段)502を有する。画像処理装置500は、図2Aに示した画像処理部104と同様に、入力画像取得部500a、被写体情報取得部500b、第1レンダリング部500c、領域検出部500d、補正係数取得部500e、補正部500fおよび第2レンダリング部500gを有する。 In this embodiment, the case where the surface normal of the subject is calculated using the imaging device 1 to generate a rendering image has been described, but the rendering image may be generated using an image processing system 2 different from the imaging device 1, the configuration of which is shown in FIG. 2B, for example. The image processing system 2 has an image processing device 500, an imaging unit 501, and a light source unit (light source means) 502. The image processing device 500 has an input image acquisition unit 500a, a subject information acquisition unit 500b, a first rendering unit 500c, an area detection unit 500d, a correction coefficient acquisition unit 500e, a correction unit 500f, and a second rendering unit 500g, similar to the image processing unit 104 shown in FIG. 2A.

この画像処理システム2を用いてレンダリング画像を生成する場合は、まず入力画像取得部500aは、互いに異なる複数の光源位置で被写体の撮像を行うことで複数の入力画像120を取得する。続いて、被写体情報取得部500bは、複数の入力画像120を用いて被写体の第1の法線情報と反射率情報を算出する。そして第1レンダリング部500cは、取得した第1の法線情報と反射率情報と入力画像120の撮像時における光源条件に基づいて第1の仮レンダリング画像122を生成する。さらに領域検出部500dは、取得した入力画像120と第1の仮レンダリング画像122とに基づいて、エラー領域124を検出する。 When generating a rendering image using this image processing system 2, first, the input image acquisition unit 500a acquires multiple input images 120 by capturing images of the subject at multiple light source positions that are different from each other. Next, the subject information acquisition unit 500b calculates first normal information and reflectance information of the subject using the multiple input images 120. Then, the first rendering unit 500c generates a first provisional rendering image 122 based on the acquired first normal information and reflectance information and the light source conditions when the input image 120 was captured. Furthermore, the area detection unit 500d detects an error area 124 based on the acquired input image 120 and first provisional rendering image 122.

補正係数取得部500eは、反射率情報を用いて反射率補正係数(第1の補正情報)を取得する。補正部500fは、第1の法線情報と反射率補正係数におけるエラー領域に対して補正処理を行い、それぞれ補正された第2の法線情報と反射率補正係数129を取得する。そして、第2レンダリング部500gは、第2の法線情報と反射率補正係数129を用いてレンダリング画像(第2の画像)を生成する。 The correction coefficient acquisition unit 500e acquires a reflectance correction coefficient (first correction information) using the reflectance information. The correction unit 500f performs a correction process on the error area in the first normal information and the reflectance correction coefficient, and acquires the corrected second normal information and reflectance correction coefficient 129, respectively. Then, the second rendering unit 500g generates a rendering image (second image) using the second normal information and the reflectance correction coefficient 129.

なお、撮像部501と光源部502はそれぞれ、個別の装置であってもよい。また、光源部502は撮像部501に内蔵されていてもよい。 Note that the imaging unit 501 and the light source unit 502 may each be separate devices. Also, the light source unit 502 may be built into the imaging unit 501.

本実施例によれば、高品位なレンダリング画像を生成することができる。 This embodiment makes it possible to generate high-quality rendering images.

次に、図8を参照して、本発明の実施例2について説明する。実施例1では、光源部を内蔵した撮像装置について説明したが、本実施例では撮像装置と光源ユニット(光源手段)とから構成される画像処理システムについて説明する。
画像処理システム3は、被写体303を撮像する撮像装置301と、複数の光源ユニット302とを備える。撮像装置301は、実施例1と同様の撮像装置であるが、光源部を内蔵しなくてもよい。
Next, a second embodiment of the present invention will be described with reference to Fig. 8. In the first embodiment, an image capturing device incorporating a light source unit is described, but in this embodiment, an image processing system including an image capturing device and a light source unit (light source means) is described.
The image processing system 3 includes an image capturing device 301 that captures an image of a subject 303, and a plurality of light source units 302. The image capturing device 301 is the same as the image capturing device in the first embodiment, but does not need to include a built-in light source unit.

光源ユニット302は、撮像装置301と有線または無線で接続され、撮像装置301からの情報に基づいて制御されることが好ましい。また、照度差ステレオ法では少なくとも3つの光源を順次照射して撮像を行うことにより取得された画像が必要であるが、単一の光源ユニットを少なくとも互いに異なる3つの位置に移動可能とすればよい。 It is preferable that the light source unit 302 is connected to the image capture device 301 by wire or wirelessly and is controlled based on information from the image capture device 301. Furthermore, the photometric stereo method requires images acquired by sequentially irradiating at least three light sources and capturing images, and it is sufficient that a single light source unit can be moved to at least three different positions.

なお、光源ユニット302が自動で位置を変更できない場合や光源ユニット302が撮像装置301により制御できない場合は、撮像装置301の表示部に表示される光源位置に移動するようにユーザが光源ユニット302の位置を調整するようにしてもよい。
本実施例におけるレンダリング処理は、実施例1で説明したレンダリング処理と同様であるため、詳細な説明は省略する。
(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
In addition, if the light source unit 302 cannot automatically change its position or if the light source unit 302 cannot be controlled by the imaging device 301, the user may adjust the position of the light source unit 302 so that it moves to the light source position displayed on the display unit of the imaging device 301.
The rendering process in this embodiment is similar to the rendering process described in the first embodiment, and therefore a detailed description thereof will be omitted.
Other Examples
The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.

以上説明した各実施例は代表的な例にすぎず、本発明の実施に際しては、各実施例に対して種々の変形や変更が可能である。 The embodiments described above are merely representative examples, and various modifications and alterations are possible when implementing the present invention.

104 画像処理部(画像処理装置)
104b 被写体情報取得部
104c 第1レンダリング部
104d 領域検出部
104e 補正係数取得部
104f 補正部
104g 第2レンダリング部
104 Image processing unit (image processing device)
104b: object information acquisition unit 104c: first rendering unit 104d: area detection unit 104e: correction coefficient acquisition unit 104f: correction unit 104g: second rendering unit

Claims (18)

被写体を撮像して得られる入力画像を用いて算出される前記被写体の第1の法線情報及び反射率情報を取得する第1の取得手段と、
前記反射率情報を用いて第1の補正情報を取得する第2の取得手段と、
前記入力画像と前記第1の法線情報とを用いて対象領域を検出する検出手段と、
前記対象領域における前記第1の補正情報を補正することで第2の補正情報を取得する補正手段と、
前記入力画像に基づいて得られる第1の画像と前記第1の法線情報と前記第2の補正情報とを用いて第2の画像を生成する生成手段とを有することを特徴とする画像処理装置。
a first acquisition means for acquiring first normal information and reflectance information of a subject, the first normal information and the reflectance information being calculated using an input image obtained by capturing an image of the subject;
a second acquisition means for acquiring first correction information using the reflectance information;
a detection means for detecting a target region using the input image and the first normal information;
a correction means for correcting the first correction information in the target region to obtain second correction information;
an image processing apparatus comprising: a generating unit configured to generate a second image using a first image obtained based on the input image, the first normal information, and the second correction information;
前記補正手段は、前記対象領域における前記第1の法線情報及び前記第1の補正情報をそれぞれ補正することで第2の法線情報及び前記第2の補正情報を取得し、
前記生成手段は、前記第1の画像と前記第2の法線情報と前記第2の補正情報とを用いて前記第2の画像を生成することを特徴とする請求項1に記載の画像処理装置。
the correction means corrects the first normal information and the first correction information in the target region to obtain second normal information and the second correction information, respectively;
The image processing apparatus according to claim 1 , wherein the generating means generates the second image by using the first image, the second normal information, and the second correction information.
前記生成手段は、前記第2の法線情報を用いてゲインマップを取得し、前記第1の画像と前記ゲインマップと前記第2の補正情報とを用いて前記第2の画像を生成することを特徴とする請求項2に記載の画像処理装置。 The image processing device according to claim 2, characterized in that the generating means obtains a gain map using the second normal information, and generates the second image using the first image, the gain map, and the second correction information. 前記入力画像は、互いに異なる複数の光源位置で前記被写体を撮像して得られた複数の画像であり、
前記第1の画像は、前記入力画像の少なくとも1つの画像に基づいて生成された画像であることを特徴とする請求項1から3のいずれか一項に記載の画像処理装置。
the input images are a plurality of images obtained by capturing images of the subject at a plurality of light source positions different from one another,
4. The image processing apparatus according to claim 1, wherein the first image is an image generated based on at least one of the input images.
前記第1の画像は、前記入力画像のうち同一座標の輝度値が最大の画像であることを特徴とする請求項4に記載の画像処理装置。 The image processing device according to claim 4, characterized in that the first image is an image of the input image having the maximum luminance value at the same coordinates. 前記検出手段は、
前記入力画像の撮像が行われた光源条件と前記第1の法線情報と前記反射率情報とを用いて仮画像を生成し、
前記仮画像と前記入力画像とを用いて前記対象領域を検出することを特徴とする請求項1から5のいずれか一項に記載の画像処理装置。
The detection means includes:
generating a provisional image using a light source condition under which the input image was captured, the first normal information, and the reflectance information;
The image processing apparatus according to claim 1 , wherein the target region is detected by using the provisional image and the input image.
前記補正手段は、
前記入力画像を用いてガイド画像を取得し、
前記ガイド画像のうち前記対象領域に対応する対象画素とは異なる参照画素の前記第1の法線情報と前記反射率情報とを用いて、前記対象領域における前記第1の法線情報と前記第1の補正情報とを補正することで、前記第2の法線情報と前記第2の補正情報とを取得することを特徴とする請求項2に記載の画像処理装置。
The correction means is
Obtaining a guide image using the input image;
The image processing device described in claim 2, characterized in that the second normal information and the second correction information are obtained by correcting the first normal information and the first correction information in the target area using the first normal information and the reflectance information of a reference pixel in the guide image that is different from a target pixel corresponding to the target area.
前記補正手段は、前記ガイド画像における前記対象画素とそれ以外の画素との色差または輝度差を用いて前記参照画素を選択することを特徴とする請求項7に記載の画像処理装置。 The image processing device according to claim 7, characterized in that the correction means selects the reference pixel using a color difference or a luminance difference between the target pixel and other pixels in the guide image. 前記補正手段は、前記ガイド画像における輝度値を用いて前記参照画素を選択することを特徴とする請求項7または8に記載の画像処理装置。 The image processing device according to claim 7 or 8, characterized in that the correction means selects the reference pixels using luminance values in the guide image. 前記入力画像は、互いに異なる複数の光源位置で前記被写体を撮像して得られた複数の画像であり、
前記ガイド画像は、前記入力画像の少なくとも1つの画像に基づいて生成された画像であることを特徴とする請求項7から9のいずれか一項に記載の画像処理装置。
the input images are a plurality of images obtained by capturing images of the subject at a plurality of light source positions different from one another,
10. The image processing apparatus according to claim 7, wherein the guide image is an image generated based on at least one of the input images.
前記ガイド画像は、前記入力画像のうち同一座標の輝度値が最大の画像であることを特徴とする請求項10に記載の画像処理装置。 The image processing device according to claim 10, characterized in that the guide image is an image of the input image having the maximum brightness value at the same coordinates. 前記ガイド画像は、前記入力画像のうち前記対象画素の輝度値が最大の画像であることを特徴とする請求項10に記載の画像処理装置。 The image processing device according to claim 10, characterized in that the guide image is an image of the input image in which the luminance value of the target pixel is maximum. 前記補正手段は、
前記対象領域における前記第1の法線情報と前記第1の補正情報とを前記対象領域に対応する対象画素とは異なる参照画素の前記第1の法線情報と前記反射率情報とを用いて補正することで、前記第2の法線情報と前記第2の補正情報とを取得し、
前記第1の法線情報を取得する方法とは異なる方法で取得された前記被写体の形状に関する情報または前記被写体の意味的領域分割マップを用いて前記参照画素を選択することを特徴とする請求項2、3、7から12のいずれか一項に記載の画像処理装置。
The correction means is
correcting the first normal information and the first correction information in the target region using the first normal information and the reflectance information of a reference pixel different from a target pixel corresponding to the target region, thereby acquiring the second normal information and the second correction information;
The image processing device according to any one of claims 2, 3, and 7 to 12, characterized in that the reference pixels are selected using information about the shape of the subject acquired by a method different from a method for acquiring the first normal information or a semantic region division map of the subject.
被写体を撮像する撮像手段と、
請求項1から1のいずれか一項に記載の画像処理装置とを有することを特徴とする撮像装置。
An imaging means for imaging a subject;
An imaging device comprising the image processing device according to claim 1 .
被写体に互いに異なる複数の位置から照明光を順次照射する照明手段と、
請求項1から1のいずれか一項に記載の画像処理装置とを有することを特徴とする画像処理システム。
An illumination means for sequentially irradiating an object with illumination light from a plurality of different positions;
An image processing system comprising the image processing device according to claim 1 .
被写体を撮像する撮像手段をさらに有することを特徴とする請求項1に記載の画像処理システム。 17. The image processing system according to claim 15, further comprising an imaging means for imaging a subject. 被写体を撮像して得られる入力画像を用いて算出される前記被写体の第1の法線情報及び反射率情報を取得するステップと、
前記反射率情報を用いて第1の補正情報を取得するステップと、
前記入力画像と前記第1の法線情報とを用いて対象領域を検出するステップと、
前記対象領域における前記第1の補正情報を補正することで第2の補正情報を取得するステップと、
前記入力画像に基づいて得られる第1の画像と前記第1の法線情報と前記第2の補正情報とを用いて第2の画像を生成するステップとを有することを特徴とする画像処理方法。
acquiring first normal information and reflectance information of the object calculated using an input image obtained by capturing an image of the object;
obtaining first correction information using the reflectance information;
detecting a target region using the input image and the first normal information;
Correcting the first correction information in the target area to obtain second correction information;
generating a second image using a first image obtained based on the input image, the first normal information, and the second correction information.
コンピュータに、請求項1に記載の画像処理方法に従う処理を実行させることを特徴とするコンピュータプログラム。
A computer program causing a computer to execute a process according to the image processing method of claim 17 .
JP2020012469A 2020-01-29 2020-01-29 IMAGE PROCESSING APPARATUS, IMAGE PROCESSING SYSTEM, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD Active JP7508230B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020012469A JP7508230B2 (en) 2020-01-29 2020-01-29 IMAGE PROCESSING APPARATUS, IMAGE PROCESSING SYSTEM, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020012469A JP7508230B2 (en) 2020-01-29 2020-01-29 IMAGE PROCESSING APPARATUS, IMAGE PROCESSING SYSTEM, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD

Publications (3)

Publication Number Publication Date
JP2021117884A JP2021117884A (en) 2021-08-10
JP2021117884A5 JP2021117884A5 (en) 2023-01-23
JP7508230B2 true JP7508230B2 (en) 2024-07-01

Family

ID=77175017

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020012469A Active JP7508230B2 (en) 2020-01-29 2020-01-29 IMAGE PROCESSING APPARATUS, IMAGE PROCESSING SYSTEM, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD

Country Status (1)

Country Link
JP (1) JP7508230B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013012087A (en) 2011-06-29 2013-01-17 Nikon Corp Image processing device, camera and image processing program
JP2016095579A (en) 2014-11-12 2016-05-26 キヤノン株式会社 Information processing apparatus, information processing method, information processing system, and program
JP2019168862A (en) 2018-03-22 2019-10-03 キヤノン株式会社 Processing equipment, processing system, imaging device, processing method, program, and recording medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013012087A (en) 2011-06-29 2013-01-17 Nikon Corp Image processing device, camera and image processing program
JP2016095579A (en) 2014-11-12 2016-05-26 キヤノン株式会社 Information processing apparatus, information processing method, information processing system, and program
JP2019168862A (en) 2018-03-22 2019-10-03 キヤノン株式会社 Processing equipment, processing system, imaging device, processing method, program, and recording medium

Also Published As

Publication number Publication date
JP2021117884A (en) 2021-08-10

Similar Documents

Publication Publication Date Title
JP7179472B2 (en) Processing device, processing system, imaging device, processing method, program, and recording medium
JP4773369B2 (en) Techniques for correcting image field data
JP6786225B2 (en) Image processing equipment, imaging equipment and image processing programs
JP5592486B2 (en) Method and associated system for estimating defects in image capture systems
JP4757927B2 (en) White balance adjusting device and white balance adjusting method
US10853935B2 (en) Image processing system, computer readable recording medium, and image processing method
JP6877936B2 (en) Processing equipment, processing systems, imaging equipment, processing methods, programs, and recording media
JP6353233B2 (en) Image processing apparatus, imaging apparatus, and image processing method
US11025829B2 (en) Imaging apparatus, accessory, processing apparatus, processing method, and storage medium
US10721395B2 (en) Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium
JP2017134561A (en) Image processing device, imaging apparatus and image processing program
JP2017138927A (en) Image processing device, imaging apparatus, control method and program thereof
JP6679289B2 (en) Processing device, processing system, imaging device, processing method, processing program, and recording medium
JP7508230B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING SYSTEM, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD
JP6716295B2 (en) Processing device, imaging device, processing method, program, and recording medium
JP7118776B2 (en) IMAGING DEVICE, IMAGE PROCESSING METHOD, IMAGE PROCESSING PROGRAM AND RECORDING MEDIUM
JP6362070B2 (en) Image processing apparatus, imaging apparatus, image processing method, program, and storage medium
JP7520586B2 (en) Image processing device, image processing method, and program
JP7213686B2 (en) Shape measuring device, control method and program
JP7490457B2 (en) Processing device, processing system, imaging device, processing method, and program
JP2020095454A (en) Processing device, imaging device, processing system, processing method, program, and storage medium
JP2011205399A (en) Image processing apparatus and method, and image processing program
JP2020129313A (en) Processing device, processing system, imaging device, processing method, program, and recording medium
JP7309425B2 (en) Processing device, processing system, imaging device, processing method, and program
JP2022076368A (en) Image processing device, imaging device, information processing device, image processing method, and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230113

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230113

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20231206

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20231226

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240220

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240619

R150 Certificate of patent or registration of utility model

Ref document number: 7508230

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150