JP2019082955A - Image processing apparatus, image processing method and program - Google Patents

Image processing apparatus, image processing method and program Download PDF

Info

Publication number
JP2019082955A
JP2019082955A JP2017211163A JP2017211163A JP2019082955A JP 2019082955 A JP2019082955 A JP 2019082955A JP 2017211163 A JP2017211163 A JP 2017211163A JP 2017211163 A JP2017211163 A JP 2017211163A JP 2019082955 A JP2019082955 A JP 2019082955A
Authority
JP
Japan
Prior art keywords
image processing
processing apparatus
image
pixel values
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2017211163A
Other languages
Japanese (ja)
Inventor
彰人 今井
Akihito Imai
彰人 今井
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 JP2017211163A priority Critical patent/JP2019082955A/en
Publication of JP2019082955A publication Critical patent/JP2019082955A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a process for acquiring reflection characteristics of an object with high accuracy.SOLUTION: The image processing apparatus includes: first acquisition means for acquiring, from an image, pixel values of a plurality of pixels whose geometric conditions determined by positions of a light source, an imaging device, and a target region in an object are different from one another; second acquisition means for acquiring normal-line information representing a normal direction on a surface of the target region; and determination means for determining reflection characteristics in the target region by processing using at least two or more pixel values among the pixel values of the plurality of pixels, and a reflectance calculated based on the geometric conditions and the normal directions corresponding to the two or more pixel values, wherein the processing accords to a distance between a position of the target region to which the plurality of pixels correspond, and a position in the object at which light from the light source is regularly reflected to the imaging device.SELECTED DRAWING: Figure 4

Description

本発明は、物体の反射特性を取得するための画像処理技術に関する。   The present invention relates to an image processing technique for acquiring reflection characteristics of an object.

照明方向や観測(撮像)方向に応じた物体の反射率の変化(反射特性)を、双方向反射率分布関数BRDF(Bi−directional Reflectance Distribution Function)を用いて表す方法が一般的に知られている。BRDFについての情報を利用することにより、任意の照明条件・視線方向における自然な陰影やハイライトの再現が可能になる。特許文献1は、光源方向又は観測方向を変えながらの撮像によって得られた複数の画像データを用いることによって、物体のBRDFの推定を行う技術を開示している。   It is generally known how to express the change (reflection characteristic) of the reflectance of an object according to the illumination direction and the observation (imaging) direction using a bi-directional reflectance distribution function (BRDF). There is. By using information about BRDF, it becomes possible to reproduce natural shadows and highlights in any lighting condition and gaze direction. Patent Document 1 discloses a technique for estimating a BRDF of an object by using a plurality of image data obtained by imaging while changing the light source direction or the observation direction.

特開2003−203220号公報JP 2003-203220 A

一般的なデジタルカメラには、露出時間や絞り値の設定に応じて、取得可能な明るさの範囲に限界がある。ある露出の設定に対して被写体が所定の輝度値より明るい場合、撮像画像の画素値が飽和し、輝度を識別できなくなる。一方、ある露出の設定に対して被写体が暗すぎる場合、画素値のS/N比が低下するため、輝度の識別が困難となる。   In a general digital camera, the range of obtainable brightness is limited according to the setting of the exposure time and the aperture value. When the subject is brighter than a predetermined luminance value with respect to a certain exposure setting, the pixel value of the captured image is saturated and the luminance can not be identified. On the other hand, when the subject is too dark with respect to a certain exposure setting, the S / N ratio of the pixel value is reduced, which makes it difficult to identify the luminance.

特許文献1の方法を用いる場合、撮像画像において光源からの光の当たり方が領域ごとに異なる。このため、明るすぎて飽和した画素や暗すぎてS/N比が低下した画素を含む画像に基づいてBRDFを決定することになる。この場合、高精度にBRDFを取得することは困難である。   When the method of Patent Document 1 is used, how light from a light source hits in a captured image differs from region to region. For this reason, the BRDF is determined based on an image including pixels that are too bright and saturated or pixels that are too dark and having a low S / N ratio. In this case, it is difficult to obtain BRDF with high accuracy.

本発明は、上記課題に鑑みてなされたものであり、物体の反射特性を高精度に取得するための処理を提供することを目的とする。   The present invention has been made in view of the above problems, and an object thereof is to provide a process for acquiring the reflection characteristic of an object with high accuracy.

上記課題を解決するために、本発明に係る画像処理装置は、光源を用いて照明した物体を撮像装置が撮像することによって得られた画像を用いて前記物体の対象領域における反射特性を決定するための画像処理装置であって、前記画像から、前記光源と前記撮像装置と前記対象領域との位置によって決まる幾何条件が互いに異なる複数の画素の画素値を取得する第1取得手段と、前記対象領域の表面における法線方向を表す法線情報を取得する第2取得手段と、前記複数の画素の画素値のうち少なくとも2つ以上の画素値と、前記2つ以上の画素値それぞれに対応する前記幾何条件及び前記法線方向に基づいて算出される反射率と、を用いた処理によって、前記対象領域における反射特性を決定する決定手段と、を有し、前記処理は、前記複数の画素が対応する前記対象領域の位置と前記物体において前記光源からの光が前記撮像装置に対して正反射する位置との距離に応じることを特徴とする。   In order to solve the above-mentioned subject, the image processing device concerning the present invention determines the reflective characteristic in the object field of the object using the picture obtained by an imaging device picturizing the object illuminated using a light source An image processing apparatus for acquiring, from the image, pixel values of a plurality of pixels having different geometric conditions determined by the positions of the light source, the imaging device, and the target area; The second acquisition means for acquiring normal information representing the normal direction on the surface of the region, at least two or more pixel values among the pixel values of the plurality of pixels, and the two or more pixel values respectively Determining means for determining reflection characteristics in the target area by processing using the geometric condition and the reflectance calculated based on the normal direction, and the processing includes Light from the light source at the position and the object of the target area, characterized in that responsive to the distance between the position of specular reflection relative to the imaging device of the pixel corresponds.

本発明によれば、物体の反射特性を高精度に取得することができる。   According to the present invention, the reflection characteristic of an object can be obtained with high accuracy.

反射特性取得システムの構成の一例を示す図A diagram showing an example of the configuration of a reflection characteristic acquisition system 画像処理装置の論理構成の一例を示すブロック図Block diagram showing an example of the logical configuration of the image processing apparatus 幾何条件θ、ρを説明するための図Diagram for explaining the geometric conditions θ, ρ 画像処理装置が実行する処理の一例を示すフローチャートFlow chart showing an example of processing executed by the image processing apparatus BRDFを決定する処理の一例を示すフローチャートFlow chart showing an example of processing to determine BRDF 光源、撮像装置、撮像領域、正反射点の位置関係の一例を示す図A diagram showing an example of the positional relationship between a light source, an imaging device, an imaging region, and a regular reflection point 撮像領域内の輝度の分布の一例を示す図A diagram showing an example of the distribution of luminance in an imaging region 多視点撮像を行う際の撮像領域と測定点との位置関係の一例を示す図。FIG. 7 is a view showing an example of the positional relationship between an imaging region and measurement points when performing multi-viewpoint imaging. 輝度値、角度ρ、BRDFの係数の関係を示す図Diagram showing the relationship between luminance value, angle ρ, and BRDF coefficients 撮像画像の端部を含む測定点において得られたBRDFの一例を示す図A diagram showing an example of a BRDF obtained at a measurement point including an end of a captured image 撮像画像の端部を含まない測定点において得られたBRDFの一例を示す図A diagram showing an example of a BRDF obtained at a measurement point not including the end of a captured image BRDFを決定する処理の一例を示すフローチャートFlow chart showing an example of processing to determine BRDF 参照点の画素値と角度ρとの関係の一例を示した図A diagram showing an example of the relationship between the pixel value of the reference point and the angle ρ 角度ρと重み係数との関係の一例を示した図Figure showing an example of the relationship between the angle ρ and the weighting factor

以下、本発明の実施形態を図面を参照して詳細に説明する。尚、以下の実施形態は本発明を必ずしも限定するものではない。また、以下の実施形態において説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。尚、同一の構成については、同一の符号を付して説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The following embodiments do not necessarily limit the present invention. Moreover, not all combinations of features described in the following embodiments are essential to the solution of the present invention. In addition, about the same structure, the same code | symbol is attached | subjected and demonstrated.

[第1実施形態]
<反射特性取得システムの構成>
図1は、本実施形態に係る反射特性取得システムの構成の一例を示す図である。反射特性取得システムは、多視点撮像システム101と、画像処理装置102とを有する。多視点撮像システム101は、光源104と、撮像装置105と、可動ステージ106と、を有する。本実施形態における光源104はプロジェクタである。また、本実施形態における撮像装置105はカラーデジタルカメラである。撮像装置105は、可動ステージ106により撮像位置を移動しながら、光源104からの光が当てられている被写体103を複数回撮像する。この複数回の撮像によって、複数の画像データが得られる。撮像装置105は、各画素にR、G、Bの3つのチャンネルを有する画像データを生成する。本実施形態においては、画像データの画素値として、16ビットで表されるR値、G値、B値が各チャンネルに記録されているが、画素値を表すためのビット数は16に限らず、8ビットなどで表される画素値であってもよい。
First Embodiment
<Configuration of Reflection Characteristic Acquisition System>
FIG. 1 is a diagram showing an example of the configuration of a reflection characteristic acquisition system according to the present embodiment. The reflection characteristic acquisition system includes a multi-viewpoint imaging system 101 and an image processing apparatus 102. The multi-viewpoint imaging system 101 includes a light source 104, an imaging device 105, and a movable stage 106. The light source 104 in the present embodiment is a projector. Further, the imaging device 105 in the present embodiment is a color digital camera. The imaging device 105 captures an image of the subject 103 to which light from the light source 104 is applied while moving the imaging position by the movable stage 106 a plurality of times. A plurality of image data can be obtained by the plurality of imagings. The imaging device 105 generates image data having three channels of R, G, and B in each pixel. In the present embodiment, R, G, and B values represented by 16 bits are recorded in each channel as pixel values of image data, but the number of bits for representing pixel values is not limited to 16. It may be a pixel value represented by 8 bits or the like.

被写体103は、油彩画のような平面に近い形状のものとする。可動ステージ106は、図1に示すX軸、Y軸、Z軸を軸とする3次元空間において、XY平面を移動可能なステージである。光源104と撮像装置105とは、可動ステージ106に固定されており、互いの相対位置を保ったまま、被写体103と概ね平行な面上を移動する。被写体103は、XY平面に凡そ平行に設置されており、測定対象となる面が可動ステージ106側に向いている。光源104は被写体103に正対する向きで設置されており、撮像装置105は光源104の正面を撮像するため、やや光源104側に傾いた向きで設置されている。   The subject 103 has a shape close to a plane such as an oil painting. The movable stage 106 is a stage capable of moving the XY plane in a three-dimensional space whose axes are the X axis, the Y axis, and the Z axis shown in FIG. The light source 104 and the imaging device 105 are fixed to the movable stage 106, and move on a plane substantially parallel to the subject 103 while maintaining their relative positions. The subject 103 is placed approximately parallel to the XY plane, and the surface to be measured is directed to the movable stage 106 side. The light source 104 is installed in a direction facing the subject 103, and the imaging device 105 is installed in a direction slightly inclined to the light source 104 in order to image the front of the light source 104.

尚、被写体103の形状や多視点撮像システム101の構成は上記一例に限定されない。被写体は平面でなくてもよく、例えば球体のような3次元形状であってもよい。この場合は、被写体の全面を撮像するために、可動ステージ106の代わりとして、3次元空間における全ての方向に移動可能なロボットアームを用いても良い。あるいは、撮像装置105を固定し、被写体を回転台の上に乗せて回転させることによって、被写体103の全面を撮像しても良い。また、撮像装置105と被写体103との両方が動く形態であっても良い。更には、複数の光源や複数の撮像装置を使用することによって、幾何条件が異なる複数回の撮像を行っても良い。また、光源104が単一の点光源であると近似できるような照明条件において撮像できれば、光源104はプロジェクタに限らず、LEDの点光源などであってもよい。   The shape of the subject 103 and the configuration of the multi-viewpoint imaging system 101 are not limited to the above example. The subject does not have to be a plane, and may be, for example, a three-dimensional shape such as a sphere. In this case, a robot arm movable in all directions in a three-dimensional space may be used instead of the movable stage 106 in order to image the entire surface of the subject. Alternatively, the entire surface of the subject 103 may be imaged by fixing the imaging device 105 and placing the subject on the rotation table and rotating it. Alternatively, both the imaging device 105 and the subject 103 may move. Furthermore, by using a plurality of light sources or a plurality of imaging devices, imaging may be performed a plurality of times under different geometric conditions. The light source 104 is not limited to a projector, but may be an LED point light source as long as the light source 104 can be imaged under an illumination condition that can be approximated as a single point light source.

画像処理装置102は、例えばコンピュータであり、CPU107、ROM108、RAM109を備える。CPU107は、RAM109をワークメモリとして、ROM108、HDD(ハードディスクドライブ)110などに格納されたOS(オペレーティングシステム)や各種プログラムを実行する。また、CPU107は、システムバス111を介して各構成を制御する。尚、後述するフローチャートによる処理は、ROM108やHDD110などに格納されたプログラムコードがRAM109に展開され、CPU107によって実行される。汎用I/F(インターフェース)112には、シリアルバスを介して、マウスやキーボードなどの入力デバイス113や多視点撮像システム101が接続される。画像処理装置102は、シリアルバスを介して、光源104、撮像装置105及び可動ステージ106と接続されているため、照明条件、撮像、視点位置等の制御が可能である。SATA(シリアルATA)I/F114には、シリアルバスを介して、HDD110や各種記録メディアの読み書きを行う汎用ドライブ115が接続される。CPU107は、HDD110や汎用ドライブ115にマウントされた各種記録メディアを各種データの格納場所として使用する。ビデオI/F116には、ディスプレイ117が接続される。CPU107は、プログラムによって提供されるUI(ユーザインターフェース)をディスプレイ117に表示し、入力デバイス113を介して受け付けるユーザ指示などの入力を受信する。   The image processing apparatus 102 is, for example, a computer, and includes a CPU 107, a ROM 108, and a RAM 109. The CPU 107 executes an OS (Operating System) and various programs stored in the ROM 108, the HDD (Hard Disk Drive) 110, etc., using the RAM 109 as a work memory. The CPU 107 also controls each component via the system bus 111. Note that program code stored in the ROM 108 or the HDD 110 is expanded on the RAM 109 and executed by the CPU 107 according to a flowchart to be described later. An input device 113 such as a mouse and a keyboard and a multi-viewpoint imaging system 101 are connected to the general-purpose I / F (interface) 112 via a serial bus. The image processing apparatus 102 is connected to the light source 104, the imaging apparatus 105, and the movable stage 106 through a serial bus, and thus can control illumination conditions, imaging, a viewpoint position, and the like. The SATA (serial ATA) I / F 114 is connected to the HDD 110 and a general-purpose drive 115 that reads and writes various recording media via a serial bus. The CPU 107 uses various recording media mounted on the HDD 110 or the general-purpose drive 115 as a storage location of various data. A display 117 is connected to the video I / F 116. The CPU 107 displays a UI (user interface) provided by the program on the display 117, and receives an input such as a user instruction received via the input device 113.

<BRDFの決定における課題>
図6〜図11を参照して、物体のBRDFを決定する際の課題を説明する。図6は、被写体103、光源104、撮像装置105を、可動ステージ106の背後側から見た場合の、それぞれの位置関係を示す図である。台形の撮像領域は、被写体103上において、撮像装置105の画角内に入る範囲(すなわち、撮像画像に映る範囲)を示している。正反射点は、被写体103の表面の法線がZ軸の負の方向と一致している場合に、光源104からの光の正反射光が撮像装置105に到達するおおよその位置を示している。尚、正反射点は、光源104及び撮像装置105よりもZ軸の正の方向にある。図7は、撮像画像内の輝度の分布を示す図である。実際の撮像によって得られる反射光の強度は被写体103の材質や凹凸(高さ及び法線の分布)の影響を受けるが、正反射点に近い位置ほど強い反射光が取得される傾向にある。図7の例においては、正反射点は撮像領域の右側の外部に位置するため、撮像領域の右端の中央付近にある領域Aが最も明るく、撮像領域の左端の上下端にある領域Jが最も暗くなる。
<Issues in determining BRDF>
The problems in determining the BRDF of an object will be described with reference to FIGS. FIG. 6 is a view showing the positional relationship between the subject 103, the light source 104, and the imaging device 105 as viewed from behind the movable stage 106. As shown in FIG. The trapezoidal imaging region indicates a range (that is, a range shown in a captured image) within the angle of view of the imaging device 105 on the subject 103. The specular reflection point indicates the approximate position at which the specularly reflected light from the light source 104 reaches the imaging device 105 when the normal to the surface of the subject 103 coincides with the negative direction of the Z axis. . The regular reflection point is in the positive direction of the Z axis relative to the light source 104 and the imaging device 105. FIG. 7 is a diagram showing the distribution of luminance in a captured image. The intensity of the reflected light obtained by actual imaging is affected by the material and unevenness (distribution of height and normal) of the subject 103, but the reflected light tends to be acquired closer to the regular reflection point. In the example of FIG. 7, since the specular reflection point is located outside the right side of the imaging area, the area A near the center of the right end of the imaging area is the brightest, and the area J at the upper and lower ends of the left end of the imaging area is the most Get dark.

図8は、可動ステージ106をX軸方向に移動させながら8回撮像を行った場合の、各撮像画像の撮像範囲を示した図である。実際に被写体103の反射特性(BRDF)を取得する場合は、Y軸方向における移動も含めた移動によって、撮像領域が被写体103全体を覆うように多くの視点で撮像する。しかし、ここでは説明の簡便のために、X軸方向における移動に伴う撮像によって得られた8視点の撮像画像を扱う。図8における測定点a〜dは、BRDFを決定する対象となる被写体103上の測定点を示している。測定点a、cは撮像領域の左右端に近い領域を含み、測定点b、dは撮像領域の左右端に近い領域を含まない。以下の説明においては、測定点a〜dの各測定点近傍の凹凸は考慮せず、法線はZ軸の負の方向に等しいものとする。   FIG. 8 is a view showing an imaging range of each captured image when imaging is performed eight times while moving the movable stage 106 in the X-axis direction. When the reflection characteristic (BRDF) of the subject 103 is actually acquired, imaging is performed with many viewpoints such that the imaging region covers the entire subject 103 by movement including movement in the Y-axis direction. However, in order to simplify the explanation here, captured images of eight viewpoints obtained by imaging with movement in the X-axis direction are dealt with. Measurement points a to d in FIG. 8 indicate measurement points on the subject 103 for which a BRDF is to be determined. Measurement points a and c include areas near the left and right ends of the imaging area, and measurement points b and d do not include areas near the left and right ends of the imaging area. In the following description, the unevenness is not considered in the vicinity of each measurement point of the measurement points a to d, and the normal is assumed to be equal to the negative direction of the Z axis.

図9は、得られたBRDFの係数(Cd,Cs,σ)と、BRDFをガウス曲線にフィッティングした結果との関係を示す図である。ここでは、Rチャンネルに対応する波長帯を一例としている。グラフの縦軸はRの輝度であり、グラフの横軸は観測方向ベクトルと光源ベクトルとの中間のベクトル(ハーフベクトル)と、法線ベクトルと、のなす角度ρである。図10は、図8の測定点aあるいはcにおける、撮像画像の各画素から取得された画素値と角度ρとの組み合わせと、得られたBRDFを示すガウス曲線と、の関係を示した図である。実線の曲線は、後述する本実施形態の方法により決定されたBRDFを示すガウス曲線である。点線の曲線は、BRDFを決定する際の最適化処理において、重み係数を設定しない場合に得られるBRDFを示すガウス曲線である。尚、重み係数を設定しないことは、重み係数を一定の値に設定することに言い換えることができる。プロットA〜Iは、取得されたRの画素値と角度ρとの組み合わせを示しており、各アルファベットは図7に示した画像内の領域と対応している。 FIG. 9 is a diagram showing the relationship between the obtained BRDF coefficients (Cd R , Cs R , σ R ) and the result of fitting the BRDF to a Gaussian curve. Here, a wavelength band corresponding to the R channel is taken as an example. The vertical axis of the graph is the luminance of R, and the horizontal axis of the graph is the angle ρ between the normal vector and the vector (half vector) between the observation direction vector and the light source vector. FIG. 10 is a diagram showing the relationship between the combination of the pixel value obtained from each pixel of the captured image and the angle ρ at the measurement point a or c in FIG. 8 and the Gaussian curve indicating the obtained BRDF. is there. The solid curve is a Gaussian curve showing a BRDF determined by the method of the present embodiment described later. The dotted curve is a Gaussian curve indicating the BRDF obtained when the weighting factor is not set in the optimization process for determining the BRDF. Not setting the weighting factor can be reworded as setting the weighting factor to a constant value. Plots A to I show combinations of the acquired R pixel values and the angle ρ, and each alphabet corresponds to the region in the image shown in FIG.

ここで、プロットAは、領域Aが正反射点に近いために画素値が飽和し、真の輝度値に対して低い画素値を示している。一方、プロットIは、画像内の最も暗い領域であり、画素値に対して相対的に大きなノイズを含んでいる可能性がある。特に、測定点の拡散反射光の光量(Cdcosθ)が小さい場合にS/N比は大きく低下する。このような条件下において、重み係数を設定せずにBRDF係数の最適化を行う場合、プロットAやプロットIの影響を強く受け、得られたBRDFは真値に対して誤差が大きくなってしまう。そこで、本実施形態においては、画像内の位置に応じて最適化処理における重み係数を設定する。つまり、プロットEの重み係数を最も大きくし、プロットA及びIの重み係数を0又は0に近い値とする。これにより、画素値の飽和やノイズの影響を低減し、より真値に近いBRDFを得ることができる。 Here, the plot A indicates that the pixel value is saturated because the region A is close to the regular reflection point, and the pixel value is lower than the true luminance value. On the other hand, plot I is the darkest region in the image and may contain relatively large noise relative to the pixel values. In particular, when the light amount (Cd R cos θ) of the diffuse reflection light at the measurement point is small, the S / N ratio is largely reduced. Under these conditions, when BRDF coefficients are optimized without setting weighting factors, plot A and plot I are strongly affected, and the resulting BRDF has a large error relative to the true value. . Therefore, in the present embodiment, the weighting factor in the optimization process is set according to the position in the image. That is, the weight coefficient of the plot E is maximized, and the weight coefficients of the plots A and I are set to 0 or a value close to 0. As a result, the influence of pixel value saturation and noise can be reduced, and BRDF closer to the true value can be obtained.

図11は、測定点bあるいはdにおける、各画素から取得されたRの画素値と幾何条件ρとの組み合わせと、得られたBRDFを示すガウス曲線と、の関係を示した図である。測定点bあるいはdにおいては、画素値の飽和したプロットやノイズの影響が大きいプロットを含まないため、重み係数を設定しない場合でも、測定点aやcと比較して真値に近いBRDFが得られる。つまり、BRDF係数の最適化処理を行う際に、重み係数を設定しない場合、測定点a及びcにおいて得られるBRDFと測定点b及びdにおいて得られるBRDFとの間に差が生じる。この差は、コンピュータグラフィックス(CG)等により被写体103のBRDFを再現した場合に、各撮像画像の撮像領域に沿った段差として観察者に知覚される。   FIG. 11 is a diagram showing the relationship between the combination of the pixel value of R obtained from each pixel and the geometric condition ρ at the measurement point b or d and the Gaussian curve indicating the obtained BRDF. The measurement points b and d do not include saturated plots of pixel values and plots that are largely affected by noise, so even when no weighting factor is set, a BRDF closer to the true value is obtained compared to the measurement points a and c. Be That is, when the BRDF coefficient optimization process is performed, if the weighting coefficient is not set, a difference occurs between the BRDF obtained at the measurement points a and c and the BRDF obtained at the measurement points b and d. This difference is perceived by the observer as a step along the imaging region of each captured image when the BRDF of the subject 103 is reproduced by computer graphics (CG) or the like.

一方、本実施形態の方法により重み係数を設定した場合、プロットD及びFの重みが相対的に高くなるため、測定点aやcと同様に真値に近いBRDFが得られる。よって、各測定点において得られたBRDFに差は生じない。つまり、本実施形態の方法によれば、物体(被写体)の反射特性(BRDF)を高精度に取得することができ、CGやプリントなどによって物体のBRDFを再現する場合に撮像領域に沿った段差が生じにくい画像を生成することができる。   On the other hand, when the weighting factor is set by the method of the present embodiment, the weight of the plots D and F becomes relatively high, so that the BRDF close to the true value can be obtained similarly to the measurement points a and c. Therefore, there is no difference in BRDF obtained at each measurement point. That is, according to the method of the present embodiment, the reflection characteristic (BRDF) of the object (subject) can be obtained with high accuracy, and the step along the imaging region when reproducing the BRDF of the object by CG, printing, etc. Can generate an image that is less likely to occur.

<画像処理装置の論理構成>
以下、画像処理装置102の論理構成について説明する。以下に示す各部の処理は、CPU107がROM108等からRAM109上に読み込んだコンピュータプログラムを実行することによって、ソフトウェアとして実施される。図2(a)は、画像処理装置102の論理構成を示すブロック図である。画像処理装置102は、第1取得部201と、第2取得部202と、算出部203と、第3取得部204と、決定部205と、出力部206と、を有する。
<Logical Configuration of Image Processing Device>
The logical configuration of the image processing apparatus 102 will be described below. The processing of each unit described below is implemented as software by the CPU 107 executing a computer program read onto the RAM 109 from the ROM 108 or the like. FIG. 2A is a block diagram showing the logical configuration of the image processing apparatus 102. As shown in FIG. The image processing apparatus 102 includes a first acquisition unit 201, a second acquisition unit 202, a calculation unit 203, a third acquisition unit 204, a determination unit 205, and an output unit 206.

第1取得部201は、撮像装置105が取得した複数の画像データと、各画像データを得るための各撮像に対応する撮像パラメータと、を取得する。撮像パラメータは、光源104の位置及び向きと、撮像装置105の位置及び向きと、撮像における撮像装置105の内部パラメータと、である。内部パラメータは、撮像装置105が有するレンズの焦点距離と、主点位置と、レンズ等に起因する画像の歪曲パラメータと、である。本実施形態における第1取得部201は、多視点撮像システム101の各部を駆動させることによって撮像を行い、画像データを取得する。尚、第1取得部201は、予めHDD110などに保存しておいた画像データ及び撮像パラメータを取得してもよい。   The first acquisition unit 201 acquires a plurality of image data acquired by the imaging device 105 and imaging parameters corresponding to each imaging for obtaining each image data. The imaging parameters are the position and orientation of the light source 104, the position and orientation of the imaging device 105, and internal parameters of the imaging device 105 in imaging. The internal parameters are the focal length of the lens of the imaging device 105, the principal point position, and the distortion parameter of the image caused by the lens or the like. The first acquisition unit 201 in the present embodiment performs imaging by driving each part of the multi-viewpoint imaging system 101 to acquire image data. The first acquisition unit 201 may acquire image data and imaging parameters stored in advance in the HDD 110 or the like.

第2取得部202は、被写体103の3次元形状を表す形状データを取得する。本実施形態においては、第1取得部201において取得した複数の画像データと撮像パラメータとに基づいて形状データを生成する。具体的には、まず、公知のステレオ法を用いて被写体103の3次元形状を示す点群(3次元空間における座標情報を有する点の集合)を表す点群データを生成する。生成した点群データに基づいて、公知のPSR(Poisson Surface Reconstruction)法を用いて点群をポリゴンメッシュモデルへと変換する。これにより、ポリゴンメッシュモデルを用いて被写体103の3次元形状を表す形状データを生成する。ここで、ポリゴンメッシュモデルは、物体の表面形状を三角形の集合を用いて表現するモデルである。尚、形状データはポリゴンメッシュモデルを用いて被写体103の3次元形状を表すデータに限られず、例えば、本実施形態における被写体103のように平面に近い物体であれば、物体の高さ分布を表す高さデータ(ハイトフィールドデータ)であってもよい。   The second acquisition unit 202 acquires shape data representing the three-dimensional shape of the subject 103. In the present embodiment, shape data is generated based on a plurality of image data acquired by the first acquisition unit 201 and imaging parameters. Specifically, first, point cloud data representing a point cloud (a set of points having coordinate information in a three-dimensional space) indicating a three-dimensional shape of the subject 103 is generated using a known stereo method. Based on the generated point cloud data, the point cloud is converted into a polygon mesh model using a known PSR (Poisson Surface Reconstruction) method. Thus, shape data representing the three-dimensional shape of the subject 103 is generated using the polygon mesh model. Here, the polygon mesh model is a model that represents the surface shape of an object using a set of triangles. The shape data is not limited to data representing the three-dimensional shape of the subject 103 using a polygon mesh model, and for example, if it is an object close to a plane like the subject 103 in the present embodiment, the height distribution of the object is represented. It may be height data (height field data).

尚、本実施形態においては、多視点からの撮像によって得られた複数の画像データに基づいて形状データを生成したが、形状データの取得方法はこれに限定されない。例えば、光源104を用いて特定のパターン光を被写体103に投影し、その反射光を撮像装置105を用いて捉えることによって形状データを取得する方法を用いてもよい。また、画像処理装置102に接続されたレーザーレンジスキャナ等を制御することによって、被写体103の形状データを取得する方法を用いてもよい。また、予めHDD110などに保存しておいた形状データを取得してもよい。   In the present embodiment, shape data is generated based on a plurality of image data obtained by imaging from multiple viewpoints, but the method of acquiring shape data is not limited to this. For example, a method may be used in which shape data is acquired by projecting specific pattern light onto the subject 103 using the light source 104 and capturing the reflected light using the imaging device 105. Alternatively, a method of acquiring shape data of the subject 103 by controlling a laser range scanner or the like connected to the image processing apparatus 102 may be used. Alternatively, shape data stored in advance in the HDD 110 or the like may be acquired.

算出部203は、形状データが表す3次元形状における各点と、各点に対応する領域を含む画像と、の組み合わせについて、法線ベクトル(法線情報)、光源ベクトル、観測方向ベクトルを算出する。ここで、3次元形状における各点は、ポリゴンメッシュモデルの表面上に位置する点である。本実施形態においては、図8に示すような撮像領域となるように撮像を行うため、各点に対応する領域を含む画像は複数存在する。法線ベクトルは、形状データにおいて対象の点が含まれる三角形の外向きの法線方向を示す単位ベクトルとして算出される。算出部203は、三角形における2つのベクトルの外積によって法線ベクトルを算出する。光源ベクトルは、対象の点から光源104の座標を指す単位ベクトルとして算出される。観測方向ベクトルは、対象の点から撮像装置105の座標を指す単位ベクトルとして算出される。算出部203は、形状データにおける対象の点の座標と光源104の位置(座標)と撮像装置105の位置(座標)とに基づいて、上述した法線ベクトルのように、ベクトル演算によって光源ベクトル及び観測方向ベクトルを算出する。尚、形状データにおける対象の点の座標と光源104の位置(座標)と撮像装置105の位置(座標)と、の相対的な位置関係は、可動ステージ106の位置情報を用いて算出してもよい。また、公知のキャリブレーション方法を用いて相対的な位置関係を算出してもよい。尚、形状データとしてハイトフィールドデータを用いる場合は、高さ情報の微分値に基づいて法線ベクトルを算出してもよい。   The calculation unit 203 calculates a normal vector (normal information), a light source vector, and an observation direction vector for a combination of each point in the three-dimensional shape represented by the shape data and an image including an area corresponding to each point. . Here, each point in the three-dimensional shape is a point located on the surface of the polygon mesh model. In the present embodiment, since imaging is performed so as to be an imaging region as shown in FIG. 8, a plurality of images including regions corresponding to each point exist. The normal vector is calculated as a unit vector indicating the outward normal direction of the triangle in which the target point is included in the shape data. The calculation unit 203 calculates a normal vector by the outer product of two vectors in a triangle. The light source vector is calculated as a unit vector pointing from the point of interest to the coordinates of the light source 104. The observation direction vector is calculated as a unit vector pointing from the point of interest to the coordinates of the imaging device 105. The calculation unit 203 calculates the light source vector by vector operation based on the coordinates of the target point in the shape data, the position (coordinates) of the light source 104 and the position (coordinates) of the imaging device 105 as in the normal vector described above. Calculate the observation direction vector. The relative positional relationship between the coordinates of the target point in the shape data, the position (coordinates) of the light source 104 and the position (coordinates) of the imaging device 105 may be calculated using the position information of the movable stage 106 Good. Also, the relative positional relationship may be calculated using a known calibration method. When height field data is used as shape data, a normal vector may be calculated based on a differential value of height information.

第3取得部204は、形状データが表す3次元形状における各点について、対応する画像データの画素値(R値、G値、B値)を取得する。本実施形態においては、上述したように、各点に対応する領域を含む画像は複数存在するため、画像ごとに複数の画素値を取得する。   The third acquisition unit 204 acquires the pixel values (R value, G value, B value) of the corresponding image data for each point in the three-dimensional shape represented by the shape data. In the present embodiment, as described above, there are a plurality of images including the area corresponding to each point, and therefore, a plurality of pixel values are acquired for each image.

決定部205は、形状データが表す3次元形状における各点について、画素値(R値、G値、B値)と幾何条件(θ、ρ)との複数の組み合わせに基づいて、BRDFの係数(Cd、Cs、σR、Cd、Cs、σ、Cd、Cs、σ)を決定する。BRDFの係数は、物体の反射特性を決定するための反射特性パラメータである。図3に示すように、幾何条件は、法線ベクトルと光源ベクトルとがなす角度θと、観測方向ベクトルと光源ベクトルとのハーフベクトルと法線ベクトルとがなす角度ρとを表す。本実施形態においては、被写体103のBRDFとして式(1)に示すGaussモデルを用いる。 For each point in the three-dimensional shape represented by the shape data, the determination unit 205 determines a BRDF coefficient (R, G, B) based on a plurality of combinations of geometric conditions (θ, 組 み 合 わ せ). Cd R , Cs R , σ R, Cd G , Cs G , σ G , Cd B , Cs B , σ B ) are determined. The coefficients of BRDF are reflection characteristic parameters for determining the reflection characteristic of an object. As shown in FIG. 3, the geometric condition represents an angle θ formed by the normal vector and the light source vector, and an angle ρ formed by the half vector and the normal vector of the observation direction vector and the light source vector. In the present embodiment, a Gaussian model shown in Expression (1) is used as the BRDF of the subject 103.

R=Cdcosθ+Csexp(−ρ/2σ )cosθ
G=Cdcosθ+Csexp(−ρ/2σ )cosθ ・・・式(1)
B=Cdcosθ+Csexp(−ρ/2σ )cosθ
CdはRチャンネルに対応する波長帯における拡散反射光の反射率(反射強度)を示す拡散反射係数である。CsはRチャンネルに対応する波長帯における鏡面反射光の反射率(反射強度)を示す鏡面反射係数、σはRチャンネルに対応する波長帯における鏡面反射光の広がりを示す鏡面反射係数である。同様に、Cd、Cs、σはGチャンネルに対応する波長帯における拡散反射係数及び鏡面反射係数である。また、Cd、Cs、σはBチャンネルに対応する波長帯における拡散反射係数及び鏡面反射係数である。
R = Cd R cos θ + Cs R exp (−ρ 2 / 2σ R 2 ) cos θ
G = Cd G cos θ + Cs G exp (−ρ 2 / 2σ G 2 ) cos θ formula (1)
B = Cd B cos θ + Cs B exp (−ρ 2 / 2σ B 2 ) cos θ
Cd R is a diffuse reflection coefficient indicating the reflectance (reflection intensity) of the diffuse reflection light in the wavelength band corresponding to the R channel. Cs R is a specular reflection coefficient indicating the reflectance (reflection intensity) of specular reflected light in a wavelength band corresponding to R channel, and σ R is a specular reflection coefficient indicating the spread of specular reflected light in a wavelength band corresponding to R channel . Similarly, Cd G , Cs G and σ G are the diffuse reflection coefficient and the specular reflection coefficient in the wavelength band corresponding to the G channel. Further, Cd B , Cs B and σ B are the diffuse reflection coefficient and the specular reflection coefficient in the wavelength band corresponding to the B channel.

決定部205は、画素値(R値、G値、B値)と幾何条件(θ、ρ)との複数の組み合わせの各々について式(1)を用いて左辺と右辺との差分(誤差)を算出し、差分の和が最小となるようにBRDF係数の最適化を行う。また、決定部205は、BRDF係数の最適化の際に、各組み合わせについて画像における画素の位置に応じた重み付けを行う。BRDF係数の最適化処理及び重み付けの詳細については後述する。   The determination unit 205 determines the difference (error) between the left side and the right side using Equation (1) for each of a plurality of combinations of pixel values (R value, G value, B value) and geometric conditions (θ,)). Calculate and optimize the BRDF coefficients so as to minimize the sum of differences. In addition, when optimizing the BRDF coefficients, the determination unit 205 performs weighting in accordance with the position of the pixel in the image for each combination. Details of optimization processing and weighting of the BRDF coefficients will be described later.

出力部206は、形状データが表す3次元形状における各点において決定したBRDF係数を形状データが表す3次元形状と関連付けることによって出力用データを生成し、出力用データをHDD110に出力する。   The output unit 206 generates output data by associating the BRDF coefficients determined at each point in the three-dimensional shape represented by the shape data with the three-dimensional shape represented by the shape data, and outputs the output data to the HDD 110.

<画像処理装置が実行する処理>
次に、画像処理装置102が実行する処理について図4(a)及び図5(a)を参照して説明する。図4(a)は、画像処理装置102が実行する処理のフローチャートである。以下、各ステップ(工程)は符号の前にSをつけて表す。
<Process Performed by Image Processing Device>
Next, processing executed by the image processing apparatus 102 will be described with reference to FIGS. 4A and 5A. FIG. 4A is a flowchart of processing performed by the image processing apparatus 102. In the following, each step (step) is represented by adding S to the front of its reference numeral.

S401において、第1取得部201は、複数の画像データと、各画像データに対応する撮像パラメータと、を取得する。S402において、第2取得部202は、S401において取得した画像データと撮像パラメータとに基づいて、被写体103の3次元形状を表す形状データを生成する。   In S401, the first acquisition unit 201 acquires a plurality of image data and imaging parameters corresponding to each image data. In step S402, the second acquisition unit 202 generates shape data representing the three-dimensional shape of the subject 103 based on the image data acquired in step S401 and the imaging parameters.

S403において、算出部203、第3取得部204、決定部205は、形状データが表すポリゴンメッシュモデルの各面(各三角形)についてBRDF決定処理を行う。BRDF決定処理の詳細については後述する。尚、S403は、各三角形について処理するまでループする。S404において、出力部206は、ポリゴンメッシュモデルの各面についてS403において決定したBRDF係数の情報を付加した出力用データを生成し、出力用データをHDD110に出力する。   In S403, the calculation unit 203, the third acquisition unit 204, and the determination unit 205 perform BRDF determination processing on each surface (each triangle) of the polygon mesh model represented by the shape data. Details of the BRDF determination process will be described later. Note that S403 loops until each triangle is processed. In S404, the output unit 206 generates output data to which the information of the BRDF coefficients determined in S403 is added for each surface of the polygon mesh model, and outputs the output data to the HDD 110.

<BRDF決定処理>
以下、S403において実行されるBRDF決定処理を詳細に説明する。図5(a)は、本実施形態におけるBRD決定処理を示すフローチャートである。
<BRDF decision processing>
Hereinafter, the BRDF determination process executed in S403 will be described in detail. FIG. 5A is a flowchart showing BRD determination processing in the present embodiment.

S501において、算出部203は、BRDFを決定する対象となる点(測定点)の3次元空間における座標を取得する。具体的には、処理対象となっている三角形の重心点の座標を、測定点の座標として、三角形の各頂点の座標を用いて算出する。次に、S502〜S504を、処理対象の測定点に対応する全ての画像データについて処理するまでループする。S502において、算出部203は、n番目の画像データについて、法線ベクトルと、光源ベクトルと、観測方向ベクトルと、光源104及び撮像装置105の座標と、を取得する。さらに、算出部203は、法線ベクトルと光源ベクトルとがなす角度θ、及び観測方向ベクトルと光源ベクトルとのハーフベクトルと法線ベクトルとがなす角度ρを算出する。 In step S501, the calculation unit 203 acquires coordinates in a three-dimensional space of a point (measurement point) which is a target for which a BRDF is to be determined. Specifically, the coordinates of the center of gravity of the triangle to be processed are calculated using the coordinates of each vertex of the triangle as the coordinates of the measurement point. Next, S502 to S504 are looped until all image data corresponding to the measurement point to be processed are processed. In step S502, the calculating unit 203 acquires, for the n-th image data, a normal vector, a light source vector, an observation direction vector, and the coordinates of the light source 104 and the imaging device 105. Furthermore, the calculation unit 203 calculates an angle [rho n the angle theta n formed by the normal vector and the light source vector, and a half vector and the normal vector of the viewing direction vector and the light source vector eggplant.

S503において、第3取得部204は、n番目の画像データにおいて、S501において座標を取得した測定点に対応する画素値を取得する。具体的には、S502において取得した撮像装置105の座標と、S401において取得した撮像パラメータと、に基づいて、3次元空間における測定点がn番目の画像データが表す画像のどの画素位置(x、y)に映っているかを算出する。ここで算出された画素位置(x、y)の値は端数を含むため、近傍の4画素の画素値を用いた補間処理を行うことによって、画素位置(x、y)に対応する画素値を算出する。取得した画素値と、S502において算出した幾何条件(θ、ρ)と、の組み合わせのリストを生成する。尚、画像において処理対象の三角形が裏面であったり、測定点が他の部位の背後であったり、測定点が画像の外であったりする場合は、画素値を取得できないものとする。 In S503, the third acquisition unit 204 acquires, in the n-th image data, a pixel value corresponding to the measurement point whose coordinates are acquired in S501. Specifically, based on the coordinates of the imaging device 105 acquired in step S502 and the imaging parameters acquired in step S401, which pixel position (x, the image point represented by the n-th image data in the three-dimensional space represents) Calculate whether it is reflected in y). Since the value of the pixel position (x, y) calculated here includes fractions, the pixel value corresponding to the pixel position (x, y) is calculated by performing interpolation processing using the pixel values of the nearby four pixels. calculate. A list of combinations of the acquired pixel values and the geometric conditions (θ n , n n ) calculated in S502 is generated. In the image, when the triangle to be processed is the back surface, the measurement point is behind another part, or the measurement point is outside the image, it is assumed that the pixel value can not be acquired.

S504において、決定部205は、S503において生成した組み合わせのリストを参照することによって、S505の最適化処理において用いる重み係数を決定する。本実施形態においては、画素値を取得した各画像における座標に基づいて、画像の端部において0あるいは0に近い値を取り、画像の中心部において大きい値を取るように係数を算出する。一例としては、n番目の画像データにおいて画素値を取得した画素位置(x、y)を画像の幅及び高さ(W、H)により除算することによって正規化したものを(u,v)とする。この場合、n番目の画像データについての画素値と幾何条件との組み合わせに適用する重み係数kを式(2)によって算出する。 In S504, the determining unit 205 determines the weighting factor used in the optimization process of S505 by referring to the list of combinations generated in S503. In this embodiment, on the basis of the coordinates in each image from which the pixel values are acquired, the coefficient is calculated so as to take a value of 0 or a value close to 0 at the edge of the image and a large value at the center of the image. As an example, the pixel position (x, y) at which the pixel value is acquired in the n-th image data is normalized by dividing it by the width and height (W, H) of the image and (u n , v n And). In this case, to calculate the weight coefficient k n to be applied to the combination of the pixel values and the geometric conditions for the n-th image data by equation (2).

=((1−cos(2πu))*(1−cos(2πv)))0.5 ・・・式(2)
以上の重み係数の決定方法により、本実施形態における最適化処理は、複数の画素それぞれが対応する物体における位置と物体において光源からの光が正反射する位置(正反射点)との距離に応じた最適化処理になる。つまり、上述した距離が大きすぎる画素(暗すぎる画素)と上述した距離が小さすぎる画素(明るすぎる画素)は重みが小さくなる。尚、S503において画素値が取得できなかった画像データについては、画素値と幾何条件との組み合わせをS505の最適化処理において使用しないため、重み係数を0に設定する。
k n = ((1−cos (2πu n )) * (1−cos (2πv n ))) 0.5 (2)
According to the above determination method of the weighting factor, the optimization processing in the present embodiment is performed according to the distance between the position on the object corresponding to each of the plurality of pixels and the position (specular reflection point) at which light from the light source is specularly reflected Optimization process. That is, the weight is small for the pixel whose distance is too large (pixel too dark) and the pixel whose distance above is too small (pixel too bright). Note that for image data for which the pixel value can not be acquired in S503, the weight coefficient is set to 0 because the combination of the pixel value and the geometric condition is not used in the optimization process of S505.

S505において、決定部205は、各画像データから取得した画素値と幾何条件との組み合わせに基づいて、測定点におけるBRDF係数(Cd、Cs、σR、Cd、Cs、σ、Cd、Cs、σ)を決定する。本実施形態においては、BRDF係数をR、G、Bの各波長帯において独立に決定する。 In step S505, the determination unit 205 determines the BRDF coefficients (Cd R , Cs R , σ R, C d G , Cs G , σ G , etc.) at the measurement point based on the combination of the pixel value obtained from each image data and the geometric condition. Determine Cd B , Cs B , σ B ). In the present embodiment, BRDF coefficients are determined independently in each of the R, G, and B wavelength bands.

各波長帯におけるBRDFの決定は、評価関数に最小二乗法を用いた、ニュートン法等の公知の最適化アルゴリズムによって行う。例えば、Rの波長帯においては、BRDF係数(Cd、Cs、σ)を最適化対象のパラメータとし、式(3)によって表される評価関数Eを最小化するようなパラメータの組み合わせを導出する。ここで、Nは最適化処理に用いる画像データの数である。 The determination of the BRDF in each wavelength band is performed by a known optimization algorithm such as the Newton method using the least squares method as an evaluation function. For example, in the wavelength band of R , a combination of parameters such as BRDF coefficients (Cd R , Cs R , σ R ) as optimization target parameters and minimizing the evaluation function E R represented by equation (3) Derive Here, N is the number of image data used for the optimization process.

Figure 2019082955
Figure 2019082955

G、Bの波長帯についても、同様に評価関数E、Eを定義し、BRDF係数(Cd、Cs、σ)及び(Cd、Cs、σ)の最適化を行う。 Similarly, evaluation functions E G and E B are defined for G and B wavelength bands, and BRDF coefficients (Cd G , Cs G , σ G ) and (Cd B , Cs B , σ B ) are optimized. .

<第1実施形態の効果>
以上説明したように、本実施形態における画像処理装置は、画像から、光源と撮像装置と物体との位置によって決まる幾何条件が互いに異なる複数の画素の画素値を取得する。さらに、物体の表面における法線方向を表す法線情報を取得する。複数の画素の画素値のうち少なくとも2つ以上の画素値と、2つ以上の画素値それぞれに対応する幾何条件及び法線方向に基づいて算出される反射率と、を用いた処理によって、物体の対象領域における反射特性を決定する。この処理は、複数の画素が対応する対象領域の位置と物体において光源からの光が撮像装置に対して正反射する位置との距離に応じる。これにより、明るすぎて飽和した画素の画素値や暗すぎてS/N比が低下した画素の画素値以外の画素値を優先して最適化に用いることができる。したがって、物体の反射特性を高精度に取得することができる。
<Effect of First Embodiment>
As described above, the image processing apparatus according to the present embodiment acquires, from an image, pixel values of a plurality of pixels having different geometric conditions determined by the positions of the light source, the imaging device, and the object. Furthermore, normal information representing a normal direction on the surface of the object is acquired. Object by processing using at least two or more pixel values among pixel values of a plurality of pixels, and a reflectance calculated based on a geometric condition and a normal direction corresponding to each of the two or more pixel values Determine the reflection characteristics in the target area of This processing corresponds to the distance between the position of the target area corresponding to the plurality of pixels and the position at which light from the light source at the object is specularly reflected to the imaging device. As a result, it is possible to prioritize and use pixel values other than the pixel values of pixels that are too bright and saturated and pixels that are too dark and that have a low S / N ratio for optimization. Therefore, the reflection characteristic of the object can be obtained with high accuracy.

[第2実施形態]
第1実施形態においては、油彩画のような平面に近い形状の物体を被写体とし、画像における位置と幾何条件との相関関係を利用して重み係数を決定する方法について説明した。しかしながら、被写体表面の凹凸が大きい場合や、球体などの立体的な形状を有する被写体に対して反射特性の取得を行う場合、撮像時の幾何条件は被写体の形状の影響を強く受けるため、画像における位置と幾何条件との相関度合いは低下する。本実施形態においては、取得された各画素値と幾何条件との組み合わせに対し、幾何条件に基づいて重み係数を決定する例を説明する。尚、本実施形態における反射特性取得システムの構成及び画像処理装置102の論理構成は第1実施形態のものと同等であるため、説明を省略する。本実施形態と実施形態1とでは、S403のBRDF決定処理の詳細が異なるため、図12乃至図14を用いて本実施形態におけるBRDF決定処理の詳細を説明する。
Second Embodiment
In the first embodiment, a method has been described in which an object having a shape close to a flat surface such as an oil painting is used as a subject, and the weight coefficient is determined using the correlation between the position in the image and the geometric condition. However, when the surface of the subject has large irregularities, or when the reflection characteristic is obtained for a subject having a three-dimensional shape such as a sphere, the geometric conditions at the time of imaging are strongly affected by the subject's shape. The degree of correlation between the position and the geometric condition decreases. In the present embodiment, an example will be described in which a weighting factor is determined based on geometric conditions for combinations of acquired pixel values and geometric conditions. The configuration of the reflection characteristic acquisition system and the logical configuration of the image processing apparatus 102 in the present embodiment are the same as those in the first embodiment, and thus the description thereof is omitted. Since the details of the BRDF determination process in S403 are different between the present embodiment and the first embodiment, the details of the BRDF determination process in the present embodiment will be described using FIGS. 12 to 14.

<BRDF決定処理>
図12は、本実施形態におけるBRDF決定処理を示すフローチャートである。S501〜S503及びS505における処理は第1実施形態と同等であるため、説明を省略する。
<BRDF decision processing>
FIG. 12 is a flowchart showing BRDF determination processing in the present embodiment. The processes in S501 to S503 and S505 are the same as in the first embodiment, and thus the description thereof is omitted.

S1201において、算出部203は、被写体103における測定点の周辺の領域にある点(参照点)の集合を決定する。具体的には、3次元空間における測定点から所定の距離よりも近い位置にある三角形を抽出し、各三角形の重心点のリストを生成する。尚、参照点は三角形の重心点に限らず、所定の距離内の点(三角形の頂点)を全て抽出してもよい。S1202において、算出部203は、各参照点について、S502と同様に、法線ベクトルと、光源ベクトルと、観測方向ベクトルと、光源104及び撮像装置105の座標と、を取得する。S1203において、第3取得部204は、各参照点について、S503と同様に、画素値を取得する。   In step S <b> 1201, the calculation unit 203 determines a set of points (reference points) in the area around the measurement point of the subject 103. Specifically, triangles at positions closer than a predetermined distance from the measurement point in the three-dimensional space are extracted, and a list of barycentric points of each triangle is generated. The reference point is not limited to the center of gravity of the triangle, and all points within the predetermined distance (the vertices of the triangle) may be extracted. In S1202, the calculation unit 203 acquires, for each reference point, the normal vector, the light source vector, the observation direction vector, and the coordinates of the light source 104 and the imaging device 105, as in S502. In S1203, the third acquisition unit 204 acquires pixel values for each reference point, as in S503.

S1204において、決定部205は、各参照点について、取得した画素値と幾何条件ρとの組み合わせに基づいて、重み係数を決定するための関数を生成する。図13は、各参照点の画素値と幾何条件ρとの関係を示している。縦軸の65535は、16ビットで表される画素値が取りうる最大値である。縦軸のtは、最適化処理に用いる画素値に下限を設けるための閾値である。この閾値により、S/N比が低い画素が最適化処理に与える影響を低減できる。本ステップにおける処理は、まず、R、G、Bいずれかの画素値が飽和した画素が出現する最大のρの値であるρlowと、R、G、Bいずれかの画素値が閾値tを下回る最小のρの値であるρhighと、を取得する。次に、取得したρlowとρhighとに基づいて、重み係数を決定するための関数を生成する。図14は、生成した関数における、幾何条件ρと重み係数との関係を示す図である。ρmidはρlowとρhighとの中間値であり、重み係数はρlow以下とρhigh以上とにおいて0となり、ρmidにおいて1となる。また、重み係数は、ρlowからρmidまでは線形に増加し、ρmidからhighまでは線形に減少する。尚、重み係数は、ρlowからρmidまでを非線形に増加してもよいし、ρmidからρhighまでを非線形に減少してもよい。 In S1204, the determination unit 205 generates, for each reference point, a function for determining a weighting factor based on the combination of the acquired pixel value and the geometric condition ρ. FIG. 13 shows the relationship between the pixel value of each reference point and the geometric condition ρ. The vertical axis 65535 is the maximum value that the pixel value represented by 16 bits can take. The vertical axis t is a threshold for setting the lower limit to the pixel value used for the optimization process. This threshold can reduce the influence of pixels having a low S / N ratio on optimization processing. In the processing in this step, first, ρ low which is the maximum value of す at which a pixel saturated with any one of R, G and B appears, and the pixel value of any one of R, G and B have threshold t. Get 最小high which is the smallest value of 下回 below. Next, based on the obtained low low and ρ high , a function for determining a weighting factor is generated. FIG. 14 is a diagram showing the relationship between the geometric condition と and the weighting factor in the generated function. ρ mid is an intermediate value between low low and ρ high , and the weighting factor is 0 at 以下low and ρ high and at ρ mid . Also, the weighting factor increases linearly from low low to mid mid and decreases linearly from mid mid to high . The weighting factor may increase non-linearly from low low to mid mid or may decrease non-linearly from ρ mid to ρ high .

S1205において、S1204において生成した関数に基づいて、測定点における各画素値と幾何条件ρとの組み合わせについて、最適化処理の際に適用する重み係数を決定する。以上の重み係数の決定方法により、第1実施形態と同様に、本実施形態における最適化処理は、複数の画素それぞれが対応する物体における位置と物体において光源からの光が正反射する位置(正反射点)との距離に応じた最適化処理になる。   In S1205, based on the function generated in S1204, a weighting factor to be applied in the optimization process is determined for the combination of each pixel value at the measurement point and the geometric condition ρ. As in the first embodiment, the optimization process according to the present embodiment determines the position of the object corresponding to each of the plurality of pixels and the position at which the light from the light source is specularly reflected by the object. Optimization processing according to the distance to the reflection point).

<第2実施形態の効果>
以上説明したように、本実施形態における画像処理装置は、幾何条件に基づいてBRDFを決定するための最適化処理に用いる重み係数を決定する。よって、物体の表面凹凸が大きい場合や、物体が立体的な形状を有する場合であっても、物体の反射特性を高精度に取得することができる。
<Effect of Second Embodiment>
As described above, the image processing apparatus according to the present embodiment determines the weighting factor used for the optimization process for determining the BRDF based on the geometric condition. Therefore, even when the surface asperity of the object is large or when the object has a three-dimensional shape, it is possible to obtain the reflection characteristic of the object with high accuracy.

[第3実施形態]
上述した実施形態においては、法線ベクトルとして1つのポリゴンについて1つの法線ベクトルを算出する例を示した。しかし、表面に凹凸を有する物体などは、データ上において物体を構成する1つのポリゴン内においても法線方向が細かく変化するため、最適化処理によって、ポリゴン内の詳細な法線方向の変化を取得する必要がある。しかしながら、最適化処理の結果、BRDFの決定における課題において述べたような課題が法線方向についても生じる。つまり、法線ベクトルを取得する際に重み付けを行わないで最適化処理を行うと、取得精度の低下及び撮像領域に沿った段差が生じる。本実施形態においては、各ポリゴンに対応する法線ベクトルを、上述した実施形態におけるBRDFの決定処理と同様に重み付けをした最適化処理によって決定する例を説明する。尚、本実施形態における反射特性取得システムの構成は第1実施形態のものと同等であるため、説明を省略する。
Third Embodiment
In the embodiment described above, an example in which one normal vector is calculated for one polygon as the normal vector has been described. However, since the normal direction of an object with irregularities on the surface changes finely even in one polygon that constitutes the object in the data, the optimization process acquires the detailed normal direction change in the polygon There is a need to. However, as a result of the optimization process, issues as described in the issue of determination of BRDF also occur in the normal direction. That is, when the optimization process is performed without weighting when acquiring the normal vector, a decrease in acquisition accuracy and a step along the imaging region occur. In this embodiment, an example will be described in which normal vectors corresponding to each polygon are determined by optimization processing weighted similarly to the determination processing of BRDF in the above-described embodiment. The configuration of the reflection characteristic acquisition system according to this embodiment is the same as that of the first embodiment, and thus the description thereof is omitted.

<画像処理装置の論理構成>
図2(b)は、画像処理装置102の論理構成を示すブロック図である。画像処理装置102は、第1取得部201と、第2取得部202と、算出部203と、第3取得部204と、決定部205と、出力部206と、設定部207と、を有する。第1取得部201と、第2取得部202と、算出部203と、第3取得部204と、出力部206と、は上述した実施形態と同等の処理を行うため説明を省略する。設定部207は、公知のテクスチャマッピングに基づいて、形状データが表す3次元形状の表面に貼り付けるテクスチャを表す画像(以下、テクスチャ画像と呼ぶ)上の座標と形状データにおける座標との対応付けを決定する。具体的には、形状データが表す3次元形状を構成する三角形の各頂点がテクスチャ画像上のどの座標に対応するかを設定する。ここで、テクスチャ画像上の座標は、画像の幅および高さによって正規化された0.0〜1.0の値として設定され、テクスチャ画像の縦横の画素数は任意の値を取り得る。三角形内部の座標は、テクスチャ画像上に投影された対応する三角形の内部の座標として、各頂点からの距離に応じて同様に対応付けられる。形状データとしてハイトフィールドデータを用いる場合は、ハイトフィールドデータの縦横をそのままテクスチャ画像の縦横に対応させれば良い。決定部205は、BRDFの係数に加えて、法線ベクトルを最適化処理によって決定する。法線ベクトルの最適化は、算出部203において算出された法線ベクトルを初期値として行う。
<Logical Configuration of Image Processing Device>
FIG. 2B is a block diagram showing the logical configuration of the image processing apparatus 102. The image processing apparatus 102 includes a first acquisition unit 201, a second acquisition unit 202, a calculation unit 203, a third acquisition unit 204, a determination unit 205, an output unit 206, and a setting unit 207. The first acquisition unit 201, the second acquisition unit 202, the calculation unit 203, the third acquisition unit 204, and the output unit 206 perform the same processing as the above-described embodiment, and thus the description thereof is omitted. The setting unit 207 associates the coordinates in the image (hereinafter referred to as a texture image) with the coordinates in the shape data representing the texture to be attached to the surface of the three-dimensional shape represented by the shape data based on known texture mapping. decide. Specifically, it is set which coordinate on the texture image corresponds to each vertex of a triangle forming a three-dimensional shape represented by the shape data. Here, the coordinates on the texture image are set as values of 0.0 to 1.0 normalized by the width and height of the image, and the number of vertical and horizontal pixels of the texture image may take any value. The coordinates inside the triangle are similarly mapped according to the distance from each vertex as the coordinates inside the corresponding triangle projected onto the texture image. When height field data is used as shape data, the height and width of the height field data may be made to correspond to those of the texture image as it is. In addition to the coefficients of the BRDF, the determination unit 205 determines a normal vector by optimization processing. Optimization of the normal vector is performed using the normal vector calculated by the calculation unit 203 as an initial value.

<画像処理装置が実行する処理>
次に、画像処理装置102が実行する処理について図4(b)及び図5(b)を参照して説明する。図4(b)は、画像処理装置102が実行する処理のフローチャートである。尚、S401、S402は実施形態1と同等の処理のため、説明を省略する。
<Process Performed by Image Processing Device>
Next, processing executed by the image processing apparatus 102 will be described with reference to FIGS. 4 (b) and 5 (b). FIG. 4B is a flowchart of processing executed by the image processing apparatus 102. In addition, since S401 and S402 are the processes equivalent to Embodiment 1, description is abbreviate | omitted.

S601において、設定部207は、ポリゴンメッシュモデルに対応したテクスチャ画像上の座標と、各三角形の頂点の座標と、の対応を決定する。本実施形態におけるテクスチャ画像の解像度は4096画素×4096画素とするが、取得したいBRDFの情報に応じて異なる解像度としてもよい。S602において、算出部203、第3取得部204、決定部205は、テクスチャ画像の各画素についてBRDF及び法線ベクトル決定処理を行う。BRDF及び法線ベクトル決定処理との詳細については後述する。尚、S602は、テクスチャ画像の各画素について処理するまでループする。S603において、出力部206は、ポリゴンメッシュモデルに、テクスチャ画像としてBRDF係数及び法線ベクトルの情報を付加した出力用データを生成し、出力用データをHDD110に出力する。   In step S601, the setting unit 207 determines the correspondence between the coordinates on the texture image corresponding to the polygon mesh model and the coordinates of the vertex of each triangle. Although the resolution of the texture image in the present embodiment is 4096 pixels × 4096 pixels, the resolution may be different depending on information of BRDF to be acquired. In step S602, the calculation unit 203, the third acquisition unit 204, and the determination unit 205 perform BRDF and normal vector determination processing on each pixel of the texture image. Details of the BRDF and normal vector determination processing will be described later. Note that S602 loops until each pixel of the texture image is processed. In step S603, the output unit 206 generates output data obtained by adding information of BRDF coefficients and normal vectors as texture images to the polygon mesh model, and outputs the output data to the HDD 110.

<BRDF及び法線ベクトル決定処理>
以下、S602において実行されるBRDF及び法線ベクトル決定処理を詳細に説明する。図5(b)は、本実施形態におけるBRDF及び法線ベクトル決定処理を示すフローチャートである。尚、S502乃至S505は実施形態1と同等の処理のため、説明を省略する。
<BRDF and Normal Vector Determination Processing>
The BRDF and normal vector determination process executed in S602 will be described in detail below. FIG. 5B is a flowchart showing BRDF and normal vector determination processing in the present embodiment. In addition, since S502 to S505 are the same processes as the first embodiment, the description will be omitted.

S701において、算出部203は、BRDFを決定する対象となる点(測定点)の3次元空間における座標を取得する。具体的には、まず、処理対象となっているテクスチャ画像上の画素に対応するポリゴンメッシュモデルの三角形を抽出する。抽出した三角形の各頂点の座標及びテクスチャ画像上の座標に基づいた補間演算によって、処理対象となっているテクスチャ画像上の画素に対応する形状データ上の座標を算出する。   In step S701, the calculation unit 203 acquires coordinates in a three-dimensional space of a point (measurement point) which is a target for which a BRDF is to be determined. Specifically, first, triangles of the polygon mesh model corresponding to the pixels on the texture image to be processed are extracted. Coordinates on shape data corresponding to pixels on the texture image to be processed are calculated by interpolation calculation based on the coordinates of each vertex of the extracted triangle and the coordinates on the texture image.

S702において、決定部205は、各画像データから取得した画素値と幾何条件との組み合わせに基づいて、測定点におけるBRDF係数(Cd、Cs、σR、Cd、Cs、σ、Cd、Cs、σ)及び法線ベクトルを決定する。 In S702, the determination unit 205 determines the BRDF coefficients (Cd R , Cs R , σ R, C d G , Cs G , σ G , etc.) at the measurement point based on the combination of the pixel value obtained from each image data and the geometric condition. Determine Cd B , Cs B , σ B ) and normal vectors.

BRDF及び法線ベクトルの決定は、評価関数に最小二乗法を用いた、ニュートン法等の公知の最適化アルゴリズムによって行う。最適化処理は、BRDF係数及び法線ベクトル(単位ベクトルであるため回転角と仰角との2自由度)を最適化対象のパラメータとし、式(4)によって表される評価関数ERGBを最小化するようなパラメータの組み合わせを導出する処理である。ここで、Nは最適化処理に用いる画像データの数である。また、θは法線ベクトルと光源ベクトルとがなす角度であり、ρは観測方向ベクトルと光源ベクトルとのハーフベクトルと、法線ベクトルと、がなす角度である。パラメータとしての法線ベクトルの変動に伴ってθ、ρも変動する。 The determination of the BRDF and the normal vector is performed by a known optimization algorithm such as the Newton method using the least squares method for the evaluation function. The optimization process takes BRDF coefficients and a normal vector (two degrees of freedom between the rotation angle and the elevation angle because it is a unit vector) as parameters to be optimized, and minimizes the evaluation function E RGB represented by equation (4) It is a process which derives the combination of such parameters. Here, N is the number of image data used for the optimization process. Further, θ n is an angle formed by the normal vector and the light source vector, and n n is an angle formed by the half vector of the observation direction vector and the light source vector and the normal vector. The θ n and n n also change with the change of the normal vector as a parameter.

Figure 2019082955
Figure 2019082955

<第3実施形態の効果>
以上説明したように、本実施形態における画像処理装置は、重み付け係数を用いた最適化処理によって、反射特性及び法線方向を決定する。これにより、明るすぎて飽和した画素や暗すぎてノイズの影響が大きい画素の重みを小さくした状態で最適化処理を行うことができるため、物体の反射特性を高精度に取得することができる。また、法線方向についても同様の最適化処理を行うため、物体の詳細な表面形状(凹凸や傾き)を高精度に取得することができる。
<Effect of Third Embodiment>
As described above, the image processing apparatus according to the present embodiment determines the reflection characteristic and the normal direction by the optimization process using the weighting factor. As a result, the optimization processing can be performed in a state where the weight of a pixel which is too bright and saturated and a pixel which is too dark and which is largely affected by noise can be reduced, so that the reflection characteristic of the object can be obtained with high accuracy. In addition, since similar optimization processing is performed also in the normal direction, the detailed surface shape (concave and convex and inclined) of the object can be acquired with high accuracy.

[変形例]
第1実施形態においては、撮像画像における位置に基づいて最適化処理に用いる重み係数を決定し、第2実施形態においては、周辺領域を含む幾何条件の分布に基づいて最適化処理に用いる重み係数を決定した。しかし、重み係数の決定方法は上記の例に限定されず、例えば、上述した2つの実施形態における重み係数の決定方法を組み合わせても良い。例えば、上述した2つの実施形態におけるそれぞれの方法によって決定した重み係数を乗算し、乗算によって得られた値を重み係数として用いてもよい。
[Modification]
In the first embodiment, the weight coefficient used for the optimization process is determined based on the position in the captured image, and in the second embodiment, the weight coefficient used for the optimization process based on the distribution of geometric conditions including the peripheral region. It was determined. However, the method of determining the weighting factor is not limited to the above example, and for example, the methods of determining the weighting factor in the two embodiments described above may be combined. For example, weighting factors determined by respective methods in the two embodiments described above may be multiplied, and values obtained by the multiplication may be used as weighting factors.

また、第1実施形態においては、正反射点が撮像領域の外部にある場合の例を説明したが、正反射点が撮像領域の内部にあってもよい。この場合は、画像における正反射点の位置において0あるいは0に近い値を取り、画像における位置が正反射点から離れるにつれて大きい値を取るように係数を算出する。具体的には、第1実施形態の方法や第2実施形態の方法、もしくは上述したような2つの方法の組み合わせによって係数を算出すればよい。画像における正反射点の位置は、例えば、幾何条件に基づいて決定してもよいし、画像の輝度値(明るさ)に基づいて決定してもよい。   In the first embodiment, an example in which the regular reflection point is outside the imaging area has been described, but the regular reflection point may be inside the imaging area. In this case, the coefficient is calculated so that the position of the regular reflection point in the image takes a value of 0 or a value close to 0, and the position in the image takes a larger value as it goes away from the regular reflection point. Specifically, the coefficients may be calculated by the method of the first embodiment or the method of the second embodiment, or a combination of the two methods as described above. The position of the specular reflection point in the image may be determined based on, for example, geometric conditions, or may be determined based on the luminance value (brightness) of the image.

また、第3実施形態においては、BRDFと法線ベクトルとの両方を最適化処理によって決定したが、どちらか一方を最適化処理によって決定してもよい。例えば、BRDFの係数を所定の値に予め決めておき、法線ベクトルのみを最適化してもよい。   Also, in the third embodiment, both the BRDF and the normal vector are determined by the optimization process, but either one may be determined by the optimization process. For example, coefficients of BRDF may be determined in advance to predetermined values, and only normal vectors may be optimized.

また、上述した実施形態においては、可動ステージに固定された1台の撮像装置を用いて物体を撮像したが、撮像装置や光源の数や配置は上記一例に限定されない。例えば、R、G、B以外の可視光の波長帯を撮像することが可能なカメラや赤外線カメラ等を追加してもよい。   In the embodiment described above, an object is imaged using one imaging device fixed to a movable stage, but the number and arrangement of imaging devices and light sources are not limited to the above-described example. For example, a camera, an infrared camera, or the like capable of imaging a wavelength band of visible light other than R, G, and B may be added.

また、上述した実施形態においては、物体を構成する各三角形やテクスチャ画像の各画素について独立にBRDFを決定した。一方で、物体上の一定の領域が同一の材質であるなど、同一のBRDFを有するとみなせる場合は、その領域の複数の測定点に対応する各画像データから取得した画素値と幾何条件との組み合わせに基づいて、領域単位でBRDFを決定してもよい。この場合、式(3)及び式(4)のNは、複数の測定点にまたがる画素値と幾何条件との組み合わせの総数である。このような場合、上述した実施形態の方法より少ない数の画像データあるいは1つの画像データに基づいて、BRDFを決定することができる。例えば、物体のすべての領域が均一の材質から成る場合、1視点のみからの撮像を行って得られた画像データのうち物体を含む全ての画素について画素値及び幾何条件の取得を行い、式(3)の評価関数に基づくBRDF係数の最適化を行っても良い。この場合、式(3)のNは物体を含む画素数である。   Further, in the above-described embodiment, BRDFs are determined independently for each pixel of each triangle or texture image that constitutes an object. On the other hand, when it can be regarded as having the same BRDF, for example, a certain area on the object is made of the same material, the pixel value obtained from each image data corresponding to a plurality of measurement points of that area and the geometric condition The BRDF may be determined on an area basis based on the combination. In this case, N in Equation (3) and Equation (4) is the total number of combinations of pixel values and geometric conditions spanning a plurality of measurement points. In such a case, the BRDF can be determined based on a smaller number of image data or one image data than the method of the above-described embodiment. For example, when all regions of an object are made of a uniform material, pixel values and geometric conditions are acquired for all pixels including the object in image data obtained by performing imaging from only one viewpoint, and The BRDF coefficients may be optimized based on the evaluation function of 3). In this case, N in equation (3) is the number of pixels including an object.

また、上述した実施形態においては、画像データから取得した画素値全てを用いて最適化処理を行ったが、全ての画素値を最適化処理に用いる必要はなく、少なくとも2つ以上の画素値を最適化処理に用いればよい。例えば、取得した画素値のうち信頼度の高い画素の画素値を最適化処理に用いるようにしてもよい。明るすぎて飽和した画素や暗すぎてS/N比が低下した画素を信頼度の低い画素とし、それら以外の画素を信頼度の高い画素とする。具体的には、例えば、上述した65535を上限の閾値とし、ユーザが入力する値を下限の閾値とし、閾値を用いた画素値に対する信頼度の判定を行うことによって、上限の閾値以下、かつ、下限の閾値より大きい画素値を信頼度の高い画素値とする。   In the embodiment described above, optimization processing is performed using all pixel values acquired from image data, but it is not necessary to use all pixel values for optimization processing, and at least two or more pixel values may be used. It may be used for optimization processing. For example, among the acquired pixel values, pixel values of pixels with high reliability may be used for the optimization process. A pixel that is too bright and saturated or a pixel that is too dark and that has a low S / N ratio is regarded as a pixel with low reliability, and the other pixels are regarded as pixels with high reliability. Specifically, for example, the above-described 65535 is set as the upper limit threshold, the value input by the user is set as the lower limit threshold, and determination of the reliability of the pixel value using the threshold is performed. Pixel values larger than the lower limit threshold value are set as pixel values with high reliability.

また、上述した実施形態においては、鏡面反射係数と拡散反射係数とを最適化したが、拡散反射係数の最適化を行わずに鏡面反射係数の最適化を行ってもよい。この場合、例えば、偏光板などを用いた撮像によって得られた画像データを用いて拡散反射成分を予め取り除いておけばよい。   Although the specular reflection coefficient and the diffuse reflection coefficient are optimized in the above-described embodiment, the specular reflection coefficient may be optimized without optimizing the diffuse reflection coefficient. In this case, for example, the diffuse reflection component may be removed in advance using image data obtained by imaging using a polarizing plate or the like.

また、上述した実施形態においては、BRDF係数をR、G、Bの各波長帯において決定したが、画像データの画素値(R値、G値、B値)に基づいて以下の式(5)により輝度値Yを算出し、輝度についてBRDF係数を決定してもよい。この場合、各波長帯においてBRDF係数を決定する必要がないため、処理にかかる時間やデータ量を削減することができる。   In the above-described embodiment, the BRDF coefficients are determined for each of the R, G, and B wavelength bands, but based on the pixel values (R value, G value, B value) of the image data, the following formula (5) The luminance value Y may be calculated by using the above equation to determine the BRDF coefficient for the luminance. In this case, since it is not necessary to determine the BRDF coefficients in each wavelength band, it is possible to reduce the processing time and data amount.

Y=0.2126×R+0.7152×G+0.0722×B ・・・式(5)
また、上述した実施形態においては、形状データにおいて、物体の表面形状を三角形の集合を用いて表現したが、表面形状を表すために四角形などの三角形以外のポリゴンを用いてもよい。
Y = 0.2126 × R + 0.7152 × G + 0.0722 × B (5)
Further, in the above-described embodiment, in the shape data, the surface shape of the object is expressed using a set of triangles, but polygons other than triangles such as quadrilateral may be used to represent the surface shape.

また、上述した実施形態においては、画像データの画素値をR値、G値、B値としたが、L空間上で定義されるL値、a値、b値といった他の形式の値であってもよい。 In the above embodiment, the pixel values of the image data are R value, G value, and B value, but L * value, a * value, b * value defined in L * a * b * space It may be another type of value such as.

また、上述した実施形態における出力部206は、出力用データをHDD110に出力したが、出力用データの出力先はHDD110に限らない。例えば、決定されたBRDFを有する物体をディスプレイ上に表示するために、ディスプレイに出力用データを出力してもよい。また、決定されたBRDFを有する物体をプリンタを用いて再現するために、3次元形状を有する物体を形成可能なインクジェットプリンタや3Dプリンタなどに出力用データを出力してもよい。   Further, although the output unit 206 in the above-described embodiment outputs the output data to the HDD 110, the output destination of the output data is not limited to the HDD 110. For example, data for output may be output to the display to display an object having the determined BRDF on the display. Further, in order to reproduce the object having the determined BRDF using a printer, the output data may be output to an inkjet printer, a 3D printer or the like capable of forming an object having a three-dimensional shape.

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

102 画像処理装置
202 第2取得部
204 第3取得部
205 決定部
102 image processing apparatus 202 second acquisition unit 204 third acquisition unit 205 determination unit

Claims (21)

光源を用いて照明した物体を撮像装置が撮像することによって得られた画像を用いて前記物体の対象領域における反射特性を決定するための画像処理装置であって、
前記画像から、前記光源と前記撮像装置と前記対象領域との位置によって決まる幾何条件が互いに異なる複数の画素の画素値を取得する第1取得手段と、
前記対象領域の表面における法線方向を表す法線情報を取得する第2取得手段と、
前記複数の画素の画素値のうち少なくとも2つ以上の画素値と、前記2つ以上の画素値それぞれに対応する前記幾何条件及び前記法線方向に基づいて算出される反射率と、を用いた処理によって、前記対象領域における反射特性を決定する決定手段と、を有し、
前記処理は、前記複数の画素が対応する前記対象領域の位置と前記物体において前記光源からの光が前記撮像装置に対して正反射する位置との距離に応じることを特徴とする画像処理装置。
An image processing apparatus for determining a reflection characteristic of a target region of an object using an image obtained by an imaging device imaging an object illuminated using a light source,
A first acquisition unit configured to acquire pixel values of a plurality of pixels having different geometric conditions determined by the positions of the light source, the imaging device, and the target area from the image;
A second acquisition unit configured to acquire normal information representing a normal direction on the surface of the target area;
At least two or more pixel values among the pixel values of the plurality of pixels, and the reflectance calculated based on the geometric condition and the normal direction corresponding to each of the two or more pixel values Determining means for determining reflection characteristics in the target area by processing;
The image processing apparatus according to claim 1, wherein the processing is performed according to a distance between a position of the target area corresponding to the plurality of pixels and a position where light from the light source specularly reflects the imaging device in the object.
前記決定手段は、前記複数の画素の画素値のうち少なくとも2つ以上の画素値と、前記2つ以上の画素値それぞれに対応する前記幾何条件及び前記法線方向に基づいて算出される反射率と、の各差分の和を小さくするように、前記対象領域における反射特性を決定するための反射特性パラメータの最適化を行うことによって、前記対象領域における反射特性を決定し、
前記最適化は、前記複数の画素が対応する前記対象領域の位置と前記物体において前記光源からの光が前記撮像装置に対して正反射する位置との距離に応じることを特徴とする請求項1に記載の画像処理装置。
The determination unit may calculate the reflectance based on the geometric condition and the normal direction corresponding to at least two or more pixel values among the pixel values of the plurality of pixels and the two or more pixel values. The reflection characteristic in the target region is determined by optimizing the reflection characteristic parameter for determining the reflection characteristic in the target region so as to reduce the sum of the differences of and.
The optimization is performed according to a distance between a position of the target area corresponding to the plurality of pixels and a position where light from the light source is specularly reflected on the imaging device at the object. The image processing apparatus according to claim 1.
前記和は、前記差分それぞれに重み付け係数を用いた重み付けを行うことによって算出される重み付け和であることを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the sum is a weighted sum calculated by weighting each of the differences using a weighting factor. 前記決定手段は、前記対象領域に対応する前記画像における位置に基づいて、前記重み係数を決定することを特徴とする請求項3に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the determination unit determines the weighting factor based on a position in the image corresponding to the target area. 前記決定手段は、前記正反射する位置が前記画像の外部にある幾何条件において撮像を行う場合に、前記画像の端部における前記重み係数が前記画像の中心部における前記重み係数より低くなるように前記重み係数を決定することを特徴とする請求項4に記載の画像処理装置。   The determination means is configured such that the weighting factor at the end of the image is lower than the weighting factor at the central part of the image when imaging is performed under a geometric condition in which the position where the specular reflection occurs is outside the image. The image processing apparatus according to claim 4, wherein the weight coefficient is determined. 前記決定手段は、前記画像において最も輝度が高い第1領域と、前記画像において最も輝度が低い第2領域と、前記第1領域より輝度が低く前記第2領域より輝度が高い第3領域と、を含む前記画像において、前記第1領域及び前記第2領域よりも前記第3領域に対応する重みが大きくなるように前記重み係数を決定することを特徴とする請求項3に記載の画像処理装置。   The determination means includes a first area having the highest luminance in the image, a second area having the lowest luminance in the image, and a third area having a lower luminance than the first area and a luminance higher than the second area. 4. The image processing apparatus according to claim 3, wherein the weight coefficient is determined such that a weight corresponding to the third region is larger than the first region and the second region in the image including . 前記決定手段は、前記幾何条件に基づいて、前記重み係数を決定することを特徴とする請求項3に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the determination unit determines the weight coefficient based on the geometric condition. 前記物体から前記光源への方向を表す第1ベクトルと前記物体から前記撮像装置への方向を表す第2ベクトルとのハーフベクトルと、前記法線方向を表す第3ベクトルと、がなす第1角度を算出する算出手段をさらに有し、
前記決定手段は、前記対象領域に対応する撮像の前記第1角度に基づいて、前記重み係数を決定することを特徴とする請求項7に記載の画像処理装置。
A first angle formed by a half vector of a first vector representing the direction from the object to the light source, and a half vector of a second vector representing the direction from the object to the imaging device, and a third vector representing the normal direction And calculating means for calculating
The image processing apparatus according to claim 7, wherein the determination unit determines the weighting factor based on the first angle of imaging corresponding to the target area.
第1閾値以下である画素値に対応する前記第1角度のうち最も小さい第2角度と、前記画像における最大の画素値に対応する前記第1角度のうち最も大きい第3角度と、に基づいて、前記重み係数を決定することを特徴とする請求項8に記載の画像処理装置。   Based on the smallest second angle among the first angles corresponding to pixel values less than or equal to a first threshold and the largest third angle among the first angles corresponding to the largest pixel value in the image The image processing apparatus according to claim 8, wherein the weight coefficient is determined. 前記第1角度のうち前記第2角度と前記第3角度との中間の第5角度に対応する画素の重みが前記第2角度及び前記第3角度に対応する画素の重みより大きくなるように、前記重み係数を決定することを特徴とする請求項9に記載の画像処理装置   In the first angle, the weight of the pixel corresponding to the fifth angle between the second angle and the third angle is larger than the weight of the pixels corresponding to the second angle and the third angle. 10. The image processing apparatus according to claim 9, wherein the weight coefficient is determined. 前記重み係数は、最も低い値が0又は0に近い値となることを特徴とする請求項3乃至請求項10のいずれか一項に記載の画像処理装置。   The image processing apparatus according to any one of claims 3 to 10, wherein the weighting factor is such that the lowest value is 0 or a value close to 0. 前記決定手段は、前記第1取得手段が取得した前記複数の画素の画素値から、前記複数の画素の各画素値の信頼度に基づいて、前記処理に用いる前記少なくとも2つ以上の画素値を決定することを特徴とする請求項1乃至請求項11のいずれか一項に記載の画像処理装置。   The determination means uses the pixel values of the plurality of pixels acquired by the first acquisition means, based on the reliability of each pixel value of the plurality of pixels, for the at least two or more pixel values used in the process. The image processing apparatus according to any one of claims 1 to 11, wherein the image processing apparatus determines the image. 前記決定手段は、前記複数の画素の画素値のうち、前記第1閾値以下であり、かつ、前記第1閾値より小さい第2閾値より大きい画素値を前記少なくとも2つ以上の画素値として決定することを特徴とする請求項12に記載の画像処理装置。   The determination means determines, as the at least two or more pixel values, pixel values which are equal to or less than the first threshold and greater than a second threshold smaller than the first threshold among pixel values of the plurality of pixels. The image processing apparatus according to claim 12, characterized in that: 前記第1取得手段は、前記撮像装置が撮像することによって得られた複数の画像から、前記複数の画素の画素値を取得することを特徴とする請求項1乃至請求項13のいずれか一項に記載の画像処理装置。   14. The image processing apparatus according to claim 1, wherein the first acquisition unit acquires pixel values of the plurality of pixels from a plurality of images acquired by imaging by the imaging device. The image processing apparatus according to claim 1. 前記撮像装置が撮像することによって得られた1つの画像から、前記複数の画素の画素値を取得することを特徴とする請求項1乃至請求項13のいずれか一項に記載の画像処理装置。   The image processing apparatus according to any one of claims 1 to 13, wherein pixel values of the plurality of pixels are acquired from one image obtained by imaging by the imaging device. 前記第2取得手段は、前記物体の形状を表す形状データを取得し、前記形状データに基づいて前記法線情報を算出することを特徴とする請求項1乃至請求項15のいずれか一項に記載の画像処理装置。   The second acquisition means acquires shape data representing the shape of the object, and calculates the normal line information based on the shape data. Image processing apparatus as described. 前記形状データは、前記物体の3次元形状を、ポリゴンを用いたモデルによって表すデータであることを特徴とする請求項16に記載の画像処理装置。   The image processing apparatus according to claim 16, wherein the shape data is data representing a three-dimensional shape of the object by a model using a polygon. 前記形状データは、前記物体の3次元形状を、前記物体の表面の高さ分布によって表すデータであることを特徴とする請求項16に記載の画像処理装置。   The image processing apparatus according to claim 16, wherein the shape data is data representing a three-dimensional shape of the object by a height distribution of a surface of the object. 前記決定手段は、前記対象領域における反射特性に加えて、前記法線情報が表す法線方向を初期値とした前記最適化によって前記対象領域の表面における法線方向を決定することを特徴とする請求項2乃至請求項18のいずれか一項に記載の画像処理装置。   The determining means determines the normal direction on the surface of the target area by the optimization with the normal direction represented by the normal information as an initial value, in addition to the reflection characteristic in the target area. An image processing apparatus according to any one of claims 2 to 18. コンピュータを請求項1乃至請求項19のいずれか一項に記載の画像処理装置の各手段として機能させるためのプログラム。   The program for functioning a computer as each means of the image processing apparatus as described in any one of Claims 1-19. 光源を用いて照明した物体を撮像装置が撮像することによって得られた画像を用いて前記物体の対象領域における反射特性を決定するための画像処理方法であって、
前記画像から、前記光源と前記撮像装置と前記対象領域との位置によって決まる幾何条件が互いに異なる複数の画素の画素値を取得する第1取得ステップと、
前記対象領域の表面における法線方向を表す法線情報を取得する第2取得ステップと、
前記複数の画素の画素値のうち少なくとも2つ以上の画素値と、前記2つ以上の画素値それぞれに対応する前記幾何条件及び前記法線方向に基づいて算出される反射率と、を用いた処理によって、前記対象領域における反射特性を決定する決定ステップと、を有し、
前記処理は、前記複数の画素が対応する前記対象領域の位置と前記物体において前記光源からの光が前記撮像装置に対して正反射する位置との距離に応じることを特徴とする画像処理方法。
An image processing method for determining a reflection characteristic of a target area of an object using an image obtained by an imaging device imaging an object illuminated using a light source,
A first acquisition step of acquiring, from the image, pixel values of a plurality of pixels whose geometric conditions determined by the positions of the light source, the imaging device, and the target area are different from each other;
A second acquisition step of acquiring normal information representing a normal direction on the surface of the target area;
At least two or more pixel values among the pixel values of the plurality of pixels, and the reflectance calculated based on the geometric condition and the normal direction corresponding to each of the two or more pixel values Determining, by processing, a reflection characteristic in the region of interest.
The image processing method according to claim 1, wherein the processing is performed according to a distance between a position of the target area corresponding to the plurality of pixels and a position where light from the light source specularly reflects the imaging device in the object.
JP2017211163A 2017-10-31 2017-10-31 Image processing apparatus, image processing method and program Pending JP2019082955A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017211163A JP2019082955A (en) 2017-10-31 2017-10-31 Image processing apparatus, image processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017211163A JP2019082955A (en) 2017-10-31 2017-10-31 Image processing apparatus, image processing method and program

Publications (1)

Publication Number Publication Date
JP2019082955A true JP2019082955A (en) 2019-05-30

Family

ID=66670454

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017211163A Pending JP2019082955A (en) 2017-10-31 2017-10-31 Image processing apparatus, image processing method and program

Country Status (1)

Country Link
JP (1) JP2019082955A (en)

Similar Documents

Publication Publication Date Title
US11869139B2 (en) System and method for three-dimensional scanning and for capturing a bidirectional reflectance distribution function
JP6363863B2 (en) Information processing apparatus and information processing method
JP6506507B2 (en) Measurement apparatus and control method thereof
JP4435865B2 (en) Image processing apparatus, image division program, and image composition method
US7200262B2 (en) 3-dimensional image processing method, 3-dimensional image processing device, and 3-dimensional image processing system
Přibyl et al. Feature point detection under extreme lighting conditions
JP6869652B2 (en) Image processing device, imaging device, image processing method, image processing program, and storage medium
US10863082B2 (en) Image processing apparatus, image processing method, and storage medium
JP5762015B2 (en) Image processing apparatus, image processing method, and program
JP6575999B2 (en) Lighting information acquisition device, lighting restoration device, and programs thereof
JP6580761B1 (en) Depth acquisition apparatus and method using polarization stereo camera
JP2018009927A (en) Image processing device, image processing method and program
JP6425406B2 (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM
JP2020512536A (en) System and method for 3D profile determination using model-based peak selection
JP2023157018A (en) Detection device, information processing device, detection method, detection program, and detection system
JP2009236696A (en) Three-dimensional image measurement method, measurement system, and measurement program for subject
JP4764963B2 (en) Image processing device
JP2019082955A (en) Image processing apparatus, image processing method and program
JP6745936B2 (en) Measuring device and control method thereof
JP2018077168A (en) Simulator, simulation method and simulation program
JP2022028344A (en) Control unit, control method, and program
JP2020106502A (en) Shape measuring device, control method, and program
JP2021004762A (en) Measurement device, imaging device, measurement system, control method, program and recording medium
JP2017037004A (en) Information processing device, information processing method and program
JP2021183918A (en) Control device, control method, and program