JP2008090590A - Method and device for image conversion to regular image - Google Patents

Method and device for image conversion to regular image Download PDF

Info

Publication number
JP2008090590A
JP2008090590A JP2006270645A JP2006270645A JP2008090590A JP 2008090590 A JP2008090590 A JP 2008090590A JP 2006270645 A JP2006270645 A JP 2006270645A JP 2006270645 A JP2006270645 A JP 2006270645A JP 2008090590 A JP2008090590 A JP 2008090590A
Authority
JP
Japan
Prior art keywords
image
pixel
pixel value
regular
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.)
Granted
Application number
JP2006270645A
Other languages
Japanese (ja)
Other versions
JP4888023B2 (en
Inventor
Kazuo Matsufuji
和夫 松藤
Naoki Kawai
直樹 河合
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2006270645A priority Critical patent/JP4888023B2/en
Publication of JP2008090590A publication Critical patent/JP2008090590A/en
Application granted granted Critical
Publication of JP4888023B2 publication Critical patent/JP4888023B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

<P>PROBLEM TO BE SOLVED: To accurately convert a photographic image taken from an angle to an overhead regular image. <P>SOLUTION: An image input part 110 inputs the photographic image obtained by photograhing an object placed within a rectangular reference frame 35 on a stage 30 from an angle by a camera 60 as image data on an xy coordinate. A linear graph calculation part 120 converts positions (x, y) of individual pixels on the xy coordinate to a linear graph μ on a Hough transform ξρ coordinate using angle ξ and distance ρ, and a pixel value integration part 130 integrates, to each pixel located on the linear graph μ on the ξρ coordinate, the pixel value of the corresponding pixel on the xy coordinate. On the other hand, the position of the reference frame 35 on the xy coordinate is predicted based on a geographic photographing condition, and each side thereof is plotted on the ξρ coordinate. An actual accurate position of the reference frame 35 on the xy coordinate is determined from positions of pixels having the maximum pixel values of pixels near the plotted points, whereby the conversion to regular image is performed. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、被写体を斜め方向から撮影することにより得られた撮影画像を、真上から見た状態の正則画像に変換する画像変換の技術に関し、特に、レンダリング用の高次元テクスチャデータ(反射特性データ)を作成する際に利用可能な画像変換技術に関する。   The present invention relates to an image conversion technique for converting a photographed image obtained by photographing a subject from an oblique direction into a regular image viewed from directly above, and in particular, high-dimensional texture data (reflection characteristics) for rendering. The present invention relates to an image conversion technique that can be used when creating data.

コンピュータの性能向上により、産業界の様々な分野でCG画像が利用されるようになってきている。たとえば、建築物、家具、自動車などの設計段階では、通常、多くのCG画像が利用されている。また、コンピュータを利用した製品のプレゼンテーションや映画などの種々の映像表現においても、物品の様々なCG画像が不可欠である。更に、最近では、商品カタログなどにも、実際の商品写真の代わりに、CG画像が利用される例も少なくない。   Due to the improvement in computer performance, CG images are being used in various fields of industry. For example, in the design stage of buildings, furniture, automobiles, etc., many CG images are usually used. Also, various CG images of articles are indispensable for various video expressions such as product presentations and movies using computers. Furthermore, recently, there are many examples in which CG images are used instead of actual product photos in product catalogs and the like.

建築物、家具、自動車の内装部品などの物品データは、仮想物体の三次元データであるのに対して、提示用のCG画像は、通常、二次元画像として用意される。したがって、三次元の物品データを利用してCG画像を作成する際には、コンピュータ内に仮想物体の三次元データを取り込み、照明条件、視点位置、投影平面を設定した上で、三次元の仮想物体の二次元投影像を投影平面上に得るためのレンダリング処理が行われる。この処理は、基本的には、照明条件で定められた光源からの照明光が仮想物体の各部で反射して視点位置へ向かう現象をコンピュータ上でシミュレートするものであり、視点位置へ向かう反射光の強度を演算する処理ということができる。   Article data such as buildings, furniture, and automobile interior parts is three-dimensional data of a virtual object, whereas a CG image for presentation is usually prepared as a two-dimensional image. Therefore, when creating a CG image using 3D article data, the 3D data of the virtual object is taken into the computer, the illumination conditions, the viewpoint position, and the projection plane are set, and then the 3D virtual A rendering process for obtaining a two-dimensional projection image of the object on the projection plane is performed. This process basically simulates the phenomenon in which the illumination light from the light source determined by the illumination conditions is reflected at each part of the virtual object and travels to the viewpoint position on the computer. It can be said that the light intensity is calculated.

また、仮想物体の表面に何らかの絵柄や模様を張り付けた表現を行いたい場合には、予め二次元のテクスチャデータを用意しておき、レンダリング時に、このテクスチャデータを物体データの表面にマッピングする処理が行われる。テクスチャデータは、基本的には、反射特性の分布を示す反射特性データであり、形式的には二次元の画像データとして与えられる。これを仮想物体の表面にマッピングすることにより、反射特性が部分ごとに異なる性質をもった物体を表現することが可能になる。   Also, if you want to create an expression with a pattern or pattern pasted on the surface of a virtual object, you need to prepare two-dimensional texture data in advance and map this texture data to the surface of the object data during rendering. Done. The texture data is basically reflection characteristic data indicating a distribution of reflection characteristics, and is formally given as two-dimensional image data. By mapping this on the surface of the virtual object, it is possible to express an object having a different reflection characteristic for each part.

最近は、反射特性データとして、単なる二次元の画像データではなく、高次元画像データを用いる方法も提案されている。たとえば、下記の非特許文献1には、BTF(Bi-directional Texture Function)と呼ばれている6次元の関数で示されるテクスチャデータを用いるレンダリング処理が開示されている。このBTFは、光の入射方向や反射方向によって異なる反射特性を定義する関数であり、照明光の入射方向を示す2つの角度θL,φLと、反射光の射出方向を示す2つの角度θL,φLと、二次元uv座標系における座標値u,vという合計6個の変数(θL,φL,θV,φV,u,v)によって、特定の反射特性を定義する関数になる。   Recently, a method using high-dimensional image data instead of simple two-dimensional image data as reflection characteristic data has been proposed. For example, Non-Patent Document 1 below discloses a rendering process that uses texture data represented by a six-dimensional function called BTF (Bi-directional Texture Function). This BTF is a function that defines reflection characteristics that vary depending on the incident direction and reflection direction of light, and includes two angles θL and φL that indicate the incident direction of illumination light and two angles θL and φL that indicate the emission direction of reflected light. And a total of six variables (θL, φL, θV, φV, u, v), which are coordinate values u and v in the two-dimensional uv coordinate system, become a function that defines specific reflection characteristics.

一方、実在の物体に近いテクスチャを表現するための手法として、当該実在の物体についての反射特性を実測し、この実測値に基づいて、反射特性データを作成する手法が知られている。たとえば、下記の特許文献1には、天然木の木目を撮影し、この撮影画像に基づいて、天然木の風合いをもった反射特性データを作成する手法が開示されている。このように、実在の物体についての反射特性を実測する場合、当該物体を様々な方向から撮影する必要があるが、これらの撮影画像に基づいて物体表面の反射特性データを作成するためには、任意方向から撮影した撮影画像を、真上から見た状態の正則画像に変換する処理が必要になる。このような画像変換処理は、幾何学的な演算によって行うことが可能である。たとえば、下記の特許文献2には、射影的正規化変換と呼ばれている画像変換処理の手法が開示されている。
G. Muller, J. Meseth, M. Sattler, R. Sarlette and R. Klein 2004, Acquisition, Synthesis and Rendering of Bidirectional Texture Functions. In Eurographics 2004 STAR-State of The Art Report 特開2002−071329号公報 特開平6−274649号公報
On the other hand, as a technique for expressing a texture close to an actual object, a technique is known in which the reflection characteristics of the actual object are measured and reflection characteristic data is created based on the measured values. For example, Patent Literature 1 below discloses a technique for photographing the grain of a natural tree and creating reflection characteristic data having a texture of the natural tree based on the photographed image. Thus, when actually measuring the reflection characteristics of an actual object, it is necessary to photograph the object from various directions, but in order to create reflection characteristic data of the object surface based on these captured images, It is necessary to convert the captured image taken from an arbitrary direction into a regular image viewed from directly above. Such an image conversion process can be performed by a geometric operation. For example, Patent Document 2 below discloses an image conversion processing technique called projective normalization conversion.
G. Muller, J. Meseth, M. Sattler, R. Sarlette and R. Klein 2004, Acquisition, Synthesis and Rendering of Bidirectional Texture Functions. In Eurographics 2004 STAR-State of The Art Report JP 2002-071329 A JP-A-6-274649

上述したとおり、BTFのような高次元画像データとして与えられる反射特性データを得るために、実在の物体についての反射特性を実測する手法を採る場合、物体を斜め方向から撮影することにより得られた撮影画像を、真上から見た状態の正則画像に変換する画像変換を行う必要がある。このような画像変換技術は、反射特性データを得る場合への利用に限られず、画像処理一般に広く適用可能な技術である。そして従来は、前掲の特許文献2に開示されているように、幾何学的な撮影条件に基づいて、射影的正規化変換と呼ばれている純然たる幾何学的な演算を利用した画像変換方法が専ら利用されてきた。   As described above, in order to obtain reflection characteristic data given as high-dimensional image data such as BTF, when a method of actually measuring the reflection characteristic of an actual object is employed, it is obtained by photographing the object from an oblique direction. It is necessary to perform image conversion for converting a captured image into a regular image viewed from directly above. Such an image conversion technique is not limited to use in obtaining reflection characteristic data, and is a technique that can be widely applied to image processing in general. Conventionally, as disclosed in the above-mentioned Patent Document 2, based on geometric imaging conditions, an image conversion method using a purely geometric operation called projective normalization conversion. Has been used exclusively.

しかしながら、このような幾何学的な演算(撮影条件に基づく射影的正規化変換など)を利用した画像変換方法を、実在の物体についてのカメラ撮影で得られた実測画像データに適用した場合、精度の高い変換を行うことができないという問題がある。もちろん、幾何学的な演算を利用した画像変換方法を用いれば、理論上は正確な正則画像が得られるはずである。ところが、予め所定の幾何学的な撮影条件を設定し、実在の物体に対して当該撮影条件下で撮影を行ったとしても、実際には、設定どおりの正確な撮影条件下での撮影を行うことは困難である。すなわち、実在の物体を撮影する際には、物体に対するカメラの相対位置や向きに関する誤差、カメラの光軸のずれ、レンズの収差などの様々な要因が関与してくるため、実際に得られた撮影画像と、理想的な撮影条件から予測される撮影画像との間には、誤差が生じることになる。このため、実際に得られた撮影画像に対して、理想的な撮影条件に基づく幾何学的な画像変換処理を施すと、得られる正則画像は正確なものにはならない。   However, when an image conversion method using such geometrical operations (projective normalization conversion based on shooting conditions, etc.) is applied to measured image data obtained by camera shooting of an actual object, accuracy There is a problem that high conversion cannot be performed. Of course, if an image conversion method using a geometric operation is used, a theoretically correct regular image should be obtained. However, even if a predetermined geometric shooting condition is set in advance and an actual object is shot under the shooting condition, actually, shooting is performed under the exact shooting condition as set. It is difficult. In other words, when photographing a real object, various factors such as an error related to the camera's relative position and orientation with respect to the object, a deviation of the optical axis of the camera, and lens aberration were involved. An error occurs between the photographed image and the photographed image predicted from the ideal photographing conditions. For this reason, when a geometric image conversion process based on ideal imaging conditions is performed on a captured image actually obtained, the obtained regular image is not accurate.

そこで本発明は、実在の物体を斜めから撮影することにより得られた撮影画像を、真上から見た状態の正則画像に正確に変換することが可能な画像変換方法および装置を提供することを目的とする。   Therefore, the present invention provides an image conversion method and apparatus capable of accurately converting a captured image obtained by photographing an actual object from an oblique direction into a regular image viewed from directly above. Objective.

(1) 本発明の第1の態様は、平面上に描かれた直線で構成される基準枠の内部に配置された被写体を、所定方向から撮影することにより得られる撮影画像を、平面上の基準点に立てた法線方向から見た正則画像に変換する画像変換方法において、
撮影画像もしくはこれに所定の加工処理を施した画像を、二次元xy座標系に所定の画素値をもった画素を配列してなる画像データとして入力する画像入力段階と、
xy座標系上の任意の直線を、座標軸に対する向きを示す変数ξと原点に対する変位を示す変数ρを用いて表わす表現形式を用い、画像データを構成する個々の画素について、当該画素の基準位置を通る直線群のそれぞれについての変数(ξ,ρ)の組合わせを求め、二次元ξρ座標系上に各変数対(ξ,ρ)に対応する座標点をプロットし、これら座標点の集合により構成される線グラフμを各画素ごとにξρ座標系上に求める線グラフ演算段階と、
ξρ座標系上に、各画素が同一の初期画素値を有する積算用二次元画素配列を定義し、この積算用二次元画素配列上に、画像データを構成する第i番目の画素Piについて求められた線グラフμiを重ね合わせ、この線グラフμi上もしくはその近傍に位置する画素の画素値に、画素Piのもつ画素値を積算する処理を、第1番目の画素から第N番目の画素まで(但し、1≦i≦N、Nは画像データに含まれる画素配列上の全画素数)繰り返し実行する画素値積算段階と、
撮影画像を得る際の幾何学的な撮影条件に基づいて、xy座標系上に配置された撮影画像上に現れるであろう基準枠の像の位置を、幾何学的な演算によって予測する基準枠位置予測段階と、
予測された基準枠の像を構成する各直線を示す変数(ξ,ρ)の組合わせについて、積算用二次元画素配列上に対応する座標点をそれぞれ幾何学的予測点εとしてプロットし、各幾何学的予測点εについての所定の近傍領域に所属する画素のうちの画素値が最大もしくは最小の画素の基準位置を、対応する直線についての実測上予測点と決定する実測上予測点決定段階と、
二次元xy座標系上に、各実測上予測点の座標値(ξ,ρ)によって表わされる直線を描き、これらの直線の位置を正しい基準枠の像の位置として取り扱い、幾何学的な演算によって撮影画像を正則画像に変換する正則変換段階と、
を行うようにしたものである。
(1) According to a first aspect of the present invention, a photographed image obtained by photographing a subject placed inside a reference frame composed of straight lines drawn on a plane from a predetermined direction is displayed on the plane. In the image conversion method for converting to a regular image viewed from the normal direction set at the reference point,
An image input stage for inputting a captured image or an image obtained by performing predetermined processing on the image as image data obtained by arranging pixels having predetermined pixel values in a two-dimensional xy coordinate system;
Using an expression form representing an arbitrary straight line on the xy coordinate system using a variable ξ indicating the orientation with respect to the coordinate axis and a variable ρ indicating the displacement with respect to the origin, the reference position of the pixel is set for each pixel constituting the image data. Obtain a combination of variables (ξ, ρ) for each of the straight line groups that pass through, plot the coordinate points corresponding to each variable pair (ξ, ρ) on the two-dimensional ξρ coordinate system, and configure the set of these coordinate points A line graph calculation step for obtaining a line graph μ to be obtained on the ξρ coordinate system for each pixel;
A two-dimensional pixel array for integration in which each pixel has the same initial pixel value is defined on the ξρ coordinate system, and the i-th pixel Pi constituting the image data is obtained on the two-dimensional pixel array for integration. The line graph μi is overlaid, and the pixel value of the pixel Pi is added to the pixel value of the pixel located on or near the line graph μi from the first pixel to the Nth pixel ( However, 1 ≦ i ≦ N, where N is the total number of pixels on the pixel array included in the image data)
A reference frame for predicting the position of the image of the reference frame that will appear on the photographed image arranged on the xy coordinate system based on the geometric photographing condition at the time of obtaining the photographed image by geometric calculation. A position prediction stage;
For each combination of variables (ξ, ρ) indicating each straight line constituting the image of the predicted reference frame, the corresponding coordinate points on the integrating two-dimensional pixel array are plotted as geometric prediction points ε, respectively. An actual prediction point determination stage that determines a reference position of a pixel having the maximum or minimum pixel value among pixels belonging to a predetermined neighboring region with respect to the geometric prediction point ε as an actual prediction point for the corresponding straight line. When,
On the two-dimensional xy coordinate system, draw a straight line represented by the coordinate values (ξ, ρ) of each measured predicted point, treat the position of these straight lines as the position of the correct reference frame image, and perform geometric calculation. A regular conversion stage for converting a captured image into a regular image;
Is to do.

(2) 本発明の第2の態様は、上述の第1の態様に係る正則画像への画像変換方法において、
所定領域の内部と外部とのコントラスト差による境界線からなる基準枠を用いた撮影により撮影画像が得られた場合に、
画像入力段階で、撮影画像に対して微分処理を施して得られる微分画像を画像データとして入力するようにしたものである。
(2) According to a second aspect of the present invention, in the image conversion method to a regular image according to the first aspect described above,
When a shot image is obtained by shooting using a reference frame consisting of a boundary line due to a contrast difference between the inside and outside of a predetermined area,
In the image input stage, a differential image obtained by performing differential processing on the captured image is input as image data.

(3) 本発明の第3の態様は、上述の第1または第2の態様に係る正則画像への画像変換方法において、
線グラフ演算段階で、xy座標系上の任意の直線に、xy座標系の原点Oから垂線を下し、その足を点Fとしたときに、xy座標系の一軸と線分OFとのなす角度をξ、線分OFの長さをρで表わし、2つの変数ξ,ρにより直線を表わす表現形式を用いるようにしたものである。
(3) According to a third aspect of the present invention, in the image conversion method to a regular image according to the first or second aspect described above,
In the line graph calculation stage, when a perpendicular line is drawn from the origin O of the xy coordinate system to an arbitrary straight line on the xy coordinate system and the foot is set as a point F, one axis of the xy coordinate system and the line segment OF are formed. The angle is represented by ξ, the length of the line segment OF is represented by ρ, and an expression form representing a straight line by two variables ξ and ρ is used.

(4) 本発明の第4の態様は、上述の第1〜第3の態様に係る正則画像への画像変換方法において、
画素値積算段階で、線グラフμ上に位置する画素の画素値に、画素Piのもつ画素値を積算するとともに、線グラフμから所定の近傍距離dだけ離れた画素の画素値に、画素Piのもつ画素値に近傍距離dに応じた所定割合R(0≦R≦1の範囲をとり、近傍距離dが大きくなるほど小さくなる値)を乗じた値を積算するようにしたものである。
(4) According to a fourth aspect of the present invention, in the image conversion method to a regular image according to the first to third aspects described above,
In the pixel value integration stage, the pixel value of the pixel Pi is integrated with the pixel value of the pixel located on the line graph μ, and the pixel Pi is set to the pixel value of the pixel separated from the line graph μ by a predetermined neighborhood distance d. Are multiplied by a predetermined ratio R (a value that takes a range of 0 ≦ R ≦ 1 and decreases as the neighborhood distance d increases) corresponding to the neighborhood distance d.

(5) 本発明の第5の態様は、上述の第4の態様に係る正則画像への画像変換方法において、
所定割合Rを、線グラフμの位置を中心としてガウス分布をとるように設定したものである。
(5) According to a fifth aspect of the present invention, in the image conversion method into a regular image according to the fourth aspect described above,
The predetermined ratio R is set so as to have a Gaussian distribution centered on the position of the line graph μ.

(6) 本発明の第6の態様は、上述の第1〜第5の態様に係る正則画像への画像変換方法において、
線グラフ演算段階で、全N個の画素のうち、所定範囲内の画素値を有する画素についてのみ線グラフを求める演算を実行し、
画素値積算段階で、全N個の画素のうち、所定範囲内の画素値を有する画素についてのみ画素値の積算処理を実行するようにしたものである。
(6) According to a sixth aspect of the present invention, in the image conversion method to a regular image according to the first to fifth aspects described above,
In the line graph calculation stage, out of all N pixels, an operation for obtaining a line graph is performed only for pixels having pixel values within a predetermined range,
In the pixel value integration stage, pixel value integration processing is executed only for pixels having pixel values within a predetermined range among all N pixels.

(7) 本発明の第7の態様は、上述の第1〜第6の態様に係る正則画像への画像変換方法において、
線グラフ演算段階で、全N個の画素のうち、所定の考慮領域内に位置する画素についてのみ線グラフを求める演算を実行し、
画素値積算段階で、全N個の画素のうち、所定の考慮領域内に位置する画素についてのみ画素値の積算処理を実行するようにしたものである。
(7) According to a seventh aspect of the present invention, in the image conversion method to a regular image according to the first to sixth aspects described above,
In the line graph calculation stage, out of all N pixels, an operation is performed to obtain a line graph only for pixels located within a predetermined consideration region,
In the pixel value integration stage, pixel value integration processing is executed only for pixels located within a predetermined consideration area among all N pixels.

(8) 本発明の第8の態様は、上述の第1〜第7の態様に係る正則画像への画像変換方法において、
基準枠位置予測段階で、撮影画像を得る際の幾何学的な撮影条件として、基準点に立てた法線と撮影装置の光軸とのなす角θと、光軸の「基準枠が描かれた平面」への投影像と基準点を通り「基準枠が描かれた平面」に含まれる所定の基準線ζとのなす角φと、撮影装置の光学系の焦点距離と、に基づく幾何学的な演算により基準枠の像の位置を予測するようにしたものである。
(8) According to an eighth aspect of the present invention, in the image conversion method to a regular image according to the first to seventh aspects described above,
At the reference frame position prediction stage, as a geometrical imaging condition for obtaining a captured image, the angle θ between the normal line set at the reference point and the optical axis of the imaging device, and the optical axis “reference frame is drawn. Geometry based on the angle φ formed between the projected image on the plane and the predetermined reference line ζ included in the plane on which the reference frame is drawn through the reference point and the focal length of the optical system of the photographing apparatus The position of the image of the reference frame is predicted by a typical calculation.

(9) 本発明の第9の態様は、上述の第1〜第8の態様に係る正則画像への画像変換方法において、
実測上予測点決定段階で、幾何学的予測点εについての所定の近傍領域として、幾何学的予測点εの座標値を(ξε,ρε)としたときに、所定の偏差Δξ,Δρを用いて、ξε−Δξ≦ξ≦ξε+Δξ、ρε−Δρ≦ρ≦ρε+Δρなる条件を満たす座標値(ξ,ρ)で示される領域を設定するようにしたものである。
(9) According to a ninth aspect of the present invention, in the image conversion method to a regular image according to the first to eighth aspects described above,
Predetermined deviations Δξ and Δρ are used when the coordinate value of the geometric prediction point ε is (ξε, ρε) as a predetermined neighborhood region for the geometric prediction point ε at the actual prediction point determination stage. Thus, an area indicated by coordinate values (ξ, ρ) satisfying the conditions of ξε−Δξ ≦ ξ ≦ ξε + Δξ and ρε−Δρ ≦ ρ ≦ ρε + Δρ is set.

(10) 本発明の第10の態様は、上述の第1〜第9の態様に係る正則画像への画像変換方法において、
実測上予測点決定段階で、幾何学的予測点εについての所定の近傍領域に所属する画素のうちの画素値が最大もしくは最小の画素が複数存在した場合には、これら複数の画素の基準位置の重心位置を、対応する直線についての実測上予測点と決定するようにしたものである。
(10) According to a tenth aspect of the present invention, in the image conversion method to a regular image according to the first to ninth aspects described above,
When there are a plurality of pixels having the maximum or minimum pixel value among the pixels belonging to the predetermined neighboring region with respect to the geometric prediction point ε at the actual measurement prediction point determination stage, the reference positions of the plurality of pixels Is determined as an actually predicted point for the corresponding straight line.

(11) 本発明の第11の態様は、上述の第1〜第10の態様に係る正則画像への画像変換方法において、
実測上予測点決定段階で、近傍領域内の最大画素値が所定のしきい値に満たない場合もしくは最小画素値が所定のしきい値を超えてしまう場合には、実測上予測点の決定を行わず、正則画像への画像変換に失敗した取り扱いを行うようにしたものである。
(11) According to an eleventh aspect of the present invention, in the image conversion method to a regular image according to the first to tenth aspects described above,
If the maximum pixel value in the vicinity region is less than the predetermined threshold value or the minimum pixel value exceeds the predetermined threshold value in the actual measurement prediction point determination stage, the actual measurement prediction point is determined. This is not performed, and handling that failed in image conversion to a regular image is performed.

(12) 本発明の第12の態様は、上述の第1〜第11の態様に係る正則画像への画像変換方法において、
矩形を示す基準枠を用いた撮影により撮影画像が得られた場合に、
正則変換段階で、基準枠の像を構成する矩形の4頂点の位置に基づく幾何学的な演算により正則画像への変換を行うようにしたものである。
(12) In a twelfth aspect of the present invention, in the image conversion method to a regular image according to the first to eleventh aspects described above,
When a shot image is obtained by shooting using a reference frame indicating a rectangle,
In the regular conversion stage, the image is converted into a regular image by a geometric operation based on the positions of the four vertices of the rectangle constituting the image of the reference frame.

(13) 本発明の第13の態様は、上述の第1〜第12の態様に係る正則画像への画像変換方法を利用することにより、
物体の被測定面の所定位置に所定の入射方向から照明光を当てたときに、所定位置から所定の射出方向に向かう反射光の反射率を、被測定面の個々の位置ごとに、それぞれ複数m通りの入射方向および複数n通りの射出方向の組み合わせによる(m×n)通りの場合について定義したデータを、被測定面についての反射特性データとして作成する物体の反射特性データの作成方法において、
平面上に描かれた直線で構成される基準枠の内部に、被測定面を有する物体を載置する物体載置段階と、
光源と被測定面とカメラとが所定の位置関係になるような撮影条件を、光源と被測定面との位置関係を複数m通りに変化させ、かつ、被測定面とカメラとの位置関係を複数n通りに変化させることにより、合計(m×n)通り設定する撮影条件設定段階と、
設定された(m×n)通りの撮影条件のそれぞれについて、光源によって照明されている被測定面の画像をカメラで撮影する撮影処理を実行することにより、(m×n)枚の物体撮影画像を得る物体撮影段階と、
(m×n)枚の物体撮影画像に対して、上述の第1〜第12の態様に係る正則画像への画像変換方法を利用した画像変換を行い、(m×n)枚の正則画像を得る画像変換段階と、
(m×n)枚の正則画像に基づいて、物体の反射特性データを作成する反射特性データ作成段階と、
を行うようにしたものである。
(13) According to a thirteenth aspect of the present invention, by using the image conversion method to a regular image according to the first to twelfth aspects described above,
When illumination light is applied from a predetermined incident direction to a predetermined position on the surface to be measured of the object, the reflectance of the reflected light from the predetermined position toward the predetermined emission direction is set for each individual position on the surface to be measured. In the method for creating reflection characteristic data of an object, data defined for (m × n) cases by a combination of m incidence directions and a plurality of n emission directions is created as reflection characteristic data for a surface to be measured.
An object placement stage for placing an object having a measured surface inside a reference frame composed of straight lines drawn on a plane;
Change the positional relationship between the light source and the surface to be measured in a plurality of m, and change the positional relationship between the surface to be measured and the camera, so that the light source, the surface to be measured, and the camera have a predetermined positional relationship. A shooting condition setting stage for setting a total (m × n) by changing to a plurality of n ways,
For each of the set (m × n) shooting conditions, (m × n) object shot images are obtained by executing a shooting process of shooting an image of the measurement target surface illuminated by the light source with the camera. Object shooting stage to obtain,
Image conversion using the image conversion method to the regular image according to the first to twelfth aspects described above is performed on (m × n) object captured images, and (m × n) regular images are obtained. An image conversion stage to obtain;
A reflection characteristic data creation stage for creating reflection characteristic data of an object based on (m × n) regular images;
Is to do.

(14) 本発明の第14の態様は、上述の第13の態様に係る物体の反射特性データの作成方法において、
特定の物体撮影画像を正則画像に変換する画像変換段階における実測上予測点決定段階で、近傍領域内の最大画素値が所定のしきい値に満たない場合もしくは最小画素値が所定のしきい値を超えてしまう場合には、実測上予測点の決定を行わず、当該物体撮影画像に関する正則画像への画像変換に失敗した取り扱いを行い、
画像変換に失敗した取り扱いが行われた物体撮影画像についての正則画像を、撮影条件が近似する別な物体撮影画像についての正則画像に基づく補間により求めるようにしたものである。
(14) According to a fourteenth aspect of the present invention, in the method for creating reflection characteristic data of an object according to the thirteenth aspect described above,
If the maximum pixel value in the neighboring region is less than the predetermined threshold value or the minimum pixel value is the predetermined threshold value in the measurement prediction point determination step in the image conversion step that converts the specific object photographed image into a regular image If it exceeds, do not determine the prediction point in actual measurement, handle the failed image conversion to a regular image related to the object captured image,
A regular image for an object-captured image that has been handled with failed image conversion is obtained by interpolation based on a regular image for another object-captured image that approximates the shooting conditions.

(15) 本発明の第15の態様は、平面上に描かれた直線で構成される基準枠の内部に配置された被写体を、所定方向から撮影することにより得られる撮影画像を、平面上の基準点に立てた法線方向から見た正則画像に変換する画像変換装置において、
撮影画像もしくはこれに所定の加工処理を施した画像を、二次元xy座標系に所定の画素値をもった画素を配列してなる画像データとして入力する画像入力部と、
xy座標系上の任意の直線を、座標軸に対する向きを示す変数ξと原点に対する変位を示す変数ρを用いて表わす表現形式を用い、画像データを構成する個々の画素について、当該画素の基準位置を通る直線群のそれぞれについての変数(ξ,ρ)の組合わせを求め、二次元ξρ座標系上に各変数対(ξ,ρ)に対応する座標点をプロットし、これら座標点の集合により構成される線グラフμを各画素ごとにξρ座標系上に求める線グラフ演算部と、
ξρ座標系上に、各画素が同一の初期画素値を有する積算用二次元画素配列を定義し、この積算用二次元画素配列上に、画像データを構成する第i番目の画素Piについて求められた線グラフμiを重ね合わせ、この線グラフμi上もしくはその近傍に位置する画素の画素値に、画素Piのもつ画素値を積算する処理を、第1番目の画素から第N番目の画素まで(但し、1≦i≦N、Nは画像データに含まれる画素配列上の全画素数)繰り返し実行する画素値積算部と、
撮影画像を得る際の幾何学的な撮影条件に基づいて、xy座標系上に配置された撮影画像上に現れるであろう基準枠の像の位置を、幾何学的な演算によって予測する基準枠位置予測部と、
予測された基準枠の像を構成する各直線を示す変数(ξ,ρ)の組合わせについて、積算用二次元画素配列上に対応する座標点をそれぞれ幾何学的予測点εとしてプロットし、各幾何学的予測点εについての所定の近傍領域に所属する画素のうちの画素値が最大もしくは最小の画素の基準位置を、対応する直線についての実測上予測点と決定する実測上予測点決定部と、
二次元xy座標系上に、各実測上予測点の座標値(ξ,ρ)によって表わされる直線を描き、これらの直線の位置を正しい基準枠の像の位置として取り扱い、幾何学的な演算によって撮影画像を正則画像に変換する正則変換部と、
を設けたものである。
(15) According to a fifteenth aspect of the present invention, a photographed image obtained by photographing a subject arranged inside a reference frame composed of straight lines drawn on a plane from a predetermined direction is displayed on the plane. In an image conversion device that converts a regular image viewed from a normal direction set at a reference point,
An image input unit for inputting a captured image or an image obtained by performing predetermined processing on the image as image data obtained by arranging pixels having predetermined pixel values in a two-dimensional xy coordinate system;
Using an expression form representing an arbitrary straight line on the xy coordinate system using a variable ξ indicating the orientation with respect to the coordinate axis and a variable ρ indicating the displacement with respect to the origin, the reference position of the pixel is set for each pixel constituting the image data. Obtain a combination of variables (ξ, ρ) for each of the straight line groups that pass through, plot the coordinate points corresponding to each variable pair (ξ, ρ) on the two-dimensional ξρ coordinate system, and configure the set of these coordinate points A line graph calculation unit for obtaining a line graph μ to be calculated on the ξρ coordinate system for each pixel;
A two-dimensional pixel array for integration in which each pixel has the same initial pixel value is defined on the ξρ coordinate system, and the i-th pixel Pi constituting the image data is obtained on the two-dimensional pixel array for integration. The line graph μi is overlaid, and the pixel value of the pixel Pi is added to the pixel value of the pixel located on or near the line graph μi from the first pixel to the Nth pixel ( However, 1 ≦ i ≦ N, where N is the total number of pixels on the pixel array included in the image data)
A reference frame for predicting the position of the image of the reference frame that will appear on the photographed image arranged on the xy coordinate system based on the geometric photographing condition at the time of obtaining the photographed image by geometric calculation. A position prediction unit;
For each combination of variables (ξ, ρ) indicating each straight line constituting the image of the predicted reference frame, the corresponding coordinate points on the integrating two-dimensional pixel array are plotted as geometric prediction points ε, respectively. An actual prediction point determination unit that determines the reference position of the pixel having the maximum or minimum pixel value among the pixels belonging to the predetermined neighboring region with respect to the geometric prediction point ε as the actual prediction point for the corresponding straight line. When,
On the two-dimensional xy coordinate system, draw a straight line represented by the coordinate values (ξ, ρ) of each measured predicted point, treat the position of these straight lines as the position of the correct reference frame image, and perform geometric calculation. A regular conversion unit that converts a captured image into a regular image;
Is provided.

(16) 本発明の第16の態様は、上述の第15の態様に係る正則画像への画像変換装置において、
線グラフ演算部が、xy座標系上の任意の直線に、xy座標系の原点Oから垂線を下し、その足を点Fとしたときに、xy座標系の一軸と線分OFとのなす角度をξ、線分OFの長さをρで表わし、2つの変数ξ,ρにより直線を表わす表現形式を用いるようにしたものである。
(16) According to a sixteenth aspect of the present invention, in the image conversion device to a regular image according to the fifteenth aspect described above,
When the line graph calculation unit draws a perpendicular line from the origin O of the xy coordinate system to an arbitrary straight line on the xy coordinate system and sets the foot as the point F, the axis of the xy coordinate system and the line segment OF are formed. The angle is represented by ξ, the length of the line segment OF is represented by ρ, and an expression form representing a straight line by two variables ξ and ρ is used.

(17) 本発明の第17の態様は、上述の第15または第16の態様に係る正則画像への画像変換装置において、
画素値積算部が、線グラフμ上に位置する画素の画素値に、画素Piのもつ画素値を積算するとともに、線グラフμから所定の近傍距離dだけ離れた画素の画素値に、画素Piのもつ画素値に近傍距離dに応じた所定割合R(0≦R≦1の範囲をとり、近傍距離dが大きくなるほど小さくなる値)を乗じた値を積算するようにしたものである。
(17) According to a seventeenth aspect of the present invention, in the image conversion device to a regular image according to the fifteenth or sixteenth aspect described above,
The pixel value accumulating unit accumulates the pixel value of the pixel Pi on the pixel value of the pixel located on the line graph μ, and the pixel Pi on the pixel value of the pixel separated from the line graph μ by a predetermined neighborhood distance d. Are multiplied by a predetermined ratio R (a value that takes a range of 0 ≦ R ≦ 1 and decreases as the neighborhood distance d increases) corresponding to the neighborhood distance d.

(18) 本発明の第18の態様は、上述の第17の態様に係る正則画像への画像変換装置において、
所定割合Rが、線グラフμの位置を中心としてガウス分布をとるように設定したものである。
(18) According to an eighteenth aspect of the present invention, in the image conversion device to a regular image according to the seventeenth aspect described above,
The predetermined ratio R is set so as to have a Gaussian distribution centered on the position of the line graph μ.

(19) 本発明の第19の態様は、上述の第15〜第18の態様に係る正則画像への画像変換装置において、
線グラフ演算部が、全N個の画素のうち、所定範囲内の画素値を有する画素についてのみ線グラフを求める演算を実行し、
画素値積算部が、全N個の画素のうち、所定範囲内の画素値を有する画素についてのみ画素値の積算処理を実行するようにしたものである。
(19) According to a nineteenth aspect of the present invention, in the image conversion apparatus for regular images according to the fifteenth to eighteenth aspects described above,
The line graph calculation unit performs a calculation for obtaining a line graph only for pixels having pixel values within a predetermined range among all N pixels,
The pixel value integration unit is configured to execute pixel value integration processing only for pixels having pixel values within a predetermined range among all N pixels.

(20) 本発明の第20の態様は、上述の第15〜第19の態様に係る正則画像への画像変換装置において、
線グラフ演算部が、全N個の画素のうち、所定の考慮領域内に位置する画素についてのみ線グラフを求める演算を実行し、
画素値積算部が、全N個の画素のうち、所定の考慮領域内に位置する画素についてのみ画素値の積算処理を実行するようにしたものである。
(20) According to a twentieth aspect of the present invention, in the image conversion apparatus for regular images according to the fifteenth to nineteenth aspects described above,
The line graph calculation unit performs a calculation for obtaining a line graph only for pixels located within a predetermined consideration area among all N pixels,
The pixel value integration unit is configured to execute the pixel value integration processing only for pixels located in a predetermined consideration area among all N pixels.

(21) 本発明の第21の態様は、上述の第15〜第20の態様に係る正則画像への画像変換装置において、
基準枠位置予測部が、撮影画像を得る際の幾何学的な撮影条件として与えられた、基準点に立てた法線と撮影装置の光軸とのなす角θと、光軸の「基準枠が描かれた平面」への投影像と基準点を通り「基準枠が描かれた平面」に含まれる所定の基準線ζとのなす角φと、撮影装置の光学系の焦点距離と、に基づく幾何学的な演算により基準枠の像の位置を予測するようにしたものである。
(21) According to a twenty-first aspect of the present invention, in the image conversion apparatus for regular images according to the fifteenth to twentieth aspects described above,
The reference frame position prediction unit gives the angle θ between the normal line set at the reference point and the optical axis of the photographing apparatus, which is given as a geometric photographing condition when obtaining a photographed image, and the “reference frame of the optical axis” The angle φ formed by the projected image on the plane on which the image is drawn and the predetermined reference line ζ included in the plane on which the reference frame is drawn through the reference point and the focal length of the optical system of the photographing apparatus The position of the image of the reference frame is predicted by a geometrical operation based on it.

(22) 本発明の第22の態様は、上述の第15〜第21の態様に係る正則画像への画像変換装置において、
実測上予測点決定部が、幾何学的予測点εについての所定の近傍領域として、幾何学的予測点εの座標値を(ξε,ρε)としたときに、所定の偏差Δξ,Δρを用いて、ξε−Δξ≦ξ≦ξε+Δξ、ρε−Δρ≦ρ≦ρε+Δρなる条件を満たす座標値(ξ,ρ)で示される領域を用いるようにしたものである。
(22) According to a twenty-second aspect of the present invention, in the image conversion apparatus for regular images according to the fifteenth to twenty-first aspects described above,
When the predicted point determination unit in actual measurement uses the coordinate values of the geometric prediction point ε as (ξε, ρε) as the predetermined neighborhood region for the geometric prediction point ε, the predetermined deviations Δξ and Δρ are used. Thus, an area indicated by coordinate values (ξ, ρ) satisfying the conditions of ξε−Δξ ≦ ξ ≦ ξε + Δξ and ρε−Δρ ≦ ρ ≦ ρε + Δρ is used.

(23) 本発明の第23の態様は、上述の第15〜第22の態様に係る正則画像への画像変換装置において、
実測上予測点決定部が、幾何学的予測点εについての所定の近傍領域に所属する画素のうちの画素値が最大もしくは最小の画素が複数存在した場合には、これら複数の画素の基準位置の重心位置を、対応する直線についての実測上予測点と決定するようにしたものである。
(23) According to a twenty-third aspect of the present invention, in the image conversion apparatus for regular images according to the fifteenth to twenty-second aspects described above,
In a case where the actually measured prediction point determination unit includes a plurality of pixels having the maximum or minimum pixel value among the pixels belonging to the predetermined neighboring region with respect to the geometric prediction point ε, the reference position of the plurality of pixels Is determined as an actually predicted point for the corresponding straight line.

(24) 本発明の第24の態様は、上述の第15〜第23の態様に係る正則画像への画像変換装置において、
実測上予測点決定部が、近傍領域内の最大画素値が所定のしきい値に満たない場合もしくは最小画素値が所定のしきい値を超えてしまう場合には、実測上予測点の決定を行わず、正則画像への画像変換に失敗した旨のメッセージを提示するようにしたものである。
(24) According to a twenty-fourth aspect of the present invention, in the image conversion apparatus for regular images according to the fifteenth to twenty-third aspects described above,
The actually measured prediction point determination unit determines the actually measured prediction point when the maximum pixel value in the vicinity region is less than the predetermined threshold value or when the minimum pixel value exceeds the predetermined threshold value. A message indicating that the image conversion to the regular image has failed is presented.

(25) 本発明の第25の態様は、上述の第15〜第24の態様に係る正則画像への画像変換装置を利用して、
物体の被測定面の所定位置に所定の入射方向から照明光を当てたときに、所定位置から所定の射出方向に向かう反射光の反射率を、被測定面の個々の位置ごとに、それぞれ複数m通りの入射方向および複数n通りの射出方向の組み合わせによる(m×n)通りの場合について定義したデータを、被測定面についての反射特性データとして作成する物体の反射特性データの作成装置を構成するために、更に、
上面が平面をなし、この平面上に直線で構成される基準枠が描かれている撮影用ステージと、
撮影用ステージ上に載置された物体を照明するための光源と、
撮影用ステージ上に載置された物体を撮影するためのカメラと、
光源と物体の被測定面との位置関係を複数m通りに変化させ、かつ、被測定面とカメラとの位置関係を複数n通りに変化させることにより撮影条件を設定する撮影条件設定部と、
を設け、カメラで撮影された撮影画像が画像変換装置の画像入力部へ与えられるように構成し、
画像変換装置によって変換された正則画像に基づいて、物体の反射特性データを作成する反射特性データ作成部を更に設けるようにしたものである。
(25) A twenty-fifth aspect of the present invention uses the image conversion apparatus for regular images according to the fifteenth to twenty-fourth aspects described above,
When illumination light is applied from a predetermined incident direction to a predetermined position on the surface to be measured of the object, the reflectance of the reflected light from the predetermined position toward the predetermined emission direction is set for each individual position on the surface to be measured. Constructs an object reflection characteristic data creation device that creates, as reflection characteristic data for a surface to be measured, data defined for (m × n) combinations of m incident directions and a plurality of n exit directions. In addition, to
A shooting stage in which the upper surface forms a plane and a reference frame composed of straight lines is drawn on the plane;
A light source for illuminating an object placed on the shooting stage;
A camera for shooting an object placed on the shooting stage;
A shooting condition setting unit that sets shooting conditions by changing the positional relationship between the light source and the measured surface of the object in a plurality of m ways and changing the positional relationship between the measured surface and the camera in a plurality of n ways;
And configured so that the captured image captured by the camera is provided to the image input unit of the image conversion device,
A reflection characteristic data creation unit for creating reflection characteristic data of an object is further provided based on the regular image converted by the image conversion apparatus.

(26) 本発明の第26の態様は、上述の第25の態様に係る物体の反射特性データの作成装置において、
撮影用ステージの上面に、物体を載置するための矩形を形成し、この矩形の内部領域と外部領域とはコントラストに差が生じるように構成し、両領域の境界線によって基準枠が構成されるようにし、
カメラで撮影された撮影画像に対して微分処理を実行する微分処理部を更に設け、微分処理後の画像が画像入力部へ与えられるように構成し、
正則変換部が、基準枠の像を構成する矩形の4頂点の位置に基づく幾何学的な演算により正則画像への変換を行うようにしたものである。
(26) According to a twenty-sixth aspect of the present invention, in the apparatus for creating reflection characteristic data of an object according to the twenty-fifth aspect described above,
A rectangle for placing an object is formed on the upper surface of the shooting stage, and the rectangular inner area and the outer area are configured to have a difference in contrast, and the reference frame is configured by the boundary line between the two areas. And
A differential processing unit that performs differential processing on the captured image captured by the camera is further provided, and the image after the differential processing is configured to be provided to the image input unit,
The regular conversion unit converts the image into a regular image by a geometric operation based on the positions of the four vertices of the rectangle constituting the image of the reference frame.

(27) 本発明の第27の態様は、上述の第25または第26の態様に係る物体の反射特性データの作成装置において、
実測上予測点決定部が、近傍領域内の最大画素値が所定のしきい値に満たない、もしくは最小画素値が所定のしきい値を超えてしまうと判断した場合には、正則画像への画像変換に失敗した旨のエラー信号を出力し、
反射特性データ作成部が、エラー信号が出力されたために画像変換装置からは得られなかった正則画像を、撮影条件が近似する別な物体撮影画像についての正則画像に基づく補間により求めるようにしたものである。
(27) According to a twenty-seventh aspect of the present invention, in the device for creating reflection characteristic data of an object according to the twenty-fifth or twenty-sixth aspect described above,
When the predicted point determination unit in actual measurement determines that the maximum pixel value in the neighborhood region is less than the predetermined threshold value or the minimum pixel value exceeds the predetermined threshold value, Outputs an error signal indicating that image conversion has failed,
The reflection characteristic data creation unit obtains a regular image that cannot be obtained from the image conversion device due to the output of an error signal by interpolation based on a regular image of another object photographed image that approximates the photographing condition. It is.

(28) 本発明の第28の態様は、上述の第1〜第12の態様に係る正則画像への画像変換方法をコンピュータに実行させるために専用のプログラムを用意したものである。   (28) According to a twenty-eighth aspect of the present invention, a dedicated program is prepared for causing a computer to execute the image conversion method to a regular image according to the first to twelfth aspects.

本発明に係る画像変換の手法を利用すれば、実在の物体を斜めから撮影することにより得られた撮影画像を、真上から見た状態の正則画像に正確に変換することが可能になる。これにより、レンダリング用の高次元テクスチャデータなど、物体の正確な反射特性データを作成することができるようになる。   By using the image conversion method according to the present invention, it is possible to accurately convert a photographed image obtained by photographing a real object from an oblique direction into a regular image viewed from directly above. Thereby, accurate reflection characteristic data of an object such as high-dimensional texture data for rendering can be created.

以下、本発明を図示する実施形態に基づいて説明する。   Hereinafter, the present invention will be described based on the illustrated embodiments.

<<< §1.レンダリング処理の基本概念 >>>
本発明は、被写体を斜め方向から撮影することにより得られた撮影画像を、真上から見た状態の正則画像に変換する画像変換技術に係る発明であるが、ここでは、この画像変換技術をレンダリング用の高次元テクスチャデータ(反射特性データ)を作成するプロセスで利用した実施形態を述べることにする。そこで、説明の便宜上、まず、従来の一般的なレンダリング処理の基本概念を説明しておく。
<<< §1. Basic concept of rendering processing >>
The present invention is an invention related to an image conversion technique for converting a captured image obtained by shooting a subject from an oblique direction into a regular image in a state viewed from directly above. An embodiment used in the process of creating high-dimensional texture data (reflection characteristic data) for rendering will be described. Therefore, for convenience of explanation, first, the basic concept of conventional general rendering processing will be described.

図1は、一般的なレンダリング処理の原理を示す斜視図である。この例は、三次元仮想物体10を、視点Eから観察したときに、投影平面H上に二次元投影画像15を求めるシェーディングモデルを示すものである。ここでは、二次元画像として用意されているテクスチャデータ20を、仮想物体10の表面にマッピングした状態で、投影画像15を求める演算が行われる。   FIG. 1 is a perspective view showing the principle of general rendering processing. This example shows a shading model for obtaining the two-dimensional projection image 15 on the projection plane H when the three-dimensional virtual object 10 is observed from the viewpoint E. Here, the calculation for obtaining the projection image 15 is performed in a state where the texture data 20 prepared as a two-dimensional image is mapped to the surface of the virtual object 10.

このようなレンダリング処理を行うために、まず、仮想物体10を示す物体データが用意される。たとえば、図示の例では、XYZ三次元座標系上に定義された多数のポリゴン(多角形)の集合として、仮想物体10が表現されており、仮想物体10の表面の各部は、それぞれポリゴンによって構成されている。したがって、仮想物体10を示す物体データは、このポリゴンの集合体からなる三次元形状データということになり、仮想物体10の実体は物体データということになる。   In order to perform such rendering processing, first, object data indicating the virtual object 10 is prepared. For example, in the illustrated example, the virtual object 10 is expressed as a set of a large number of polygons (polygons) defined on an XYZ three-dimensional coordinate system, and each part of the surface of the virtual object 10 is configured by a polygon. Has been. Therefore, the object data indicating the virtual object 10 is three-dimensional shape data including a collection of polygons, and the entity of the virtual object 10 is object data.

一方、テクスチャデータ20は、uv二次元座標系上に定義された二次元画像データであり、二次元平面上に配列された多数の画素の集合体である。ここに示す例では、ハート型の絵柄模様が表現されている。もちろん、テクスチャデータ20によって表現される模様は、必ずしも人為的に描かれた絵柄模様だけではなく、天然素材がもつ固有の陰影模様の場合もある。たとえば、無地の絨毯を表現するテクスチャデータには、人為的な模様は描かれていないが、絨毯の毛並みによる陰影模様が表現されていることになる。結局、このテクスチャデータ20は、二次元平面上における反射特性の分布を示す反射特性データということができる。本発明は、このような反射特性データを、たとえば絨毯などの実在の物体を撮影した画像から作成するプロセスにおいて利用可能な技術である。レンダリング処理を行う際には、このuv座標系上に定義されたテクスチャデータ20を、XYZ座標系上に定義された仮想物体10の表面にマッピングし、仮想物体表面の各部の反射特性を決定することになる。   On the other hand, the texture data 20 is two-dimensional image data defined on the uv two-dimensional coordinate system, and is an aggregate of a large number of pixels arranged on a two-dimensional plane. In the example shown here, a heart-shaped pattern is expressed. Of course, the pattern expressed by the texture data 20 is not necessarily an artificially drawn pattern, but may be an inherent shadow pattern of a natural material. For example, in the texture data expressing a plain carpet, an artificial pattern is not drawn, but a shadow pattern due to the fur of the carpet is expressed. After all, the texture data 20 can be referred to as reflection characteristic data indicating a distribution of reflection characteristics on a two-dimensional plane. The present invention is a technique that can be used in a process of creating such reflection characteristic data from an image of a real object such as a carpet. When performing the rendering process, the texture data 20 defined on the uv coordinate system is mapped to the surface of the virtual object 10 defined on the XYZ coordinate system, and the reflection characteristics of each part of the virtual object surface are determined. It will be.

レンダリング処理にあたっては、この他、照明条件、視点位置、投影平面を設定する必要がある。照明条件としては、光源の種類(たとえば、形状、大きさ、波長特性など)や位置などを設定する。図示の例の場合、光源G、視点E、投影平面Hが図示の位置に設定されている。また、三次元仮想物体10の表面に、どのようにして二次元テクスチャデータ20をマッピングするかを示すマッピング態様(たとえば、相対的な位置や向き)も設定しておく必要がある。一方、投影平面H上には、αβ二次元座標系が定義されており、投影画像15(レンダリング処理の目的物として得られる二次元画像)は、このαβ座標系上の画像データとして得られることになる。   In the rendering process, it is necessary to set the illumination condition, the viewpoint position, and the projection plane. As illumination conditions, the type (for example, shape, size, wavelength characteristics, etc.) and position of the light source are set. In the case of the illustrated example, the light source G, the viewpoint E, and the projection plane H are set at the illustrated positions. Also, it is necessary to set a mapping mode (for example, relative position and orientation) indicating how to map the two-dimensional texture data 20 on the surface of the three-dimensional virtual object 10. On the other hand, an αβ two-dimensional coordinate system is defined on the projection plane H, and a projection image 15 (a two-dimensional image obtained as an object of rendering processing) is obtained as image data on the αβ coordinate system. become.

いま、図示のとおり、仮想物体10上にサンプル点Qを定義し、このサンプル点Qから視点Eに向かう反射光Vを考える。この反射光Vは、光源Gからの照明光Lが、サンプル点Qで反射することにより得られる光であり、視点Eの位置で観察される光である。もっとも、ここでいう「反射」とは、「鏡面反射」のみでなく、「拡散反射」も含めた広い概念であり、サンプル点Qに様々な角度で入射する照明光がそれぞれ反射光として視点Eに向かうことになる。したがって、図示の反射光Vは、様々な角度から入射した照明光から得られる反射光の集まりというべきものになる。   Now, as shown in the figure, a sample point Q is defined on the virtual object 10, and the reflected light V from the sample point Q toward the viewpoint E is considered. The reflected light V is light obtained by reflecting the illumination light L from the light source G at the sample point Q, and is light that is observed at the position of the viewpoint E. However, “reflection” here is a broad concept that includes not only “specular reflection” but also “diffuse reflection”, and illumination light incident on the sample point Q at various angles is reflected as viewpoint E. Will head to. Accordingly, the reflected light V shown in the figure is a collection of reflected light obtained from illumination light incident from various angles.

1つのサンプル点Qから視点Eに向かう反射光Vと投影平面Hとの交点位置に、当該反射光Vの強度に応じた画素値をもつ画素Pを定義するようにし、仮想物体10の表面上の多数のサンプル点から視点Eに向かう各反射光について、同様に、投影平面H上に画素を定義すれば、多数のサンプル点について定義された多数の画素の集合により、三次元仮想物体10の二次元投影画像15が投影平面H上に得られることになる。実用上は、予め投影平面H上に所望の解像度で画素配列を定義しておき、視点Eと個々の画素Pの基準位置(たとえば、中心点)とを結ぶ線を仮想物体10上へと伸ばし、仮想物体表面との交点位置にサンプル点Qを定義し、上述した手法により、個々の画素Pの画素値を演算すれば、必要な解像度をもった二次元データを得ることができる。   On the surface of the virtual object 10, a pixel P having a pixel value corresponding to the intensity of the reflected light V is defined at the intersection of the reflected light V and the projection plane H from one sample point Q toward the viewpoint E. Similarly, if pixels are defined on the projection plane H with respect to each reflected light directed from the large number of sample points to the viewpoint E, the set of the large number of pixels defined for the large number of sample points results in the three-dimensional virtual object 10. A two-dimensional projection image 15 is obtained on the projection plane H. In practice, a pixel array is defined in advance on the projection plane H with a desired resolution, and a line connecting the viewpoint E and the reference position (for example, the center point) of each pixel P is extended onto the virtual object 10. If the sample point Q is defined at the position of the intersection with the virtual object surface and the pixel value of each pixel P is calculated by the above-described method, two-dimensional data having the necessary resolution can be obtained.

このように、投影平面H上の画素Pの画素値を求めるためには、サンプル点Qから画素Pを通って視点Eに向かう反射光Vの強度を求める必要があるが、このような反射光Vの強度は、基本的に、サンプル点Qに入射する照明光Lの強度と、サンプル点Qにおける光の反射率(鏡面反射率や拡散反射率)とを考慮した演算によって求めることができる。もちろん、このとき、サンプル点Qを含むポリゴンの向きを考慮に入れた演算が行われ、サンプル点Qにマッピングされたテクスチャデータ20(uv座標系上に定義された二次元画像データ)も考慮に入れた演算が行われる。したがって、仮想物体10の表面が曲面であれば、当該曲面に応じた陰影をもった投影画像15が得られることになり、テクスチャデータ20が、図示のように、ハート型の絵柄の情報をもっていれば、投影画像15上にも、このハート型の絵柄が表現されることになる(図1では、この絵柄の図示は省略)。   As described above, in order to obtain the pixel value of the pixel P on the projection plane H, it is necessary to obtain the intensity of the reflected light V from the sample point Q through the pixel P to the viewpoint E. The intensity of V can be basically obtained by calculation in consideration of the intensity of the illumination light L incident on the sample point Q and the light reflectance (specular reflectance or diffuse reflectance) at the sample point Q. Of course, at this time, calculation taking into account the orientation of the polygon including the sample point Q is performed, and the texture data 20 (two-dimensional image data defined on the uv coordinate system) mapped to the sample point Q is also taken into consideration. The entered operation is performed. Therefore, if the surface of the virtual object 10 is a curved surface, a projection image 15 having a shadow corresponding to the curved surface is obtained, and the texture data 20 includes information on a heart-shaped pattern as shown in the figure. For example, this heart-shaped picture is also expressed on the projected image 15 (the picture is not shown in FIG. 1).

サンプル点Qからの反射光の強度を演算する最も単純な方法は、XYZ三次元座標系上の1点として定義されるサンプル点Qから視点Eに向かう反射光Vの強度I(V)を、
I(V)=K・I(L)
なる式で求める方法である。ここで、I(L)は照明光Lのサンプル点Qの位置における強度であり、Kは反射係数である。照明光Lの強度I(L)は、光源Gの輝度、光源Gとサンプル点Qとの距離、サンプル点Qが所属するポリゴンに対する照明光の入射角といったパラメータによって決定される。これに対して、反射係数Kは、テクスチャデータ20によって決定される。まず、テクスチャデータ20を仮想物体10の表面に所定のマッピング態様でマッピングした場合に、サンプル点Qの位置が、テクスチャデータ20のどの座標に対応するかを定め、当該対応座標(u,v)に位置する画素T(u,v)を決定する。そして、この対応画素T(u,v)の画素値として定義されている値が、サンプル点Qの位置における反射係数Kになる。
The simplest method for calculating the intensity of the reflected light from the sample point Q is the intensity I (V) of the reflected light V from the sample point Q defined as one point on the XYZ three-dimensional coordinate system toward the viewpoint E,
I (V) = K · I (L)
It is a method to obtain by the following formula. Here, I (L) is the intensity of the illumination light L at the position of the sample point Q, and K is the reflection coefficient. The intensity I (L) of the illumination light L is determined by parameters such as the brightness of the light source G, the distance between the light source G and the sample point Q, and the incident angle of the illumination light with respect to the polygon to which the sample point Q belongs. On the other hand, the reflection coefficient K is determined by the texture data 20. First, when the texture data 20 is mapped on the surface of the virtual object 10 in a predetermined mapping manner, it is determined which coordinate of the texture data 20 the position of the sample point Q corresponds to, and the corresponding coordinates (u, v) A pixel T (u, v) located at is determined. The value defined as the pixel value of the corresponding pixel T (u, v) becomes the reflection coefficient K at the position of the sample point Q.

テクスチャデータ20として、カラー画像を用いる場合は、個々の原色ごとに、それぞれ所定の反射係数が定義される。すなわち、uv座標系上に定義された1つの画素T(u,v)の画素値として、3つの係数Kr,Kg,Kbが定義されている。ここで、係数Krは原色R(赤)の波長成分をもった照明光についての反射率、係数Kgは原色G(緑)の波長成分をもった照明光についての反射率、係数Kbは原色B(青)の波長成分をもった照明光についての反射率である。   When a color image is used as the texture data 20, a predetermined reflection coefficient is defined for each primary color. That is, three coefficients Kr, Kg, and Kb are defined as pixel values of one pixel T (u, v) defined on the uv coordinate system. Here, the coefficient Kr is the reflectance for the illumination light having the wavelength component of the primary color R (red), the coefficient Kg is the reflectance for the illumination light having the wavelength component of the primary color G (green), and the coefficient Kb is the primary color B. It is a reflectance with respect to illumination light having a wavelength component of (blue).

このようなカラー画像からなるテクスチャデータ20をマッピングした場合、サンプル点Qからの反射光の強度は、光の各波長成分ごとに演算される。たとえば、反射光Vの赤色波長成分の強度Ir(V)は、照明光Lの赤色波長成分のサンプル点Qの位置における強度Ir(L)と、反射係数Krとを用いて、
Ir(V)=Kr・Ir(L)
なる式で求めることができる。
When mapping the texture data 20 composed of such a color image, the intensity of the reflected light from the sample point Q is calculated for each wavelength component of the light. For example, the intensity Ir (V) of the red wavelength component of the reflected light V is calculated using the intensity Ir (L) at the position of the sample point Q of the red wavelength component of the illumination light L and the reflection coefficient Kr.
Ir (V) = Kr · Ir (L)
It can be calculated by the following formula.

<<< §2.高次元画像をテクスチャとして用いるモデル >>>
§1では、テクスチャデータ20として、二次元画像を用いた例を示した。このような二次元画像をマッピングするモデルでは、サンプル点Qの反射特性が、照明光の入射角や反射光の反射角に依存しないものとして取り扱っているが、パイル地のような三次元構造をもった繊維シートを物体表面に張り付けた場合、厳密には、照明光の入射角や反射光の反射角に依存した異方性反射の特性を考慮した取り扱いをしなければならない。
<<< §2. Model using high-dimensional image as texture >>
In §1, an example using a two-dimensional image as the texture data 20 is shown. In such a model for mapping a two-dimensional image, the reflection characteristic of the sample point Q is handled as not depending on the incident angle of illumination light or the reflection angle of reflected light, but a three-dimensional structure such as a pile ground is used. Strictly speaking, when the fiber sheet is stuck on the object surface, it must be handled in consideration of the anisotropic reflection characteristics depending on the incident angle of the illumination light and the reflection angle of the reflected light.

このように、光の入射方向や反射方向に関する角度に依存して、反射特性が異なるような取り扱いを行う基本的なモデルとして、BRDF(Bi-directional Reflection Distribution Function)と呼ばれるモデルが提案されている。図2は、このBRDFモデルの原理を説明するための斜視図である。図示のとおり、仮想物体表面上のサンプル点Qの位置に法線Nを立て、サンプル点Qを含み、法線Nに直交する直交平面W(以下、基準面Wと呼ぶ)を定義する。そして、法線Nと入射照明光Lとのなす角をθL、基準面W上への入射照明光Lの投影像L′とこの基準面W上のサンプル点Qを通る所定の基準線ζとのなす角度をφLとし、入射照明光Lの向きを角度θLおよび角度φLの組み合わせで定義する。同様に、法線Nと反射光Vとのなす角をθV、基準面W上への反射光Vの投影像V′と基準線ζとのなす角度をφVとし、反射光Vの向きを角度θVおよび角度φVの組み合わせで定義する。いわば、角度θL,θVは、入射照明光および反射光の仰角に相当する(本来の「仰角」は、水平面に対する角度を意味するので、角度θL,θVは、厳密に言えば「90°−仰角」であるが、ここでは、便宜上、単に「仰角」と呼ぶことにする)。また、角度φL,φVは、入射照明光および反射光の方位角に相当する。   As described above, a model called BRDF (Bi-directional Reflection Distribution Function) has been proposed as a basic model for handling with different reflection characteristics depending on the angle of incidence and reflection direction of light. . FIG. 2 is a perspective view for explaining the principle of the BRDF model. As shown in the figure, a normal line N is set at the position of the sample point Q on the virtual object surface, and an orthogonal plane W (hereinafter referred to as a reference plane W) including the sample point Q and orthogonal to the normal line N is defined. An angle between the normal N and the incident illumination light L is θL, a projection image L ′ of the incident illumination light L on the reference plane W, and a predetermined reference line ζ passing through the sample point Q on the reference plane W Is defined as a combination of an angle θL and an angle φL. Similarly, the angle between the normal N and the reflected light V is θV, the angle between the projected image V ′ of the reflected light V on the reference plane W and the reference line ζ is φV, and the direction of the reflected light V is the angle. It is defined by a combination of θV and angle φV. In other words, the angles θL and θV correspond to the elevation angles of the incident illumination light and the reflected light (the original “elevation angle” means an angle with respect to the horizontal plane, so strictly speaking, the angles θL and θV are “90 ° −elevation angle”. However, here, for the sake of convenience, this is simply referred to as “elevation angle”). The angles φL and φV correspond to the azimuth angles of incident illumination light and reflected light.

ここで、サンプル点Qにおける入射照明光Lの強度をI(L)としたとき、サンプル点Qからの反射光Vの強度I(V)を、θL,φL,θV,φVの関数として与えられる反射係数K(θL,φL,θV,φV)を用いて、
I(V)=K(θL,φL,θV,φV)・I(L)
なる式で求めるのが、BRDFモデルである。このBRDFモデルの特徴は、反射係数Kを、入射照明光Lの向きを示すパラメータ「θL,φL」および反射光Vの向きを示すパラメータ「θV,φV」の関数として与える点にある。
Here, when the intensity of the incident illumination light L at the sample point Q is I (L), the intensity I (V) of the reflected light V from the sample point Q is given as a function of θL, φL, θV, φV. Using the reflection coefficient K (θL, φL, θV, φV),
I (V) = K (θL, φL, θV, φV) · I (L)
The BRDF model is obtained by the following formula. The BRDF model is characterized in that the reflection coefficient K is given as a function of parameters “θL, φL” indicating the direction of the incident illumination light L and parameters “θV, φV” indicating the direction of the reflected light V.

このBRDFモデルに、テクスチャマッピングの概念を付加したものが、前掲の非特許文献1等に記載されているBTF(Bi-directional Texture Function)モデルである。BTFモデルでは、上記BRDFモデルで用いた4つの角度パラメータに、更に、二次元uv座標系上での座標値(u,v)がパラメータとして加わることになり、サンプル点Qにおける入射照明光Lの強度をI(L)としたとき、サンプル点Qからの反射光Vの強度I(V)は、
I(V)=K(θL,φL,θV,φV,u,v)・I(L)
なる式で与えられる。すなわち、図2に示す反射光Vの強度I(V)は、入射照明光Lがどの方向からサンプル点Qに照射され、反射光Vがサンプル点Qからどの方向に射出するか、という角度に関するパラメータに依存して定まるとともに、サンプル点Qの位置にも依存して定まるファクターということになる。
A BTF (Bi-directional Texture Function) model described in the above-mentioned Non-Patent Document 1 or the like is obtained by adding the concept of texture mapping to the BRDF model. In the BTF model, coordinate values (u, v) on the two-dimensional uv coordinate system are further added as parameters to the four angle parameters used in the BRDF model, and the incident illumination light L at the sample point Q When the intensity is I (L), the intensity I (V) of the reflected light V from the sample point Q is
I (V) = K (θL, φL, θV, φV, u, v) · I (L)
It is given by That is, the intensity I (V) of the reflected light V shown in FIG. 2 relates to the angle from which direction the incident illumination light L is applied to the sample point Q and from which direction the reflected light V is emitted from the sample point Q. This is a factor that is determined depending on the parameter and also determined depending on the position of the sample point Q.

図3は、このBTFモデルで用いる6次元テクスチャデータ20の構造を示す平面図である。上述したとおり、このBTFモデルにおいて、反射係数Kは、6次元の関数K(θL,φL,θV,φV,u,v)として定義されるパラメータであるから、この6次元テクスチャデータ20自身は、6次元空間上に配置された多数の画素の集合から構成される6次元の画像データということになり、個々の画素が特定の反射係数Kに相当する画素値を有することになる。ただ、ここでは、説明の便宜上、図3に示す例のように、この6次元テクスチャデータ20を、uv平面上の二次元画素配列として図示することにする。この場合、この二次元画素配列上の個々の画素T(u,v)には、4つのパラメータ「θL,φL,θV,φV」の関数として定まる反射係数K(θL,φL,θV,φV)がそれぞれ定義されていることになる。   FIG. 3 is a plan view showing the structure of the 6-dimensional texture data 20 used in this BTF model. As described above, in this BTF model, the reflection coefficient K is a parameter defined as a six-dimensional function K (θL, φL, θV, φV, u, v). This means 6-dimensional image data composed of a set of a large number of pixels arranged in a 6-dimensional space, and each pixel has a pixel value corresponding to a specific reflection coefficient K. However, for convenience of explanation, the 6-dimensional texture data 20 is illustrated as a two-dimensional pixel array on the uv plane as in the example shown in FIG. In this case, each pixel T (u, v) on the two-dimensional pixel array has a reflection coefficient K (θL, φL, θV, φV) determined as a function of four parameters “θL, φL, θV, φV”. Is defined respectively.

ここで、反射係数K(θL,φL,θV,φV)は、θL,φL,θV,φVをそれぞれ変数として含む何らかの関数式として定義することも可能であるが、実用上は、数値テーブルとして定義するのが一般的であり、ここで述べる実施形態も、数値テーブルとして定義する取り扱いを行うことを前提としている。このように反射係数Kを数値テーブルとして定義する場合、角度のパラメータθL,φL,θV,φVは連続量として取り扱うことはできないので、離散的な取り扱いを行わざるを得ない。   Here, the reflection coefficient K (θL, φL, θV, φV) can be defined as some function expression including θL, φL, θV, and φV as variables, but in practice, it is defined as a numerical table. The embodiment described here is also premised on the handling defined as a numerical table. Thus, when the reflection coefficient K is defined as a numerical table, the angle parameters θL, φL, θV, and φV cannot be handled as continuous quantities, and thus must be handled in a discrete manner.

図4に、角度θLの離散的な定義の一例を示す。上述したとおり、角度θLは、サンプル点Qに入射する照明光Lの法線Nに対する角度を示すものである。図4には、サンプル点Qに対して、6通りの仰角をもって入射する照明光L1〜L6が描かれている。これら照明光L1〜L6の入射角θL1〜θL6は、図示のとおり、0°,15°,30°,45°,60°,75°である。入射角(仰角)に関しては、このように15°おきに6通りの角度を離散的に定義しておけば、実用上、ある程度の精度をもったテクスチャ表現が可能になる。   FIG. 4 shows an example of a discrete definition of the angle θL. As described above, the angle θL indicates an angle with respect to the normal line N of the illumination light L incident on the sample point Q. In FIG. 4, illumination lights L <b> 1 to L <b> 6 that are incident on the sample point Q at six elevation angles are depicted. The incident angles θL1 to θL6 of the illumination lights L1 to L6 are 0 °, 15 °, 30 °, 45 °, 60 °, and 75 ° as illustrated. With respect to the incident angle (elevation angle), if six angles are discretely defined at intervals of 15 ° as described above, texture expression with a certain degree of accuracy can be achieved in practice.

一方、図5には、角度φLの離散的な定義の一例を示す。上述したとおり、角度φLは、サンプル点Qに入射する照明光Lの基準面W上への投影像L′と基準線ζとのなす角度であり、照明光Lの方位角を示すものである。図5には、サンプル点Qに対して、12通りの方向から入射する照明光の方位角が描かれている(基準線ζは0°の位置に定義されている。)。すなわち、図5の紙面は基準面Wに対応し、この基準面W上に、0°〜360°の範囲内の方位角が30°おきに定義されている。方位角に関しては、このように30°おきに12通りの角度を離散的に定義しておけば、実用上、ある程度の精度をもったテクスチャ表現が可能になる。   On the other hand, FIG. 5 shows an example of a discrete definition of the angle φL. As described above, the angle φL is an angle formed between the projection image L ′ of the illumination light L incident on the sample point Q on the reference plane W and the reference line ζ, and indicates the azimuth angle of the illumination light L. . In FIG. 5, the azimuth angle of illumination light incident from 12 directions with respect to the sample point Q is drawn (the reference line ζ is defined at a position of 0 °). 5 corresponds to the reference plane W, and azimuth angles in the range of 0 ° to 360 ° are defined on the reference plane W every 30 °. With regard to the azimuth angle, if 12 angles are defined discretely at intervals of 30 ° in this way, texture expression with a certain degree of accuracy can be achieved in practice.

以上、入射照明光Lに関する角度θL,φLについての離散的定義例を示したが、反射光Vに関する角度θV,φVについても同様の定義を行うことができる。すなわち、角度θVに関しては、0°,15°,30°,45°,60°,75°という6通りの離散的定義を行い、角度φVに関しては、0°〜360°の範囲内の方位角を30°おきに定義すればよい。   As described above, the discrete definition examples of the angles θL and φL related to the incident illumination light L have been shown, but the same definitions can be made for the angles θV and φV related to the reflected light V. That is, regarding the angle θV, six discrete definitions of 0 °, 15 °, 30 °, 45 °, 60 °, and 75 ° are made, and the angle φV is an azimuth angle in the range of 0 ° to 360 °. May be defined every 30 °.

このような離散的な定義を行うと、角度θLおよびθVはそれぞれ6通りの値をとり、角度φLおよびφVはそれぞれ12通りの値をとることになるので、これら4つの角度の組み合わせは、6×12×6×12=5184通りということになる。したがって、図3に示すテクスチャデータ20の1つの画素T(u,v)に定義される反射係数Kは、それぞれの角度値の組み合わせに応じて5184通りの値をとることになる。   If such a discrete definition is performed, the angles θL and θV each have six values, and the angles φL and φV each have twelve values. Therefore, the combination of these four angles is 6 That is, × 12 × 6 × 12 = 5184 ways. Therefore, the reflection coefficient K defined for one pixel T (u, v) of the texture data 20 shown in FIG. 3 takes 5184 values depending on the combination of the respective angle values.

結局、図3に示すテクスチャデータ20は、形式的には、二次元uv座標系上に定義された二次元の画像データとして表現されているが、実際には、6つのパラメータθL,φL,θV,φV,u,vによって定義される画素値(反射率)をもった6次元の画像データ(反射特性データ)ということになる。   After all, the texture data 20 shown in FIG. 3 is formally expressed as two-dimensional image data defined on the two-dimensional uv coordinate system, but actually, the six parameters θL, φL, θV are represented. , ΦV, u, v, it is 6-dimensional image data (reflection characteristic data) having a pixel value (reflectance) defined by.

この図3に示すような高次元のテクスチャデータ20を用いたBTFモデルによるレンダリング処理は、次のようにして行われる。まず、図1に示すように、三次元仮想物体10の表面に、このテクスチャデータ20をマッピングし、サンプル点Qの位置に対応する画素T(u,v)を決定する。次に、光源Gの位置やサンプル点Qが所属するポリゴンの向きなどを考慮することにより、サンプル点Qに入射する照明光Lの角度θL,φL、サンプル点Qから射出する反射光Vの角度θV,φVを決定する。そして、図3に示す画素T(u,v)について定義されている反射特性を参照して、特定の角度θL,φL,θV,φVの組み合わせに対応する反射係数を求める。カラー画像の場合は、三原色RGBのそれぞれについての反射係数Kr,Kg,Kbが求められる。最後に、これらの反射係数Kr,Kg,Kbに基づいて、反射光Vの各原色成分ごとの強度値を求め、投影面H上の画素Pの画素値を決定すればよい。   The rendering process using the BTF model using the high-dimensional texture data 20 as shown in FIG. 3 is performed as follows. First, as shown in FIG. 1, the texture data 20 is mapped on the surface of the three-dimensional virtual object 10 to determine a pixel T (u, v) corresponding to the position of the sample point Q. Next, by taking into account the position of the light source G and the orientation of the polygon to which the sample point Q belongs, the angles θL and φL of the illumination light L incident on the sample point Q, and the angle of the reflected light V emitted from the sample point Q θV and φV are determined. Then, a reflection coefficient corresponding to a combination of specific angles θL, φL, θV, and φV is obtained with reference to the reflection characteristics defined for the pixel T (u, v) shown in FIG. In the case of a color image, reflection coefficients Kr, Kg, and Kb are obtained for each of the three primary colors RGB. Finally, the intensity value for each primary color component of the reflected light V is obtained based on these reflection coefficients Kr, Kg, and Kb, and the pixel value of the pixel P on the projection plane H may be determined.

<<< §3.実測による反射特性データの作成方法 >>>
続いて、§2で述べたような高次元画像として表現される反射特性データを、実在の物体についての実測により作成する方法を説明する。たとえば、図1に示すレンダリング処理において、物体データ10の表面に、パイル地のような三次元構造をもった繊維シートを張り付けた状態をBTFモデルによって表現したい場合、表面にマッピングするテクスチャデータ20としては、図3に示すような6次元画像として表現される反射特性データを用意する必要がある。実在の物体に基づく測定により、このような高次元の反射特性データを作成するには、たとえば、実在のパイル地の生地を用意し、この生地の表面の反射特性を様々な幾何学的な撮影条件下で撮影し、得られた複数の撮影画像に基づいて、反射特性データを作成すればよい。
<<< §3. Method of creating reflection characteristic data by actual measurement >>>
Next, a method for creating the reflection characteristic data expressed as a high-dimensional image as described in §2 by actually measuring an actual object will be described. For example, in the rendering process shown in FIG. 1, when it is desired to represent a state in which a fiber sheet having a three-dimensional structure such as a pile ground is attached to the surface of the object data 10 using a BTF model, the texture data 20 to be mapped to the surface is used as the texture data 20. Therefore, it is necessary to prepare reflection characteristic data expressed as a six-dimensional image as shown in FIG. In order to create such high-dimensional reflection characteristics data based on measurements based on real objects, for example, a real pile fabric is prepared, and the reflection characteristics of the surface of the fabric are measured with various geometrical images. The reflection characteristic data may be created based on a plurality of photographed images obtained by photographing under the conditions.

具体的な撮影条件としては、光源、物体、カメラという三者の位置関係を設定すればよい。すなわち、1つの撮影条件は、この三者が所定の位置関係にあることを示す条件ということになる。より具体的には、1つの撮影条件は、光源と物体との位置関係と、カメラと物体との位置関係と、の組み合わせにより定義される。   As specific shooting conditions, a positional relationship between the three sources of the light source, the object, and the camera may be set. That is, one shooting condition is a condition indicating that the three parties have a predetermined positional relationship. More specifically, one imaging condition is defined by a combination of the positional relationship between the light source and the object and the positional relationship between the camera and the object.

図6は、様々な撮影条件下での撮影を行うための撮影系の一例を示す斜視図である。この例では、撮影用ステージ30の上面(平面)にシート状の物体40(たとえば、パイル地などの布片)を載置した状態が示されている。この物体40の上面W(被測定面)に対する撮影を行うために、光源50およびカメラ60が図のように配置されている。ここでは、光源50として点光源を用いている。また、光源50、物体40、カメラ60という三者の位置関係を幾何学的に定義するために、光源50内に代表点51を定義し、物体40の上面Wの中心位置に基準点Sを定義している。点光源は、理論上は幾何学的な1点から球面波として光を発生させる光源であるが、実際には、有限の体積を有する発光体であるので、その中に代表点51を定義して取り扱うことにする。代表点51も基準点Sも、位置定義の基準を示すための幾何学的な点であり、理論的には任意の位置に定義することができるが、実用上は、それぞれの中心位置に定義するのが好ましい。したがって、図示の例では、光源50の中心位置に代表点51が定義されており、物体40の上面Wの中心位置に基準点Sが定義されている。   FIG. 6 is a perspective view showing an example of an imaging system for performing imaging under various imaging conditions. In this example, a state in which a sheet-like object 40 (for example, a piece of cloth such as a pile fabric) is placed on the upper surface (plane) of the imaging stage 30 is shown. In order to photograph the upper surface W (surface to be measured) of the object 40, a light source 50 and a camera 60 are arranged as shown in the figure. Here, a point light source is used as the light source 50. In addition, in order to geometrically define the positional relationship between the light source 50, the object 40, and the camera 60, a representative point 51 is defined in the light source 50, and a reference point S is set at the center position of the upper surface W of the object 40. Defined. A point light source is a light source that theoretically generates light as a spherical wave from a geometric point. However, since it is a light emitter having a finite volume, a representative point 51 is defined therein. I will handle it. Both the representative point 51 and the reference point S are geometrical points for indicating a reference for position definition, and can be theoretically defined at arbitrary positions, but in practice, they are defined at respective center positions. It is preferable to do this. Therefore, in the illustrated example, the representative point 51 is defined at the center position of the light source 50, and the reference point S is defined at the center position of the upper surface W of the object 40.

ここで、カメラ60は、その光軸上に基準点Sが位置するような向きに配置することにする。また、代表点51から基準点Sに向かう照明光を基準照明光Lsと呼び、基準点Sからカメラ60の光軸方向に射出する反射光を基準反射光Vsと呼ぶことにする。更に、基準点Sの位置において、物体40の上面Wに対する法線Nを立て、この上面Wを基準面Wと呼び、この基準面W上への基準照明光Lsの投影像をLs′と呼び、基準面W上への基準反射光Vsの投影像をVs′と呼ぶことにする。   Here, the camera 60 is arranged in such an orientation that the reference point S is positioned on the optical axis. In addition, illumination light traveling from the representative point 51 toward the reference point S is referred to as reference illumination light Ls, and reflected light emitted from the reference point S in the optical axis direction of the camera 60 is referred to as reference reflected light Vs. Further, at the position of the reference point S, a normal line N to the upper surface W of the object 40 is set, this upper surface W is called a reference surface W, and a projection image of the reference illumination light Ls on this reference surface W is called Ls ′. The projected image of the reference reflected light Vs on the reference surface W will be referred to as Vs ′.

このような定義を行うと、光源50と物体40との位置関係は、基準点Sに入射する基準照明光Lsと法線Nとのなす角θLs(基準照明光Lsの入射角)と、基準照明光Lsの基準面W上への投影像Ls′と基準線ζsとのなす角φLs(基準照明光Lsの方位角)とによって定義することができる。同様に、物体40とカメラ60の位置関係は、基準点Sからカメラ60の光軸方向に射出する基準反射光Vsと法線Nとのなす角θVs(基準反射光Vsの反射角)と、基準反射光Vsの基準面W上への投影像Vs′と基準線ζsとのなす角φVs(基準反射光Vsの方位角)とによって定義することができる。   With such a definition, the positional relationship between the light source 50 and the object 40 is such that the angle θLs (incidence angle of the reference illumination light Ls) formed by the reference illumination light Ls and the normal N incident on the reference point S, and the reference It can be defined by an angle φLs (an azimuth angle of the reference illumination light Ls) formed between the projection image Ls ′ of the illumination light Ls on the reference plane W and the reference line ζs. Similarly, the positional relationship between the object 40 and the camera 60 is that an angle θVs (a reflection angle of the reference reflected light Vs) formed by the reference reflected light Vs emitted from the reference point S in the optical axis direction of the camera 60 and the normal line N, and It can be defined by the angle φVs (azimuth angle of the reference reflected light Vs) formed by the projected image Vs ′ of the reference reflected light Vs on the reference surface W and the reference line ζs.

この定義は、図2に示すBTFモデルにおけるサンプル点Qに関する照明光Lと反射光Vの定義と共通している。ただ、図2に示す例は、図1に示すようなレンダリング処理を行う際に、三次元仮想物体10上のサンプル点Qの位置における照明光Lと反射光Vとの関係を示すためのものであるのに対し、図6に示す例は、実在の物体40上に定義された基準点Sに入射する基準入射光Lsと、そこから反射する基準反射光Vsとを基準にして、光源50,物体40,カメラ60という三者の位置関係を示すためのものということになる。   This definition is common to the definitions of the illumination light L and the reflected light V for the sample point Q in the BTF model shown in FIG. However, the example shown in FIG. 2 is for showing the relationship between the illumination light L and the reflected light V at the position of the sample point Q on the three-dimensional virtual object 10 when performing the rendering process as shown in FIG. On the other hand, the example shown in FIG. 6 uses the reference incident light Ls incident on the reference point S defined on the real object 40 and the reference reflected light Vs reflected therefrom as a reference, and the light source 50 , The object 40 and the camera 60 to indicate the positional relationship of the three parties.

さて、図6に示す例の場合、角度θLsをa通り、角度φLsをb通りに変化させることにより、光源50と物体40との位置関係をm=(a×b)通りに変化させることができる。同様に、角度θVsをc通り、角度φVsをd通りに変化させることにより、物体40とカメラ60との位置関係を複数n=(c×d)通りに変化させることができる。結局、光源50,物体40,カメラ60という三者の位置関係としては、光源50と物体40との位置関係を複数m通りに変化させ、かつ、物体40とカメラ60との位置関係を複数n通りに変化させることにより、合計(m×n)通りの設定を行うことができ、個々の設定をそれぞれ固有の撮影条件と捉えれば、合計(a×b×c×d)通りの撮影条件を設定することができる。   In the case of the example shown in FIG. 6, the positional relationship between the light source 50 and the object 40 can be changed to m = (a × b) by changing the angle θLs to a and the angle φLs to b. it can. Similarly, by changing the angle θVs to c and the angle φVs to d, the positional relationship between the object 40 and the camera 60 can be changed to a plurality of n = (c × d) ways. After all, as the positional relationship between the light source 50, the object 40, and the camera 60, the positional relationship between the light source 50 and the object 40 is changed in a plurality of m ways, and the positional relationship between the object 40 and the camera 60 is changed to a plurality of n. By changing the way, it is possible to perform a total (m × n) setting. If each setting is regarded as a unique shooting condition, the total (a × b × c × d) shooting conditions can be set. Can be set.

ここに示す実施形態では、0〜90°の角度範囲をα等分し、a=c=αとすることにより、θLsの角度値およびθVsの角度値をそれぞれα通り設定し、0〜360°の角度範囲をβ等分し、b=d=βとすることにより、φLsの角度値およびφVsの角度値をそれぞれβ通り設定し、合計α×β通りの撮影条件を設定するようにしている。 In the embodiment shown here, the angle range of 0 to 90 ° is equally divided by α, and a = c = α, so that the θLs angle value and the θVs angle value are respectively set to α and 0 to 360 °. The angle range is divided equally into β and b = d = β, so that the angle value of φLs and the angle value of φVs are respectively set in β ways, and a total of α 2 × β 2 shooting conditions are set. ing.

具体的には、たとえば、α=6(a=6,c=6)に設定した場合、入射角θLsおよび反射角θVsについては、図4に示す例と同様に、0°,15°,30°,45°,60°,75°なる6通りの設定を行うことができ、β=12(b=12,d=12)に設定した場合、方位角φLsおよび方位角φVsについては、図5に示す例と同様に、0°,30°,60°,…,300°,330°なる12通りの設定を行うことができる。この場合、光源50と物体40との位置関係は72通り(m=6×12通り)、物体40とカメラ60との位置関係も72通り(n=6×12通り)となり、全部で5184通りの撮影条件が設定されることになる。   Specifically, for example, when α = 6 (a = 6, c = 6), the incident angle θLs and the reflection angle θVs are 0 °, 15 °, 30 as in the example shown in FIG. Six settings of °, 45 °, 60 °, and 75 ° can be performed. When β = 12 (b = 12, d = 12), the azimuth angle φLs and the azimuth angle φVs are as shown in FIG. Similarly to the example shown in FIG. 12, twelve settings of 0 °, 30 °, 60 °,..., 300 °, 330 ° can be performed. In this case, the positional relationship between the light source 50 and the object 40 is 72 (m = 6 × 12), and the positional relationship between the object 40 and the camera 60 is 72 (n = 6 × 12), for a total of 5184. The shooting conditions are set.

結局、図6に示す例の場合、光源50と物体40とカメラ60とが所定の位置関係になるような撮影条件を、光源50と物体40との位置関係を複数m通りに変化させ、かつ、物体40とカメラ60との位置関係を複数n通りに変化させることにより、合計(m×n)通り設定することができる。   Finally, in the case of the example shown in FIG. 6, the shooting conditions are such that the light source 50, the object 40, and the camera 60 have a predetermined positional relationship, the positional relationship between the light source 50 and the object 40 is changed in a plurality of m ways, By changing the positional relationship between the object 40 and the camera 60 in a plurality of n ways, a total (m × n) ways can be set.

こうして設定された(m×n)通りの撮影条件のそれぞれについて、光源50によって照明されている物体40の画像をカメラ60で撮影すれば、合計(m×n)枚の撮影画像を得ることができる。上述の例の場合、合計5184通りの撮影条件に基づいて、合計5184枚の撮影画像が得られる。なお、実用上は、カメラ60としてカラー画像を撮影する機能をもったカメラを用いることにより、三原色RGBの各原色プレーンの集合からなるカラー画像が撮影されることになる。   If the image of the object 40 illuminated by the light source 50 is captured by the camera 60 for each of the (m × n) imaging conditions set in this way, a total of (m × n) captured images can be obtained. it can. In the case of the above-described example, a total of 5184 shot images are obtained based on a total of 5184 shooting conditions. In practice, by using a camera having a function of capturing a color image as the camera 60, a color image composed of a set of primary color planes of the three primary colors RGB is captured.

このように、幾何学的に様々な条件下で撮影を行うと、撮影画像上における物体像の形状や大きさは様々なものになる。たとえば、物体40の上面(被測定面)が矩形の平面であったとすると、この被測定面を、基準点S(この矩形の中心点)の位置に立てた法線Nの方向から(図6において、角度θVs=0となる方向から)、特定の回転位置で(図6において、角度φVs=0°もしくは180°となる回転位置で)撮影した場合には、図7(a) に示すように、正則な矩形(画像の輪郭を構成する矩形の各辺に平行な4辺をもった矩形)の撮影画像が得られることになる。ところが、角度φVsを変化させた撮影条件では、図7(b) のように、回転がかかった矩形の画像が得られることになり、更に、角度θVsおよびφVsが任意の値をとる撮影条件では、図7(c) 〜(f) のように、様々な形状や大きさをもった画像が得られることになる。   As described above, when photographing is performed under various geometric conditions, the shape and size of the object image on the photographed image become various. For example, if the upper surface (surface to be measured) of the object 40 is a rectangular plane, this surface to be measured is viewed from the direction of the normal N that stands at the position of the reference point S (the center point of the rectangle) (FIG. 6). In the case where the image is taken at a specific rotational position (in FIG. 6, at a rotational position where the angle φVs = 0 ° or 180 °) from the direction where the angle θVs = 0, as shown in FIG. In addition, a captured image of a regular rectangle (a rectangle having four sides parallel to each side of the rectangle constituting the contour of the image) is obtained. However, under the shooting conditions in which the angle φVs is changed, as shown in FIG. 7B, a rotated rectangular image is obtained. Further, under the shooting conditions in which the angles θVs and φVs take arbitrary values. As shown in FIGS. 7C to 7F, images having various shapes and sizes can be obtained.

しかしながら、ここで作成しようとしているテクスチャーデータ20(反射特性データ)は、図3に示すように、uv座標系上に正則なマトリックス状に配置された画素T(u,v)の集合体によって構成されていなければならない。そこで、前掲の特許文献2などに開示されている射影的正規化変換と呼ばれている幾何学的な画像変換処理の手法を用い、図7(a) 〜(f) に示されている個々の撮影画像を、それぞれ図8(a) 〜(f) に示されている正則画像に変換する。このような正則画像への変換処理は、角度θVsおよびφVsと、カメラ60の焦点距離と、に基づいて行うことが可能である。   However, the texture data 20 (reflection characteristic data) to be created here is composed of an aggregate of pixels T (u, v) arranged in a regular matrix on the uv coordinate system as shown in FIG. Must have been. Therefore, by using a geometric image conversion method called projective normalization conversion disclosed in the above-mentioned Patent Document 2 and the like, each of the individual images shown in FIGS. Are converted into regular images shown in FIGS. 8A to 8F, respectively. Such conversion processing into a regular image can be performed based on the angles θVs and φVs and the focal length of the camera 60.

図8(a) 〜(f) に示されている正則画像は、幾何学的には、いずれも図6に示す物体40を法線Nの方向から見た画像に相当する。もっとも、この図8(a) 〜(f) に示されている正則画像は、互いにそれぞれ異なった画像になる。たとえば、図8(c) に示す正則画像は、幾何学的には、物体40を法線Nの方向から見た画像に相当し、縦横の画素数は、図8(a) に示す正則画像と全く同じになる。しかしながら、図8(c) に示す正則画像は、物体40を法線Nの方向から撮影することにより得られた画像ではなく、斜めの方向から撮影することにより得られた画像であるから、当然、個々の画素値は、図8(a) に示す正則画像の個々の画素値とは異なる。このように、本願において「法線方向から見た正則画像」とは、「幾何学的な意味で法線方向から見た画像と同じ画素配列を有する画像」という意味であり、「法線方向からの撮影により得られる画像(たとえば、図8(a) )」を意味するものではない。   The regular images shown in FIGS. 8A to 8F geometrically correspond to images obtained by viewing the object 40 shown in FIG. However, the regular images shown in FIGS. 8A to 8F are different from each other. For example, the regular image shown in FIG. 8 (c) geometrically corresponds to an image of the object 40 viewed from the direction of the normal N, and the number of vertical and horizontal pixels is the regular image shown in FIG. 8 (a). Is exactly the same. However, the regular image shown in FIG. 8 (c) is not an image obtained by photographing the object 40 from the direction of the normal N, but an image obtained by photographing from an oblique direction. The individual pixel values are different from the individual pixel values of the regular image shown in FIG. Thus, in this application, “regular image viewed from the normal direction” means “an image having the same pixel arrangement as the image viewed from the normal direction in a geometric sense”, It does not mean an image obtained by photographing from (for example, FIG. 8 (a)).

さて、各撮影画像に対して、このような画像変換処理を行うことにより、最終的に(m×n)枚の正則画像が得られたら、これら正則画像に基づいて、反射特性データを作成することができる。最終的に作成される反射特性データは、図3に示されているテクスチャデータ20のように、二次元画素配列上の個々の画素T(u,v)に、4つのパラメータ「θL,φL,θV,φV」の関数として定まる反射係数K(θL,φL,θV,φV)をそれぞれ定義したものである。これに対して、上記画像変換処理によって得られるデータは、上述の例の場合、5184枚の正則画像のデータである。そこで、この5184枚の正則画像のデータに基づいて、図3に示すような反射特性データを作成すればよい。   Now, when (m × n) regular images are finally obtained by performing such image conversion processing on each captured image, reflection characteristic data is created based on these regular images. be able to. The finally created reflection characteristic data is obtained by assigning four parameters “θL, φL, etc. to each pixel T (u, v) on the two-dimensional pixel array as in the texture data 20 shown in FIG. The reflection coefficients K (θL, φL, θV, φV) defined as functions of “θV, φV” are respectively defined. On the other hand, the data obtained by the image conversion process is data of 5184 regular images in the above example. Therefore, reflection characteristic data as shown in FIG. 3 may be created based on the data of the 5184 regular images.

もっとも、この処理は、実体的な演算を伴う処理ではなく、単にデータを整理する処理というべきものである。たとえば、図3に示すテクスチャデータ20の画素T(u,v)には、角度「θL,φL,θV,φV」の関数として定まる反射係数K(θL,φL,θV,φV)が定義されている。そこで、撮影条件として設定した角度「θLs,φLs,θVs,φVs」を、それぞれ角度「θL,φL,θV,φV」とみなして、角度「θLs,φLs,θVs,φVs」という特定の撮影条件についての正則画像上の座標(u,v)の位置にある画素の画素値を、図3に示すテクスチャデータ20の画素T(u,v)についての角度「θL,φL,θV,φV」についての反射係数K(θL,φL,θV,φV)と定義する処理を行えばよい。   However, this process should not be a process involving substantial operations, but simply a process of organizing data. For example, the reflection coefficient K (θL, φL, θV, φV) that is defined as a function of the angles “θL, φL, θV, φV” is defined for the pixel T (u, v) of the texture data 20 shown in FIG. Yes. Therefore, the angles “θLs, φLs, θVs, φVs” set as the imaging conditions are regarded as the angles “θL, φL, θV, φV”, respectively, and the specific imaging conditions of the angles “θLs, φLs, θVs, φVs” are used. The pixel value of the pixel at the position of the coordinate (u, v) on the regular image is obtained with respect to the angle “θL, φL, θV, φV” for the pixel T (u, v) of the texture data 20 shown in FIG. A process defined as a reflection coefficient K (θL, φL, θV, φV) may be performed.

より具体的に説明すると次のようになる。たとえば、「θLs=45°,φLs=120°,θVs=15°,φVs=300°」という特定の撮影条件の下で撮影された撮影画像に基づいて、特定の正則画像が得られたとする。そして、この特定の正則画像上の座標(u,v)の位置にある画素の画素値がP(u,v)であったとする。この場合、図3に示すテクスチャデータ20の画素T(u,v)についての角度「θL=45°,φL=120°,θV=15°,φV=300°」についての反射係数K(45°,120°,15°,300°)の値を、P(u,v)とする定義がなされることになる。もちろん、この画素T(u,v)には、個々の角度の組み合わせのバリエーションに応じて全部で5184通りの反射係数Kが定義されることになるが、これらの反射係数Kは、得られた5184枚の正則画像上の座標(u,v)の位置にある画素の画素値ということになる。   More specifically, it is as follows. For example, it is assumed that a specific regular image is obtained based on a photographed image photographed under specific photographing conditions of “θLs = 45 °, φLs = 120 °, θVs = 15 °, φVs = 300 °”. It is assumed that the pixel value of the pixel at the position of the coordinate (u, v) on this specific regular image is P (u, v). In this case, the reflection coefficient K (45 °) for the angles “θL = 45 °, φL = 120 °, θV = 15 °, φV = 300 °” for the pixel T (u, v) of the texture data 20 shown in FIG. , 120 °, 15 °, 300 °) is defined as P (u, v). Of course, a total of 5184 reflection coefficients K are defined for this pixel T (u, v) in accordance with variations in the combination of individual angles, but these reflection coefficients K were obtained. This is the pixel value of the pixel at the position of coordinates (u, v) on 5184 regular images.

かくして得られた反射特性データは、結局、物体40の所定位置に所定の入射方向から照明光を当てたときに、当該所定位置から所定の射出方向に向かう反射光の反射率を、個々の位置ごとに、それぞれ複数m通りの入射方向および複数n通りの射出方向の組み合わせによる(m×n)通りの場合について定義した反射特性データということになる。   The reflection characteristic data obtained in this way, when the illumination light is applied to the predetermined position of the object 40 from the predetermined incident direction, the reflectance of the reflected light directed from the predetermined position toward the predetermined emission direction is determined as the individual position. In other words, the reflection characteristic data is defined for (m × n) cases each of which is a combination of a plurality of m incident directions and a plurality of n exit directions.

なお、カラー画像の撮影を行った場合、個々の原色プレーンごとに正則画像への変換処理を実行することにより、三原色RGBの各原色プレーンの集合からなる正則画像を得るようにすればよい。   Note that when a color image is taken, a regular image composed of a set of primary color planes of the three primary colors RGB may be obtained by executing a conversion process to a regular image for each primary color plane.

<<< §4.本発明における変換の基本原理 >>>
上述したとおり、図7(a) 〜(f) に示されている個々の撮影画像を、それぞれ図8(a) 〜(f) に示されている正則画像に変換する手法として、従来は、幾何学的な撮影条件(角度θVs,φVs,カメラ60の焦点距離)に基づく幾何学的な演算手法(射影的正規化変換)が利用されてきた。しかしながら、このような幾何学的な演算手法を、実在の物体についてのカメラ撮影で得られた実測画像データに適用しても、精度の高い変換を行うことはできない。その原因は、既に述べたとおり、予め所定の幾何学的な撮影条件を設定し、実在の物体に対して当該撮影条件下で撮影を行ったとしても、実際には、設定どおりの正確な撮影条件下での撮影を行うことが困難なためである。すなわち、図6に示す撮影系では、物体40に対するカメラ60の相対位置や向きに関する誤差、カメラ60の光軸のずれ、レンズの収差などの要因が関与してくるため、図7(a) 〜(f) に示す実際の撮影画像は、幾何学的な撮影条件(角度θVs,φVs,カメラ60の焦点距離)の下で得られる理想的な撮影画像に合致しないのである。
<<< §4. Basic Principle of Conversion in the Present Invention >>
As described above, as a technique for converting the individual captured images shown in FIGS. 7 (a) to (f) into regular images shown in FIGS. 8 (a) to (f), respectively, A geometric calculation method (projective normalization conversion) based on geometric imaging conditions (angles θVs, φVs, focal length of the camera 60) has been used. However, even if such a geometric calculation method is applied to measured image data obtained by camera shooting of an actual object, conversion with high accuracy cannot be performed. The reason for this is that, as described above, even if a predetermined geometric imaging condition is set in advance and an actual object is imaged under the imaging condition, in practice, an accurate imaging as set This is because it is difficult to perform shooting under conditions. That is, in the photographing system shown in FIG. 6, factors such as an error related to the relative position and orientation of the camera 60 with respect to the object 40, a deviation of the optical axis of the camera 60, and lens aberration are involved. The actual captured image shown in (f) does not match the ideal captured image obtained under geometric imaging conditions (angles θVs, φVs, focal length of the camera 60).

そこで、本発明では、基本的に別なアプローチを採り、より正確な正則画像への変換を実現している。本発明における変換の基本原理は、幾何学的な撮影条件を手掛かりとする代わりに、実際に得られた撮影画像上に残された手掛かりを用いて、当該撮影画像を正則画像へ変換する処理を行うことにある。   Therefore, in the present invention, basically another approach is taken to realize a more accurate conversion to a regular image. The basic principle of the conversion in the present invention is a process of converting the photographed image into a regular image using a clue left on the actually obtained photographed image instead of using the geometric photographing condition as a clue. There is to do.

たとえば、図6に示す撮影系において、撮影用ステージ30上に載置された物体40が矩形状の輪郭を有する平面物体であったとしよう。この場合、この物体40を斜め方向から撮影することにより得られた撮影画像上には、たとえば、図9(a) に示すように、物体40の輪郭矩形の像として、四角形ABCDが写っているはずである。一方、この物体40を、法線Nの方向(真上)から撮影した場合には、撮影画像上には、図9(b) に示すような正則な四角形ABCDが写ることが予めわかっていたとする。そうすれば、図9(a) に示す四角形ABCDを図9(b) に示す四角形ABCDに変換することは、公知の幾何学的な演算手法(たとえば、前掲の射影的正規化変換)を用いて行うことができ、この演算手法を用いて、図9(a) に示す四角形ABCD内の任意の点Qについて、図9(b) に示す正則四角形ABCD内の対応点Qを求めることもできる。   For example, suppose that in the imaging system shown in FIG. 6, the object 40 placed on the imaging stage 30 is a planar object having a rectangular outline. In this case, on the photographed image obtained by photographing the object 40 from an oblique direction, for example, as shown in FIG. It should be. On the other hand, when the object 40 is photographed from the direction of the normal N (directly above), it is known in advance that a regular square ABCD as shown in FIG. To do. Then, to convert the square ABCD shown in FIG. 9 (a) into the square ABCD shown in FIG. 9 (b), a known geometric calculation method (for example, projective normalization conversion described above) is used. Using this calculation method, the corresponding point Q in the regular quadrilateral ABCD shown in FIG. 9 (b) can be obtained for any point Q in the quadrilateral ABCD shown in FIG. 9 (a). .

このように、被撮影対象物上に基準枠として機能する矩形が存在すれば、撮影画像上に写っているこの基準枠の像の形状を手掛かりとして、従来の幾何学的な演算手法を適用することにより、当該撮影画像を正則画像に変換することが可能になる。もちろん、射影的正規化変換などの幾何学的な変換手法を用いる、という点に関しては、§3で述べた従来の画像変換方法と共通するが、従来の方法の場合、幾何学的な撮影条件を手掛かりとした変換が行われていたのに対し、本発明では、実際に得られた撮影画像上に写っている基準枠の像の形状を手掛かりとした変換が行われることになる。ある特定の撮影画像を正則画像に変換する処理を行う際に、当該撮影画像上に写っている基準枠の像を利用するため、非常に正確な変換処理が可能になる。すなわち、本発明では、撮影時において、設定どおりの理想的な撮影条件下で撮影が行われなかったとしても、何ら影響を受けることはない。   In this way, if there is a rectangle that functions as a reference frame on the object to be imaged, a conventional geometric calculation method is applied using the shape of the image of the reference frame in the captured image as a clue. Thus, the captured image can be converted into a regular image. Of course, the point that a geometric transformation method such as projective normalization transformation is used is the same as the conventional image transformation method described in §3. On the other hand, in the present invention, conversion is performed using the shape of the image of the reference frame shown in the actually obtained captured image as a clue. When a process for converting a specific captured image into a regular image is performed, an image of the reference frame that appears on the captured image is used, so that a very accurate conversion process can be performed. In other words, in the present invention, even when shooting is not performed under ideal shooting conditions as set during shooting, there is no influence.

もっとも、被撮影対象物上の基準枠として、測定対象となる物体40自身を用いるのは好ましくない。上述の例では、物体40が矩形状の輪郭を有する平面物体であった例を示したが、実用上、測定対象となる物体40は様々な形態を有しており、必ずしも矩形状の輪郭を有しているとは限らない。そこで、実用上は、物体40を載置する撮影用ステージ30の上面に、矩形からなる基準枠を形成しておくようにするのが好ましい。   However, it is not preferable to use the object 40 itself to be measured as the reference frame on the object to be photographed. In the above-described example, the example in which the object 40 is a planar object having a rectangular outline is shown. However, in practice, the object 40 to be measured has various forms, and the rectangular outline is not necessarily used. It does not necessarily have. Therefore, in practice, it is preferable to form a rectangular reference frame on the upper surface of the imaging stage 30 on which the object 40 is placed.

図10は、本発明に係る画像変換を利用するために用いる撮影用ステージ30の一例を示す平面図である。図示のとおり、撮影用ステージ30の上面には、矩形状の基準枠35が描かれている。この基準枠35は、4つの辺35A,35B,35C,35Dによって構成されており、被写体となる物体40は、図示のとおり、この基準枠35の内側に載置される。図11は、図10に示す撮影用ステージ30を用いた撮影により得られた撮影画像の一例を示す平面図である(撮影用ステージ30の輪郭像は図示省略)。この例は、撮影用ステージ30の斜め上方から撮影した例であり、基準枠35の像は、歪んだ四角形ABCDを構成している。もちろん、物体40の像の形状も歪んだものとなっている。   FIG. 10 is a plan view showing an example of the imaging stage 30 used for utilizing the image conversion according to the present invention. As illustrated, a rectangular reference frame 35 is drawn on the upper surface of the imaging stage 30. The reference frame 35 includes four sides 35A, 35B, 35C, and 35D, and an object 40 that is a subject is placed inside the reference frame 35 as illustrated. FIG. 11 is a plan view showing an example of a photographed image obtained by photographing using the photographing stage 30 shown in FIG. 10 (the contour image of the photographing stage 30 is not shown). This example is an example of photographing from obliquely above the photographing stage 30, and the image of the reference frame 35 constitutes a distorted square ABCD. Of course, the shape of the image of the object 40 is also distorted.

この図11に示すような撮影画像を正則画像に変換する目的は、物体40の像の歪みを修正することにあるが、そのような修正を行う上での手掛かりとして、基準枠35の像を構成する歪んだ四角形ABCDを利用するのである。すなわち、図10に示す撮影用ステージ30を真上から撮影したときに得られる撮影画像上で、基準枠35の像がどのような像(正則な四角形)になるかを予め確認しておけば、図9(a) に示す歪んだ四角形ABCDを図9(b) に示す正則四角形ABCDに変換したのと同じ幾何学的な手法(たとえば、射影的正規化変換)により、図11に示す撮影画像を正則画像に変換することができる。   The purpose of converting the captured image as shown in FIG. 11 into a regular image is to correct the distortion of the image of the object 40. As a clue to such correction, the image of the reference frame 35 is used. The distorted rectangular ABCD is used. That is, if the image of the reference frame 35 (regular rectangle) is confirmed in advance on the captured image obtained when the imaging stage 30 shown in FIG. FIG. 11 shows an image obtained by the same geometric technique (for example, projective normalization conversion) as that obtained by converting the distorted quadrangle ABCD shown in FIG. 9 (a) into the regular quadrangle ABCD shown in FIG. 9 (b). Images can be converted into regular images.

これが、本発明における正則画像への画像変換処理の基本原理である。しかしながら、この原理に基づく画像変換処理を実際に行うためには、解決しなければならない重要な問題がある。それは、図11に示すような撮影画像上での基準枠35の像の認識である。図11では、説明の便宜上、基準枠35の像を単純な四角形ABCDとして示したが、正則画像への画像変換処理をコンピュータを利用した演算として実行するためには、四角形ABCDを構成する各辺35A,35B,35C,35Dを、コンピュータに直線として認識させてやる必要がある。   This is the basic principle of image conversion processing into a regular image in the present invention. However, in order to actually perform image conversion processing based on this principle, there is an important problem that must be solved. That is recognition of the image of the reference frame 35 on the photographed image as shown in FIG. In FIG. 11, for convenience of explanation, the image of the reference frame 35 is shown as a simple quadrilateral ABCD. However, in order to perform image conversion processing to a regular image as an operation using a computer, each side constituting the quadrilateral ABCD 35A, 35B, 35C, and 35D need to be recognized as straight lines by the computer.

コンピュータを利用したデジタル画像処理を行う場合、撮影画像は多数の画素の配列からなるデータとして取り扱われる。したがって、図10に示す撮影ステージ30上に、どんなに精密な基準枠35を描いたとしても、図11に示すような撮影画像上では、この基準枠35の像は、単なる画素の集合体でしかない。したがって、コンピュータに幾何学的な四角形ABCDを認識させてやるためには、何らかのアルゴリズムに基づき、基準枠35の像を構成する画素を抽出し、直線認識を行う処理が必要になる。   When digital image processing using a computer is performed, a photographed image is handled as data composed of an array of a large number of pixels. Therefore, no matter how precise the reference frame 35 is drawn on the shooting stage 30 shown in FIG. 10, the image of the reference frame 35 is only a collection of pixels on the shot image as shown in FIG. Absent. Therefore, in order for the computer to recognize the geometric quadrangle ABCD, it is necessary to perform a straight line recognition process by extracting pixels constituting the image of the reference frame 35 based on some algorithm.

しかも、図11に示すような撮影画像から四角形ABCDを認識させる処理は、実際には困難を伴う処理になる。これは、撮影画像上に写った基準枠35の像は、必ずしも連続した線になっていないためである。図6に示す撮影系を見ればわかるとおり、実際の撮影画像は、物体40,光源50,カメラ60の相対位置を様々に変えた条件下で撮影されることになるので、撮影条件によっては、撮影用ステージ30上に描かれた基準枠35が光の反射により不鮮明に写る可能性がある。実際、撮影画像上の基準枠35の像は、とぎれとぎれの線になることも少なくない。§2で述べた例の場合、種々の撮影条件下で撮影した画像が合計5184枚も得られることになり、これら個々の撮影画像ごとに、それぞれ基準枠35の像の形態、線のとぎれ方は異なるものになる。   Moreover, the process of recognizing the quadrilateral ABCD from the photographed image as shown in FIG. 11 is actually a process with difficulty. This is because the image of the reference frame 35 shown on the photographed image is not necessarily a continuous line. As can be seen from the imaging system shown in FIG. 6, an actual captured image is captured under conditions in which the relative positions of the object 40, the light source 50, and the camera 60 are variously changed. There is a possibility that the reference frame 35 drawn on the photographing stage 30 is unclearly reflected by the reflection of light. In fact, the image of the reference frame 35 on the photographed image often becomes a continuous line. In the case of the example described in §2, a total of 5184 images shot under various shooting conditions are obtained. For each of these shot images, the form of the image of the reference frame 35 and how the lines are broken Will be different.

結局、前述した本発明における正則画像への画像変換処理の基本原理を実用化するには、個々の撮影画像上で、基準枠35の像を構成する各辺35A,35B,35C,35Dを、コンピュータ上で直線として認識させる、という具体的な課題を解決する必要がある。本発明では、ハフ変換という直線認識の手法と、幾何学的な撮影条件を手掛かりとする従来の画像変換の手法とを組み合わせることにより、この課題を解決することに成功した。以下、この方法について詳述する。   Eventually, in order to put the basic principle of the image conversion process into the regular image in the present invention into practical use, each side 35A, 35B, 35C, 35D constituting the image of the reference frame 35 on each photographed image, It is necessary to solve the specific problem of recognizing a straight line on a computer. The present invention has succeeded in solving this problem by combining a straight line recognition method called Hough transform and a conventional image conversion method based on geometric imaging conditions. Hereinafter, this method will be described in detail.

<<< §5.ハフ変換の基本原理 >>>
ここでは、ハフ変換の基本原理を簡単に説明する。ハフ変換(Hough transform)は、不完全な画像情報から線の抽出を行うための方法であり、たとえば、「イメージプロセッシング<画像処理標準テキストブック>」 監修:画像処理標準テキストブック編集委員会、発行所:財団法人画像情報教育振興協会、発行日:平成9年2月25日、187〜190頁などに詳細な説明がなされている。
<<< §5. Basic principle of Hough transform >>>
Here, the basic principle of the Hough transform will be briefly described. The Hough transform is a method for extracting lines from incomplete image information. For example, “Image Processing <Image Processing Standard Text Book>” Supervision: Image Processing Standard Text Book Editorial Committee, published Place: Foundation for Image Information Education, Date of Issue: February 25, 1997, 187-190 pages, and so on.

いま、図12(a) に示すような二次元xy座標系を定義し、この座標上に、図示のような1本の直線Laが存在するものとする。一般に、xy座標系上の任意の直線は、座標軸に対する向きを示す変数ξと原点に対する変位を示す変数ρを用いて表わすことができる。図示の例の場合、直線Laは、座標軸xに対する向きを示す変数ξaと原点Oに対する変位を示す変数ρaを用いて表わされている。すなわち、図12(a) に示す例では、xy座標系の原点Oから直線Laに対して垂線を下し、その足を点Fとしたときに、このxy座標系の一軸xと線分OFとのなす角度をξaとし、線分OFの長さをρaで表わし、2つの変数ξa,ρaにより、当該直線Laを表わす表現形式が用いられている。   Now, it is assumed that a two-dimensional xy coordinate system as shown in FIG. 12 (a) is defined, and one straight line La as shown exists on this coordinate. In general, an arbitrary straight line on the xy coordinate system can be expressed using a variable ξ indicating the orientation with respect to the coordinate axis and a variable ρ indicating the displacement with respect to the origin. In the case of the illustrated example, the straight line La is represented using a variable ξa indicating the orientation with respect to the coordinate axis x and a variable ρa indicating the displacement with respect to the origin O. That is, in the example shown in FIG. 12A, when the perpendicular line is drawn from the origin O of the xy coordinate system to the straight line La and the foot is set to the point F, the one axis x of this xy coordinate system and the line segment OF. Is represented by ρa, the length of the line segment OF is represented by ρa, and an expression form representing the straight line La by two variables ξa and ρa is used.

このように、2つの変数(ξ,ρ)の組合わせが、xy座標上の1本の直線に一義的に対応することになるので、図12(b) に示すように、二次元ξρ座標系を定義すれば、このξρ座標上の任意の1点λは、xy座標上の特定の直線に対応する。図示の例では、図12(b) に示すξρ座標上の1点λa(ξa,ρa)は、図12(a) に示すxy座標上の直線Laに対応する。   Thus, since the combination of the two variables (ξ, ρ) uniquely corresponds to one straight line on the xy coordinates, as shown in FIG. 12 (b), the two-dimensional ξρ coordinates. If a system is defined, an arbitrary point λ on the ξρ coordinate corresponds to a specific straight line on the xy coordinate. In the illustrated example, one point λa (ξa, ρa) on the ξρ coordinate shown in FIG. 12B corresponds to a straight line La on the xy coordinate shown in FIG.

そこで、図13(a) に示すように、xy座標上に点Pをとり、この点Pを通る3本の直線La,Lb,Lcを考える。すると、図13(b) に示すように、ξρ座標上には、これら3本の直線La,Lb,Lcに対応して、それぞれ点λa,λb,λcがプロットできる。xy座標上の点Pを通る直線は、3本だけではなく、実は無限に存在するので、この無限個の直線について、ξρ座標上にそれぞれ対応する点をプロットすれば、ξρ座標上には、無限個の対応点がプロットされることになり、この無限個の対応点によって1本の線グラフを描くことができる。すなわち、図14(a) に示すように、xy座標上に点Pを定義し、この点Pを通る無限個の直線群を考えると、当該直線群は、図14(b) に示すように、ξρ座標上に引かれた1本の線グラフμとして表現されることになる。   Accordingly, as shown in FIG. 13A, a point P is taken on the xy coordinates, and three straight lines La, Lb, and Lc passing through the point P are considered. Then, as shown in FIG. 13B, points λa, λb, and λc can be plotted on the ξρ coordinate corresponding to these three straight lines La, Lb, and Lc, respectively. Since the straight line passing through the point P on the xy coordinates is not limited to three but actually exists infinitely, if the corresponding points are plotted on the ξρ coordinate for the infinite number of straight lines, An infinite number of corresponding points are plotted, and a single line graph can be drawn by the infinite number of corresponding points. That is, when a point P is defined on the xy coordinates as shown in FIG. 14 (a) and an infinite number of straight lines passing through the point P is considered, the straight line group is as shown in FIG. 14 (b). , Ξρ is represented as a single line graph μ drawn on the coordinates.

次に、図15(a) に示すように、xy座標上に4つの点P1,P2,P3,P4が存在する場合を考える。この場合、点P1を通る無限個の直線は、図15(b) に示すように、ξρ座標上での1本の線グラフμ1として表現することができる。同様に、点P2を通る無限個の直線は線グラフμ2として表現され、点P3を通る無限個の直線は線グラフμ3として表現され、点P4を通る無限個の直線は線グラフμ4として表現される。ここで、図15(b) に示すように、この4本の線グラフμ1〜μ4が共通の交点γを通る場合、当該交点γは、点P1を通る直線の1つに対応し、点P2を通る直線の1つに対応し、点P3を通る直線の1つに対応し、点P4を通る直線の1つに対応することになるので、結局、図15(a) に破線で示す直線L(4点P1〜P4のすべてを通る直線)に対応することになる。   Next, consider the case where there are four points P1, P2, P3, and P4 on the xy coordinates as shown in FIG. In this case, an infinite number of straight lines passing through the point P1 can be expressed as one line graph μ1 on the ξρ coordinate, as shown in FIG. 15 (b). Similarly, an infinite number of straight lines passing through the point P2 are represented as a line graph μ2, an infinite number of straight lines passing through the point P3 are represented as a line graph μ3, and an infinite number of straight lines passing through the point P4 are represented as a line graph μ4. The Here, as shown in FIG. 15B, when the four line graphs μ1 to μ4 pass through the common intersection γ, the intersection γ corresponds to one of the straight lines passing through the point P1, and the point P2 Corresponds to one of the straight lines passing through the point P3, and corresponds to one of the straight lines passing through the point P4. Consequently, the straight line indicated by the broken line in FIG. L (a straight line passing through all four points P1 to P4).

かくして、ハフ変換の手法を利用すれば、図15(a) に示すように、xy座標上の4点P1〜P4に基づいて、これら4点を通る直線Lを決定することが可能になる。すなわち、4点P1〜P4のそれぞれについて、図15(b) に示すように、各点を通る無限個の直線群を示す線グラフμ1〜μ4をそれぞれξρ座標上に求め、その交点γのξ座標値およびρ座標値を求めれば、図15(a) に示す直線Lを一義的に決定することができる。したがって、xy座標上で、とぎれとぎれの不鮮明な線が与えられた場合でも、これを完全な直線に修復することが可能になる。   Thus, if the Hough transform method is used, a straight line L passing through these four points can be determined based on the four points P1 to P4 on the xy coordinates as shown in FIG. That is, for each of the four points P1 to P4, as shown in FIG. 15 (b), line graphs μ1 to μ4 indicating an infinite number of straight lines passing through each point are obtained on the ξρ coordinate, respectively, and ξ of the intersection γ is obtained. If the coordinate value and the ρ coordinate value are obtained, the straight line L shown in FIG. 15 (a) can be uniquely determined. Therefore, even when a sharp and blurred line is given on the xy coordinates, it can be restored to a complete straight line.

<<< §6.本発明に係る反射特性データの作成方法の基本手順 >>>
続いて、本発明に係る反射特性データの作成方法の基本手順を、図16の流れ図を参照しながら説明する。この図16に示す方法の概要は、既に§3で述べたとおりであり、その目的は、実在の物体の被測定面の所定位置に所定の入射方向から照明光を当てたときに、当該所定位置から所定の射出方向に向かう反射光の反射率を、被測定面の個々の位置ごとに、それぞれ複数m通りの入射方向および複数n通りの射出方向の組み合わせによる(m×n)通りの場合について定義したデータを、被測定面についての反射特性データとして作成することにある。
<<< §6. Basic procedure of a method for creating reflection characteristic data according to the present invention >>>
Next, the basic procedure of the method for creating reflection characteristic data according to the present invention will be described with reference to the flowchart of FIG. The outline of the method shown in FIG. 16 has already been described in §3. The purpose of this method is to apply illumination light to a predetermined position on a surface to be measured of an actual object from a predetermined incident direction. When the reflectance of reflected light traveling from a position toward a predetermined emission direction is (m × n) depending on a combination of a plurality of m incident directions and a plurality of n emission directions for each position of the surface to be measured Is to create the reflection characteristic data for the surface to be measured.

まず、ステップS1の物体載置段階では、平面上に描かれた直線で構成される基準枠の内部に、被測定面を有する物体が載置される。具体的には、図10に示すように、矩形からなる基準枠35が描かれた撮影用ステージ30を用意し、この基準枠35の内部に、被測定面を有する物体40を載置すればよい。   First, in the object placement stage of step S1, an object having a surface to be measured is placed inside a reference frame constituted by straight lines drawn on a plane. Specifically, as shown in FIG. 10, if an imaging stage 30 on which a rectangular reference frame 35 is drawn is prepared, and an object 40 having a measurement surface is placed inside the reference frame 35. Good.

続くステップS2の撮影条件設定段階では、図6に示すような撮影系において、光源50と被測定面(物体40)とカメラ60とが所定の位置関係になるような撮影条件を、光源50と被測定面(物体40)との位置関係を複数m通りに変化させ、かつ、被測定面(物体40)とカメラ60との位置関係を複数n通りに変化させることにより、合計(m×n)通り設定する作業が行われる。§3で述べた例の場合、角度θV,θLに関しては、図4に示すとおり、0°,15°,30°,45°,60°,75°という6通りの離散的定義を行い、角度φV,φLに関しては、図5に示すとおり、0°〜360°の範囲内の方位角を30°おきに合計12通りの定義を行い、m=72通り、n=72通り、合計5184通りの撮影条件を設定した。   In the subsequent shooting condition setting stage of step S2, in the shooting system as shown in FIG. 6, the shooting conditions such that the light source 50, the surface to be measured (object 40), and the camera 60 are in a predetermined positional relationship are The total (m × n) is obtained by changing the positional relationship between the surface to be measured (object 40) in a plurality of m ways and changing the positional relationship between the surface to be measured (object 40) and the camera 60 in a plurality of n ways. ) Work to set as follows. In the case of the example described in §3, regarding the angles θV and θL, as shown in FIG. 4, six discrete definitions of 0 °, 15 °, 30 °, 45 °, 60 °, and 75 ° are performed. Regarding φV and φL, as shown in FIG. 5, azimuth angles in the range of 0 ° to 360 ° are defined in total 12 ways every 30 °, and m = 72, n = 72, and 5184 in total. Set the shooting conditions.

次のステップS3の物体撮影段階では、図6に示す撮影系を用いて、設定された(m×n)通りの撮影条件のそれぞれについて、光源50によって照明されている物体40上の被測定面の画像をカメラ60で撮影する撮影処理を実行することにより、(m×n)枚の物体撮影画像を得る処理が行われる。こうして得られた物体撮影画像は、たとえば、図7に示すように、様々な方向から撮影した画像になる。   In the object photographing stage of the next step S3, the surface to be measured on the object 40 illuminated by the light source 50 for each of the set (m × n) photographing conditions using the photographing system shown in FIG. (M × n) object captured images are obtained by executing a shooting process of shooting the image of the above with the camera 60. The object photographed image thus obtained is an image photographed from various directions as shown in FIG. 7, for example.

そして、ステップS4の画像変換段階では、得られた(m×n)枚の物体撮影画像に対する画像変換が行われ、(m×n)枚の正則画像が得られる。たとえば、図7に示すような物体撮影画像が、図8に示すような正則画像に変換されることになる。このステップS4の画像変換段階の処理は、本発明の本質的な特徴となるプロセスであり、別途、§7において詳細に説明する。   Then, in the image conversion stage of step S4, image conversion is performed on the obtained (m × n) object photographed images, and (m × n) regular images are obtained. For example, an object photographed image as shown in FIG. 7 is converted into a regular image as shown in FIG. The process of the image conversion stage in step S4 is a process that is an essential feature of the present invention, and will be described in detail separately in §7.

最後に、ステップS5の反射特性データ作成段階において、(m×n)枚の正則画像に基づいて、物体の反射特性データの作成が行われる。これは、§3で説明したとおり、(m×n)枚の正則画像の各画素値を整理して、図3に示すようなテクスチャデータ20の形式のデータを作成する処理である。なお、図16に示す各手順におけるステップS4,S5は、実際には、コンピュータによって実行される処理である。   Finally, in the reflection characteristic data creation stage of step S5, the reflection characteristic data of the object is created based on (m × n) regular images. This is a process of organizing the pixel values of (m × n) regular images and creating data in the form of texture data 20 as shown in FIG. 3 as described in §3. Note that steps S4 and S5 in each procedure shown in FIG. 16 are actually executed by a computer.

<<< §7.本発明に係る正則画像への画像変換方法の基本手順 >>>
ここでは、図16の流れ図におけるステップS4の画像変換段階の基本手順、すなわち、本発明の特徴となる正則画像への画像変換方法の基本手順を詳述する。図17は、この画像変換段階の詳細な手順を示す流れ図であり、平面上に描かれた直線で構成される基準枠の内部に配置された被写体を、所定方向から撮影することにより得られる撮影画像を、当該平面上の基準点に立てた法線方向から見た正則画像に変換するための処理手順である。この図17の各ステップに示されている処理は、実用上、コンピュータによって実行されることになる。
<<< §7. Basic procedure of image conversion method to regular image according to the present invention >>
Here, the basic procedure of the image conversion stage in step S4 in the flowchart of FIG. 16, that is, the basic procedure of the image conversion method to a regular image that is a feature of the present invention will be described in detail. FIG. 17 is a flowchart showing the detailed procedure of this image conversion stage, and is obtained by photographing a subject placed inside a reference frame composed of straight lines drawn on a plane from a predetermined direction. This is a processing procedure for converting an image into a regular image viewed from a normal direction set at a reference point on the plane. The processing shown in each step of FIG. 17 is practically executed by a computer.

まず、ステップS11は、画像入力段階の処理であり、図16のステップS3の物体撮影段階で撮影された画像が、所定の画素値をもった画素を配列してなる画像データとして入力されることになる。図6の撮影系におけるカメラ60として、デジタルカメラを用いるようにすれば、このデジタルカメラから出力される画像データをそのままコンピュータに取り込むようにすればよい。   First, step S11 is processing in an image input stage, and an image captured in the object imaging stage in step S3 in FIG. 16 is input as image data in which pixels having predetermined pixel values are arranged. become. If a digital camera is used as the camera 60 in the photographing system of FIG. 6, the image data output from this digital camera may be directly taken into the computer.

ここでは便宜上、ステップS11で入力された撮影画像が、二次元xy座標系上に定義された画素配列から構成されているものとし、より具体的には、図18に示すような単純な画素配列からなる撮影画像が入力されたものとして、以下の説明を行うことにする。図18に示す撮影画像は、xy座標系上に縦横行列状に多数の画素を配置してなるデータであり、ここでは説明を単純化するため、個々の画素には、「0」もしくは「1」のいずれかの画素値が与えられているものとする。すなわち、図18に示す撮影画像は二値画像であり、図にハッチングを施して示す画素が画素値「1」をもつ画素(以下、黒画素と呼ぶ)であり、それ以外の画素が画素値「0」をもつ画素(以下、白画素と呼ぶ)である。ここでは、この図18に示す撮影画像が、合計N個の画素から構成されているものとし、左上隅の画素から順に、画素P1,P2,P3,…,PNと符号を付すことにする。なお、黒画素については、個々の画素の輪郭を示してあるが、白画素については、図が繁雑になるため、左上隅の白画素P1,P2,P3および右下隅の白画素PNを除き、個々の白画素の輪郭は省略してある(図18において、黒画素の背景となっている白地部分には、すべて白画素が配列されている)。   Here, for convenience, it is assumed that the captured image input in step S11 is composed of a pixel array defined on the two-dimensional xy coordinate system, and more specifically, a simple pixel array as shown in FIG. The following description will be given on the assumption that a captured image consisting of is input. The captured image shown in FIG. 18 is data in which a large number of pixels are arranged in a vertical and horizontal matrix on an xy coordinate system. In order to simplify the description here, each pixel has “0” or “1”. It is assumed that one of the pixel values of “is given. That is, the photographed image shown in FIG. 18 is a binary image, the hatched pixels in the figure are pixels having a pixel value “1” (hereinafter referred to as black pixels), and the other pixels are pixel values. A pixel having “0” (hereinafter referred to as a white pixel). Here, it is assumed that the photographed image shown in FIG. 18 is composed of a total of N pixels, and the pixels P1, P2, P3,. For black pixels, the outline of each pixel is shown. However, for white pixels, the figure is complicated, so the white pixels P1, P2, P3 in the upper left corner and the white pixel PN in the lower right corner are excluded. The outline of each white pixel is omitted (in FIG. 18, white pixels are all arranged in the white background portion that is the background of the black pixel).

なお、ここでは、後述するように、撮影用ステージ30上に描かれた基準枠35の像から、当該基準枠35を構成する直線を認識する例を説明するため、図18に示す撮影画像は、基準枠35の撮影像の直線部分の一部のみを示す画像になっている。図18の黒画素を繋げてゆけば、1本の直線の存在が認識できるであろう。このようなとぎれとぎれの黒画素の分布に基づいて、1本の直線(基準枠35を構成する直線)を認識するために、§5で述べたハフ変換の原理が利用されることになる。もちろん、実際の撮影画像は、たとえば、図11に示す例のように、基準枠35を構成する4本の辺35A,35B,35C,35Dの像と物体40の像とが含まれた複雑な画素構成になるので、図18は、実際に得られる撮影画像の一部分のみを図示した例ということになる。   Here, as will be described later, in order to describe an example in which a straight line constituting the reference frame 35 is recognized from an image of the reference frame 35 drawn on the shooting stage 30, the captured image shown in FIG. The image shows only a part of the straight line portion of the photographed image of the reference frame 35. If the black pixels in FIG. 18 are connected, the existence of one straight line will be recognized. In order to recognize one straight line (straight line constituting the reference frame 35) based on such a discontinuous black pixel distribution, the principle of the Hough transform described in §5 is used. Of course, the actual captured image is a complex image including the images of the four sides 35A, 35B, 35C, and 35D constituting the reference frame 35 and the image of the object 40, as in the example shown in FIG. Since it has a pixel configuration, FIG. 18 is an example in which only a part of a captured image actually obtained is illustrated.

続いて、ステップS12において、積算用二次元画素配列の定義を行う。ここで、積算用二次元画素配列は、後述するステップS15において画素値の積算処理を行う際に用いられる画素配列であり、ξρ座標系上に定義された画素配列であるものとする。また、個々の画素は、いずれも初期画素値0を有しているものとする。このステップS12は、いわばステップS15で実行される画素値積算段階の準備段階というべき処理である。なお、ここで定義する積算用二次元画素配列のサイズは、直線を決定するための変数ξ,ρについて必要な精度を考慮して適宜設定すればよい。   Subsequently, in step S12, a two-dimensional pixel array for integration is defined. Here, the two-dimensional pixel array for integration is a pixel array used when pixel value integration processing is performed in step S15 described later, and is a pixel array defined on the ξρ coordinate system. Each pixel has an initial pixel value of 0. This step S12 is a process that should be called a preparation stage of the pixel value integration stage executed in step S15. Note that the size of the two-dimensional pixel array for integration defined here may be appropriately set in consideration of necessary accuracy for the variables ξ and ρ for determining a straight line.

ステップS13では、パラメータiが初期値1に設定され、ステップS14,S15の処理が、ステップS16を経て繰り返し実行される。このとき、毎回、ステップS17において、パラメータiが1ずつ増加更新される。ここで、パラメータiは、図18に示す撮影画像上の画素を示すパラメータであり、i=1の場合は第1番目の画素P1,i=2の場合は第2番目の画素P2,…,i=Nの場合は第N番目の画素PNを示すことになる。   In step S13, the parameter i is set to the initial value 1, and the processes in steps S14 and S15 are repeatedly executed through step S16. At this time, the parameter i is incremented and updated by 1 in step S17 each time. Here, the parameter i is a parameter indicating a pixel on the photographed image shown in FIG. 18, and when i = 1, the first pixel P1, when i = 2, the second pixel P2,. When i = N, this indicates the Nth pixel PN.

ステップS14は、§5で述べたハフ変換を利用して、ξρ座標上の線グラフμを演算によって求める線グラフ演算段階の処理である。図12に示すとおり、xy座標系上の任意の直線Laは、座標軸に対する向きを示す変数ξaと原点Oに対する変位を示す変数ρaとを用いて表わすことができ、ξρ座標系上では、1点λaとして表わすことができる。このような表現形式を採れば、図14に示すとおり、xy座標系上の任意の1点Pを通る直線群は、ξρ座標系上では、1本の線グラフμとして表わすことができる。そこで、このステップS14では、ステップS11で入力した画像データを構成する1つの画素について、当該画素の基準位置を通る直線群のそれぞれについての変数(ξ,ρ)の組合わせを求め、二次元ξρ座標系上に各変数対(ξ,ρ)に対応する座標点をプロットし、これら座標点の集合により構成される線グラフμをξρ座標系上に求める処理が行われる。   Step S14 is a line graph calculation stage process for calculating the line graph μ on the ξρ coordinate by using the Hough transform described in §5. As shown in FIG. 12, an arbitrary straight line La on the xy coordinate system can be expressed by using a variable ξa indicating the orientation with respect to the coordinate axis and a variable ρa indicating the displacement with respect to the origin O, and one point on the ξρ coordinate system. It can be expressed as λa. If such an expression format is adopted, as shown in FIG. 14, a group of straight lines passing through one arbitrary point P on the xy coordinate system can be represented as one line graph μ on the ξρ coordinate system. Therefore, in step S14, for one pixel constituting the image data input in step S11, a combination of variables (ξ, ρ) for each of the straight line groups passing through the reference position of the pixel is obtained, and two-dimensional ξρ is obtained. A process is performed in which coordinate points corresponding to each variable pair (ξ, ρ) are plotted on the coordinate system, and a line graph μ composed of a set of these coordinate points is obtained on the ξρ coordinate system.

すなわち、ステップS14の処理は、パラメータiを用いて説明すれば、第i番目の画素Piについて、ξρ座標系上に線グラフμiを求める処理ということができる。図19は、このようにしてξρ座標上に求められた線グラフμiの一例を示す平面図である。この図19に示すξρ座標系上の線グラフμiは、図18に示すxy座標系上の第i番目の画素Piの基準位置を通る直線群を示すグラフということになる(図14に示す線グラフμと点Pとの関係と同じ)。なお、ここで述べる実施形態の場合、「画素の基準位置」として、当該画素の中心点位置を採用するようにしているので、図19に示す線グラフμiは、図18に示す画素Piの中心点を通る直線群を表わすグラフということになる。もちろん、「画素の基準位置」としては、必ずしも中心点位置を採用する必要はなく、たとえば、画素の左上隅の位置などを基準位置として用いるようにしてもかまわない。   That is, the process of step S14 can be said to be a process of obtaining the line graph μi on the ξρ coordinate system for the i-th pixel Pi, if described using the parameter i. FIG. 19 is a plan view showing an example of the line graph μi thus obtained on the ξρ coordinate. The line graph μi on the ξρ coordinate system shown in FIG. 19 is a graph showing a straight line group passing through the reference position of the i-th pixel Pi on the xy coordinate system shown in FIG. 18 (the line shown in FIG. 14). Same as the relationship between graph μ and point P). In the case of the embodiment described here, since the center point position of the pixel is adopted as the “pixel reference position”, the line graph μi shown in FIG. 19 is the center of the pixel Pi shown in FIG. This is a graph representing a group of straight lines passing through the points. Of course, as the “pixel reference position”, it is not always necessary to use the center point position. For example, the position of the upper left corner of the pixel may be used as the reference position.

次のステップS15は、ステップS14で求められた線グラフμi上の画素(ξρ座標系上に定義された積算用二次元画素配列上の画素)の画素値に、画素Pi(図18に示すようなxy座標系上に配列されている第i番目の画素)の画素値を積算する画素値積算段階の処理である。既に述べたとおり、ステップS12の準備段階において、ξρ座標系上に、各画素が初期画素値0を有する積算用二次元画素配列が定義されている。また、ステップS14の線グラフ演算段階において、ξρ座標系上に、図19に示すような線グラフμiが求められている。ステップS15の処理は、ステップS12で準備した積算用二次元画素配列上に、ステップS11で入力した画像データを構成する第i番目の画素Piについて求められた線グラフμiを重ね合わせ、この線グラフμi上に位置する画素の画素値に、画素Piのもつ画素値を積算する処理ということになる。   In the next step S15, the pixel Pi (as shown in FIG. 18) is set to the pixel value of the pixel (pixel on the integrating two-dimensional pixel array defined on the ξρ coordinate system) obtained in step S14. This is a pixel value integration stage process of integrating the pixel values of the i-th pixel arrayed on the xy coordinate system. As already described, in the preparation stage of step S12, a two-dimensional pixel array for integration in which each pixel has an initial pixel value of 0 is defined on the ξρ coordinate system. Further, in the line graph calculation stage of step S14, a line graph μi as shown in FIG. 19 is obtained on the ξρ coordinate system. In the process of step S15, the line graph μi obtained for the i-th pixel Pi constituting the image data input in step S11 is overlaid on the integrating two-dimensional pixel array prepared in step S12. This is a process of adding the pixel value of the pixel Pi to the pixel value of the pixel located on μi.

図20は、図19に示すξρ座標上の線グラフμi上に位置する画素(ハッチング部分)を示す平面図である。ステップS15の処理は、図20にハッチングを施して示す画素の画素値に、図18に示す画素Piの画素値を積算する処理ということになる。ここに示す例の場合、図18に示す画素Piは、画素値「1」をもった黒画素であるから、図20にハッチングを施したすべての画素の画素値に、画素値「1」が積算されることになる。別言すれば、ξρ座標系上に定義された積算用二次元画素配列を構成する画素のうち、図20にハッチングを施して示す画素の画素値のみが「1」だけ増加することになる。   FIG. 20 is a plan view showing pixels (hatched portions) located on the line graph μi on the ξρ coordinate shown in FIG. The process of step S15 is a process of adding the pixel value of the pixel Pi shown in FIG. 18 to the pixel value of the pixel shown by hatching in FIG. In the case of the example shown here, the pixel Pi shown in FIG. 18 is a black pixel having the pixel value “1”, and therefore the pixel value “1” is included in the pixel values of all the pixels hatched in FIG. Will be accumulated. In other words, only the pixel value of the pixel shown by hatching in FIG. 20 among the pixels constituting the integrating two-dimensional pixel array defined on the ξρ coordinate system is increased by “1”.

前述したとおり、ステップS14およびS15の処理は、ステップS16およびS17を経て、パラメータiを1ずつ増加させながら繰り返し実行される。図21は、図18に示す画素P(i+1)の画素値を積算させる処理を示す平面図である。図20に示す線グラフμiが、図18に示す画素Piの基準位置を通る直線群を示すグラフであったのに対し、図21に示す線グラフμ(i+1)は、図18に示す画素P(i+1)の基準位置を通る直線群を示すグラフであるため、ξρ座標上の被積算対象となる画素(図20,図21にハッチングを施して示す画素)は、それぞれ異なっている。ただ、図20と図21との双方においてともにハッチングが施された画素(線グラフμiとμ(i+1)との交点付近に位置する画素)は、図18に示す画素Piの基準位置と画素P(i+1)の基準位置との双方を通る直線に対応することになる。   As described above, the processes in steps S14 and S15 are repeatedly executed through steps S16 and S17 while increasing the parameter i by one. FIG. 21 is a plan view showing a process of integrating the pixel values of the pixel P (i + 1) shown in FIG. The line graph μi shown in FIG. 20 is a graph showing a straight line group passing through the reference position of the pixel Pi shown in FIG. 18, whereas the line graph μ (i + 1) shown in FIG. 21 is the pixel P shown in FIG. Since it is a graph showing a group of straight lines passing through the reference position of (i + 1), the pixels to be accumulated on the ξρ coordinates (pixels shown by hatching in FIGS. 20 and 21) are different. However, in both FIG. 20 and FIG. 21, the hatched pixels (pixels located near the intersections of the line graphs μi and μ (i + 1)) are the reference positions of the pixels Pi and the pixels P shown in FIG. It corresponds to a straight line passing through both of the reference positions (i + 1).

図18に示す画素P1,P2,P3等は、画素値「0」をもった白画素であるから、これらに対応するξρ座標系上の線グラフμ1,μ2,μ3の上に位置する画素について、ステップS15で積算される画素値は「0」ということになる。したがって、ステップS14,S15の処理は、パラメータiが白画素に対応している場合(たとえば、i=1,2,3,…の場合)は実行する意味がない。結局、理論上は、ステップS14およびS15の処理は、ステップS16においてパラメータiがNに達するまで、合計N回(図18に示す第1番目の画素P1から第N番目の画素PNまで)繰り返し実行されることになるが、実用上は、ステップS14,S15の処理は、全N個の画素のうち、画素値「1」を有する黒画素についてのみ行えば足り、画素値「0」を有する白画素については実行する必要はない。   Since the pixels P1, P2, P3, etc. shown in FIG. 18 are white pixels having a pixel value “0”, the pixels located on the line graphs μ1, μ2, μ3 on the ξρ coordinate system corresponding to these pixels. Therefore, the pixel value integrated in step S15 is “0”. Therefore, the processes in steps S14 and S15 are meaningless if the parameter i corresponds to a white pixel (for example, when i = 1, 2, 3,...). After all, theoretically, the processes in steps S14 and S15 are repeatedly executed a total of N times (from the first pixel P1 to the Nth pixel PN shown in FIG. 18) until the parameter i reaches N in step S16. However, in practice, it is sufficient to perform the processing of steps S14 and S15 only for black pixels having a pixel value “1” among all N pixels, and white processing having a pixel value “0”. There is no need to do this for the pixels.

こうして、ステップS16において、パラメータiがNに達すると、ステップS16からステップS18へと進み、基準枠位置予測段階が実行される。この基準枠位置予測段階は、撮影画像を得る際の幾何学的な撮影条件に基づいて、xy座標系上に配置された撮影画像上に現れるであろう基準枠の像の位置を、幾何学的な演算によって予測する処理である。ステップS11で画像データとして入力された撮影画像は、§3で述べたとおり、特定の幾何学的な撮影条件の下で撮影された画像であり、理論的には、この撮影条件が正確に与えられれば、当該撮影条件のみに基づく幾何学的な演算により、撮影画像を正則画像に変換することが可能である。   Thus, when the parameter i reaches N in step S16, the process proceeds from step S16 to step S18, and the reference frame position prediction step is executed. In this reference frame position prediction step, the position of the image of the reference frame that will appear on the photographed image arranged on the xy coordinate system is determined based on the geometric photographing condition at the time of obtaining the photographed image. This is a process of predicting by a typical calculation. The captured image input as image data in step S11 is an image captured under specific geometric imaging conditions as described in §3. Theoretically, this imaging condition is given accurately. If so, it is possible to convert the photographed image into a regular image by a geometric calculation based only on the photographing condition.

具体的には、ここで述べる実施例の場合、図6に示すような撮影系を用いて撮影が行われているので(但し、撮影用ステージ30上には、図10に示すような矩形状の基準枠35が描かれている)、撮影画像を得る際の幾何学的な撮影条件として、
(1)基準点Sに立てた法線Nと撮影装置(図6のカメラ60)の光軸とのなす角θ(図6のθVs)、
(2)この光軸の「基準枠が描かれた平面」(図6の撮影用ステージ30の上面)への投影像(図6のVs′)と基準点Sを通り「基準枠が描かれた平面」に含まれる所定の基準線ζ(図6のζs)とのなす角φ(図6のφVs)、
(3)撮影装置(図6のカメラ60)の光学系の焦点距離、
を与えることが可能である。そこで、ステップS18の基準枠位置予測段階では、上記幾何学的な撮影条件に基づく幾何学的な演算により(実際には、この他にも、カメラの撮影倍率やCCD素子上の画素ピッチなどのカメラ側の撮影条件も考慮した演算がなされる。)、ステップS11で画像データとして入力された撮影画像上に現れるであろう基準枠35の像の位置を予測することが可能である。
Specifically, in the case of the embodiment described here, photographing is performed using a photographing system as shown in FIG. 6 (however, a rectangular shape as shown in FIG. 10 is formed on the photographing stage 30. As a geometric imaging condition for obtaining a captured image,
(1) An angle θ (θVs in FIG. 6) between the normal N set at the reference point S and the optical axis of the photographing apparatus (camera 60 in FIG. 6),
(2) The projected image (Vs ′ in FIG. 6) onto the “plane on which the reference frame is drawn” (the upper surface of the imaging stage 30 in FIG. 6) and the reference point S of this optical axis passes through the “reference frame is drawn. Angle φ (φVs in FIG. 6) formed with a predetermined reference line ζ (ζs in FIG. 6) included in
(3) the focal length of the optical system of the imaging device (camera 60 in FIG. 6);
It is possible to give Therefore, in the reference frame position prediction stage in step S18, by a geometric calculation based on the above geometric imaging conditions (actually, in addition to this, the imaging magnification of the camera, the pixel pitch on the CCD element, etc.) The calculation is performed in consideration of the photographing condition on the camera side.) It is possible to predict the position of the image of the reference frame 35 that will appear on the photographed image input as image data in step S11.

この幾何学的演算は、図10に示すように、撮影用ステージ30を真上から見たときの基準枠35の位置および形状に基づいて、図11に示すように、撮影用ステージ30を斜め方向(上記撮影条件で示される方向)から撮影したときの基準枠35の位置および形状を予測する演算であり、一般に射影的正規化変換と呼ばれている公知の手法に基づく演算である。しかしながら、実際の撮影条件は理想的な撮影条件に対して誤差を生じるため、このステップS18の基準枠位置予測段階で求めた基準枠の像は、正しい基準枠の像とは必ずしも一致しない。既に述べたとおり、従来は、この基準枠位置予測段階で求めた基準枠の像が正しい基準枠の像であるとの前提で、撮影画像を正則画像へ変換する処理を行っていたため、正確な変換処理を行うことができなかったわけである。本発明では、このステップS18で求めた基準枠の像は、あくまでも基準枠が現れるであろう予測位置として取り扱われる。   As shown in FIG. 10, this geometric calculation is performed based on the position and shape of the reference frame 35 when the imaging stage 30 is viewed from directly above, as shown in FIG. This is a calculation for predicting the position and shape of the reference frame 35 when shooting from the direction (direction indicated by the shooting conditions), and is a calculation based on a known method generally called projective normalization conversion. However, since the actual shooting condition causes an error with respect to the ideal shooting condition, the image of the reference frame obtained in the reference frame position prediction step in step S18 does not necessarily match the image of the correct reference frame. As described above, since the process of converting a captured image into a regular image has been performed on the premise that the image of the reference frame obtained in the reference frame position prediction stage is a correct image of the reference frame. The conversion process could not be performed. In the present invention, the image of the reference frame obtained in step S18 is handled as a predicted position where the reference frame will appear.

続くステップS19では、パラメータjが初期値1に設定され、ステップS20,S21の処理が、ステップS22を経て繰り返し実行される。このとき、毎回、ステップS23において、パラメータjが1ずつ増加更新される。ここで、パラメータjは、基準枠を構成する直線を示すパラメータである。ここで述べる実施形態の場合、図10に示すとおり基準枠35は矩形であるため、合計4本の直線から構成されており、j=1,2,3,4の値をとることになる。たとえば、j=1の場合は辺35Aを示し、j=2の場合は辺35Bを示し、j=3の場合は辺35Cを示し、j=4の場合は辺35Dを示すことになる。また、ステップS22における判定基準Mは、この場合M=4ということになる。   In the subsequent step S19, the parameter j is set to the initial value 1, and the processes in steps S20 and S21 are repeatedly executed through step S22. At this time, the parameter j is incremented and updated by 1 in step S23 each time. Here, the parameter j is a parameter indicating a straight line constituting the reference frame. In the case of the embodiment described here, since the reference frame 35 is rectangular as shown in FIG. 10, the reference frame 35 is composed of a total of four straight lines and takes values j = 1, 2, 3, and 4. For example, when j = 1, side 35A is shown, when j = 2, side 35B is shown, when j = 3, side 35C is shown, and when j = 4, side 35D is shown. In addition, the determination criterion M in step S22 is M = 4 in this case.

ステップS20,S21は、実測上予測点決定段階の処理であり、ここでは、ステップS18において予測された基準枠35の像を構成する各直線を示す変数(ξ,ρ)の組合わせについて、積算用二次元画素配列上に対応する座標点をそれぞれ幾何学的予測点εとしてプロットし、各幾何学的予測点εについての所定の近傍領域に所属する画素のうちの画素値が最大の画素の基準位置を、対応する直線についての実測上予測点と決定する処理が行われる。   Steps S20 and S21 are processes in the actual measurement prediction point determination stage, and here, for the combinations of variables (ξ, ρ) indicating the respective straight lines constituting the image of the reference frame 35 predicted in step S18, integration is performed. The corresponding coordinate points on the two-dimensional pixel array are plotted as the geometric prediction points ε, and the pixel value of the pixel belonging to the predetermined neighborhood region for each geometric prediction point ε is the largest. A process of determining the reference position as an actually estimated point for the corresponding straight line is performed.

この実測上予測点決定段階の処理の意味するところを説明する前に、まず、積算用二次元画素配列を構成する個々の画素の画素値が意味するところを説明しておく。積算用二次元画素配列は、ステップS12において、ξρ座標系上に定義された画素配列であり、初期状態では、すべての画素の画素値は0に設定されている。ところが、ステップS13〜S16の処理を繰り返してゆくと、特定の画素の画素値は徐々に増加してゆく。そこで、各画素の画素値が、どのような場合に増加するのかをふりかえってみよう。   Before explaining the meaning of the process in the prediction point determination stage in actual measurement, first, the meaning of the pixel value of each pixel constituting the integrating two-dimensional pixel array will be explained. The integrating two-dimensional pixel array is a pixel array defined on the ξρ coordinate system in step S12, and the pixel values of all the pixels are set to 0 in the initial state. However, when the processes in steps S13 to S16 are repeated, the pixel value of a specific pixel gradually increases. Therefore, let us look back at when the pixel value of each pixel increases.

たとえば、図18に示す第i番目の画素Piについての積算処理では、図20にハッチングを施して示す各画素の画素値が1ずつ増加することになる。ここで、図20にハッチングを施して示す各画素は、線グラフμi上の画素であるから、これは、「xy座標上の画素Pi」の基準位置を通る直線群を示す「ξρ座標上の画素」ということになる。結局、ステップS15において、xy座標上の特定の黒画素の画素値「1」が積算されるξρ座標上の画素とは、当該特定の黒画素の基準位置を通る直線を示す画素であるから、図18に示すすべての黒画素の基準位置を通る共通の直線(xy座標上での直線)が存在するとすれば、そのような直線に対応するξρ座標上の画素は、ξρ座標上の全画素の中の最大画素値をとる画素ということになる。これは、図15(b) の点γが、図15(a) の直線Lに対応することになるのと同じ原理である。   For example, in the integration process for the i-th pixel Pi shown in FIG. 18, the pixel value of each pixel shown by hatching in FIG. 20 increases by one. Here, since each pixel shown by hatching in FIG. 20 is a pixel on the line graph μi, this indicates that the pixel group on the “ξρ coordinate” indicates a straight line group passing through the reference position of the “pixel Pi on the xy coordinate”. It means “pixel”. After all, in step S15, the pixel on the ξρ coordinate on which the pixel value “1” of the specific black pixel on the xy coordinate is integrated is a pixel indicating a straight line passing through the reference position of the specific black pixel. If there is a common straight line (straight line on the xy coordinates) passing through the reference positions of all the black pixels shown in FIG. 18, pixels on the ξρ coordinate corresponding to such a straight line are all pixels on the ξρ coordinate. That is, the pixel having the maximum pixel value among the pixels. This is the same principle that the point γ in FIG. 15 (b) corresponds to the straight line L in FIG. 15 (a).

いま、図18に示すxy座標系上の全N個の画素(撮影画像の全画素)についての画素値積算処理が完了した時点において(すなわち、ステップS16でi=Nと判断された時点において)、ξρ座標上に定義されている積算用二次元画素配列上で最大画素値を有する画素が、図22に示すように、画素γであったとしよう。この場合、この画素γに対応するxy座標上の直線は、図18に示す黒画素のすべてを結ぶ直線の可能性が最も高い直線ということができる。たとえば、この画素γの基準位置(たとえば、中心位置)の座標値が(ξγ,ργ)であった場合、xy座標上に、変数(ξγ,ργ)の組合わせで示される直線Lを描けば、図23に示すように、この直線Lは、図に示すほとんどの黒画素上を通る直線になる。別言すれば、図22に示す画素γの最大画素値は、図23において直線L上に位置する黒画素の各画素値の積算結果として得られたことになる。   Now, when the pixel value integration processing has been completed for all N pixels (all pixels of the captured image) on the xy coordinate system shown in FIG. 18 (that is, when i = N is determined in step S16). Suppose that the pixel having the maximum pixel value on the integrating two-dimensional pixel array defined on the ξρ coordinates is a pixel γ as shown in FIG. In this case, it can be said that the straight line on the xy coordinate corresponding to the pixel γ is the straight line having the highest possibility of a straight line connecting all the black pixels shown in FIG. For example, when the coordinate value of the reference position (for example, the center position) of the pixel γ is (ξγ, ργ), a straight line L indicated by a combination of variables (ξγ, ργ) is drawn on the xy coordinates. As shown in FIG. 23, this straight line L is a straight line passing over most black pixels shown in the figure. In other words, the maximum pixel value of the pixel γ shown in FIG. 22 is obtained as an integration result of the pixel values of the black pixels located on the straight line L in FIG.

このように、ξρ座標上の積算用二次元画素配列を構成する個々の画素の画素値は、当該画素に対応するxy座標系上の直線が、撮影画像を構成する黒画素をいくつ通るかを示すパラメータということになる。したがって、最大画素値を有する画素γの座標値(ξγ,ργ)で表わされる直線は、xy座標上の撮影画像において、黒画素を結んで形成される直線の可能性が最も高い直線としての意味をもつ。かくして、図22に示すように、積算用二次元画素配列上で最大画素値を有する画素γを決定すれば、その座標値(ξγ,ργ)により、図23に示すように、xy座標上に直線Lを決定することができる。   As described above, the pixel value of each pixel constituting the integrating two-dimensional pixel array on the ξρ coordinate indicates how many black pixels constituting the photographed image the straight line on the xy coordinate system corresponding to the pixel passes through. It will be the parameter to show. Therefore, the straight line represented by the coordinate value (ξγ, ργ) of the pixel γ having the maximum pixel value means the straight line having the highest possibility of the straight line formed by connecting the black pixels in the photographed image on the xy coordinate. It has. Thus, as shown in FIG. 22, if the pixel γ having the maximum pixel value is determined on the two-dimensional pixel array for integration, the coordinate value (ξγ, ργ) is used to determine the xy coordinate as shown in FIG. A straight line L can be determined.

このような方法で直線Lを決定するようにすれば、基準枠35の像を構成する直線が、撮影画像上では、とぎれとぎれの黒画素によって構成されていたとしても、これを幾何学的な直線として認識することが可能になる。しかも、このように撮影画像上の情報から直接認識した基準枠35の像は、幾何学的な撮影条件に基づいて予測した基準枠の像のような誤差を含まない正確な位置を示す指標として利用することができる。   If the straight line L is determined by such a method, even if the straight line constituting the image of the reference frame 35 is constituted by discontinuous black pixels on the photographed image, this is expressed as a geometric straight line. It becomes possible to recognize as. In addition, the image of the reference frame 35 directly recognized from the information on the photographed image as described above is an index indicating an accurate position that does not include an error like the image of the reference frame predicted based on the geometric photographing condition. Can be used.

しかしながら、「積算用二次元画素配列上で最大画素値を有する画素γを決定する」という手法のみで、基準枠35の像を構成する直線を決定することは、実用上問題がある。第1の問題点は、基準枠35が複数の直線から構成されているため、これら複数の直線を相互に区別して認識する必要がある点である。図18に示す例は、説明の便宜上、1本の直線を示す黒画素の集合からなる撮影画像を示すものであったため、図23に示すように、1本の直線Lのみが決定されれば十分であった。しかし、実際の基準枠35は、4本の直線から構成されているため、1枚の撮影画像について、基準枠35の像として4本の直線をそれぞれ決定しなければならない。   However, it is practically problematic to determine the straight line constituting the image of the reference frame 35 only by the method of “determining the pixel γ having the maximum pixel value on the two-dimensional pixel array for integration”. The first problem is that since the reference frame 35 is composed of a plurality of straight lines, it is necessary to distinguish the plurality of straight lines from each other. The example shown in FIG. 18 shows a photographed image made up of a set of black pixels showing one straight line for convenience of explanation, and therefore only one straight line L is determined as shown in FIG. It was enough. However, since the actual reference frame 35 is composed of four straight lines, it is necessary to determine four straight lines as images of the reference frame 35 for one photographed image.

そして、第2の問題点は、撮影画像上には、基準枠35の像のみが写っているわけではないという点である。実際の撮影は、図10に示すように、撮影用ステージ30上に描かれた基準枠35の内部に被写体となる物体40を載置し、これら全体をカメラで撮影することになる。このため、撮影画像には、基準枠35のみならず、物体40も写っていることになる。したがって、撮影画像上の全画素について、ステップS13〜S16の処理を繰り返し実行すると、物体40上の直線要素も検出されてしまうことになる。また、実際には、様々な照明条件下で、様々な撮影方向から撮影が行われるため、撮影用ステージ30上の意図しない部分に反射や陰影が生じることになり、これらが誤って基準枠35の一部として認識されてしまう可能性もある。   The second problem is that only the image of the reference frame 35 is not shown on the photographed image. In actual photographing, as shown in FIG. 10, an object 40 as a subject is placed inside a reference frame 35 drawn on a photographing stage 30, and the whole is photographed with a camera. Therefore, the captured image includes not only the reference frame 35 but also the object 40. Therefore, if the processes in steps S13 to S16 are repeatedly executed for all the pixels on the captured image, a linear element on the object 40 is also detected. In practice, since photographing is performed from various photographing directions under various illumination conditions, reflections and shadows are generated in unintended portions on the photographing stage 30, and these are erroneously generated by the reference frame 35. May be recognized as part of

ステップS18で行われた基準枠位置予測段階は、このような問題を解決するための準備を行う処理ということができる。上述したとおり、この基準枠位置予測段階で予測した基準枠の像の位置は、通常、撮影条件に関する誤差を含んでいるため、正しいものにはならない。しかしながら、ここで予測した基準枠の像の位置は、本来の基準枠の像の位置から大きく外れることはない。すなわち、本来の基準枠の像は、ステップS18で予測された位置から外れているとしても、その近傍の所定範囲内に位置していると考えることができる。   It can be said that the reference frame position prediction stage performed in step S18 is a process of preparing for solving such a problem. As described above, the position of the image of the reference frame predicted in the reference frame position prediction stage usually includes an error related to the shooting conditions, and thus is not correct. However, the position of the image of the reference frame predicted here does not greatly deviate from the position of the image of the original reference frame. That is, even if the original image of the reference frame deviates from the position predicted in step S18, it can be considered that the image is located within a predetermined range in the vicinity thereof.

そこで、ステップS20では、基準枠35を構成する第j番目の直線について、ξρ座標系上に幾何学的予測点εをプロットする。すなわち、既に、ステップS18において、xy座標系上の4本の直線から構成される基準枠35の像の位置が予測されているので、この4本の直線のうちの第j番目の直線(たとえば、図11に示す辺35A)について、座標軸xに対する角度ξεと、原点Oから当該直線に下した垂線OFの長さρεとを求め、ξρ座標上に幾何学的予測点ε(ξε,ρε)をプロットすればよい。図24は、このようにしてプロットされた幾何学的予測点εの一例を示す平面図である。   Therefore, in step S20, geometric prediction points ε are plotted on the ξρ coordinate system for the jth straight line constituting the reference frame 35. That is, since the position of the image of the reference frame 35 composed of four straight lines on the xy coordinate system is already predicted in step S18, the jth straight line (for example, the four straight lines (for example, 11), the angle ξε with respect to the coordinate axis x and the length ρε of the perpendicular OF drawn from the origin O to the straight line are obtained, and the geometric prediction point ε (ξε, ρε) on the ξρ coordinate. Can be plotted. FIG. 24 is a plan view showing an example of the geometric prediction point ε plotted in this way.

次に、ステップS21において、プロットした幾何学的予測点εの近傍領域内で、最大画素値を有する画素を探し、当該画素の基準位置を実測上予測点γと決定する処理が行われる。具体的には、個々の画素の基準位置(たとえば、中心位置)が、近傍領域内に入る画素についての画素値を比較し、最大画素値を有する画素を決定すればよい。   Next, in step S21, a process is performed in which a pixel having the maximum pixel value is searched for in the vicinity of the plotted geometric prediction point ε, and the reference position of the pixel is determined as an actually measured prediction point γ. Specifically, it is only necessary to compare the pixel values of pixels whose reference positions (for example, center positions) of the individual pixels fall within the vicinity region and determine the pixel having the maximum pixel value.

図24では、幾何学的予測点εの近傍領域として、図に一点鎖線で囲った領域を設定している。すなわち、幾何学的予測点εの座標値を(ξε,ρε)としたときに、所定の偏差Δξ,Δρを用いて、ξε−Δξ≦ξ≦ξε+Δξ、ρε−Δρ≦ρ≦ρε+Δρなる条件を満たす座標値(ξ,ρ)で示される領域が幾何学的予測点εについての近傍領域として設定されている。ここで、偏差Δξ,Δρとしては、前述した2つの問題点を解決するのに好ましい値を適宜設定すればよい。もちろん、幾何学的予測点εの近傍領域は、必ずしも図示のような矩形領域にする必要はなく、たとえば、幾何学的予測点εを中心として所定半径をもった円を近傍領域として設定することも可能である。   In FIG. 24, a region surrounded by an alternate long and short dash line is set as a region near the geometric prediction point ε. That is, when the coordinate value of the geometric prediction point ε is (ξε, ρε), the following conditions are used: ξε−Δξ ≦ ξ ≦ ξε + Δξ, ρε−Δρ ≦ ρ ≦ ρε + Δρ, using predetermined deviations Δξ and Δρ. A region indicated by the coordinate values (ξ, ρ) to be satisfied is set as a neighborhood region for the geometric prediction point ε. Here, as the deviations Δξ and Δρ, preferable values may be appropriately set to solve the above-described two problems. Of course, the neighboring area of the geometric prediction point ε is not necessarily a rectangular area as shown in the figure. For example, a circle having a predetermined radius around the geometric prediction point ε is set as the neighboring area. Is also possible.

図24に示す例において、たとえば、全画素の中で一番大きな画素値を有する画素が画素γ1であり、2番目に大きい画素値を有する画素が画素γ2であり、3番目に大きい画素値を有する画素が画素γ3であったとすると、ステップS21では、近傍領域に所属する画素のうちの最大画素値を有する画素γ3が抽出され、この画素γ3の基準位置(ξγ,ργ)が、実測上予測点と決定されることになる。ここで、幾何学的な撮影条件に基づいて得られた幾何学的予測点ε(ξε,ρε)は、実測上予測点(ξγ,ργ)に対して図示の距離だけずれているが、このずれは、設定した理論的な撮影条件と、現実に撮影が行われた際の実際の撮影条件とのずれに相当する。続いて、図23に示す例のように、xy座標系上に実測上予測点(ξγ,ργ)に応じた角度ξγおよび原点からの変位ργをもつ直線Lを求めれば、当該直線Lが、基準枠35を構成する第j番目の直線の像に相当することになる。   In the example shown in FIG. 24, for example, the pixel having the largest pixel value among all the pixels is the pixel γ1, the pixel having the second largest pixel value is the pixel γ2, and the third largest pixel value is obtained. Assuming that the pixel having the pixel γ3 is the pixel γ3 having the maximum pixel value among the pixels belonging to the neighboring region is extracted in step S21, the reference position (ξγ, ργ) of the pixel γ3 is predicted by actual measurement. Will be determined as a point. Here, the geometric prediction point ε (ξε, ρε) obtained based on the geometric imaging conditions is shifted from the predicted point (ξγ, ργ) by the distance shown in the figure. The deviation corresponds to a deviation between the set theoretical photographing condition and the actual photographing condition when photographing is actually performed. Subsequently, as in the example shown in FIG. 23, if a straight line L having an angle ξγ corresponding to the actually estimated point (ξγ, ργ) and a displacement ργ from the origin is obtained on the xy coordinate system, the straight line L is This corresponds to an image of the jth straight line constituting the reference frame 35.

なお、図24に示す例において、一番大きな画素値を有する画素γ1や、2番目に大きい画素値を有する画素γ2は、幾何学的予測点εから大きく外れてしまっているため、目的とする第j番目の直線ではない別な直線に対応した画素か、物体40を構成する直線に対応した画素か、あるいは、撮影時に意図せずに生じた陰影などの影響の結果として積算画素値が大きくなってしまった画素と考えられる。   In the example shown in FIG. 24, the pixel γ1 having the largest pixel value and the pixel γ2 having the second largest pixel value are greatly deviated from the geometric prediction point ε. The accumulated pixel value is large as a result of an influence such as a pixel corresponding to another straight line that is not the jth straight line, a pixel corresponding to a straight line constituting the object 40, or an unintentional shadow at the time of photographing. It is thought that the pixel has become.

結局、ステップS20,S21における実測上予測点決定段階の処理は、撮影画像に基づくハフ変換という直線認識の手法(ξρ座標上で最大画素値の画素を求める手法)と、幾何学的な撮影条件を手掛かりとする従来の画像変換の手法とを組み合わせ、従来の画像変換の手法で得られた直線の位置をξρ座標上に幾何学的予測点εとしてプロットし、この幾何学的予測点εの近傍領域の中で最大画素値を有する画素の位置を実測上予測点と決定し、撮影画像上に目的とする第j番目の基準枠35を構成する直線の像を求める処理ということができる。   After all, the process of the step of determining the predicted point in actual measurement in steps S20 and S21 includes a straight line recognition method (a method for obtaining a pixel having the maximum pixel value on the ξρ coordinate) based on the photographed image and a geometric photographing condition. In combination with a conventional image conversion method that uses as a clue, the position of a straight line obtained by the conventional image conversion method is plotted as a geometric prediction point ε on the ξρ coordinate, and the geometric prediction point ε It can be said that the position of the pixel having the maximum pixel value in the vicinity region is determined as an actually measured prediction point, and a straight line image constituting the target jth reference frame 35 is obtained on the photographed image.

こうして、パラメータjを1ずつ増加させながらステップS20,S21の手順を繰り返し実行し、撮影画像上に基準枠35を構成する直線の像を1本ずつ順に求めてゆき、全M本の直線(この例では、M=4)が求まったら、ステップS22を経て、ステップS24へ進むことになる。   In this way, the procedure of steps S20 and S21 is repeatedly executed while increasing the parameter j by 1, and the straight line images constituting the reference frame 35 are sequentially obtained one by one on the photographed image. In the example, when M = 4) is obtained, the process proceeds to step S24 via step S22.

最後のステップS24の処理は、二次元xy座標系上に、各実測上予測点の座標値(ξ,ρ)によって表わされる直線を描き、これらの直線の位置を基準枠35の像の正しい位置として取り扱い、幾何学的な演算によって、ステップS11で入力した撮影画像を正則画像に変換する処理である。すなわち、図9(a) に示すように、xy座標系の撮影画像上において、基準枠35の正しい像が四角形ABCDと認識できれば、前掲の射影的正規化変換などの公知の幾何学的演算手法により、当該撮影画像を正則画像に変換する処理を実行することができる。こうして得られた正則画像上では、基準枠35の像は、図9(b) に示すような正則な四角形ABCDとなる。   The process of the last step S24 draws the straight line represented by the coordinate value (ξ, ρ) of each actually estimated point on the two-dimensional xy coordinate system, and the position of these straight lines is the correct position of the image of the reference frame 35. The captured image input in step S11 is converted into a regular image by geometric calculation. That is, as shown in FIG. 9 (a), if the correct image of the reference frame 35 can be recognized as a quadrilateral ABCD on the photographed image in the xy coordinate system, a known geometric calculation method such as the projective normalization conversion described above. Thereby, the process which converts the said picked-up image into a regular image can be performed. On the regular image thus obtained, the image of the reference frame 35 is a regular quadrilateral ABCD as shown in FIG.

<<< §8.より実用的な実施形態 >>>
上述した§7では、本発明の特徴となる正則画像への画像変換方法の基本概念を単純な実例モデルを用いて説明した。ここでは、本発明のより実用的な実施形態をいくつか述べることにする。
<<< §8. More practical embodiment >>
In §7 described above, the basic concept of the image conversion method into a regular image, which is a feature of the present invention, has been described using a simple example model. Here, some more practical embodiments of the present invention will be described.

(1) 撮影画像が階調画像である場合
これまで述べた基本的な実施形態では、図17の流れ図におけるステップS11で入力される撮影画像が二値画像である単純な例を示した。たとえば、図18に示す撮影画像は、図にハッチングを施して示す黒画素とそれ以外の白画素との2種類の画素から構成される二値画像であった。しかしながら、物体の反射特性データを求めることを目的とした撮影では、通常、階調をもった撮影画像が利用される。このように、撮影画像が階調画像である場合にも、これまで述べてきた基本的な実施形態をそのまま適用した取り扱いが可能である。
(1) Case where Captured Image is Gradation Image In the basic embodiment described so far, a simple example in which the captured image input in step S11 in the flowchart of FIG. 17 is a binary image is shown. For example, the photographed image shown in FIG. 18 is a binary image composed of two types of pixels, a black pixel shown hatched in the figure and other white pixels. However, in photographing for the purpose of obtaining reflection characteristic data of an object, a photographed image having gradation is usually used. As described above, even when the captured image is a gradation image, it is possible to handle the basic embodiment as it is.

たとえば、4段階の階調値をもった階調画像(2ビットの階調画像)の場合、個々の画素のもつ画素値は、「0」,「1」,「2」,「3」の4種類に増えることになる。ここで、画素値「0」をもった画素を白画素、画素値「1」をもった画素を淡画素、画素値「2」をもった画素を濃画素、画素値「3」をもった画素を黒画素と呼ぶことにし、撮影画像上に現れる直線が、図25に示す例のように、白画素からなる背景上に、黒画素,濃画素,淡画素の組合わせで表現されていた場合を考えてみよう。実際、撮影用ステージ30上に描かれた基準枠35を、所定の解像度のデジタルカメラなどで撮影した場合、階調をもった撮影画像上の基準枠35の像は、何種類かの画素値をもつ画素の集合体として表現されるのが一般的である。   For example, in the case of a gradation image having four gradation values (2-bit gradation image), the pixel value of each pixel is “0”, “1”, “2”, “3”. It will increase to 4 types. Here, a pixel having a pixel value “0” is a white pixel, a pixel having a pixel value “1” is a light pixel, a pixel having a pixel value “2” is a dark pixel, and a pixel value is “3”. The pixel is called a black pixel, and a straight line appearing on the photographed image is expressed by a combination of a black pixel, a dark pixel, and a light pixel on a background made up of white pixels as in the example shown in FIG. Let's consider the case. Actually, when the reference frame 35 drawn on the shooting stage 30 is photographed by a digital camera or the like having a predetermined resolution, the image of the reference frame 35 on the photographed image having gradation has several pixel values. It is generally expressed as a collection of pixels having

この図25に示す例の場合、個々の黒画素は、基準枠35を構成する直線の像の最も確からしい位置を示しており、個々の濃画素は、若干精度の低い位置を示しており、個々の淡画素は、更に精度の低い位置を示していると考えられる。また、白画素は、基準枠35を構成する直線の像が存在しない位置を示していると考えてよい。したがって、撮影画像が二値画像ではなく階調画像の場合も、個々の画素の画素値を、積算用二次元画素配列上の画素の画素値に積算する処理を行えば問題はない。   In the case of the example shown in FIG. 25, each black pixel indicates the most probable position of the straight line image constituting the reference frame 35, and each dark pixel indicates a position with a slightly low accuracy, Each light pixel is considered to indicate a position with lower accuracy. Further, it can be considered that the white pixel indicates a position where the straight line image forming the reference frame 35 does not exist. Therefore, even when the photographed image is not a binary image but a gradation image, there is no problem if the pixel values of the individual pixels are integrated with the pixel values of the pixels on the integrating two-dimensional pixel array.

前述した二値画像を用いて説明した例(図18の例)では、黒画素についての積算処理では画素値「1」が積算され、白画素についての積算処理では画素値「0」が積算された(実質的に、白画素については積算処理を実施しないのと同じ)。これに対して、図25に示す階調画像を用いた場合、黒画素についての積算処理では画素値「3」が積算され、濃画素についての積算処理では画素値「2」が積算され、淡画素についての積算処理では画素値「1」が積算され、白画素についての積算処理では画素値「0」が積算されることになる(実質的に、白画素については積算処理を実施しないのと同じ)。これは、濃画素の位置や淡画素の位置にも、ある程度の確率で基準枠35を構成する直線の像が存在する可能性があるため、当該確率に応じた画素値を積算した方が、より正確な結果が得られるであろうという考え方に基づいた手法である。   In the above-described example using the binary image (example in FIG. 18), the pixel value “1” is integrated in the integration process for black pixels, and the pixel value “0” is integrated in the integration process for white pixels. (Substantially the same as not performing integration processing for white pixels). On the other hand, when the gradation image shown in FIG. 25 is used, the pixel value “3” is integrated in the integration process for black pixels, and the pixel value “2” is integrated in the integration process for dark pixels. In the integration process for pixels, the pixel value “1” is integrated, and in the integration process for white pixels, the pixel value “0” is integrated (substantially, no integration process is performed for white pixels). the same). This is because there is a possibility that a straight line image constituting the reference frame 35 exists with a certain degree of probability at the position of the dark pixel or the position of the light pixel. Therefore, it is better to integrate the pixel values according to the probability, This approach is based on the idea that more accurate results will be obtained.

もちろん、実際には、より階調段階の多い階調画像が撮影画像として用いられるのが一般的である。たとえば、8ビットの階調画像の場合、個々の画素には、0〜255までの256通りの画素値が定義されることになる。この場合、基準枠35を構成する直線の像は、たとえば、240〜255という範囲内の画素値をもった画素の集合体として表現されることになろう。この場合、画素値「255」をもった画素は、基準枠35を構成する直線の像の最も確からしい位置を示しているものと考えられるが、画素値「240」をもった画素も、基準枠35を構成する直線の像についてある程度の確からしい位置を示しているものと考えることができる。したがって、このような場合でも、各画素値をそのまま積算するような取り扱いを行えば、これまで述べた基本的な実施形態どおりの手順で、基準枠35を構成する直線の像の位置を正確に決定することが可能である。   Of course, in practice, a gradation image having more gradation steps is generally used as a captured image. For example, in the case of an 8-bit gradation image, 256 pixel values from 0 to 255 are defined for each pixel. In this case, the straight line image constituting the reference frame 35 will be expressed as an aggregate of pixels having pixel values within the range of 240 to 255, for example. In this case, it is considered that the pixel having the pixel value “255” indicates the most probable position of the straight line image forming the reference frame 35, but the pixel having the pixel value “240” It can be considered that a certain position of the straight line image constituting the frame 35 is shown. Therefore, even in such a case, if the handling is performed such that the pixel values are integrated as they are, the position of the straight line image constituting the reference frame 35 can be accurately determined in the same manner as the basic embodiment described so far. It is possible to determine.

(2) 基準枠のバリエーション
これまで述べてきた基本的な実施形態では、図10に示す例のように、撮影用ステージ30の上面に、矩形からなる基準枠35が描かれている例を示した。しかしながら、本発明で用いる基準枠は、必ずしも4辺を有する矩形図形にする必要はない。本発明における基準枠の役割は、図9(a) に示すように、斜めから撮影したときに像として得られる四角形ABCDの幾何学的な形状に基づいて、これを図9(b) に示すような正則四角形に戻すための幾何学的変換(射影的正規化変換など)を特定するための手掛かりを与えることにある。このような幾何学的変換は、四角形の4頂点A,B,C,Dの位置が特定されていれば実施可能であるので、基準枠35は、必ずしも図形的な四角形である必要はない。
(2) Variation of reference frame In the basic embodiment described so far, an example in which a rectangular reference frame 35 is drawn on the upper surface of the photographing stage 30 as shown in FIG. 10 is shown. It was. However, the reference frame used in the present invention is not necessarily a rectangular figure having four sides. The role of the reference frame in the present invention is shown in FIG. 9 (b) based on the geometric shape of the quadrilateral ABCD obtained as an image when taken from an oblique direction, as shown in FIG. 9 (a). It is to provide a clue for specifying a geometric transformation (projective normalization transformation or the like) for returning to a regular quadrangle. Since such geometric transformation can be performed if the positions of the four vertices A, B, C, and D of the quadrangle are specified, the reference frame 35 does not necessarily have to be a graphic quadrangle.

たとえば、図10に示す基準枠35は、35A,35B,35C,35Dの4辺を有する四角形の枠であるが、その代わりに、35A,35B,35Cの3辺を有するU字形の枠を基準枠として用いてもかまわない。この場合、第4の辺35Dは描かれていないが、U字形の枠によって、4頂点A,B,C,Dを特定することは可能である。同様に、35A,35Cの2線分のみからなる図形を基準枠として用いてもかまわない。この場合でも、2線分35A,35Cの各端点として、4頂点A,B,C,Dを特定することが可能である。   For example, the reference frame 35 shown in FIG. 10 is a rectangular frame having four sides of 35A, 35B, 35C, and 35D, but instead, a U-shaped frame having three sides of 35A, 35B, and 35C is used as a reference. It may be used as a frame. In this case, the fourth side 35D is not drawn, but it is possible to specify the four vertices A, B, C, and D by a U-shaped frame. Similarly, a figure composed of only two line segments 35A and 35C may be used as the reference frame. Even in this case, the four vertices A, B, C, and D can be specified as the end points of the two line segments 35A and 35C.

また、基準枠は、必ずしも線で描かれた図形によって構成する必要はない。たとえば、所定領域の内部と外部とのコントラスト差による境界線によって基準枠を構成することも可能である。図26(a) は、このような境界線から構成された基準枠35の一例を示す平面図である。この例では、撮影用ステージ30の上面に、矩形領域38が形成されている。ここで、この矩形領域38は、その内部と外部とでコントラスト差が生じるような領域として形成されている。具体的には、たとえば、上面が白色の撮影用ステージ30の上に、黒い矩形領域38を形成すればよい。そうすれば、黒色領域(図にハッチングを施した部分)と、その周囲の白色領域との境界線として、矩形状の基準枠35を形成することができる。   Further, the reference frame does not necessarily need to be configured by a figure drawn with lines. For example, the reference frame can be configured by a boundary line due to a contrast difference between the inside and the outside of a predetermined area. FIG. 26A is a plan view showing an example of the reference frame 35 constituted by such a boundary line. In this example, a rectangular region 38 is formed on the upper surface of the shooting stage 30. Here, the rectangular region 38 is formed as a region in which a contrast difference occurs between the inside and the outside. Specifically, for example, a black rectangular region 38 may be formed on the imaging stage 30 having a white upper surface. Then, a rectangular reference frame 35 can be formed as a boundary line between the black region (the hatched portion in the figure) and the surrounding white region.

もっとも、このようにコントラスト差による境界線によって基準枠が構成されている場合は、撮影画像上には、たとえば図18に示すような黒画素の集合体として基準枠の像を得ることはできず、黒画素の集合からなる領域と、白画素の集合からなる領域との境界線としてしか、基準枠を構成する直線を把握することができなくなる。そこで、この場合には、図17のステップS11における画像データの入力を行う際に、境界線からなる基準枠35の像を抽出する処理を行う必要がある。   However, when the reference frame is configured by the boundary line due to the contrast difference as described above, the image of the reference frame cannot be obtained as an aggregate of black pixels, for example, as shown in FIG. Therefore, the straight line constituting the reference frame can be grasped only as a boundary line between the area composed of the set of black pixels and the area composed of the set of white pixels. Therefore, in this case, when inputting the image data in step S11 of FIG. 17, it is necessary to perform a process of extracting the image of the reference frame 35 formed by the boundary line.

実際には、この基準枠35の像を抽出する処理は、撮影画像に対する微分処理によって行うことができる。図26(b) は、図26(a) に示す撮影用ステージ30を、図の横方向に走査したときの画素値の変化を示すグラフである。ここでは、白色の画素値を0,黒色の画素値を255とした例が示されている。図示のとおり、黒い矩形領域38に対応する部分の画素値は255、その両側の白い領域に対応する部分の画素値は0となっている。もちろん、実際の撮影画像は、矩形領域38の内部に被写体となる物品が載置された状態で撮影されるので、実際に得られる撮影画像の画素値分布は、このグラフのようにはならないが、矩形領域38の境界部分において、画素値の急激な変化が生じることに変わりはない。   Actually, the process of extracting the image of the reference frame 35 can be performed by a differentiation process on the captured image. FIG. 26B is a graph showing changes in pixel values when the imaging stage 30 shown in FIG. 26A is scanned in the horizontal direction in the figure. Here, an example in which the white pixel value is 0 and the black pixel value is 255 is shown. As shown in the figure, the pixel value of the portion corresponding to the black rectangular region 38 is 255, and the pixel value of the portion corresponding to the white region on both sides thereof is 0. Of course, since the actual captured image is captured with the article to be a subject placed inside the rectangular area 38, the pixel value distribution of the actually captured image does not look like this graph. The pixel value is abruptly changed at the boundary portion of the rectangular area 38.

図26(c) は、図26(b) のグラフを微分したグラフである。微分を行うことにより、画素値の急激な変化が微分値の急激な上昇として現れることになり、矩形領域38の境界部分を検出することが可能になる。なお、図26(c) における微分値は絶対値で示してあるので、境界部分はいずれも上方に伸びる線として表わされている。結局、図26(a) に示すように、所定領域の内部と外部とのコントラスト差による境界線によって基準枠を構成した場合は、画像入力段階で、撮影画像に対して微分処理を施して得られる微分画像を画像データとして入力すれば、これまで述べてきた基本的な実施形態をそのまま適用することが可能になる。   FIG. 26 (c) is a graph obtained by differentiating the graph of FIG. 26 (b). By performing differentiation, an abrupt change in pixel value appears as an abrupt increase in the differential value, and the boundary portion of the rectangular area 38 can be detected. Since the differential values in FIG. 26 (c) are shown as absolute values, the boundary portions are all represented as lines extending upward. Eventually, as shown in FIG. 26 (a), when the reference frame is constituted by the boundary line due to the contrast difference between the inside and the outside of the predetermined area, it is obtained by performing a differentiation process on the captured image at the image input stage. If the obtained differential image is input as image data, the basic embodiment described so far can be applied as it is.

このように、図17のステップS11で入力する画像データは、必ずしも撮影画像そのものである必要はなく、撮影画像に所定の加工処理(たとえば、上述した微分処理や、その他のフィルタリング処理でもかまわない)を施した画像であってもよい。   As described above, the image data input in step S11 of FIG. 17 is not necessarily the captured image itself, and the captured image may be subjected to predetermined processing (for example, the above-described differential processing or other filtering processing may be performed). It may be an image subjected to.

(3) 画素値の被積算対象となるξρ座標上の画素
これまで述べた基本的な実施形態の場合、図17の流れ図におけるステップS14の線グラフ演算段階で、xy座標上の第i番目の画素Piに対応させて、ξρ座標上に図19に示すような線グラフμiを求め、続くステップS15の画素値積算段階で、図20に示すように、ξρ座標上の積算用二次元画素配列上に線グラフμiを重ね合わせ、この線グラフμi上に位置する画素(図20にハッチングを施して示す画素)の画素値に、画素Piのもつ画素値を積算する処理を行った。
(3) Pixels on the ξρ coordinate that are subject to pixel value accumulation In the case of the basic embodiment described so far, at the line graph calculation stage of step S14 in the flowchart of FIG. A line graph .mu.i as shown in FIG. 19 is obtained on the .xi..rho. Coordinate corresponding to the pixel Pi, and at the subsequent pixel value integration stage of step S15, as shown in FIG. 20, the two-dimensional pixel array for integration on the .xi..rho. The line graph μi is overlaid on top of each other, and the pixel value of the pixel Pi is added to the pixel value of the pixel (the pixel shown by hatching in FIG. 20) located on the line graph μi.

しかしながら、ステップS15の画素値積算段階で画素値の被積算対象となるξρ座標上の画素は、必ずしも線グラフμi上に位置する画素に限定する必要はなく、線グラフμi上もしくはその近傍に位置する画素にまで拡張してかまわない。たとえば、図20に示す例の場合、被積算対象となる画素(ハッチングを施した画素)は、いずれも画素内の一部に線グラフμiが通過している画素に限られているが、対象となる画素をもう少し拡張し、線グラフμiに対して所定の距離範囲内にある画素までを被積算対象となる画素に含ませるようにしてもかまわない。   However, the pixel on the ξρ coordinate that is the pixel value integration target in the pixel value integration stage of step S15 is not necessarily limited to the pixel located on the line graph μi, and is located on or near the line graph μi. It does not matter even if it extends to the pixel to do. For example, in the example shown in FIG. 20, the pixels to be accumulated (hatched pixels) are all limited to the pixels through which the line graph μi passes through a part of the pixels. The pixels to be accumulated may be further expanded to include pixels within a predetermined distance range with respect to the line graph μi.

図27は、ξρ座標上の線グラフμiの近傍の画素Tdについても画素値を積算する変形例を説明する平面図である。たとえば、画素Tdの基準位置(中心位置)と線グラフμiとの距離d(μi上の最近接点との距離)を「画素Tdと線グラフμiとの距離」と定義し、この距離dが予め設定した所定のしきい値以下となる画素Tdを、画素値の被積算対象となる画素に含ませるようにすれば、図27にハッチングを施した画素だけでなく、線グラフμiとの距離dが所定のしきい値以下となる近傍の画素に対しても、画素Piのもつ画素値が積算されることになる。   FIG. 27 is a plan view for explaining a modification in which pixel values are also integrated for pixels Td in the vicinity of the line graph μi on the ξρ coordinate. For example, the distance d between the reference position (center position) of the pixel Td and the line graph μi (the distance from the closest point on μi) is defined as “the distance between the pixel Td and the line graph μi”, and this distance d is determined in advance. If the pixel Td that is equal to or less than the set threshold value is included in the pixel that is subject to pixel value accumulation, the distance d to the line graph μi as well as the hatched pixels in FIG. The pixel value of the pixel Pi is also integrated with respect to neighboring pixels in which is below a predetermined threshold.

なお、このように画素値の被積算対象となる画素を、線グラフμiの近傍に位置する画素まで拡張する場合、線グラフμiに対する近接度合いに応じて、積算すべき画素値に差をつけるのが好ましい。たとえば、図27に示す例の場合、ハッチングを施した画素はいずれも線グラフμi上の画素であるのに対して、画素Tdは線グラフμiから距離dだけ離れた位置にある画素であるので、線グラフμiに関連した画素値(画素Piのもつ画素値)を積算する場合、後者には、画素値の寄与割合を考慮して積算した方が理にかなっている。   In addition, when the pixel to be accumulated in pixel values is extended to a pixel located in the vicinity of the line graph μi in this way, the pixel value to be accumulated is differentiated according to the degree of proximity to the line graph μi. Is preferred. For example, in the example shown in FIG. 27, the hatched pixels are all pixels on the line graph μi, whereas the pixel Td is a pixel located at a distance d from the line graph μi. When pixel values related to the line graph μi (pixel values of the pixel Pi) are integrated, it is more reasonable to integrate the latter in consideration of the contribution ratio of the pixel values.

そこで実用上は、線グラフμi上に位置する画素(図27にハッチングを施した画素)の画素値には、画素Piのもつ画素値をそのまま積算し、線グラフμiから所定の近傍距離dだけ離れた画素の画素値には、画素Piのもつ画素値に当該近傍距離dに応じた所定割合R(0≦R≦1の範囲をとり、近傍距離dが大きくなるほど小さくなる値)を乗じた値を積算するようにすればよい。たとえば、画素Piの画素値が255であった場合、図27にハッチングを施して示す各画素に対しては、当該画素値255をそのまま積算し、近傍距離dだけ離れた位置にある画素Tdに対しては、近傍距離dに応じて定まる所定割合R(0≦R≦1)を乗じた値「255×R」を積算するようにすればよい。   Therefore, in practice, the pixel value of the pixel Pi is added as it is to the pixel value of the pixel (hatched pixel in FIG. 27) located on the line graph μi, and only a predetermined neighborhood distance d from the line graph μi. The pixel value of the distant pixel is multiplied by the pixel value of the pixel Pi by a predetermined ratio R corresponding to the neighborhood distance d (a value that takes a range of 0 ≦ R ≦ 1 and decreases as the neighborhood distance d increases). What is necessary is just to integrate a value. For example, when the pixel value of the pixel Pi is 255, the pixel value 255 is added as it is to each pixel shown by hatching in FIG. 27, and the pixel value Td is located at a position separated by the neighborhood distance d. On the other hand, a value “255 × R” multiplied by a predetermined ratio R (0 ≦ R ≦ 1) determined according to the neighborhood distance d may be integrated.

所定割合Rは、近傍距離dが大きくなるほど小さくなる値になれば、どのような方法で定義してもかまわないが、本願発明者は、近傍距離dが非常に小さいうちはRは1に近く、近傍距離dがある程度大きくなるとRが急激に低下するような関数により、Rとdとの関係を定義するのが好ましいと考えている。そこで、実用上は、図28に示すように、線グラフμiの位置を中心としてガウス分布をとる関数を定義し、この関数に基づいて任意の近傍距離dに対する所定割合Rを決定するようにすればよい。   The predetermined ratio R may be defined by any method as long as the neighborhood distance d becomes smaller. However, the inventor of the present application is that R is close to 1 while the neighborhood distance d is very small. We believe that it is preferable to define the relationship between R and d by a function in which R decreases rapidly when the neighborhood distance d increases to some extent. Therefore, in practice, as shown in FIG. 28, a function having a Gaussian distribution around the position of the line graph μi is defined, and a predetermined ratio R with respect to an arbitrary neighborhood distance d is determined based on this function. That's fine.

(4) 実測上予測点決定方法のバリエーション
これまで述べた基本的な実施形態の場合、図17の流れ図におけるステップS21の実測上予測点決定段階では、幾何学的予測点εの近傍領域内で「最大画素値」を有する画素を探し、当該画素の基準位置を実測上予測点と決定していた。しかしながら、ここで「最大画素値」を有する画素を探したのは、xy座標上の画像上において、「基準枠の像を構成する画素の画素値が、その背景となる画素の画素値よりも大きい」という設定がなされていることを前提としたためである。
(4) Variation of Actually Predicted Point Determination Method In the case of the basic embodiment described so far, in the actually estimated point determination step of step S21 in the flowchart of FIG. A pixel having the “maximum pixel value” was searched, and the reference position of the pixel was determined as a predicted point in actual measurement. However, the pixel having the “maximum pixel value” is searched for on the image on the xy coordinates, “the pixel value of the pixel constituting the image of the reference frame is higher than the pixel value of the background pixel. This is because it is assumed that the setting “large” is made.

たとえば、図18に示す例の場合、基準枠の像を構成する黒画素の画素値は「1」、背景となる白画素の画素値は「0」という説明を行った。また、図25に示す例の場合も、基準枠の像を構成する黒画素,濃画素,淡画素の画素値はそれぞれ「3」,「2」,「1」であり、背景となる白画素の画素値は「0」という説明を行った。すなわち、これまで述べてきた実施形態は、「背景部分の画素値に比べて、基準枠の像の部分の画素値が大きい」ことを前提としたものであった。   For example, in the case of the example shown in FIG. 18, description has been made that the pixel value of the black pixel constituting the image of the reference frame is “1” and the pixel value of the white pixel as the background is “0”. Also in the example shown in FIG. 25, the pixel values of the black pixel, the dark pixel, and the light pixel that constitute the image of the reference frame are “3”, “2”, and “1”, respectively. The pixel value of “0” is described as “0”. That is, the embodiments described so far are based on the premise that “the pixel value of the image portion of the reference frame is larger than the pixel value of the background portion”.

しかしながら、本発明を実施する上では、必ずしもこのような前提をとる必要はない。たとえば、xy座標上の画像が二値画像であった場合、基準枠の像を構成する画素の画素値を「0」、背景部分の画素の画素値を「1」とする設定を行ってもかまわない。また、0〜255の画素値を有する階調画像の場合であれば、基準枠の像を構成する画素の画素値が「0〜50程度」、背景部分の画素の画素値が「200〜255程度」に分布した画像を用いてもかまわない。ただ、このように、「背景部分の画素値に比べて、基準枠の像の部分の画素値が小さい画像」をxy座標系上に入力して処理を行う場合、ξρ座標上では、「xy座標上における基準枠の像を構成する画素を通る直線」に対応する画素ほど、積算される画素値が小さくなる。したがって、ステップS21の実測上予測点決定段階では、幾何学的予測点εの近傍領域内で「最大画素値」の代わりに「最小画素値」を有する画素を探し、当該画素の基準位置を実測上予測点と決定する必要がある。   However, in carrying out the present invention, it is not always necessary to take such a premise. For example, when the image on the xy coordinates is a binary image, the pixel value of the pixel constituting the image of the reference frame is set to “0”, and the pixel value of the pixel in the background portion is set to “1”. It doesn't matter. In the case of a gradation image having a pixel value of 0 to 255, the pixel value of the pixel constituting the image of the reference frame is “about 0 to 50”, and the pixel value of the background portion pixel is “200 to 255”. An image distributed in “degree” may be used. However, when processing is performed by inputting “an image in which the pixel value of the image portion of the reference frame is smaller than the pixel value of the background portion” on the xy coordinate system in this way, The pixel value integrated becomes smaller as the pixel corresponds to “a straight line passing through pixels constituting the image of the reference frame on the coordinates”. Therefore, in the actually predicted point determination step in step S21, a pixel having “minimum pixel value” is searched for in place of the “maximum pixel value” in the region near the geometric prediction point ε, and the reference position of the pixel is actually measured. It is necessary to determine the upper prediction point.

また、前述した実施形態では、図17のステップS12において、初期画素値0をもった画素の集合体として、積算用二次元画素配列の定義を行っているが、初期画素値は必ずしも0に設定する必要はない。上述したとおり、実測上予測点を決定する上では、ξρ座標上に定義された積算用二次元画素配列の構成画素の中から、「最大画素値」もしくは「最小画素値」を有する画素を探すことになるので、画素間相互で画素値の比較が可能な環境が用意できていればよい。したがって、積算用二次元画素配列を構成する個々の画素の初期画素値は、すべてが同一の初期画素値となっていれば、どのような値に設定してもかまわない。   In the above-described embodiment, the two-dimensional pixel array for integration is defined as a collection of pixels having the initial pixel value 0 in step S12 in FIG. 17, but the initial pixel value is not necessarily set to 0. do not have to. As described above, in determining the predicted point in actual measurement, the pixel having the “maximum pixel value” or the “minimum pixel value” is searched from the constituent pixels of the integrating two-dimensional pixel array defined on the ξρ coordinate. Therefore, it is only necessary to prepare an environment in which pixel values can be compared between pixels. Accordingly, the initial pixel values of the individual pixels constituting the integrating two-dimensional pixel array may be set to any values as long as all the initial pixel values are the same.

なお、ステップS21の実測上予測点決定段階において、幾何学的予測点εについての所定の近傍領域に所属する画素のうち、「最大画素値」もしくは「最小画素値」を有する画素が複数存在した場合には、これら複数の画素の基準位置の重心位置を、対応する直線についての実測上予測点と決定するようにすればよい。たとえば、図24に示す例では、一点鎖線で示す近傍領域内の画素γ3が「最大画素値」を有する画素である場合を説明した。ここで、もし、「最大画素値」を有する画素として、画素γ3と画素γ4との2つが存在した場合、双方の基準位置を実測上予測点としてしまうと、xy平面上に2本の直線が定義されてしまう。このような場合は、画素γ3の基準位置と画素γ4の基準位置との重心位置を実測上予測点として決定すればよい。   It should be noted that in the actual measurement prediction point determination step in step S21, among the pixels belonging to the predetermined neighborhood region with respect to the geometric prediction point ε, a plurality of pixels having “maximum pixel value” or “minimum pixel value” existed. In this case, the center-of-gravity position of the reference position of the plurality of pixels may be determined as the actually predicted point for the corresponding straight line. For example, in the example shown in FIG. 24, the case where the pixel γ3 in the vicinity region indicated by the alternate long and short dash line is a pixel having the “maximum pixel value” has been described. Here, if there are two pixels γ3 and γ4 as the pixels having the “maximum pixel value”, if both of the reference positions are measured prediction points, two straight lines are formed on the xy plane. Will be defined. In such a case, the center-of-gravity position between the reference position of the pixel γ3 and the reference position of the pixel γ4 may be determined as an actually estimated point.

(5) 画素値の積算対象となるxy座標上の画素
図17の流れ図におけるステップS13〜S17の処理は、パラメータiを1ずつ増加させながら繰り返し実行される手順であり、その意味するところは、xy座標上に入力された画像を構成する全N個の画素の1つ1つについて、ξρ座標上に線グラフを求め、当該線グラフ上もしくはその近傍に位置するξρ座標上の画素を被積算対象画素として、画素値の積算を行うことにある。したがって、この流れ図の手順によれば、xy座標上の第1番目の画素から第N番目の画素に至るまで、全N個の画素すべてを対象として、ステップS14,S15の処理が実行されることになる。
(5) Pixel on xy coordinates to be accumulated pixel values The processing of steps S13 to S17 in the flowchart of FIG. 17 is a procedure that is repeatedly executed while incrementing the parameter i by 1, and its meaning is For each of all N pixels constituting the image input on the xy coordinates, a line graph is obtained on the ξρ coordinate, and pixels on the ξρ coordinate located on or near the line graph are integrated. The pixel value is integrated as the target pixel. Therefore, according to the flowchart, the processes of steps S14 and S15 are executed for all N pixels from the first pixel on the xy coordinates to the Nth pixel. become.

しかしながら、実際には、ステップS14,S15の処理は、必ずしも全N個の画素すべてについて実行する必要がないケースがある。たとえば、画素値「0」をもった画素については、ステップS14,S15を実行して画素値の積算処理を行ったとしても、積算対象となる画素の画素値が「0」であるから、実質的には無意味な処理になる。したがって、実用上、このようなケースでは、ステップS14,S15の処理は省略することができる。   However, in practice, there are cases where the processes of steps S14 and S15 do not necessarily have to be executed for all N pixels. For example, for a pixel having a pixel value “0”, the pixel value of the pixel to be integrated is “0” even if the pixel values are integrated by executing steps S14 and S15. This is meaningless processing. Therefore, practically, in such a case, the processes of steps S14 and S15 can be omitted.

また、画素値「0」をもった画素でなくても、実用上は、ステップS14,S15の処理を省略可能な画素もある。たとえば、0〜255の範囲の画素値をもつ画素の集合体からなる階調画像がxy座標上に存在し、画素値0〜50の範囲内の画素値は、ほとんど確実に背景部分の画素についての画素値であろうと予測されるような場合であれば、画素値0〜50の範囲内の画素値をもつ画素については、ステップS14,S15の処理を省略しても大きな支障は生じない。   Further, even if it is not a pixel having the pixel value “0”, there is a pixel in which the processes of steps S14 and S15 can be omitted in practice. For example, a gradation image composed of a collection of pixels having pixel values in the range of 0 to 255 exists on the xy coordinates, and the pixel values in the range of pixel values 0 to 50 are almost certainly about the pixels in the background portion. In the case where it is predicted that the pixel value of the pixel value is within the range of 0 to 50, there is no significant problem even if the processing of steps S14 and S15 is omitted for pixels having pixel values in the range of pixel values 0 to 50.

このようなケースを考慮した場合、図17のステップS14の線グラフ演算段階は、全N個の画素のうち、所定範囲内の画素値を有する画素についてのみ線グラフを求める演算を実行すれば足り、ステップS15の画素値積算段階は、全N個の画素のうち、所定範囲内の画素値を有する画素についてのみ画素値の積算処理を実行すれば足りる。   In consideration of such a case, the line graph calculation stage in step S14 in FIG. 17 only needs to execute a calculation for obtaining a line graph only for pixels having pixel values within a predetermined range among all N pixels. In the pixel value integration step of step S15, it is only necessary to perform the pixel value integration processing only for pixels having pixel values within a predetermined range among all N pixels.

なお、画素値の積算対象となるxy座標上の画素を決定する際に考慮する要素として、当該画素の画素値の代わりに、当該画素の位置を用いることも可能である。たとえば、ステップS18の基準枠位置予測段階は、ステップS13よりも先に行っておくことが可能であり、そうした場合、ステップS14,S15の処理を実行する時点で、幾何学的な撮影条件に基づいて基準枠位置が既に予測されていることになる。もちろん、ここで予測されている基準枠位置は正確なものにはならないが、実際の基準枠位置は、予測されている基準枠位置の近傍の領域に存在すると考えられるので、当該近傍の領域を「考慮領域」と定義し、xy座標上に配列された画素のうち、当該「考慮領域」内に位置する画素のみを画素値の積算対象とし、それ以外の画素については、ステップS14,S15の処理を省略しても大きな支障は生じない。   It should be noted that as a factor to be considered when determining a pixel on the xy coordinate that is a pixel value integration target, the position of the pixel can be used instead of the pixel value of the pixel. For example, the reference frame position prediction stage in step S18 can be performed prior to step S13. In such a case, at the time when the processes in steps S14 and S15 are executed, the reference frame position prediction stage is based on geometric imaging conditions. Thus, the reference frame position has already been predicted. Of course, the reference frame position predicted here is not accurate, but it is considered that the actual reference frame position exists in a region near the predicted reference frame position. Of the pixels that are defined as “consideration regions” and are arranged on the xy coordinates, only pixels located within the “consideration region” are subject to pixel value accumulation, and other pixels are processed in steps S14 and S15. Even if the processing is omitted, no major trouble occurs.

たとえば、図18に示す例の場合、前述した基本的実施形態では、全N個の画素すべてを画素値の積算対象としていたが、積算対象となる画素をその一部に絞り込むことが可能になる。すなわち、ステップS18の基準枠位置予測段階によって、基準枠の予測位置を求めれば、それは図示の黒画素を結ぶ直線に近い位置にくるであろう。したがって、基準枠の予測位置の近傍に「考慮領域」を定義すれば、それは図示の黒画素を含んだ細長い領域になるであろう。ステップS14,S15の処理は、この細長い「考慮領域」内の画素についてのみ実行され、それ以外の画素については省略される。   For example, in the case of the example shown in FIG. 18, in the basic embodiment described above, all N pixels are targeted for integration of pixel values, but it is possible to narrow down the pixels targeted for integration to a part thereof. . That is, if the predicted position of the reference frame is obtained by the reference frame position prediction step in step S18, it will be close to the straight line connecting the black pixels shown in the figure. Therefore, if a “consideration area” is defined in the vicinity of the predicted position of the reference frame, it will be an elongated area including the black pixels shown in the figure. The processes in steps S14 and S15 are executed only for the pixels in the elongated “consideration region”, and are omitted for the other pixels.

要するに、ステップS14の線グラフ演算段階で、全N個の画素のうち、所定の考慮領域内に位置する画素についてのみ線グラフを求める演算を実行し、ステップS15の画素値積算段階で、全N個の画素のうち、所定の考慮領域内に位置する画素についてのみ画素値の積算処理を実行するようにすればよい。   In short, in the line graph calculation stage in step S14, a calculation for obtaining a line graph is performed only for pixels located within a predetermined consideration area among all N pixels, and in the pixel value integration stage in step S15, all N pixels are calculated. It is only necessary that the pixel value integration process is executed only for pixels located within a predetermined consideration area among the pixels.

(6) 実測上予測点の決定に失敗した取り扱い
これまで述べてきた変形例の内容も踏まえると、図17のステップS21では、幾何学的予測点εについての所定の近傍領域に所属する画素のうちの画素値が最大もしくは最小の画素の基準位置を、実測上予測点と決定することになる。しかしながら、実際には、このような方法で実測上予測点を決定すると、基準枠を構成する直線の像とは全く無関係な直線に対応する点が、実測上予測点として誤検出されてしまう事態が生じやすい。特に、§3で述べたような反射特性データの作成を目的として、様々な撮影条件で多数の撮影画像が得られた場合、何枚かの撮影画像においては、照明光の反射像の影響を受け、ステップS21で誤検出が生じる可能性がある。
(6) Handling of failure in determination of predicted point in actual measurement In consideration of the contents of the modification examples described so far, in step S21 of FIG. 17, the pixel belonging to the predetermined neighborhood region for the geometric predicted point ε The reference position of the pixel having the maximum or minimum pixel value is determined as a predicted point in actual measurement. However, in practice, when the actually estimated point is determined by such a method, a point corresponding to a straight line completely unrelated to the straight line image constituting the reference frame is erroneously detected as the actually measured predicted point. Is likely to occur. In particular, for the purpose of creating reflection characteristic data as described in §3, when a large number of captured images are obtained under various shooting conditions, the influence of the reflected image of illumination light is affected in some captured images. Accordingly, there is a possibility that erroneous detection occurs in step S21.

たとえば、図6に示す撮影系において、照明光Lsの入射角θLs,方位角φLs、反射光Vsの入射角θVs,方位角φVsの組合わせが特定の条件を満たすと、撮影用ステージ30上の鏡面反射により、光源50の像がそのままカメラ60の撮像面に形成されてしまう場合がある。このような条件下で得られた撮影画像上には、光源50の像が真っ白い反射領域として写り込み、基準枠の像は、いわゆる白飛びの状態となって認識することはできなくなる。ところが、このような撮影画像について図17の流れ図に示す手順を実施すると、アルゴリズム上は、ステップS21で実測上予測点の決定が行われてしまう。本来の基準枠の像が写っていない以上、こうして決定された実測上予測点は、本来の基準枠を構成する直線とは全く無関係な点になる。   For example, in the imaging system shown in FIG. 6, if the combination of the incident angle θLs and azimuth angle φLs of the illumination light Ls and the incident angle θVs and azimuth angle φVs of the reflected light Vs satisfies a specific condition, it is on the imaging stage 30. Due to the specular reflection, the image of the light source 50 may be directly formed on the imaging surface of the camera 60. On the photographed image obtained under such conditions, the image of the light source 50 appears as a pure white reflection area, and the image of the reference frame becomes so-called whiteout and cannot be recognized. However, if the procedure shown in the flowchart of FIG. 17 is performed on such a photographed image, a predicted point for actual measurement is determined in step S21 on the algorithm. As long as the image of the original reference frame is not shown, the actually estimated points determined in this way are completely unrelated to the straight lines constituting the original reference frame.

これは、「画素値が最大もしくは最小の画素」というアルゴリズムにより実測上予測点の決定を行う以上、真っ白い反射領域の中で、いくらかでも直線パターンの存在が認識できる部分が、実測上予測点と認識されてしまうためである。図24に示す例の場合、一点鎖線で囲った領域内の多くの画素が、たとえば、「0〜100程度」の画素値をとっているところ、画素γ3だけが最大画素値「10000」をとる、というように、最大画素値は他の画素値に比べてかなり突出した値になるのが一般的である。この突出度が高ければ高いほど正確な直線検出が行われたことを意味する。ところが、基準枠の像が白飛びの状態になってしまうと、図24に示す一点鎖線で囲った領域内のすべての画素が、たとえば、「0〜100程度」の画素値しかとらない現象が生じることになる。このような「ドングリの背比べ」のような状況でも、前掲のアルゴリズムに従う以上、たとえば最大画素値「101」をとる画素γ3が抽出され、その基準位置が実測上予測点として決定されてしまうことになる。もちろん、このような状況下で決定された実測上予測点は、基準枠を構成する直線の像を示すものにはなっていない。   This is because, as long as the predicted point of measurement is determined by the algorithm of “pixel having the maximum or minimum pixel value”, the part that can recognize the presence of any linear pattern in the pure white reflection area is the estimated point of measurement. It is because it will be recognized. In the case of the example shown in FIG. 24, for example, many pixels in the region surrounded by the alternate long and short dash line have a pixel value of “about 0 to 100”, but only the pixel γ3 has the maximum pixel value “10000”. Thus, in general, the maximum pixel value is a considerably prominent value compared to other pixel values. The higher the degree of protrusion, the more accurate straight line detection has been performed. However, when the image of the reference frame is overexposed, all the pixels in the area surrounded by the alternate long and short dash line shown in FIG. 24 may have a pixel value of “about 0 to 100”, for example. Will occur. Even in such a situation such as “acorn comparison”, the pixel γ3 having the maximum pixel value “101” is extracted, for example, as long as the algorithm described above is followed, and the reference position is determined as a predicted point in actual measurement. become. Of course, the actually measured prediction point determined under such circumstances does not indicate a straight line image forming the reference frame.

このような誤検出を避けるためには、ステップS21の実測上予測点決定段階で、「近傍領域内の最大画素値が所定のしきい値に満たない場合」もしくは「最小画素値が所定のしきい値を超えてしまう場合」には、実測上予測点の決定を行わず、正則画像への画像変換に失敗した取り扱いを行うようにすればよい。たとえば、上述の図24に示す例のように、一般的には画素γ3だけが最大画素値「10000」をとる、というケースであれば、たとえば、しきい値を5000に設定しておき、「近傍領域内の最大画素値が5000に満たない場合」には、正しい検出は行われなかったものと判断し、実測上予測点の決定を行わず、正則画像への画像変換に失敗した取り扱いを行うようにすればよい。そうすれば、最大画素値「101」をとる画素γ3が抽出され、その基準位置が実測上予測点として決定されてしまうような誤検出を避けることができる。   In order to avoid such erroneous detection, “when the maximum pixel value in the neighboring region is less than a predetermined threshold” or “the minimum pixel value is not predetermined at the actual prediction point determination stage of step S21. In the case where the threshold value is exceeded, it is only necessary to handle the failure in image conversion to a regular image without determining a predicted point in actual measurement. For example, in the case where only the pixel γ3 generally takes the maximum pixel value “10000” as in the example shown in FIG. 24 described above, for example, the threshold value is set to 5000, and “ In the case where the maximum pixel value in the neighborhood region is less than 5000, it is determined that correct detection has not been performed, the prediction point in actual measurement is not determined, and the image conversion to the regular image has failed. You just have to do it. By doing so, it is possible to avoid erroneous detection in which the pixel γ3 having the maximum pixel value “101” is extracted and the reference position is determined as a predicted point in actual measurement.

なお、1枚の撮影画像を正則画像に変換する、という観点からは、上述したように実測上予測点の決定に失敗すると、正則画像への変換を行うことができず、完全な失敗に終わらざるを得ないが、§3で述べたような反射特性データの作成を目的として、様々な撮影条件で多数の撮影画像が得られた場合であれば、何枚かの撮影画像について正則画像への変換に失敗したとしても、これを補間することが可能になる。   Note that, from the viewpoint of converting a single photographed image into a regular image, as described above, if determination of a predicted point in actual measurement fails, conversion to a regular image cannot be performed, resulting in complete failure. However, if a large number of captured images are obtained under various shooting conditions for the purpose of creating reflection characteristic data as described in §3, some of the captured images are converted into regular images. Even if this conversion fails, this can be interpolated.

すなわち、特定の物体撮影画像を正則画像に変換する画像変換段階における実測上予測点決定段階で、近傍領域内の最大画素値が所定のしきい値に満たない場合もしくは最小画素値が所定のしきい値を超えてしまう場合には、上述したとおり、実測上予測点の決定を行わず、当該物体撮影画像に関する正則画像への画像変換に失敗した取り扱いを行うこととし、画像変換に失敗した取り扱いが行われた物体撮影画像についての正則画像については、撮影条件が近似する別な物体撮影画像についての正則画像に基づく補間を行うことにより求めるようにすればよい。   That is, in the measurement prediction point determination step in the image conversion step of converting a specific object photographed image into a regular image, if the maximum pixel value in the neighboring region is less than a predetermined threshold value or the minimum pixel value is not predetermined. When the threshold value is exceeded, as described above, the actual prediction point is not determined, the image conversion to the regular image related to the object photographed image is failed, and the image conversion is failed. The regular image for the object photographed image that has been subjected to the above may be obtained by performing interpolation based on the regular image for another object photographed image with similar photographing conditions.

図29は、§3で述べた反射特性データの作成プロセスにおいて、特定の撮影画像について正則画像への画像変換に失敗した場合の補間方法を示す平面図である。この図は、図6に示す撮影系における反射光Vsの仰角θVsを、θV1=0°〜θV6=75°の6通りに変化させ、方位角φVsを、φV1=0°〜φV12=330°の12通りに変化させた結果を表形式で示したものである。たとえば、この表における欄Eには、反射光Vsの仰角をθV3=30°に設定し、方位角をφV5=120°に設定したときの結果(正則画像に変換された画像)が配置されることになる。もちろん、実際には、照明光Lsについても、仰角θLsを6通り、方位角φLsを12通りに変化させた実測が行われるので、欄E内には、照明光Lsについての72通りのバリエーションを示す72枚の正則画像が配置されることになる。   FIG. 29 is a plan view illustrating an interpolation method when image conversion to a regular image fails for a specific captured image in the reflection characteristic data creation process described in §3. In this figure, the elevation angle θVs of the reflected light Vs in the imaging system shown in FIG. 6 is changed in six ways from θV1 = 0 ° to θV6 = 75 °, and the azimuth angle φVs is changed from φV1 = 0 ° to φV12 = 330 °. The result of changing in 12 ways is shown in tabular form. For example, in column E in this table, the result (image converted to a regular image) when the elevation angle of the reflected light Vs is set to θV3 = 30 ° and the azimuth angle is set to φV5 = 120 ° is arranged. It will be. Of course, actually, the illumination light Ls is actually measured by changing the elevation angle θLs to 6 ways and the azimuth angle φLs to 12 ways, and therefore, in the column E, 72 variations of the illumination light Ls are provided. The 72 regular images shown are arranged.

ここでたとえば、θV3=30°,φV5=120°,θL4=45°,φL11=300°という特定の撮影条件で撮影したときに、上述した基準枠の像の白飛び現象が起こり、当該撮影画像について正則変換に失敗したものとしよう。この場合、失敗した正則画像を、隣接する欄A,B,C,D,F,G,H,I内の照明光Lsについての仰角および方位角が同一の正則画像8枚(すなわち、撮影条件が近似する別な物体撮影画像についての正則画像)に基づく補間処理によって求めることが可能である。   Here, for example, when shooting is performed under specific shooting conditions of θV3 = 30 °, φV5 = 120 °, θL4 = 45 °, and φL11 = 300 °, the above-described reference frame image whiteout phenomenon occurs, and the captured image is displayed. Let's suppose that regular conversion failed for. In this case, the failed regular images are eight regular images having the same elevation angle and azimuth angle with respect to the illumination light Ls in the adjacent fields A, B, C, D, F, G, H, and I (that is, photographing conditions). Can be obtained by an interpolation process based on a regular image of another object photographed image that approximates.

より具体的には、欄Aからは、θV2=15°,φV4=90°,θL4=45°,φL11=300°という特定の撮影条件での結果として得られている正則画像を取り出し、欄Bからは、θV3=30°,φV4=90°,θL4=45°,φL11=300°という特定の撮影条件での結果として得られている正則画像を取り出し、…、欄Iからは、θV4=45°,φV6=150°,θL4=45°,φL11=300°という特定の撮影条件での結果として得られている正則画像を取り出し、こうして取り出した8枚の正則画像に基づく補間処理(たとえば、8枚の画像の同一位置の画素の平均値を、補間画像の同一位置の画素の画素値とする補間処理)を行うことにより、θV3=30°,φV5=120°,θL4=45°,φL11=300°という撮影条件で得られる正則画像の代用として欄Eに配置可能な補間画像を得ることができる。   More specifically, a regular image obtained as a result under specific photographing conditions of θV2 = 15 °, φV4 = 90 °, θL4 = 45 °, φL11 = 300 ° is extracted from the column A, and the column B Is taken out as a regular image obtained as a result of specific imaging conditions of θV3 = 30 °, φV4 = 90 °, θL4 = 45 °, φL11 = 300 °, and so on, from column I, θV4 = 45 A regular image obtained as a result under specific imaging conditions of °, φV6 = 150 °, θL4 = 45 °, and φL11 = 300 ° is extracted, and interpolation processing based on the eight regular images thus extracted (for example, 8 (Interpolation processing in which the average value of the pixels at the same position in the image is used as the pixel value of the pixel at the same position in the interpolated image), θV3 = 30 °, φV5 = 120 °, θL4 = 45 °, φL11 = 300 ° An interpolated image that can be arranged in the column E can be obtained as a substitute for the regular image obtained under the shooting conditions.

もちろん、補間に利用する正則画像は、必ずしも8枚である必要はなく、たとえば、縦横に隣接する欄B,D,F,H内の4枚の正則画像を用いてもよいし、斜めに隣接する欄A,C,G,I内の4枚の正則画像を用いてもよい。   Of course, the number of regular images used for interpolation is not necessarily eight. For example, four regular images in columns B, D, F, and H adjacent in the vertical and horizontal directions may be used, or adjacent to each other diagonally. Four regular images in the columns A, C, G, and I may be used.

<<< §9.本発明に係る物体の反射特性データの作成装置 >>>
最後に、本発明に係る物体の反射特性データの作成装置の基本構成を、図30に示すブロック図を参照しながら説明する。この装置は、図16の流れ図に示す反射特性データの作成手順を実施するために利用可能な装置であり、物体の被測定面の所定位置に所定の入射方向から照明光を当てたときに、当該所定位置から所定の射出方向に向かう反射光の反射率を、被測定面の個々の位置ごとに、それぞれ複数m通りの入射方向および複数n通りの射出方向の組み合わせによる(m×n)通りの場合について定義したデータを、被測定面についての反射特性データとして作成する機能を有している。
<<< §9. Apparatus for creating reflection characteristic data of an object according to the present invention >>
Finally, the basic configuration of the object reflection characteristic data creation apparatus according to the present invention will be described with reference to the block diagram shown in FIG. This device is a device that can be used to implement the procedure of creating the reflection characteristic data shown in the flowchart of FIG. 16, and when illuminating light is applied from a predetermined incident direction to a predetermined position of the surface to be measured of the object, The reflectance of the reflected light traveling from the predetermined position toward the predetermined emission direction is (m × n) depending on a combination of a plurality of m incidence directions and a plurality of n emission directions for each position of the surface to be measured. The data defined for the above case has a function of creating the reflection characteristic data for the surface to be measured.

この装置の主たる構成要素は、図示のとおり、撮影用ステージ30、光源50、カメラ60、撮影条件設定部210、画像変換装置100、微分処理部220、反射特性データ作成部230である。撮影用ステージ30は、上面が平面をなし、この平面上に直線で構成される基準枠35が描かれている。図示の例では、撮影用ステージ30の上面に、物体を載置するための矩形が形成されており、この矩形の内部領域38と外部領域とはコントラストに差が生じるように構成され、両領域の境界線によって基準枠35が構成されている。   The main components of this apparatus are an imaging stage 30, a light source 50, a camera 60, an imaging condition setting unit 210, an image conversion device 100, a differential processing unit 220, and a reflection characteristic data creation unit 230, as shown in the figure. The imaging stage 30 has a flat upper surface, and a reference frame 35 composed of straight lines is drawn on this plane. In the example shown in the drawing, a rectangle for placing an object is formed on the upper surface of the imaging stage 30, and the rectangular inner region 38 and the outer region are configured so that a difference in contrast occurs between the two regions. The reference frame 35 is configured by the boundary line.

光源50は、撮影用ステージ30上に載置された物体を照明する機能を果たし、カメラ60は、撮影用ステージ30上に載置された物体を撮影する機能を果たす。図示の例の場合、カメラ60としてデジタルカメラが用いられており、撮影画像はデジタル画像データとして出力される。   The light source 50 has a function of illuminating an object placed on the shooting stage 30, and the camera 60 has a function of shooting an object placed on the shooting stage 30. In the illustrated example, a digital camera is used as the camera 60, and the captured image is output as digital image data.

撮影条件設定部210は、光源50と撮影用ステージ30上に載置された物体の被測定面との位置関係を複数m通りに変化させ、かつ、当該被測定面とカメラ60との位置関係を複数n通りに変化させることにより所望の撮影条件を設定する機能をもった構成要素である。このような種々の撮影条件については、図6の撮影系を参照して§3で説明したとおりである。具体的には、この撮影条件設定部210は、光源50,カメラ60,撮影用ステージ30の相対位置を複数通りのバリエーションで変化させる機構と、これを駆動するモータなどの動力源と、これを制御するコンピュータなどによって構成することができる。この撮影条件設定部210で設定された幾何学的な撮影条件は、画像変換装置100へデジタルデータとして与えられる。   The imaging condition setting unit 210 changes the positional relationship between the light source 50 and the surface to be measured of the object placed on the imaging stage 30 in a plurality of m ways, and the positional relationship between the surface to be measured and the camera 60. This is a component having a function of setting a desired photographing condition by changing the number n in plural ways. Such various imaging conditions are as described in Section 3 with reference to the imaging system of FIG. Specifically, the imaging condition setting unit 210 includes a mechanism that changes the relative positions of the light source 50, the camera 60, and the imaging stage 30 in a plurality of variations, a power source such as a motor that drives the mechanism, and the like. It can be configured by a computer to be controlled. The geometric imaging conditions set by the imaging condition setting unit 210 are given to the image conversion apparatus 100 as digital data.

カメラ60で撮影された撮影画像は、デジタル画像データとして微分処理部220へと与えられ、ここで微分処理が施され、微分画像が画像変換装置100内の画像入力部110へと入力される。微分処理部220で行われる微分処理の内容およびその目的は、図26を参照して、§8(2)で説明したとおりである。なお、撮影用ステージ30上に形成する基準枠が実線からなるパターンであった場合は、微分処理を行う必要がないので、微分処理部220は省略することができる。この場合、カメラ60で得られた撮影画像は、画像入力部110に直接入力される。   The captured image captured by the camera 60 is provided as digital image data to the differential processing unit 220, where differential processing is performed, and the differential image is input to the image input unit 110 in the image conversion apparatus 100. The contents of the differentiation process performed by the differentiation processing unit 220 and the purpose thereof are as described in §8 (2) with reference to FIG. If the reference frame formed on the photographing stage 30 is a pattern made of a solid line, the differentiation processing section 220 can be omitted because it is not necessary to perform differentiation processing. In this case, the captured image obtained by the camera 60 is directly input to the image input unit 110.

画像変換装置100は、図17の流れ図に示す手順を実施する機能をもった装置であり、撮影用ステージ30の上面に描かれた直線で構成される基準枠の内部に配置された被写体を、所定方向から撮影することにより得られる撮影画像を、カメラ60から入力し、これを正則画像に変換する処理を行う装置である。また、反射特性データ作成部230は、この画像変換装置100によって変換された正則画像に基づいて、物体の反射特性データを作成する構成要素である。   The image conversion apparatus 100 is an apparatus having a function of executing the procedure shown in the flowchart of FIG. 17, and subjects that are arranged inside a reference frame constituted by straight lines drawn on the upper surface of the photographing stage 30. This is a device that performs processing for inputting a photographed image obtained by photographing from a predetermined direction from the camera 60 and converting it into a regular image. The reflection characteristic data creation unit 230 is a component that creates reflection characteristic data of an object based on the regular image converted by the image conversion apparatus 100.

画像変換装置100は、図示のとおり、画像入力部110,線グラフ演算部120,画素値積算部130,実測上予測点決定部140,正則変換部150,基準枠位置予測部160によって構成されている。もっとも、この画像変換装置100は、実際には、コンピュータに専用のプログラムを組み込むことにより実現されるべき装置であり、上記各構成要素は、実用上は、コンピュータのハードウエアとソフトウエアとの組合わせによって実現されることになる。   The image conversion apparatus 100 includes an image input unit 110, a line graph calculation unit 120, a pixel value integration unit 130, an actually measured predicted point determination unit 140, a regular conversion unit 150, and a reference frame position prediction unit 160, as illustrated. Yes. However, the image conversion apparatus 100 is actually an apparatus that should be realized by incorporating a dedicated program into a computer. In practice, each of the above components is a combination of computer hardware and software. It will be realized by combination.

画像入力部110は、カメラ60から得られた撮影画像もしくは当該撮影画像に所定の加工処理を施した画像(図示の例の場合、微分処理部220により微分処理加工を施した微分画像)を、二次元xy座標系に所定の画素値をもった画素を配列してなる画像データとして入力する構成要素であり、図17のステップS11「画像入力段階」を実行する。実用上は、ここで入力された画像は、コンピュータのメモリ上に展開されることになる。   The image input unit 110 captures a captured image obtained from the camera 60 or an image obtained by performing a predetermined processing on the captured image (in the illustrated example, a differential image subjected to differential processing by the differential processing unit 220). This is a component that is input as image data formed by arranging pixels having predetermined pixel values in the two-dimensional xy coordinate system, and executes step S11 “image input stage” in FIG. In practice, the image input here is developed on the memory of the computer.

線グラフ演算部120は、図17のステップS14「線グラフ演算段階」を実行する構成要素であり、xy座標系上の任意の直線を、座標軸に対する向きを示す変数ξと原点に対する変位を示す変数ρを用いて表わす表現形式を用い、画像入力部110が入力した画像データを構成する個々の画素について、当該画素の基準位置を通る直線群のそれぞれについての変数(ξ,ρ)の組合わせを求め、二次元ξρ座標系上に各変数対(ξ,ρ)に対応する座標点をプロットし、これら座標点の集合により構成される線グラフμを各画素ごとにξρ座標系上に求める処理を行う。   The line graph calculation unit 120 is a component that executes step S14 “line graph calculation stage” of FIG. 17, and represents an arbitrary straight line on the xy coordinate system, a variable ξ indicating the orientation with respect to the coordinate axis, and a variable indicating the displacement with respect to the origin. For each pixel constituting the image data input by the image input unit 110 using an expression format expressed using ρ, a combination of variables (ξ, ρ) for each of a group of straight lines passing through the reference position of the pixel is set. A process of obtaining the coordinate point corresponding to each variable pair (ξ, ρ) on the two-dimensional ξρ coordinate system and obtaining a line graph μ composed of a set of these coordinate points on the ξρ coordinate system for each pixel. I do.

ここで述べる実施形態の場合、線グラフ演算部120は、図12(a) に示すように、xy座標系上の任意の直線Laに、xy座標系の原点Oから垂線を下し、その足を点Fとしたときに、xy座標系の一軸xと線分OFとのなす角度をξ、線分OFの長さをρで表わし、2つの変数ξ,ρにより直線Laを表わす表現形式を用いている。   In the case of the embodiment described here, the line graph calculation unit 120 drops a perpendicular line from the origin O of the xy coordinate system to an arbitrary straight line La on the xy coordinate system, as shown in FIG. , The angle between one axis x of the xy coordinate system and the line segment OF is denoted by ξ, the length of the line segment OF is denoted by ρ, and the expression form expressing the straight line La by two variables ξ and ρ Used.

画素値積算部130は、図17のステップS12「画素値積算段階の準備」およびステップS15「画素値積算段階」を実行する構成要素である。すなわち、ξρ座標系上に、各画素が同一の初期画素値(たとえば、初期画素値0)を有する積算用二次元画素配列を定義し、この積算用二次元画素配列上に、画像入力部110がxy座標上に入力した画像データを構成する第i番目の画素Piについて線グラフ演算部120が求めた線グラフμiを重ね合わせ、この線グラフμi上もしくはその近傍に位置する画素の画素値に、画素Piのもつ画素値を積算する処理を実行する。実際には、コンピュータのメモリ上に積算用二次元画素配列が展開され、積算値はメモリ上に保存されることになる。   The pixel value integration unit 130 is a component that executes Step S12 “Preparation for Pixel Value Integration Stage” and Step S15 “Pixel Value Integration Stage” in FIG. That is, a two-dimensional pixel array for integration in which each pixel has the same initial pixel value (for example, initial pixel value 0) is defined on the ξρ coordinate system, and the image input unit 110 is placed on the two-dimensional pixel array for integration. Is overlapped with the line graph μi obtained by the line graph calculation unit 120 for the i-th pixel Pi constituting the image data input on the xy coordinates, and the pixel value of the pixel located on or near the line graph μi is overlapped. Then, a process of integrating the pixel values of the pixel Pi is executed. Actually, the two-dimensional pixel array for integration is developed on the memory of the computer, and the integrated value is stored on the memory.

なお、§8(3)で述べたように、画素値積算部130による画素値の積算時には、線グラフμi上に位置する画素の画素値に、画素Piのもつ画素値を積算するとともに、線グラフμiから所定の近傍距離dだけ離れた画素の画素値に、画素Piのもつ画素値にその近傍距離dに応じた所定割合R(0≦R≦1の範囲をとり、近傍距離dが大きくなるほど小さくなる値)を乗じた値を積算するようにしてもかまわない。このとき、所定割合Rが、線グラフμの位置を中心としてガウス分布をとるように設定するとよい。   Note that, as described in §8 (3), when the pixel value is integrated by the pixel value integrating unit 130, the pixel value of the pixel Pi is integrated with the pixel value of the pixel located on the line graph μi, and the line The pixel value of a pixel that is separated from the graph μi by a predetermined neighborhood distance d takes a predetermined ratio R (0 ≦ R ≦ 1) corresponding to the neighborhood value d of the pixel value of the pixel Pi, and the neighborhood distance d is large. A value obtained by multiplying a value that becomes smaller may be integrated. At this time, the predetermined ratio R may be set so as to have a Gaussian distribution centered on the position of the line graph μ.

基準枠位置予測部160は、図17のステップS18「基準枠位置予測段階」を実行する構成要素である。すなわち、画像入力部110が入力した画像に関して、撮影条件設定部210から与えられる幾何学的な撮影条件に基づいて、xy座標系上に配置された撮影画像上に現れるであろう基準枠の像の位置を、幾何学的な演算によって予測する処理を実行する。具体的には、図6の撮影系を用いて撮影画像を得る際の幾何学的な撮影条件として、基準点Sに立てた法線Nとカメラ60の光軸とのなす角θ、この光軸の「基準枠が描かれた平面」への投影像と基準点Sを通り「基準枠が描かれた平面」に含まれる所定の基準線ζとのなす角φ、カメラ60と基準点Sとの距離が、撮影条件設定部210から幾何学的な撮影条件として与えられるので、これらに幾何学的な演算により基準枠の像の位置を予測する処理を実行する。   The reference frame position prediction unit 160 is a component that executes Step S18 “reference frame position prediction stage” of FIG. That is, with respect to the image input by the image input unit 110, the image of the reference frame that will appear on the captured image arranged on the xy coordinate system based on the geometric imaging condition given from the imaging condition setting unit 210. The process of predicting the position of is performed by geometric calculation. Specifically, as a geometric imaging condition for obtaining a captured image using the imaging system of FIG. 6, an angle θ formed between the normal N set at the reference point S and the optical axis of the camera 60, this light The angle φ formed by the projected image of the axis onto the “plane on which the reference frame is drawn” and the predetermined reference line ζ included in the “plane on which the reference frame is drawn” passing through the reference point S, the camera 60 and the reference point S Is given as a geometric imaging condition from the imaging condition setting unit 210, and a process of predicting the position of the image of the reference frame is executed by geometric calculation.

実測上予測点決定部140は、図17のステップS20,S21「実測上予測点決定段階」を実行する構成要素である。すなわち、基準枠位置予測部160において予測された基準枠の像を構成する各直線を示す変数(ξ,ρ)の組合わせについて、積算用二次元画素配列上に対応する座標点をそれぞれ幾何学的予測点εとしてプロットし、各幾何学的予測点εについての所定の近傍領域に所属する画素のうちの画素値が最大もしくは最小の画素の基準位置を、対応する直線についての実測上予測点と決定する。図24には、幾何学的予測点εについての所定の近傍領域として、幾何学的予測点εの座標値を(ξε,ρε)としたときに、所定の偏差Δξ,Δρを用いて、ξε−Δξ≦ξ≦ξε+Δξ、ρε−Δρ≦ρ≦ρε+Δρなる条件を満たす座標値(ξ,ρ)で示される領域を用いた例が示されている。   The actually measured predicted point determination unit 140 is a component that executes steps S20 and S21 “actually predicted point determination stage” of FIG. That is, with respect to combinations of variables (ξ, ρ) indicating the straight lines constituting the image of the reference frame predicted by the reference frame position prediction unit 160, the corresponding coordinate points on the integrating two-dimensional pixel array are geometrically determined. Plotted as a target prediction point ε, and the reference position of the pixel having the maximum or minimum pixel value among the pixels belonging to the predetermined neighborhood region for each geometric prediction point ε is measured on the corresponding straight line. And decide. In FIG. 24, when the coordinate value of the geometric prediction point ε is (ξε, ρε) as a predetermined neighborhood region with respect to the geometric prediction point ε, a predetermined deviation Δξ, Δρ is used, and ξε An example using an area indicated by coordinate values (ξ, ρ) satisfying the conditions of −Δξ ≦ ξ ≦ ξε + Δξ and ρε−Δρ ≦ ρ ≦ ρε + Δρ is shown.

なお、この実測上予測点決定部140では、§8(4)で述べたように、幾何学的予測点εについての所定の近傍領域に所属する画素のうちの画素値が最大もしくは最小の画素が複数存在した場合には、これら複数の画素の基準位置の重心位置を、対応する直線についての実測上予測点と決定するようにしている。   In the actual measurement prediction point determination unit 140, as described in §8 (4), the pixel having the maximum or minimum pixel value among the pixels belonging to the predetermined neighborhood region with respect to the geometric prediction point ε. When there are a plurality of pixels, the barycentric position of the reference position of the plurality of pixels is determined as an actually predicted point for the corresponding straight line.

正則変換部150は、図17のステップS24「正則変換段階」を実行する構成要素である。すなわち、二次元xy座標系上に、各実測上予測点の座標値(ξ,ρ)によって表わされる直線を描き、これらの直線の位置を正しい基準枠の像の位置として取り扱い、幾何学的な演算によって、カメラ60から得られる撮影画像を正則画像に変換する処理を行う。このような正則変換が、基準枠の像を構成する矩形の4頂点の位置に基づく幾何学的な演算により実施できる点は、既に述べたとおりである。変換により得られた正則画像は、反射特性データ作成部230へ与えられる。   The regular conversion unit 150 is a component that executes Step S24 “regular conversion stage” of FIG. That is, on the two-dimensional xy coordinate system, straight lines represented by the coordinate values (ξ, ρ) of the actually measured predicted points are drawn, the positions of these straight lines are handled as the positions of the correct reference frame images, A process of converting a captured image obtained from the camera 60 into a regular image by calculation is performed. As described above, such regular transformation can be performed by a geometric operation based on the positions of the four vertices of a rectangle constituting the image of the reference frame. The regular image obtained by the conversion is given to the reflection characteristic data creation unit 230.

なお、線グラフ演算部120による線グラフの演算処理や、画素値積算部130による画素値の積算処理は、理論上は、画像入力部110が入力したxy座標上の画像の全N個の画素について実行すればよいが、実用上は、§8(5)で述べたとおり、全N個の画素のうち、所定範囲内の画素値を有する画素についてのみ、もしくは、全N個の画素のうち、所定の考慮領域内に位置する画素についてのみ実行すると、演算負担を軽減させることができる。   In theory, the line graph calculation processing by the line graph calculation unit 120 and the pixel value integration processing by the pixel value integration unit 130 are all N pixels of the image on the xy coordinates input by the image input unit 110. However, in practice, as described in §8 (5), among all N pixels, only pixels having pixel values within a predetermined range, or all N pixels If it is executed only for the pixels located within the predetermined consideration area, the calculation burden can be reduced.

また、実測上予測点決定部140には、§8(6)で述べたとおり、近傍領域内の最大画素値が所定のしきい値に満たない場合もしくは最小画素値が所定のしきい値を超えてしまう場合には、実測上予測点の決定を行わず、正則画像への画像変換に失敗した旨のメッセージを提示する機能をもたせておくのが好ましい。この場合、具体的には、画像変換装置100から反射特性データ作成部230に対して、正則画像への画像変換に失敗した旨のエラー信号を出力するようにする。そして、反射特性データ作成部230には、エラー信号が出力されたために画像変換装置100からは出力されなかった正則画像があった場合には、§8(6)で述べた手法により、撮影条件が近似する別な物体撮影画像についての正則画像に基づく補間を行う機能をもたせておけばよい。   Further, as described in §8 (6), the actually measured prediction point determination unit 140 determines that the maximum pixel value in the vicinity region is less than the predetermined threshold value, or the minimum pixel value has the predetermined threshold value. In the case of exceeding, it is preferable to provide a function of presenting a message that the image conversion to the regular image has failed without determining the predicted point in actual measurement. In this case, specifically, an error signal indicating that the image conversion to the regular image has failed is output from the image conversion apparatus 100 to the reflection characteristic data creation unit 230. If there is a regular image that is not output from the image conversion apparatus 100 because the error signal is output, the reflection characteristic data creation unit 230 uses the method described in §8 (6) to obtain the shooting condition. It is sufficient to provide a function of performing interpolation based on a regular image for another object photographed image that approximates.

テクスチャデータを利用した一般的なレンダリング処理の概念を示す斜視図である。It is a perspective view which shows the concept of the general rendering process using texture data. BRDFモデルおよびBTFモデルの原理を説明するための斜視図である。It is a perspective view for demonstrating the principle of a BRDF model and a BTF model. BTFモデルで用いる6次元テクスチャデータの構造を示す平面図である。It is a top view which shows the structure of 6-dimensional texture data used with a BTF model. BTFモデルにおける離散的な入射角定義の一例を示す正面図である。It is a front view which shows an example of the discrete incident angle definition in a BTF model. BTFモデルにおける離散的な方位角定義の一例を示す正面図である。It is a front view which shows an example of the discrete azimuth | direction angle definition in a BTF model. BTFモデルで用いる6次元テクスチャデータを作成するための撮影系の構成を示す斜視図である。It is a perspective view which shows the structure of the imaging | photography system for producing the 6-dimensional texture data used with a BTF model. 図6に示す撮影系によって撮影された撮影画像のいくつかの例を示す平面図である。It is a top view which shows some examples of the picked-up image image | photographed with the imaging | photography system shown in FIG. 図7に示す撮影画像に対して画像変換を施すことにより得られた正則画像を示す平面図である。It is a top view which shows the regular image obtained by performing image conversion with respect to the picked-up image shown in FIG. 幾何学的な方法に基づいて、撮影画像を正則画像に変換する処理の一例を示す平面図である。It is a top view which shows an example of the process which converts a picked-up image into a regular image based on a geometric method. 本発明に係る画像変換を利用するために用いる撮影用ステージ30の一例を示す平面図である。It is a top view which shows an example of the imaging | photography stage 30 used in order to utilize the image conversion which concerns on this invention. 図10に示す撮影用ステージ30を用いた撮影により得られた撮影画像の一例を示す平面図である。It is a top view which shows an example of the picked-up image acquired by imaging | photography using the imaging | photography stage 30 shown in FIG. xy座標系とハフ変換用のξρ座標系との関係を示す平面図である。It is a top view which shows the relationship between xy coordinate system and ξρ coordinate system for Hough transform. xy座標系上の各直線とハフ変換用のξρ座標系上の各点との対応関係を示す平面図である。It is a top view which shows the correspondence of each straight line on xy coordinate system, and each point on the ξρ coordinate system for Hough transform. xy座標系上の1点Pを通る直線群とハフ変換用のξρ座標系上の線グラフμとの対応関係を示す平面図である。It is a top view which shows the correspondence of the straight line group which passes along 1 point P on an xy coordinate system, and the line graph micro on the ξρ coordinate system for Hough transform. xy座標系上の複数の点P1〜P4を通る直線Lとハフ変換用のξρ座標系上の線グラフμ1〜μ4の交点γとの対応関係を示す平面図である。It is a top view which shows the correspondence of the straight line L which passes through several points P1-P4 on xy coordinate system, and the intersection (gamma) of line graphs μ1-μ4 on the Hough transform ξρ coordinate system. 本発明に係る物体の反射特性データの作成方法の基本手順を示す流れ図である。It is a flowchart which shows the basic procedure of the preparation method of the reflection characteristic data of the object based on this invention. 本発明に係る正則画像への画像変換方法(図16の流れ図のステップS4の段階)の基本手順を示す流れ図である。It is a flowchart which shows the basic procedure of the image conversion method (step S4 stage of the flowchart of FIG. 16) to the regular image which concerns on this invention. 図17のステップS11で入力された画像データを構成するxy座標上の画素配列の一部を示す平面図である。FIG. 18 is a plan view showing a part of a pixel array on an xy coordinate constituting the image data input in step S11 of FIG. 図18に示すxy座標上の第i番目の画素Piに対応するξρ座標上の線グラフμiを示す平面図である。FIG. 19 is a plan view showing a line graph μi on the ξρ coordinate corresponding to the i-th pixel Pi on the xy coordinate shown in FIG. 18. 図19に示すξρ座標上の線グラフμi上に位置する画素(ハッチング部分)を示す平面図である。FIG. 20 is a plan view showing pixels (hatched portions) located on a line graph μi on the ξρ coordinate shown in FIG. 19. 図18に示す第(i+1)番目の画素P(i+1)に対応するξρ座標上の線グラフμ(i+1)上に位置する画素(ハッチング部分)を示す平面図である。FIG. 19 is a plan view showing pixels (hatched portions) located on a line graph μ (i + 1) on the ξρ coordinate corresponding to the (i + 1) th pixel P (i + 1) shown in FIG. 18. ξρ座標上の各画素について画素値の積算処理を行った後に求まる最大画素値を有する画素γを示す平面図である。It is a top view which shows the pixel (gamma) which has the largest pixel value calculated | required after performing the integration process of a pixel value about each pixel on (xi) ρ coordinate. 図22に示す画素γの位置(ξγ,ργ)に対応して、xy座標上に描かれた直線Lを示す平面図である。FIG. 23 is a plan view showing a straight line L drawn on xy coordinates corresponding to the position (ξγ, ργ) of the pixel γ shown in FIG. 22. ξρ座標上の各画素について画素値の積算処理を行った後、幾何学的予測点εについての近傍領域に所属する画素のうちの最大画素値を有する画素γ3を決定する様子を示す平面図である。It is a top view which shows a mode that the pixel (gamma) 3 which has the largest pixel value among the pixels which belong to the vicinity area | region about the geometric prediction point (epsilon) is determined after performing the integration process of each pixel value on (xi) coordinate. is there. 図17のステップS11で入力された画像データが階調画像であった場合の当該画像データを構成するxy座標上の画素配列の一部を示す平面図である。FIG. 18 is a plan view showing a part of the pixel array on the xy coordinates constituting the image data when the image data input in step S11 of FIG. 17 is a gradation image. 撮影用ステージ30の上面に、内部と外部とでコントラスト差が生じる矩形領域が形成されている場合に、境界線からなる基準枠35を抽出する処理を示す図である。FIG. 6 is a diagram illustrating processing for extracting a reference frame 35 formed by a boundary line when a rectangular region in which a contrast difference occurs between the inside and the outside is formed on the upper surface of the imaging stage 30. ξρ座標上の線グラフμiの近傍の画素Tdについても所定の画素値を積算する変形例を説明する平面図である。It is a top view explaining the modification which accumulate | stores a predetermined pixel value also about the pixel Td of the vicinity of the line graph microi on (xi) coordinate. 図27に示す画素Tdに積算すべき画素値を決定する際に用いるガウス分布曲線を示すグラフである。It is a graph which shows the Gaussian distribution curve used when determining the pixel value which should be integrated | accumulated to the pixel Td shown in FIG. 正則画像への画像変換に失敗した場合の補間方法を示す平面図である。It is a top view which shows the interpolation method when the image conversion to a regular image fails. 本発明に係る物体の反射特性データの作成装置の構成を示すブロック図である。It is a block diagram which shows the structure of the preparation apparatus of the reflection characteristic data of the object which concerns on this invention.

符号の説明Explanation of symbols

10:物体データ(三次元仮想物体)
15:二次元投影画像
20:テクスチャデータ(原テクスチャデータ)
30:撮影用ステージ
35:基準枠
35A〜35D:基準枠の4辺
38:矩形領域
40:被写体(物体)
50:光源
51:代表点
60:カメラ
100:画像変換装置
110:画像入力部
120:線グラフ演算部
130:画素値積算部
140:実測上予測点決定部
150:正則変換部
160:基準枠位置予測部
210:撮影条件設定部
220:微分処理部
230:反射特性データ作成部
A〜D:矩形の4頂点
d:近傍距離(線グラフμと画素Tの基準位置との距離)
E:視点
F:垂線の足
G:光源
H:投影平面
I(L):照明光の強度
I(V):反射光の強度
K:反射係数
K(θL,φL,θV,φV):反射係数
K(θL,φL,θV,φV,u,v):反射係数
L:照明光/xy座標上の直線
L1〜L6:照明光
La〜Lc:xy座標上の直線
L′:照明光の投影像
Ls:基準照明光
Ls′:基準照明光の投影像
N:法線
O:xy座標系の原点
P:投影平面上の画素/xy座標上の点
P1〜P4,Pi,P(i+1),PN:xy座標上の点/xy座標上の画素
Q:サンプル点/画像上の1点
R:画素値に乗じる割合
S:基準点
S1〜S24:流れ図の各ステップ
Td:ξρ座標上の画素
T(u,v):uv座標上の画素
u,v:テクスチャを定義する二次元座標系の各座標軸
V:反射光
V′:反射光の投影像
Vs:基準反射光
Vs′:基準反射光の投影像
W:基準面/被測定面
X,Y,Z:三次元座標系の各座標軸
α,β:投影平面H上の二次元座標系の各座標軸
γ:複数の線グラフの交点/最大画素値をもつ画素
γ1,γ2,γ3:ξρ座標上の画素
θL:照明光Lの入射角
θL1〜θL6:照明光の入射角
θLs:基準照明光Lsの入射角
θV:反射光Vの反射角
θVs:基準反射光Vsの反射角
ζ,ζs:基準線
λa,λb,λc:ξρ座標上の点
φL:照明光Lの方位角
φL1〜φL12:照明光Lの方位角
φLs:基準照明光Lsの方位角
φV:反射光Vの方位角
φVs:基準反射光Vsの方位角
μ,μ1〜μ4,μi,μ(i+1):ξρ座標上の線グラフ
ξ,ρ:ハフ変換用の座標系の各座標軸
ξa:x軸と垂線OFとのなす角
ρa:垂線OFの長さ
ξγ:x軸と垂線OFとのなす角/ξ座標軸上の座標値
ργ:垂線OFの長さ/ρ座標軸上の座標値
ξε:ξ座標軸上の座標値
ρε:ρ座標軸上の座標値
Δξ,Δρ:偏差
10: Object data (3D virtual object)
15: Two-dimensional projection image 20: Texture data (original texture data)
30: Shooting stage 35: Reference frames 35A to 35D: Four sides of reference frame 38: Rectangular area 40: Subject (object)
50: Light source 51: Representative point 60: Camera 100: Image conversion device 110: Image input unit 120: Line graph calculation unit 130: Pixel value integration unit 140: Predicted point determination unit 150: Regular conversion unit 160: Reference frame position Prediction unit 210: photographing condition setting unit 220: differentiation processing unit 230: reflection characteristic data creation unit A to D: four vertices of rectangle d: neighborhood distance (distance between line graph μ and reference position of pixel T)
E: View point F: Vertical foot G: Light source H: Projection plane I (L): Illumination light intensity I (V): Reflected light intensity K: Reflection coefficient K (θL, φL, θV, φV): Reflection coefficient K (θL, φL, θV, φV, u, v): reflection coefficient L: illumination light / straight line L1 to L6 on the xy coordinate: illumination light La to Lc: straight line L ′ on the xy coordinate: projected image of the illumination light Ls: reference illumination light Ls ′: projection image of reference illumination light N: normal O: origin of xy coordinate system P: pixels on projection plane / points P1 to P4, Pi, P (i + 1), PN on xy coordinates : Point on the xy coordinate / pixel Q on the xy coordinate Q: sample point / one point R on the image R: ratio of multiplying the pixel value S: reference points S1 to S24: each step Td in the flowchart: pixel T (on the ξρ coordinate u, v): pixels u, v on the uv coordinates, each coordinate axis V of the two-dimensional coordinate system defining the texture V: reflected light V ': projected reflected light Vs: Reference reflected light Vs ′: Projected image of reference reflected light W: Reference plane / surface to be measured X, Y, Z: Each coordinate axis α, β: Three-dimensional coordinate system on the projection plane H Coordinate axis γ: intersection of a plurality of line graphs / pixels γ1, γ2, and γ3 having maximum pixel values: pixels θL on the ξρ coordinate: incident angles θL1 to θL6 of illumination light L: incident angles θLs of illumination light: reference illumination light Ls Incident angle θV: reflection angle θVs of reflected light V: reflection angles ζ, ζs of reference reflected light Vs: reference lines λa, λb, λc: points on coordinate Φρ: azimuth angles φL1 to φL12 of illumination light L: illumination Azimuth angle φLs of light L: Azimuth angle φV of reference illumination light Ls: Azimuth angle φVs of reflected light V: Azimuth angles of reference reflected light Vs μ, μ1 to μ4, μi, μ (i + 1): Line graph on ξρ coordinate ξ, ρ: Each coordinate axis of the coordinate system for Hough transformation ξa: Angle formed by the x axis and the perpendicular OF ρa: Length of the perpendicular OF ξγ: X axis Coordinate values on the angle / xi] axis of the perpendicular OF ργ: coordinate value on the length / [rho axis of a perpendicular OF ξε: ξ coordinate values on the coordinate axis Roipushiron: coordinates Δξ on [rho axes, [Delta] [rho]: deviation

Claims (28)

平面上に描かれた直線で構成される基準枠の内部に配置された被写体を、所定方向から撮影することにより得られる撮影画像を、前記平面上の基準点に立てた法線方向から見た正則画像に変換する画像変換方法であって、
前記撮影画像もしくは前記撮影画像に所定の加工処理を施した画像を、二次元xy座標系に所定の画素値をもった画素を配列してなる画像データとして入力する画像入力段階と、
前記xy座標系上の任意の直線を、座標軸に対する向きを示す変数ξと原点に対する変位を示す変数ρを用いて表わす表現形式を用い、前記画像データを構成する個々の画素について、当該画素の基準位置を通る直線群のそれぞれについての変数(ξ,ρ)の組合わせを求め、二次元ξρ座標系上に各変数対(ξ,ρ)に対応する座標点をプロットし、これら座標点の集合により構成される線グラフμを各画素ごとに前記ξρ座標系上に求める線グラフ演算段階と、
前記ξρ座標系上に、各画素が同一の初期画素値を有する積算用二次元画素配列を定義し、この積算用二次元画素配列上に、前記画像データを構成する第i番目の画素Piについて求められた線グラフμiを重ね合わせ、この線グラフμi上もしくはその近傍に位置する画素の画素値に、前記画素Piのもつ画素値を積算する処理を、第1番目の画素から第N番目の画素まで(但し、1≦i≦N、Nは前記画像データに含まれる画素配列上の全画素数)繰り返し実行する画素値積算段階と、
前記撮影画像を得る際の幾何学的な撮影条件に基づいて、前記xy座標系上に配置された撮影画像上に現れるであろう前記基準枠の像の位置を、幾何学的な演算によって予測する基準枠位置予測段階と、
予測された前記基準枠の像を構成する各直線を示す変数(ξ,ρ)の組合わせについて、前記積算用二次元画素配列上に対応する座標点をそれぞれ幾何学的予測点εとしてプロットし、各幾何学的予測点εについての所定の近傍領域に所属する画素のうちの画素値が最大もしくは最小の画素の基準位置を、対応する直線についての実測上予測点と決定する実測上予測点決定段階と、
前記二次元xy座標系上に、前記各実測上予測点の座標値(ξ,ρ)によって表わされる直線を描き、これらの直線の位置を正しい基準枠の像の位置として取り扱い、幾何学的な演算によって前記撮影画像を前記正則画像に変換する正則変換段階と、
を有することを特徴とする正則画像への画像変換方法。
A photographed image obtained by photographing a subject placed inside a reference frame composed of straight lines drawn on a plane from a predetermined direction is viewed from a normal direction set up on a reference point on the plane. An image conversion method for converting to a regular image,
An image input step of inputting the captured image or an image obtained by performing a predetermined processing on the captured image as image data obtained by arranging pixels having a predetermined pixel value in a two-dimensional xy coordinate system;
Using an expression form that represents an arbitrary straight line on the xy coordinate system using a variable ξ indicating an orientation with respect to a coordinate axis and a variable ρ indicating a displacement with respect to the origin, a reference of the pixel for each pixel constituting the image data A combination of variables (ξ, ρ) is obtained for each of the straight line groups passing through the position, and coordinate points corresponding to each variable pair (ξ, ρ) are plotted on a two-dimensional ξρ coordinate system. A line graph calculation stage for obtaining a line graph μ constituted by the ξρ coordinate system for each pixel;
An accumulation two-dimensional pixel array in which each pixel has the same initial pixel value is defined on the ξρ coordinate system, and the i-th pixel Pi constituting the image data is formed on the accumulation two-dimensional pixel array. A process of superimposing the obtained line graph μi and adding the pixel value of the pixel Pi to the pixel value of a pixel located on or near the line graph μi is performed from the first pixel to the Nth pixel. A pixel value integrating step that is repeatedly executed up to pixels (where 1 ≦ i ≦ N, N is the total number of pixels on the pixel array included in the image data);
Based on the geometric imaging conditions at the time of obtaining the captured image, the position of the image of the reference frame that will appear on the captured image arranged on the xy coordinate system is predicted by geometric calculation. A reference frame position prediction stage to perform,
For the combinations of variables (ξ, ρ) indicating the respective straight lines constituting the predicted image of the reference frame, the corresponding coordinate points on the integrating two-dimensional pixel array are plotted as geometric prediction points ε, respectively. , The actual prediction point that determines the reference position of the pixel having the maximum or minimum pixel value among the pixels belonging to the predetermined neighborhood region for each geometric prediction point ε as the actual prediction point for the corresponding straight line The decision stage;
On the two-dimensional xy coordinate system, straight lines represented by the coordinate values (ξ, ρ) of the actually measured predicted points are drawn, the positions of these straight lines are handled as the positions of the correct reference frame images, A regular conversion step of converting the captured image into the regular image by calculation;
A method for converting an image into a regular image.
請求項1に記載の画像変換方法において、
所定領域の内部と外部とのコントラスト差による境界線からなる基準枠を用いた撮影により撮影画像が得られた場合に、
画像入力段階で、撮影画像に対して微分処理を施して得られる微分画像を画像データとして入力することを特徴とする正則画像への画像変換方法。
The image conversion method according to claim 1,
When a shot image is obtained by shooting using a reference frame consisting of a boundary line due to a contrast difference between the inside and outside of a predetermined area,
A method for converting an image into a regular image, wherein a differential image obtained by subjecting a captured image to differential processing is input as image data in an image input stage.
請求項1または2に記載の画像変換方法において、
線グラフ演算段階で、xy座標系上の任意の直線に、前記xy座標系の原点Oから垂線を下し、その足を点Fとしたときに、前記xy座標系の一軸と線分OFとのなす角度をξ、線分OFの長さをρで表わし、2つの変数ξ,ρにより前記直線を表わす表現形式を用いることを特徴とする正則画像への画像変換方法。
The image conversion method according to claim 1 or 2,
In the line graph calculation stage, when a perpendicular is drawn from the origin O of the xy coordinate system to an arbitrary straight line on the xy coordinate system and the foot is set as a point F, one axis of the xy coordinate system and the line segment OF A method of converting an image into a regular image, in which the angle formed by ξ is represented by ξ, the length of the line segment OF is represented by ρ, and an expression form representing the straight line by two variables ξ and ρ is used.
請求項1〜3のいずれかに記載の画像変換方法において、
画素値積算段階で、線グラフμ上に位置する画素の画素値に、画素Piのもつ画素値を積算するとともに、線グラフμから所定の近傍距離dだけ離れた画素の画素値に、画素Piのもつ画素値に前記近傍距離dに応じた所定割合R(0≦R≦1の範囲をとり、近傍距離dが大きくなるほど小さくなる値)を乗じた値を積算することを特徴とする正則画像への画像変換方法。
In the image conversion method in any one of Claims 1-3,
In the pixel value integration stage, the pixel value of the pixel Pi is integrated with the pixel value of the pixel located on the line graph μ, and the pixel Pi is set to the pixel value of the pixel separated from the line graph μ by a predetermined neighborhood distance d. A regular image obtained by multiplying the pixel value of the pixel value by a predetermined ratio R corresponding to the neighborhood distance d (a value that takes a range of 0 ≦ R ≦ 1 and decreases as the neighborhood distance d increases). Image conversion method.
請求項4に記載の画像変換方法において、
所定割合Rを、線グラフμの位置を中心としてガウス分布をとるように設定することを特徴とする正則画像への画像変換方法。
The image conversion method according to claim 4, wherein
A method for converting an image into a regular image, wherein the predetermined ratio R is set so as to have a Gaussian distribution centered on the position of the line graph μ.
請求項1〜5のいずれかに記載の画像変換方法において、
線グラフ演算段階で、全N個の画素のうち、所定範囲内の画素値を有する画素についてのみ線グラフを求める演算を実行し、
画素値積算段階で、全N個の画素のうち、所定範囲内の画素値を有する画素についてのみ画素値の積算処理を実行することを特徴とする正則画像への画像変換方法。
In the image conversion method according to any one of claims 1 to 5,
In the line graph calculation stage, out of all N pixels, an operation for obtaining a line graph is performed only for pixels having pixel values within a predetermined range,
A method for converting an image into a regular image, wherein pixel value integration processing is executed only for pixels having pixel values within a predetermined range among all N pixels in the pixel value integration stage.
請求項1〜6のいずれかに記載の画像変換方法において、
線グラフ演算段階で、全N個の画素のうち、所定の考慮領域内に位置する画素についてのみ線グラフを求める演算を実行し、
画素値積算段階で、全N個の画素のうち、所定の考慮領域内に位置する画素についてのみ画素値の積算処理を実行することを特徴とする正則画像への画像変換方法。
In the image conversion method in any one of Claims 1-6,
In the line graph calculation stage, out of all N pixels, an operation is performed to obtain a line graph only for pixels located within a predetermined consideration region,
A method for converting an image into a regular image, wherein pixel value integration processing is executed only for pixels located within a predetermined consideration area among all N pixels in the pixel value integration stage.
請求項1〜7のいずれかに記載の画像変換方法において、
基準枠位置予測段階で、撮影画像を得る際の幾何学的な撮影条件として、基準点に立てた法線と撮影装置の光軸とのなす角θと、前記光軸の「基準枠が描かれた平面」への投影像と前記基準点を通り前記「基準枠が描かれた平面」に含まれる所定の基準線ζとのなす角φと、前記撮影装置の光学系の焦点距離と、に基づく幾何学的な演算により基準枠の像の位置を予測することを特徴とする正則画像への画像変換方法。
In the image conversion method in any one of Claims 1-7,
In the reference frame position prediction stage, as a geometric imaging condition for obtaining a captured image, an angle θ formed between a normal line set at a reference point and the optical axis of the imaging apparatus, and the “reference frame drawn by the optical axis” The angle φ formed between the projected image on the `` planar plane '' and the predetermined reference line ζ included in the `` plane on which the reference frame is drawn '' passing through the reference point, and the focal length of the optical system of the photographing apparatus, A method for converting an image into a regular image, wherein the position of the image of the reference frame is predicted by a geometric calculation based on the method.
請求項1〜8のいずれかに記載の画像変換方法において、
実測上予測点決定段階で、幾何学的予測点εについての所定の近傍領域として、幾何学的予測点εの座標値を(ξε,ρε)としたときに、所定の偏差Δξ,Δρを用いて、ξε−Δξ≦ξ≦ξε+Δξ、ρε−Δρ≦ρ≦ρε+Δρなる条件を満たす座標値(ξ,ρ)で示される領域を設定することを特徴とする正則画像への画像変換方法。
In the image conversion method in any one of Claims 1-8,
Predetermined deviations Δξ and Δρ are used when the coordinate value of the geometric prediction point ε is (ξε, ρε) as a predetermined neighborhood region for the geometric prediction point ε at the actual prediction point determination stage. Thus, an image conversion method for converting to a regular image is characterized in that an area indicated by coordinate values (ξ, ρ) satisfying the conditions of ξε−Δξ ≦ ξ ≦ ξε + Δξ and ρε−Δρ ≦ ρ ≦ ρε + Δρ is set.
請求項1〜9のいずれかに記載の画像変換方法において、
実測上予測点決定段階で、幾何学的予測点εについての所定の近傍領域に所属する画素のうちの画素値が最大もしくは最小の画素が複数存在した場合には、これら複数の画素の基準位置の重心位置を、対応する直線についての実測上予測点と決定することを特徴とする正則画像への画像変換方法。
In the image conversion method in any one of Claims 1-9,
When there are a plurality of pixels having the maximum or minimum pixel value among the pixels belonging to the predetermined neighboring region with respect to the geometric prediction point ε at the actual measurement prediction point determination stage, the reference positions of the plurality of pixels A method of converting an image into a regular image, wherein the position of the center of gravity is determined as an actually estimated point for the corresponding straight line.
請求項1〜10のいずれかに記載の画像変換方法において、
実測上予測点決定段階で、近傍領域内の最大画素値が所定のしきい値に満たない場合もしくは最小画素値が所定のしきい値を超えてしまう場合には、実測上予測点の決定を行わず、正則画像への画像変換に失敗した取り扱いを行うことを特徴とする正則画像への画像変換方法。
In the image conversion method in any one of Claims 1-10,
If the maximum pixel value in the vicinity region is less than the predetermined threshold value or the minimum pixel value exceeds the predetermined threshold value in the actual measurement prediction point determination stage, the actual measurement prediction point is determined. A method for converting an image into a regular image, characterized in that the image conversion into a regular image is not performed.
請求項1〜11のいずれかに記載の画像変換方法において、
矩形を示す基準枠を用いた撮影により撮影画像が得られた場合に、
正則変換段階で、前記基準枠の像を構成する矩形の4頂点の位置に基づく幾何学的な演算により正則画像への変換を行うことを特徴とする正則画像への画像変換方法。
In the image conversion method in any one of Claims 1-11,
When a shot image is obtained by shooting using a reference frame indicating a rectangle,
A method for converting an image into a regular image, wherein the image is converted into a regular image by a geometric operation based on the positions of four vertices of a rectangle constituting the image of the reference frame in the regular conversion stage.
請求項1〜12のいずれかに記載の画像変換方法を利用することにより、
物体の被測定面の所定位置に所定の入射方向から照明光を当てたときに、前記所定位置から所定の射出方向に向かう反射光の反射率を、前記被測定面の個々の位置ごとに、それぞれ複数m通りの入射方向および複数n通りの射出方向の組み合わせによる(m×n)通りの場合について定義したデータを、前記被測定面についての反射特性データとして作成する物体の反射特性データの作成方法であって、
平面上に描かれた直線で構成される基準枠の内部に、被測定面を有する物体を載置する物体載置段階と、
光源と前記被測定面とカメラとが所定の位置関係になるような撮影条件を、前記光源と前記被測定面との位置関係を複数m通りに変化させ、かつ、前記被測定面と前記カメラとの位置関係を複数n通りに変化させることにより、合計(m×n)通り設定する撮影条件設定段階と、
設定された(m×n)通りの撮影条件のそれぞれについて、前記光源によって照明されている前記被測定面の画像を前記カメラで撮影する撮影処理を実行することにより、(m×n)枚の物体撮影画像を得る物体撮影段階と、
前記(m×n)枚の物体撮影画像に対して、請求項1〜12のいずれかに記載の画像変換方法を利用した画像変換を行い、(m×n)枚の正則画像を得る画像変換段階と、
前記(m×n)枚の正則画像に基づいて、物体の反射特性データを作成する反射特性データ作成段階と、
を有することを特徴とする物体の反射特性データの作成方法。
By using the image conversion method according to claim 1,
When illumination light is applied from a predetermined incident direction to a predetermined position of the surface to be measured of the object, the reflectance of reflected light from the predetermined position toward the predetermined emission direction is determined for each position of the surface to be measured. Creation of reflection characteristic data of an object in which data defined for (m × n) cases by a combination of a plurality of m incidence directions and a plurality of n emission directions are created as reflection characteristic data for the surface to be measured. A method,
An object placement stage for placing an object having a measured surface inside a reference frame composed of straight lines drawn on a plane;
An imaging condition in which a light source, the surface to be measured, and the camera have a predetermined positional relationship is changed in a plurality of m in a positional relationship between the light source and the surface to be measured, and the surface to be measured and the camera And a shooting condition setting stage for setting a total (m × n) as a result of changing the positional relationship to n in plural ways,
For each of the set (m × n) shooting conditions, (m × n) (m × n) sheets are obtained by executing a shooting process of shooting an image of the measurement target surface illuminated by the light source with the camera. An object shooting stage to obtain an object shooting image;
Image conversion using the image conversion method according to any one of claims 1 to 12 for the (m × n) object photographed images to obtain (m × n) regular images Stages,
A reflection characteristic data creating step of creating reflection characteristic data of an object based on the (m × n) regular images;
A method for creating reflection characteristic data of an object characterized by comprising:
請求項13に記載の反射特性データの作成方法において、
特定の物体撮影画像を正則画像に変換する画像変換段階における実測上予測点決定段階で、近傍領域内の最大画素値が所定のしきい値に満たない場合もしくは最小画素値が所定のしきい値を超えてしまう場合には、実測上予測点の決定を行わず、当該物体撮影画像に関する正則画像への画像変換に失敗した取り扱いを行い、
画像変換に失敗した取り扱いが行われた物体撮影画像についての正則画像を、撮影条件が近似する別な物体撮影画像についての正則画像に基づく補間により求めることを特徴とする物体の反射特性データの作成方法。
The method of creating reflection characteristic data according to claim 13,
If the maximum pixel value in the neighboring region is less than the predetermined threshold value or the minimum pixel value is the predetermined threshold value in the measurement prediction point determination step in the image conversion step that converts the specific object photographed image into a regular image If it exceeds, do not determine the prediction point in actual measurement, handle the failed image conversion to a regular image related to the object captured image,
Creation of reflection characteristic data of an object characterized by obtaining a regular image of an object photographed image that has been handled with failed image conversion by interpolation based on a regular image of another object photographed image that approximates the photographing condition Method.
平面上に描かれた直線で構成される基準枠の内部に配置された被写体を、所定方向から撮影することにより得られる撮影画像を、前記平面上の基準点に立てた法線方向から見た正則画像に変換する画像変換装置であって、
前記撮影画像もしくは前記撮影画像に所定の加工処理を施した画像を、二次元xy座標系に所定の画素値をもった画素を配列してなる画像データとして入力する画像入力部と、
前記xy座標系上の任意の直線を、座標軸に対する向きを示す変数ξと原点に対する変位を示す変数ρを用いて表わす表現形式を用い、前記画像データを構成する個々の画素について、当該画素の基準位置を通る直線群のそれぞれについての変数(ξ,ρ)の組合わせを求め、二次元ξρ座標系上に各変数対(ξ,ρ)に対応する座標点をプロットし、これら座標点の集合により構成される線グラフμを各画素ごとに前記ξρ座標系上に求める線グラフ演算部と、
前記ξρ座標系上に、各画素が同一の初期画素値を有する積算用二次元画素配列を定義し、この積算用二次元画素配列上に、前記画像データを構成する第i番目の画素Piについて求められた線グラフμiを重ね合わせ、この線グラフμi上もしくはその近傍に位置する画素の画素値に、前記画素Piのもつ画素値を積算する処理を、第1番目の画素から第N番目の画素まで(但し、1≦i≦N、Nは前記画像データに含まれる画素配列上の全画素数)繰り返し実行する画素値積算部と、
前記撮影画像を得る際の幾何学的な撮影条件に基づいて、前記xy座標系上に配置された撮影画像上に現れるであろう前記基準枠の像の位置を、幾何学的な演算によって予測する基準枠位置予測部と、
予測された前記基準枠の像を構成する各直線を示す変数(ξ,ρ)の組合わせについて、前記積算用二次元画素配列上に対応する座標点をそれぞれ幾何学的予測点εとしてプロットし、各幾何学的予測点εについての所定の近傍領域に所属する画素のうちの画素値が最大もしくは最小の画素の基準位置を、対応する直線についての実測上予測点と決定する実測上予測点決定部と、
前記二次元xy座標系上に、前記各実測上予測点の座標値(ξ,ρ)によって表わされる直線を描き、これらの直線の位置を正しい基準枠の像の位置として取り扱い、幾何学的な演算によって前記撮影画像を前記正則画像に変換する正則変換部と、
を備えることを特徴とする正則画像への画像変換装置。
A photographed image obtained by photographing a subject placed inside a reference frame composed of straight lines drawn on a plane from a predetermined direction is viewed from a normal direction set up on a reference point on the plane. An image conversion device for converting to a regular image,
An image input unit that inputs the captured image or an image obtained by performing a predetermined processing on the captured image as image data in which pixels having a predetermined pixel value are arranged in a two-dimensional xy coordinate system;
Using an expression form that represents an arbitrary straight line on the xy coordinate system using a variable ξ indicating an orientation with respect to a coordinate axis and a variable ρ indicating a displacement with respect to the origin, a reference of the pixel for each pixel constituting the image data A combination of variables (ξ, ρ) is obtained for each of the straight line groups passing through the position, and coordinate points corresponding to each variable pair (ξ, ρ) are plotted on a two-dimensional ξρ coordinate system. A line graph calculation unit for obtaining a line graph μ configured by the above-mentioned ξρ coordinate system for each pixel;
An accumulation two-dimensional pixel array in which each pixel has the same initial pixel value is defined on the ξρ coordinate system, and the i-th pixel Pi constituting the image data is formed on the accumulation two-dimensional pixel array. A process of superimposing the obtained line graph μi and adding the pixel value of the pixel Pi to the pixel value of a pixel located on or near the line graph μi is performed from the first pixel to the Nth pixel. A pixel value integrating unit that repeatedly executes up to pixels (where 1 ≦ i ≦ N, N is the total number of pixels on the pixel array included in the image data);
Based on the geometric imaging conditions at the time of obtaining the captured image, the position of the image of the reference frame that will appear on the captured image arranged on the xy coordinate system is predicted by geometric calculation. A reference frame position prediction unit to perform,
For the combinations of variables (ξ, ρ) indicating the respective straight lines constituting the predicted image of the reference frame, the corresponding coordinate points on the integrating two-dimensional pixel array are plotted as geometric prediction points ε, respectively. , The actual prediction point that determines the reference position of the pixel having the maximum or minimum pixel value among the pixels belonging to the predetermined neighborhood region for each geometric prediction point ε as the actual prediction point for the corresponding straight line A decision unit;
On the two-dimensional xy coordinate system, straight lines represented by the coordinate values (ξ, ρ) of the actually measured predicted points are drawn, the positions of these straight lines are handled as the positions of the correct reference frame images, A regular conversion unit that converts the captured image into the regular image by calculation;
A device for converting an image into a regular image, comprising:
請求項15に記載の画像変換装置において、
線グラフ演算部が、xy座標系上の任意の直線に、前記xy座標系の原点Oから垂線を下し、その足を点Fとしたときに、前記xy座標系の一軸と線分OFとのなす角度をξ、線分OFの長さをρで表わし、2つの変数ξ,ρにより前記直線を表わす表現形式を用いることを特徴とする正則画像への画像変換装置。
The image conversion device according to claim 15, wherein
When the line graph calculation unit draws a perpendicular line from the origin O of the xy coordinate system to an arbitrary straight line on the xy coordinate system and sets the foot as a point F, one axis of the xy coordinate system and the line segment OF An image conversion apparatus for converting a regular image into a regular image, in which an angle formed by ξ is represented by ξ, a length of the line segment OF is represented by ρ, and the straight line is represented by two variables ξ and ρ.
請求項15または16に記載の画像変換装置において、
画素値積算部が、線グラフμ上に位置する画素の画素値に、画素Piのもつ画素値を積算するとともに、線グラフμから所定の近傍距離dだけ離れた画素の画素値に、画素Piのもつ画素値に前記近傍距離dに応じた所定割合R(0≦R≦1の範囲をとり、近傍距離dが大きくなるほど小さくなる値)を乗じた値を積算することを特徴とする正則画像への画像変換装置。
The image conversion apparatus according to claim 15 or 16,
The pixel value accumulating unit accumulates the pixel value of the pixel Pi on the pixel value of the pixel located on the line graph μ, and the pixel Pi on the pixel value of the pixel separated from the line graph μ by a predetermined neighborhood distance d. A regular image obtained by multiplying the pixel value of the pixel value by a predetermined ratio R corresponding to the neighborhood distance d (a value that takes a range of 0 ≦ R ≦ 1 and decreases as the neighborhood distance d increases). To image converter.
請求項17に記載の画像変換装置において、
所定割合Rが、線グラフμの位置を中心としてガウス分布をとるように設定されていることを特徴とする正則画像への画像変換装置。
The image conversion apparatus according to claim 17, wherein
A device for converting an image into a regular image, wherein the predetermined ratio R is set so as to have a Gaussian distribution centered on the position of the line graph μ.
請求項15〜18のいずれかに記載の画像変換装置において、
線グラフ演算部が、全N個の画素のうち、所定範囲内の画素値を有する画素についてのみ線グラフを求める演算を実行し、
画素値積算部が、全N個の画素のうち、所定範囲内の画素値を有する画素についてのみ画素値の積算処理を実行することを特徴とする正則画像への画像変換装置。
The image conversion device according to any one of claims 15 to 18,
The line graph calculation unit performs a calculation for obtaining a line graph only for pixels having pixel values within a predetermined range among all N pixels,
An image conversion device for a regular image, wherein the pixel value integration unit executes pixel value integration processing only for pixels having pixel values within a predetermined range among all N pixels.
請求項15〜19のいずれかに記載の画像変換装置において、
線グラフ演算部が、全N個の画素のうち、所定の考慮領域内に位置する画素についてのみ線グラフを求める演算を実行し、
画素値積算部が、全N個の画素のうち、所定の考慮領域内に位置する画素についてのみ画素値の積算処理を実行することを特徴とする正則画像への画像変換装置。
The image conversion apparatus according to any one of claims 15 to 19,
The line graph calculation unit performs a calculation for obtaining a line graph only for pixels located within a predetermined consideration area among all N pixels,
An image conversion apparatus for a regular image, wherein the pixel value integration unit executes pixel value integration processing only for pixels located within a predetermined consideration region among all N pixels.
請求項15〜20のいずれかに記載の画像変換装置において、
基準枠位置予測部が、撮影画像を得る際の幾何学的な撮影条件として与えられた、基準点に立てた法線と撮影装置の光軸とのなす角θと、前記光軸の「基準枠が描かれた平面」への投影像と前記基準点を通り前記「基準枠が描かれた平面」に含まれる所定の基準線ζとのなす角φと、前記撮影装置の光学系の焦点距離と、に基づく幾何学的な演算により基準枠の像の位置を予測することを特徴とする正則画像への画像変換装置。
The image conversion device according to any one of claims 15 to 20,
The reference frame position prediction unit gives an angle θ between the normal line set at the reference point and the optical axis of the imaging apparatus, which is given as a geometric imaging condition for obtaining a captured image, and the “reference of the optical axis” The angle φ formed between the projection image on the “plane on which the frame is drawn” and the predetermined reference line ζ included in the “plane on which the reference frame is drawn” passing through the reference point, and the focal point of the optical system of the photographing apparatus An image conversion apparatus for a regular image, wherein the position of an image of a reference frame is predicted by a geometric calculation based on the distance.
請求項15〜21のいずれかに記載の画像変換装置において、
実測上予測点決定部が、幾何学的予測点εについての所定の近傍領域として、幾何学的予測点εの座標値を(ξε,ρε)としたときに、所定の偏差Δξ,Δρを用いて、ξε−Δξ≦ξ≦ξε+Δξ、ρε−Δρ≦ρ≦ρε+Δρなる条件を満たす座標値(ξ,ρ)で示される領域を用いることを特徴とする正則画像への画像変換装置。
The image conversion device according to any one of claims 15 to 21,
When the predicted point determination unit in actual measurement uses the coordinate values of the geometric prediction point ε as (ξε, ρε) as the predetermined neighborhood region for the geometric prediction point ε, the predetermined deviations Δξ and Δρ are used. Thus, an image conversion device to a regular image, characterized in that a region indicated by coordinate values (ξ, ρ) satisfying the conditions of ξε−Δξ ≦ ξ ≦ ξε + Δξ and ρε−Δρ ≦ ρ ≦ ρε + Δρ is used.
請求項15〜22のいずれかに記載の画像変換装置において、
実測上予測点決定部が、幾何学的予測点εについての所定の近傍領域に所属する画素のうちの画素値が最大もしくは最小の画素が複数存在した場合には、これら複数の画素の基準位置の重心位置を、対応する直線についての実測上予測点と決定することを特徴とする正則画像への画像変換装置。
The image conversion apparatus according to any one of claims 15 to 22,
In a case where the actually measured prediction point determination unit includes a plurality of pixels having the maximum or minimum pixel value among the pixels belonging to the predetermined neighboring region with respect to the geometric prediction point ε, the reference position of the plurality of pixels A device for converting an image into a regular image, wherein the center of gravity position is determined as an actually measured predicted point for the corresponding straight line.
請求項15〜23のいずれかに記載の画像変換装置において、
実測上予測点決定部が、近傍領域内の最大画素値が所定のしきい値に満たない場合もしくは最小画素値が所定のしきい値を超えてしまう場合には、実測上予測点の決定を行わず、正則画像への画像変換に失敗した旨のメッセージを提示することを特徴とする正則画像への画像変換装置。
The image conversion apparatus according to any one of claims 15 to 23,
The actually measured prediction point determination unit determines the actually measured prediction point when the maximum pixel value in the vicinity region is less than the predetermined threshold value or when the minimum pixel value exceeds the predetermined threshold value. A device for converting an image into a regular image, characterized in that a message indicating that the image conversion into the regular image has failed is presented.
請求項15〜24のいずれかに記載の画像変換装置を含み、
物体の被測定面の所定位置に所定の入射方向から照明光を当てたときに、前記所定位置から所定の射出方向に向かう反射光の反射率を、前記被測定面の個々の位置ごとに、それぞれ複数m通りの入射方向および複数n通りの射出方向の組み合わせによる(m×n)通りの場合について定義したデータを、前記被測定面についての反射特性データとして作成する物体の反射特性データの作成装置であって、更に、
上面が平面をなし、この平面上に直線で構成される基準枠が描かれている撮影用ステージと、
前記撮影用ステージ上に載置された物体を照明するための光源と、
前記撮影用ステージ上に載置された物体を撮影するためのカメラと、
前記光源と前記物体の被測定面との位置関係を複数m通りに変化させ、かつ、前記被測定面と前記カメラとの位置関係を複数n通りに変化させることにより撮影条件を設定する撮影条件設定部と、
を備え、前記カメラで撮影された撮影画像が前記画像変換装置の画像入力部へ与えられるように構成され、
前記画像変換装置によって変換された正則画像に基づいて、物体の反射特性データを作成する反射特性データ作成部を更に有することを特徴とする物体の反射特性データの作成装置。
An image conversion apparatus according to any one of claims 15 to 24,
When illumination light is applied from a predetermined incident direction to a predetermined position of the surface to be measured of the object, the reflectance of reflected light from the predetermined position toward the predetermined emission direction is determined for each position of the surface to be measured. Creation of reflection characteristic data of an object in which data defined for (m × n) cases by a combination of a plurality of m incidence directions and a plurality of n emission directions are created as reflection characteristic data for the surface to be measured. A device, further,
A shooting stage in which the upper surface forms a plane and a reference frame composed of straight lines is drawn on the plane;
A light source for illuminating an object placed on the shooting stage;
A camera for photographing an object placed on the photographing stage;
Shooting conditions for setting shooting conditions by changing the positional relationship between the light source and the surface to be measured of the object in a plurality of m and changing the positional relationship between the surface to be measured and the camera in a plurality of n ways A setting section;
Comprising a photographed image photographed by the camera and provided to an image input unit of the image conversion device,
An apparatus for creating reflection property data of an object, further comprising a reflection property data creation unit that creates reflection property data of an object based on the regular image converted by the image conversion device.
請求項25に記載の反射特性データの作成装置において、
撮影用ステージの上面に、物体を載置するための矩形が形成されており、前記矩形の内部領域と外部領域とはコントラストに差が生じるように構成され、両領域の境界線によって基準枠が構成されており、
カメラで撮影された撮影画像に対して微分処理を実行する微分処理部が更に設けられており、微分処理後の画像が画像入力部へ与えられるように構成されており、
正則変換部が、前記基準枠の像を構成する矩形の4頂点の位置に基づく幾何学的な演算により正則画像への変換を行うことを特徴とする物体の反射特性データの作成装置。
The reflection characteristic data creating apparatus according to claim 25,
A rectangle for placing an object is formed on the upper surface of the imaging stage, and the inner area and the outer area of the rectangle are configured to have a difference in contrast, and the reference frame is defined by the boundary line between the two areas. Configured,
A differential processing unit that performs differential processing on the captured image captured by the camera is further provided, and the image after the differential processing is configured to be provided to the image input unit,
An apparatus for generating reflection characteristic data of an object, wherein the regular conversion unit performs conversion into a regular image by a geometric calculation based on the positions of four vertices of a rectangle constituting the image of the reference frame.
請求項25または26に記載の反射特性データの作成装置において、
実測上予測点決定部が、近傍領域内の最大画素値が所定のしきい値に満たない、もしくは最小画素値が所定のしきい値を超えてしまうと判断した場合には、正則画像への画像変換に失敗した旨のエラー信号を出力し、
反射特性データ作成部が、前記エラー信号が出力されたために画像変換装置からは得られなかった正則画像を、撮影条件が近似する別な物体撮影画像についての正則画像に基づく補間により求めることを特徴とする物体の反射特性データの作成装置。
In the reflection characteristic data creation device according to claim 25 or 26,
When the predicted point determination unit in actual measurement determines that the maximum pixel value in the neighborhood region is less than the predetermined threshold value or the minimum pixel value exceeds the predetermined threshold value, Outputs an error signal indicating that image conversion has failed,
The reflection characteristic data creation unit obtains a regular image that cannot be obtained from the image conversion apparatus because the error signal is output by interpolation based on a regular image of another object photographed image that approximates the photographing condition. A device for creating reflection characteristic data of an object.
請求項1〜12のいずれかに記載の画像変換方法をコンピュータに実行させるためのプログラム。   The program for making a computer perform the image conversion method in any one of Claims 1-12.
JP2006270645A 2006-10-02 2006-10-02 Method and apparatus for creating reflection characteristic data of object Active JP4888023B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006270645A JP4888023B2 (en) 2006-10-02 2006-10-02 Method and apparatus for creating reflection characteristic data of object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006270645A JP4888023B2 (en) 2006-10-02 2006-10-02 Method and apparatus for creating reflection characteristic data of object

Publications (2)

Publication Number Publication Date
JP2008090590A true JP2008090590A (en) 2008-04-17
JP4888023B2 JP4888023B2 (en) 2012-02-29

Family

ID=39374666

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006270645A Active JP4888023B2 (en) 2006-10-02 2006-10-02 Method and apparatus for creating reflection characteristic data of object

Country Status (1)

Country Link
JP (1) JP4888023B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015049776A (en) * 2013-09-03 2015-03-16 国立大学法人 東京大学 Image processor, image processing method and image processing program
CN110418607A (en) * 2017-02-28 2019-11-05 株式会社岛津制作所 Image processing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003203220A (en) * 2002-01-07 2003-07-18 Canon Inc Three-dimensional image processing method, three- dimensional image processor, there-dimensional image processing system and three-dimensional image processing program
JP2006074512A (en) * 2004-09-02 2006-03-16 Casio Comput Co Ltd Photographing device, and image processing method, and program for photographing device
JP2006115334A (en) * 2004-10-15 2006-04-27 Casio Comput Co Ltd Photographing device, and image processing method and program of photographing device
JP2006163545A (en) * 2004-12-03 2006-06-22 Canon Inc Three-dimensional data processing program, three-dimensional data processing system, and three-dimensional data processing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003203220A (en) * 2002-01-07 2003-07-18 Canon Inc Three-dimensional image processing method, three- dimensional image processor, there-dimensional image processing system and three-dimensional image processing program
JP2006074512A (en) * 2004-09-02 2006-03-16 Casio Comput Co Ltd Photographing device, and image processing method, and program for photographing device
JP2006115334A (en) * 2004-10-15 2006-04-27 Casio Comput Co Ltd Photographing device, and image processing method and program of photographing device
JP2006163545A (en) * 2004-12-03 2006-06-22 Canon Inc Three-dimensional data processing program, three-dimensional data processing system, and three-dimensional data processing method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015049776A (en) * 2013-09-03 2015-03-16 国立大学法人 東京大学 Image processor, image processing method and image processing program
CN110418607A (en) * 2017-02-28 2019-11-05 株式会社岛津制作所 Image processing method
CN110418607B (en) * 2017-02-28 2023-02-24 株式会社岛津制作所 Image processing method

Also Published As

Publication number Publication date
JP4888023B2 (en) 2012-02-29

Similar Documents

Publication Publication Date Title
JP6007178B2 (en) 3D imaging system
TWI387936B (en) A video conversion device, a recorded recording medium, a semiconductor integrated circuit, a fish-eye monitoring system, and an image conversion method
US20150109418A1 (en) Method and system for three-dimensional data acquisition
CN104335005B (en) 3D is scanned and alignment system
JP6223169B2 (en) Information processing apparatus, information processing method, and program
WO2017154705A1 (en) Imaging device, image processing device, image processing program, data structure, and imaging system
JP2018514237A (en) Texture mapping apparatus and method for dental 3D scanner
JPWO2007139070A1 (en) Light source estimation device, light source estimation system, light source estimation method, image resolution increasing device, and image resolution increasing method
JP2015219679A (en) Image processing system, information processing device, and program
JP5886242B2 (en) Image processing apparatus, image processing method, and image processing program
JP2008217243A (en) Image creation device
US10091490B2 (en) Scan recommendations
JP2002236918A (en) Image pickup system, program used in image data control, distortion correcting method for picked up image in the image pickup system and storage medium storing the procedure
JP6541920B1 (en) INFORMATION PROCESSING APPARATUS, PROGRAM, AND INFORMATION PROCESSING METHOD
JP7432793B1 (en) Mapping methods, devices, chips and module devices based on three-dimensional point clouds
WO2012169174A1 (en) Image processing device and image processing method
JP4888023B2 (en) Method and apparatus for creating reflection characteristic data of object
JP2014142832A (en) Image processing apparatus, control method of image processing apparatus, and program
JP6776004B2 (en) Image processing equipment, image processing methods and programs
JP2012256274A (en) Image generation device, image generation method, and computer program
JP2008204318A (en) Image processor, image processing method and image processing program
CN115753019A (en) Pose adjusting method, device and equipment of acquisition equipment and readable storage medium
JP6867766B2 (en) Information processing device and its control method, program
JP3823559B2 (en) How to convert 3D distance data
JP7298687B2 (en) Object recognition device and object recognition method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090915

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110530

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110705

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110902

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111128

R150 Certificate of patent or registration of utility model

Ref document number: 4888023

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141222

Year of fee payment: 3