JPH06102027A - Three-dimensional shape recovering method - Google Patents

Three-dimensional shape recovering method

Info

Publication number
JPH06102027A
JPH06102027A JP4275242A JP27524292A JPH06102027A JP H06102027 A JPH06102027 A JP H06102027A JP 4275242 A JP4275242 A JP 4275242A JP 27524292 A JP27524292 A JP 27524292A JP H06102027 A JPH06102027 A JP H06102027A
Authority
JP
Japan
Prior art keywords
viewpoint
axis
dimensional shape
image
moving
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.)
Withdrawn
Application number
JP4275242A
Other languages
Japanese (ja)
Inventor
Katsuyuki Tanaka
勝之 田中
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.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to JP4275242A priority Critical patent/JPH06102027A/en
Publication of JPH06102027A publication Critical patent/JPH06102027A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Input (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To allow accurate recovery of the three-dimensional shape of an object by determining the direction where the variation of feature amount of image is high, moving the viewpoint in that direction, and then determining a correcponding point accurately. CONSTITUTION:An object is imaged, at an initial position thereof, by means of a television camera and a distributing condition in the direction where the variation of luminance is highest (direction of gradient angle) is determined for all pixels in order to prepare a histogram and then the moving direction of viewpoint is set in the direction corresponding to the peak value of the histogram. When the axis of a columnar object is set in the direction of x-axis, for example, the camera is moved along x-axis or y-axis and the object is imaged before and after movement thereof. In this regard, luminance varies in the direction of y-axis but does not vary in the direction of x-axis because of the columnar structure. Consequently, a corresponding point can be obtained by moving the viewpoint in the direction of y-axis. The camera is moved in the direction thus determined and the objected is imaged and then the image is compared with the image at initial position thus operating the depth of the corresponding point. This method allows accurate recovery of the three-dimensional shape of an object.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、例えばテレビカメラを
用いて所定の物体を異なる位置で撮影し、そのとき得ら
れる画像から、その物体の3次元画像を得る場合に用い
て好適な3次元形状復元方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a three-dimensional image suitable for obtaining a three-dimensional image of an object from an image obtained by photographing a predetermined object at different positions by using, for example, a television camera. The present invention relates to a shape restoration method.

【0002】[0002]

【従来の技術】所定の物体を異なる位置(視点)で撮影
し、そのとき得られる画像を処理して、その物体の3次
元形状を復元する方法が知られている。位置Aにおいて
物体を撮影し、位置Aから所定の平面内を移動し、所定
距離移動した位置Bにおいて物体の撮影を行なう。この
とき、物体を撮影するテレビカメラのレンズの光軸は、
移動する面と垂直になっている。各位置において物体の
像は位置AおよびBから、それぞれレンズの焦点距離f
だけ離間した投影面上に投影されることになる。そし
て、位置AとBにおいて得た2つの画像から物体の3次
元形状を復元する。
2. Description of the Related Art There is known a method in which a predetermined object is photographed at different positions (viewpoints), an image obtained at that time is processed, and a three-dimensional shape of the object is restored. The object is photographed at the position A, the object moves in a predetermined plane from the position A, and the object is photographed at the position B moved by a predetermined distance. At this time, the optical axis of the lens of the TV camera that shoots the object is
It is perpendicular to the moving plane. At each position, the image of the object is obtained from the positions A and B, respectively, and the focal length f of the lens is
It will be projected on the projection plane spaced apart by only. Then, the three-dimensional shape of the object is restored from the two images obtained at the positions A and B.

【0003】静止物体の2枚の画像により物体の3次元
形状を復元する方法としては、ステレオマッチングがよ
く使われる。このステレオマッチングは、2枚の画像の
対応点の位置ずれ(視差)から三角測量の原理に基づい
て物体の形状を復元するものである。
Stereo matching is often used as a method for restoring the three-dimensional shape of an object from two images of a stationary object. This stereo matching is to restore the shape of an object based on the triangulation principle from the positional shift (parallax) between corresponding points of two images.

【0004】[0004]

【発明が解決しようとする課題】従来の方法において
は、位置Bの位置Aからの方向、即ち、テレビカメラの
移動方向は、例えば水平方向など、テレビカメラが移動
し易い方向に定められ、物体の形状などとは無関係に決
定されていた。その結果、テレビカメラを位置Aから位
置Bに移動したとしても、物体の対応する点を必ずしも
正確に求めることができない場合があった。
In the conventional method, the direction of the position B from the position A, that is, the moving direction of the television camera is set to a direction in which the television camera is easy to move, such as a horizontal direction, and It was decided regardless of the shape of the. As a result, even if the television camera is moved from the position A to the position B, the corresponding point of the object cannot always be obtained accurately.

【0005】本発明はこのような状況に鑑みてなされた
ものであり、物体の対応する点を正確に求めることがで
き、もって正確に物体の3次元形状を復元することがで
きるようにするものである。
The present invention has been made in view of such a situation, and it is possible to accurately find a corresponding point of an object and thereby accurately restore the three-dimensional shape of the object. Is.

【0006】[0006]

【課題を解決するための手段】本発明の3次元形状復元
方法は、同一の物体を異なる視点で撮影して複数の画像
を得て、複数の画像から物体の対応点を求め、物体の3
次元形状を復元する3次元形状復元方法において、画像
の特徴量の変化が大きい方向を求め、その方向に視点を
移動することを特徴とする。
According to the three-dimensional shape restoration method of the present invention, the same object is photographed from different viewpoints to obtain a plurality of images, the corresponding points of the object are obtained from the plurality of images, and the three points of the object are obtained.
A three-dimensional shape restoration method for restoring a three-dimensional shape is characterized in that a direction in which a change in the feature amount of an image is large is obtained and the viewpoint is moved in that direction.

【0007】この異なる視点は、例えば所定の第1の視
点と、第1の視点を、少なくとも平行移動または回転し
た第2の視点を有するものとすることができる。
The different viewpoints may have, for example, a predetermined first viewpoint and a second viewpoint obtained by at least translating or rotating the first viewpoint.

【0008】また、特徴量は、画像の輝度情報またはエ
ッジ情報とすることができる。
Further, the characteristic amount can be luminance information or edge information of the image.

【0009】さらに、特徴量の変化が大きい方向に関す
るヒストグラムを作成し、ヒストグラムのピーク値に対
応して視点の移動方向を決定するようにすることができ
る。
Further, it is possible to create a histogram for the direction in which the change in the characteristic amount is large and to determine the moving direction of the viewpoint in accordance with the peak value of the histogram.

【0010】また、特徴量の変化が大きい方向を演算
し、演算により求められた方向を所定の範囲毎に区分
し、区分毎に視点を移動するようにすることも可能であ
る。
It is also possible to calculate the direction in which the change in the characteristic amount is large, divide the direction obtained by the calculation into predetermined ranges, and move the viewpoint for each section.

【0011】[0011]

【作用】上記構成の3次元形状復元方法においては、画
像の輝度情報、エッジ情報などの特徴量の変化が大きい
方向が求められ、その方向に視点が移動される。従っ
て、移動する前の視点と移動した後の視点の画像から、
対応点を正確に求めることができ、物体の3次元形状を
正確に復元することが可能となる。
In the three-dimensional shape restoration method of the above construction, the direction in which the change in the feature amount such as the brightness information and the edge information of the image is large is obtained, and the viewpoint is moved in that direction. Therefore, from the images of the viewpoint before moving and the viewpoint after moving,
The corresponding points can be accurately obtained, and the three-dimensional shape of the object can be accurately restored.

【0012】[0012]

【実施例】最初に、図1乃至図8を参照して、本発明に
よる3次元形状復元の原理について説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS First, the principle of three-dimensional shape restoration according to the present invention will be described with reference to FIGS.

【0013】図1は、本発明において物体が撮影される
様子を示している。同図に示すように、本発明において
は、例えば位置Aにおいてテレビカメラにより物体が撮
影され、投影面に投影されたその画像が得られる。その
後、テレビカメラは移動面を移動し、位置Bに到達した
とき、その撮影レンズの光軸を回転して物体の方向に向
けさせ、そこで物体を撮影する。即ち、本発明において
は、テレビカメラが移動されるだけでなく、移動された
位置において、その光軸が必要に応じて回転されるよう
になされている。
FIG. 1 shows how an object is photographed in the present invention. As shown in the figure, in the present invention, an object is photographed by a television camera at position A, for example, and an image thereof projected on a projection surface is obtained. After that, the television camera moves on the moving surface, and when it reaches the position B, the optical axis of its photographing lens is rotated and directed toward the object, and the object is photographed there. That is, in the present invention, not only the television camera is moved, but also the optical axis is rotated at the moved position as needed.

【0014】その結果、例えば図2に示すように、物体
の外周を囲むように、A,B,C,Dといった各位置
(視点)において物体を撮影することにより、物体の外
周の全部の範囲のデータを得ることができる。
As a result, for example, as shown in FIG. 2, by photographing the object at each position (viewpoint) such as A, B, C, and D so as to surround the outer circumference of the object, the entire range of the outer circumference of the object can be obtained. Can be obtained.

【0015】次に、図3および図4を用いて、物体の視
差について説明する。いま、図3に示すように、位置A
と位置Bにおいてテレビカメラ1により物体を撮影する
と、各位置に対応して、図4(a)および(b)に示す
ような画像が得られる。図3に示す物体の参照点Pの座
標が、位置Aで撮影した画面においては(xp,yp)で
あり、位置Bで撮影した画面においては(xp’,
p’)であったとすると、参照点Pの視差dv (以
下、ベクトルをvの添字を付して表す)は、図4(b)
に示すようになる。
Next, the parallax of an object will be described with reference to FIGS. 3 and 4. Now, as shown in FIG.
When an image of an object is taken by the television camera 1 at the position B and the position B, images as shown in FIGS. 4A and 4B are obtained corresponding to each position. The coordinates of the reference point P of the object shown in FIG. 3 are (x p , y p ) on the screen shot at the position A, and (x p ', on the screen shot at the position B.
y p ') a which was a With, reference points P parallax d v (hereinafter represented denoted by the subscript a vector v) is, and FIG. 4 (b)
As shown in.

【0016】以上のことをより立体的に表すと、図5お
よび図6に示すようになる。即ち、図5は位置Aにおい
て撮影した状態を示している。座標軸X,Y,Zのう
ち、Z軸は物体方向の座標に設定されており、テレビカ
メラ1のレンズの光軸はこのZ軸上に配置されている。
物体の参照点Pの座標は(Xp,Yp,Zp)で表すこと
ができる。即ち、X,Y,Z軸の原点をOとするとき、
原点Oと参照点Pを結んで得られるベクトルPvは、次
式で表すことができる。 Pv=(Xp,Yp,Zp)・・・(1)
[0016] The above is more three-dimensionally expressed as shown in Figs. That is, FIG. 5 shows a state of photographing at the position A. Of the coordinate axes X, Y, Z, the Z axis is set to the coordinate in the object direction, and the optical axis of the lens of the television camera 1 is arranged on this Z axis.
The coordinates of the reference point P of the object can be represented by (X p , Y p , Z p ). That is, when the origin of the X, Y, and Z axes is O,
The vector P v obtained by connecting the origin O and the reference point P can be expressed by the following equation. P v = (X p , Y p , Z p ) ... (1)

【0017】この参照点Pは、Z軸上において原点Oか
ら焦点距離fだけ離間した投影面上に点qとして投影さ
れる。この投影面は、XY平面と平行なZ軸上の座標f
における平面により構成される。投影面上の座標は、X
軸に平行な座標軸xと、Y軸に平行な座標軸yにより表
される。参照点Pは投影面上において点qとして投影さ
れるため、点qの座標を(xp,yp)とすると、座標x
yの原点をoとするとき、原点oから点qに向かうベク
トルqvが、ベクトルPvの投影面に投影されたものとな
る。従って、次式が成立する。 qv=(xp,yp)・・・(2)
The reference point P is projected as a point q on the projection plane separated from the origin O by the focal length f on the Z axis. This projection plane is a coordinate f on the Z axis parallel to the XY plane.
It is composed of a plane. The coordinates on the projection plane are X
It is represented by a coordinate axis x parallel to the axis and a coordinate axis y parallel to the Y axis. Since the reference point P is projected as a point q on the projection plane, if the coordinates of the point q are (x p , y p ), the coordinate x
When the origin of y is o, the vector q v from the origin o to the point q is projected on the projection plane of the vector P v . Therefore, the following equation is established. q v = (x p , y p ) ... (2)

【0018】その結果、上記した式(1),(2)から
次式が成立する。 xp=f(Xp/Zp)・・・(3) yp=f(Yp/Zp)・・・(4)
As a result, the following equation is established from the above equations (1) and (2). x p = f (X p / Z p) ··· (3) y p = f (Y p / Z p) ··· (4)

【0019】一方、図6は、位置Bにおいて物体を撮影
した状態を示している。即ち、位置Bは、位置A(図6
における原点O)からベクトルtvだけ座標軸X,Y,
Zを平行移動させた位置(図6における原点O’)とな
っている。そしてさらに、この実施例においては、座標
軸が所定の方向に回転される。例えば、平行移動した状
態のX軸(図6のX’軸)を中心として、角度θだけ座
標軸が回転される。そして新たな位置における座標軸を
それぞれX’,Y’,Z’とする。また、原点はO’と
される。
On the other hand, FIG. 6 shows a state in which the object is photographed at the position B. That is, position B corresponds to position A (see FIG. 6).
From the origin O) by the vector t v coordinate axis X, Y,
It is a position (origin O ′ in FIG. 6) obtained by translating Z. And further, in this embodiment, the coordinate axes are rotated in a predetermined direction. For example, the coordinate axis is rotated about the X axis (X ′ axis in FIG. 6) in the translated state by the angle θ. The coordinate axes at the new positions are X ', Y', and Z ', respectively. The origin is O '.

【0020】X軸を中心にθだけ回転させた場合、回転
行列Rは次式で示すことができる。
When rotated by θ around the X axis, the rotation matrix R can be expressed by the following equation.

【0021】[0021]

【数1】 [Equation 1]

【0022】上述した場合と同様に、この位置Bにおけ
る投影面の座標軸をx’,y’とすると、参照点Pの投
影面上における投影点はq’となる。そして、その座標
は(xp’,yp’)となる。また、原点O’から参照点
PまでのベクトルPv’は、投影面上においてはqv’と
なる。その結果、次式が成立する。 Pv’=(Xp’,Yp’,Zp’)・・・(6) qv’=(xp’,yp’)・・・(7) xp’=f(Xp’/Zp’)・・・(8) yp’=f(Yp’/Zp’)・・・(9)
As in the case described above, when the coordinate axes of the projection plane at this position B are x'and y ', the projection point of the reference point P on the projection plane is q'. Then, the coordinates are (x p ', y p '). Further, the vector P v ′ from the origin O ′ to the reference point P is q v ′ on the projection plane. As a result, the following equation is established. P v '= (X p' , Y p ', Z p') ··· (6) q v '= (x p', y p ') ··· (7) x p' = f (X p '/ Z p ') ・ ・ ・ (8) y p '= f (Y p ' / Z p ') ・ ・ ・ (9)

【0023】平行移動成分tvと回転行列Rの逆行列R
-1により、PvとPv’は次式の関係を有する。 Pv’=R-1(Pv−tv)・・・(10) ここで、R-1は次式で表される。
Inverse matrix R of translation component t v and rotation matrix R
−1 , P v and P v 'have the following relationship. In P v '= R -1 (P v -t v) ··· (10) wherein, R -1 is expressed by the following equation.

【0024】[0024]

【数2】 [Equation 2]

【0025】またtvは、次式で表される。 tv=(tx,ty,tz)・・・(15)[0025] t v is represented by the following equation. t v = (t x , t y , t z ) ... (15)

【0026】式(10)に式(1),(6),(11)
乃至(15)を代入すると、次式が得られる。
Expressions (1), (6), and (11) are added to Expression (10).
By substituting (15) to (15), the following equation is obtained.

【0027】[0027]

【数3】 [Equation 3]

【0028】ここでSvpは、次式で定義されるものであ
る。 Svp≡(xp,yp,f)・・・(17)
Here, S vp is defined by the following equation. S vp ≡ (x p , y p , f) (17)

【0029】式(16)に、式(12)乃至(14)を
代入して、次の式が得られる。 Xp’=rv1・(Zpvp−ftv)/f・・・(18) Yp’=rv2・(Zpvp−ftv)/f・・・(19) Zp’=rv3・(Zpvp−ftv)/f・・・(20)
By substituting the equations (12) to (14) into the equation (16), the following equation is obtained. X p '= r v1 · ( Z p S vp -ft v) / f ··· (18) Y p' = r v2 · (Z p S vp -ft v) / f ··· (19) Z p '= R v3 · (Z p S vp −ft v ) / f (20)

【0030】上記した式(8),(9)に、式(18)
乃至(20)を代入すると、次の式が得られる。 xp’=f(Xp’/Zp’) =f{(rv1・(Zpvp−ftv))/(rv3・(Zpvp−ftv))} ・・・(21) yp’=f(Yp’/Zp’) =f{(rv2・(Zpvp−ftv))/(rv3・(Zpvp−ftv))} ・・・(22)
In addition to the above equations (8) and (9), the equation (18)
By substituting (20) to (20), the following equation is obtained. x p '= f (X p ' / Z p ') = f {(r v1 · (Z p S vp -ft v)) / (r v3 · (Z p S vp -ft v))} ··· (21) y p '= f (Y p' / Z p ') = f {(r v2 · (Z p S vp -ft v)) / (r v3 · (Z p S vp -ft v))} (22)

【0031】視差dvは、次式で示すことができる。 dv=qv−qv’=(dx,dy)・・・(23)The parallax d v can be expressed by the following equation. d v = q v -q v ' = (dx, dy) ··· (23)

【0032】また、dx,dyは次式で示すことができ
る。 dx=x−x’・・・(24) dy=y−y’・・・(25)
Further, dx and dy can be expressed by the following equations. dx = xx '... (24) dy = yy' ... (25)

【0033】上記した式(21),(22)は、添字p
を除くと、画像の各画素に投影されている物体上の部分
の奥行きと、視点を変えたときの画像における対応点の
位置を表す一般的な関係式となる。これらの式を視差d
vと奥行きZとの関係に直し、式(24),(25)を
代入すると、次式が得られる。 Z=[f{(x−dx)rv3−frv1}tv] /[{(x−dx)rv3−frv1}Sv] =[f{(y−dy)rv3−frv2}tv] /[{(y−dy)rv3−frv2}Sv]・・・(26)
In the above equations (21) and (22), the subscript p
Is a general relational expression that represents the depth of the part on the object projected on each pixel of the image and the position of the corresponding point in the image when the viewpoint is changed. Parallax d of these equations
By substituting equations (24) and (25) into the relationship between v and the depth Z, the following equation is obtained. Z = [f {(x- dx) r v3 -fr v1} t v] / [{(x-dx) r v3 -fr v1} S v] = [f {(y-dy) r v3 -fr v2 } t v] / [{( y-dy) r v3 -fr v2} S v] ··· (26)

【0034】即ち、視差分布dx,dyを適当な数値解
法を用いて解くことにより、物体の奥行きZの分布、即
ち、3次元形状を復元することができる。尚、視点の移
動をX方向に限定し(ty=tz=0)、かつ回転を与え
ないようにすると(Rを単位行列とすると)、Z=f×
(tx/dx)となり、通常のステレオマッチングに相
当する。
That is, by solving the parallax distributions dx and dy using an appropriate numerical solution, the distribution of the depth Z of the object, that is, the three-dimensional shape can be restored. If the movement of the viewpoint is limited to the X direction (t y = t z = 0) and no rotation is given (when R is a unit matrix), Z = f ×
(Tx / dx), which corresponds to normal stereo matching.

【0035】画像間の視差分布dvの計算は、通常のス
テレオマッチングと同様の方法(例えば、特開平3−1
67678号公報に開示されている)により可能であ
る。また、dvを式(26)によって物体の奥行き分布
に変換することができるが、次にその計算方法の例につ
いて説明する。
The parallax distribution d v between the images is calculated by the same method as the ordinary stereo matching (see, for example, Japanese Patent Laid-Open No. 3-1
No. 67678). Further, d v can be converted into the depth distribution of the object by the equation (26). Next, an example of the calculation method will be described.

【0036】2つの位置における画像情報F0(qv),
1(qv)がエッジ情報のような2値(黒または白)情
報であったり、物体から見た2つの視点までの距離およ
びレンズの見込み角の差が影響しないような輝度情報で
あれば、対応点の存在する領域においては次式が成立す
る。 F0(qv)=F1(qv+dv(qv))・・・(27)
Image information F 0 (q v ) at two positions,
F 1 (q v ) may be binary (black or white) information such as edge information, or luminance information that is not affected by the difference between the distance from the object to the two viewpoints and the perspective angle of the lens. For example, in the region where the corresponding points exist, the following equation holds. F 0 (q v ) = F 1 (q v + d v (q v )) (27)

【0037】視差dvを次式で示すように、オフセット
量dv0(dvに近い所定の値)と、Δdv(qv)(=dv
−dv0)の和で表すものとすると、 dv=dv0+Δdv(qv)・・・(28) 上記した式(27)は、近似的に次のように表すことが
できる。 F0(qv)=F1(qv+dv0+Δdv(qv)) =F1(qv+dv0)+Δdv(qv)×ΔF1(qv+dv0) ・・・(29)
As shown in the following expression, the parallax d v is an offset amount d v0 (a predetermined value close to d v ) and Δd v (q v ) (= d v
Assuming that it is represented by the sum of −d v0 ), d v = d v0 + Δd v (q v ) ... (28) The above equation (27) can be approximately expressed as follows. F 0 (q v ) = F 1 (q v + d v0 + Δd v (q v )) = F 1 (q v + d v0 ) + Δd v (q v ) × ΔF 1 (q v + d v0 ) ... (29 )

【0038】その結果、次式が得られる。 Δdx(qv)(∂F1/∂x)(qv+dv0) +Δdy(∂F1/∂y)(qv+dv0) =F0(qv)−F1(qv+dv0)・・・(30)As a result, the following equation is obtained. Δdx (q v) (∂F 1 / ∂x) (q v + d v0) + Δdy (∂F 1 / ∂y) (q v + d v0) = F 0 (q v) -F 1 (q v + d v0) ... (30)

【0039】一方、次の(31),(32)の条件を上
記した式(26)に代入すると、次の式(33)が得ら
れる。 dx=d0x+Δdx・・・(31) dy=d0y+Δdy・・・(32) Z=[f{(x−(d0x+Δdx))rv3−frv1}・tv] /[{(x−(d0x+Δdx))rv3−frv1}・Sv] =[f{(y−(d0y+Δdy))rv3−frv2}・tv] /[{(y−(d0y+Δdy))rv3−frv2}・Sv] ・・・(33)
On the other hand, if the following conditions (31) and (32) are substituted into the above equation (26), the following equation (33) is obtained. dx = d 0x + Δdx ··· ( 31) dy = d 0y + Δdy ··· (32) Z = [f {(x- (d 0x + Δdx)) r v3 -fr v1} · t v] / [{( x- (d 0x + Δdx)) r v3 -fr v1} · S v] = [f {(y- (d 0y + Δdy)) r v3 -fr v2} · t v] / [{(y- (d 0y + Δdy)) r v3 −fr v2 } · S v ] ... (33)

【0040】上記した式(30)と(33)は連立方程
式を成し、これを解くことにより、Δdx(qv),Δ
dy(qv)を求めることができる。その結果、上記し
た式(33)と(3),(4)より、画像F0(qv)上
のqvに対応する物体上の点の3次元空間における座標
(X,Y,Z)を求めることができる。視差のオフセッ
トdv0は、物体の存在する大体の位置を考慮するなどし
て与えるが、dv0+Δdv0を、dv1として再びΔdv
計算することにより、精度を向上させることができる。
同様の計算を繰り返すと、Δdvが次第に0に近い値と
なり、適当な値εを設定して、Δdvの絶対値が、この
εより小さくなったところで演算を終了させる。
The above equations (30) and (33) form simultaneous equations, and by solving them, Δdx (q v ), Δ
dy (q v ) can be obtained. As a result, from the above equations (33), (3), and (4), the coordinates (X, Y, Z) of the point on the object corresponding to q v on the image F 0 (q v ) in the three-dimensional space Can be asked. The parallax offset d v0 is given by taking into account the position of the object in general, and the accuracy can be improved by calculating Δ d v again with d v0 + Δd v0 as d v1 .
When the same calculation is repeated, Δd v gradually becomes a value close to 0, an appropriate value ε is set, and the operation is terminated when the absolute value of Δd v becomes smaller than this ε.

【0041】以上の演算が画像F0の各画素に対して実
行される。
The above calculation is executed for each pixel of the image F 0 .

【0042】図7は、以上の演算を実行するフローチャ
ートを示している。最初にステップS1において、変数
nが0に初期設定される。この変数nは画素番号を表
し、画素総数N以下の値を取る。次にステップS2に進
み、mが0に初期設定され、またΔdvmが初期値Δdv0
に設定される。次にステップS3に進み、(∂F1/∂
x)(qvn+dvm)および(∂F1/∂y)(qvn+d
vm)の演算が実行される。即ち、ここにおいて画像情報
が微分される。
FIG. 7 shows a flowchart for executing the above calculation. First, in step S1, the variable n is initialized to 0. This variable n represents a pixel number and takes a value equal to or less than the total number N of pixels. Next, in step S2, m is initialized to 0, and Δd vm is an initial value Δd v0.
Is set to. Next, in step S3, (∂F 1 / ∂
x) (q vn + d vm ) and (∂F 1 / ∂y) (q vn + d
vm ) operation is executed. That is, the image information is differentiated here.

【0043】さらにステップS4に進み、上記した式
(30),(33)の連立方程式を演算し、Δdvmが求
められる。次にステップS5に進み、dvm+Δdvmをd
vm+1に設定する。
Further proceeding to step S4, the simultaneous equations of the above equations (30) and (33) are calculated to obtain Δd vm . Next, in Step S5, d vm + Δd vm is d
Set to vm + 1 .

【0044】次にステップS6において、Δdvmの絶対
値が所定の定数εより小さいか否かが判定される。ステ
ップS6において、YESの判定が行なわれた場合にお
いては、ステップS7に進み、上記した式(3),
(4),(33)から、Xn,Yn,Znが演算される。
即ち、物体の3次元空間の座標が求められる。
Next, at step S6, it is judged if the absolute value of Δd vm is smaller than a predetermined constant ε. If YES is determined in step S6, the process proceeds to step S7, and the above equation (3),
From (4) and (33), X n , Y n , and Z n are calculated.
That is, the coordinates of the three-dimensional space of the object are obtained.

【0045】ステップS6において、NOの判定が行な
われた場合においては、ステップS9に進み、mがMよ
り小さいか否かが判定される。このMは、繰り返し演算
の繰り返し数の上限値を意味している。mがMより小さ
い場合においては、まだ演算回数が上限値に達していな
いため、ステップS10に進み、mを1だけインクリメ
ントして、ステップS3に進み、それ以降の処理が繰り
返し実行される。
If NO is determined in step S6, the process proceeds to step S9, and it is determined whether or not m is smaller than M. This M means the upper limit value of the number of iterations of the iterative calculation. When m is smaller than M, the number of calculations has not reached the upper limit value yet, so the process proceeds to step S10, m is incremented by 1, the process proceeds to step S3, and the subsequent processes are repeatedly executed.

【0046】ステップS9において、変数mがM以上に
なったと判定された場合においては、ステップS7の処
理が完了した場合と同様に、ステップS8に進み、変数
nとNの大きさが比較される。変数nがNより小さい場
合においては、即ち、すべての画素に対する演算がまだ
完了していない場合においては、ステップS11に進
み、変数nが1だけインクリメントされ、ステップS2
に戻り、それ以降の処理が繰り返し実行される。ステッ
プS8において、変数nがN以上と判定された場合にお
いては、すべての画素の処理が終了したので、演算処理
は終了される。
When it is determined in step S9 that the variable m has become equal to or greater than M, the process proceeds to step S8 and the magnitudes of the variables n and N are compared, as in the case where the process of step S7 is completed. . If the variable n is smaller than N, that is, if the calculation has not been completed for all pixels, the process proceeds to step S11, the variable n is incremented by 1, and step S2 is performed.
Then, the subsequent processing is repeatedly executed. When it is determined in step S8 that the variable n is equal to or greater than N, the processing of all the pixels is completed, and thus the arithmetic processing is completed.

【0047】図8は、以上の演算を実行するためのハー
ド構成を示している。同図に示すように、テレビカメラ
1は物体を撮影すると、そのビデオ信号を出力する。こ
のビデオ信号は、A/D変換器2によりA/D変換さ
れ、CPU3に出力される。CPU3は、ROM6に記
憶されているプログラムに従って各部を制御する。即
ち、A/D変換器2より入力されたデータを一旦RAM
7に記憶させる。そしてカメラ制御部5を介してテレビ
カメラ1を制御し、テレビカメラ1の撮影位置を移動さ
せて、複数の位置における画像データをRAM7に記憶
させる。さらにRAM7に記憶されたデータを読み出し
て処理し、その処理結果をCRT4に出力し、表示させ
る。即ち、これにより、CRT4に復元された3次元形
状が表示されることになる。
FIG. 8 shows a hardware configuration for executing the above calculation. As shown in the figure, when the television camera 1 photographs an object, it outputs a video signal thereof. This video signal is A / D converted by the A / D converter 2 and output to the CPU 3. The CPU 3 controls each unit according to the program stored in the ROM 6. That is, the data input from the A / D converter 2 is temporarily stored in the RAM.
Store in 7. Then, the television camera 1 is controlled via the camera control unit 5, the shooting position of the television camera 1 is moved, and the image data at a plurality of positions is stored in the RAM 7. Further, the data stored in the RAM 7 is read and processed, and the processing result is output to the CRT 4 and displayed. That is, by this, the restored three-dimensional shape is displayed on the CRT 4.

【0048】テレビカメラ1の光軸の回転がないものと
し(回転行列Rが単位行列であるとし)、視点の移動方
向をX方向の1軸に限定すると(ty=0,tz=0とす
ると)、式(21),(22)より、y’=y(dy=
0)となり、視差はX方向のみに生ずる。画像情報F0
において、所定の高さのX方向の特徴量(例えば輝度情
報)の変化の仕方が、他の画像情報F1において、同じ
高さのX方向で奥行き分布に対応して変形を受けるが、
図9に示すように、画像情報F0とF1の対応点における
輝度の値は一致するものとなる。尚、図9においては、
矢印の長さが視差を表し、この矢印の長さは位置によっ
て異なるものとなる。
If the optical axis of the television camera 1 is not rotated (the rotation matrix R is a unit matrix) and the moving direction of the viewpoint is limited to one axis in the X direction (t y = 0, t z = 0). Then, from equations (21) and (22), y ′ = y (dy =
0), and parallax occurs only in the X direction. Image information F 0
In, in the other image information F 1 , the way of changing the characteristic amount (for example, the luminance information) of the predetermined height in the X direction is deformed corresponding to the depth distribution in the X direction of the same height,
As shown in FIG. 9, the luminance values at the corresponding points of the image information F 0 and F 1 are the same. In addition, in FIG.
The length of the arrow represents parallax, and the length of the arrow varies depending on the position.

【0049】一方、視点の移動方向をY方向の1軸に限
定すると、視差はY方向にのみ発生し、画像情報F0
所定の水平位置のY方向の輝度の変化の仕方は、画像情
報F1における水平位置のY方向の奥行き分布に対応し
て変形を受けることになる。
On the other hand, if the moving direction of the viewpoint is limited to one axis in the Y direction, parallax occurs only in the Y direction, and the way of changing the luminance in the Y direction at a predetermined horizontal position of the image information F 0 is the image information. The horizontal position in F 1 is deformed corresponding to the depth distribution in the Y direction.

【0050】このように、視点の移動方向を1軸に限定
すると、視差の方向は、その軸方向にのみ生じるため、
輝度変化が、その軸方向において存在しないか、あるい
は存在していたとしても、小さい場合においては対応点
を求めることが困難になる。
As described above, when the moving direction of the viewpoint is limited to one axis, the direction of parallax occurs only in that axial direction,
If the brightness change does not exist in the axial direction, or even if it exists, it is difficult to find the corresponding point when the change is small.

【0051】即ち、例えば図10に示すように、円柱状
の物体を、その軸をx軸方向に沿って配置した場合、テ
レビカメラ1をx軸に沿って−x方向に移動すると、移
動する前において図11(a)に示す画像が得られ、移
動した後において図11(b)に示す画像が得られる。
また、テレビカメラ1をy軸方向に沿って移動すると、
移動する前において図11(a)に示す画像が得られ、
移動した後において図11(c)に示す画像が得られ
る。そして、図11(a)と(b)の所定の高さ(y=
c)におけるx軸方向の輝度の変化を示すと、図12
(a)のようになる。同様に、図11(a)と(c)の
画像のx=xcにおけるy軸方向の輝度の変化を表す
と、図12(b)に示すようになる。
That is, for example, as shown in FIG. 10, when a cylindrical object is arranged with its axis along the x-axis direction, it moves when the television camera 1 moves along the x-axis in the -x direction. The image shown in FIG. 11A is obtained before, and the image shown in FIG. 11B is obtained after moving.
Moreover, when the TV camera 1 is moved along the y-axis direction,
Before moving, the image shown in FIG. 11 (a) is obtained,
After moving, the image shown in FIG. 11C is obtained. Then, a predetermined height (y =
12 shows the change in luminance in the x-axis direction in y c ).
It becomes like (a). Similarly, FIG. 12B shows changes in luminance in the y-axis direction at x = x c of the images in FIGS. 11A and 11C.

【0052】円柱という物体の構造上、図12に示すよ
うに、y軸方向には輝度変化が存在するが、x軸方向に
は輝度変化が存在しない。このため、視点の移動方向を
x軸方向とすると、移動前の画像と移動後の画像から対
応点を求めることが、従って、3次元形状を復元するこ
とが困難になる。換言すれば、この実施例の場合、y軸
方向に視点を移動することにより、対応点を求めること
ができるが、x軸方向に移動すると、対応点を求めるこ
とが困難になる。
Due to the structure of an object called a cylinder, as shown in FIG. 12, there is a luminance change in the y-axis direction, but there is no luminance change in the x-axis direction. Therefore, when the moving direction of the viewpoint is the x-axis direction, it becomes difficult to find the corresponding point from the image before moving and the image after moving, and thus it is difficult to restore the three-dimensional shape. In other words, in the case of this embodiment, it is possible to obtain the corresponding points by moving the viewpoint in the y-axis direction, but it becomes difficult to obtain the corresponding points in the x-axis direction.

【0053】また、視点の移動方向における輝度変化が
大きい場合、視点の移動方向に対応して、図13に示す
ような輝度変化の分布特性を得ることができる。これに
対して、視点の移動方向における輝度変化が存在はする
が、極めて小さい場合、視点の移動に対応して得られる
輝度分布の変化は、図14に示すようになる。即ち、輝
度変化が小さいと、ノイズにより、真の視差と測定され
る視差との誤差が大きくなる。
When the change in the luminance in the moving direction of the viewpoint is large, the distribution characteristic of the change in the luminance as shown in FIG. 13 can be obtained corresponding to the moving direction of the viewpoint. On the other hand, although there is a luminance change in the moving direction of the viewpoint, when it is extremely small, the change in the luminance distribution obtained in response to the movement of the viewpoint is as shown in FIG. That is, when the luminance change is small, the error between the true parallax and the measured parallax increases due to noise.

【0054】以上のことから、ステレオマッチングによ
り3次元形状の復元を行う場合、視点の移動方向は、輝
度変化が大きい方向に対して行うのが好ましいことが判
る。
From the above, it is understood that, when the three-dimensional shape is restored by stereo matching, it is preferable that the moving direction of the viewpoint is the direction in which the luminance change is large.

【0055】ところで、図10に示したような円柱状の
物体の場合は、その輝度変化の分布の方向が一定の方向
となる。しかしながら、一般的には、輝度変化の分布は
物体の形状に依存し、規則的なものとはならない。ま
た、同じ物体像でも照明装置や照明の方向が変わること
で、輝度変化の様子が変化する。従って、視点の移動方
向を1つだけとせず、複数の方向とするのが好ましい。
By the way, in the case of a columnar object as shown in FIG. 10, the direction of the distribution of the brightness change is a constant direction. However, in general, the distribution of luminance changes depends on the shape of the object and is not regular. In addition, even if the same object image is used, the manner in which the luminance changes is changed by changing the illumination device and the direction of illumination. Therefore, it is preferable that the moving direction of the viewpoint is not limited to one but plural directions.

【0056】1つの物体像上の所定の点の対応点を、別
の視点からの物体像から求める場合、その点における輝
度変化の最も大きい方向へ視点移動した物体像から求め
るようにすることで、対応点の誤差を小さくすることが
できる。このようにして、1つの物体像上の全ての画素
に対して対応点を求めると、各画素についての奥行き分
布を精度よく演算することができ、信頼性の高い3次元
形状を復元することができる。
When the corresponding point of a predetermined point on one object image is obtained from the object image from another viewpoint, it is obtained from the object image whose viewpoint has moved in the direction in which the change in luminance is the largest. , It is possible to reduce the error of the corresponding points. In this way, when the corresponding points are obtained for all the pixels on one object image, the depth distribution for each pixel can be calculated accurately, and a highly reliable three-dimensional shape can be restored. it can.

【0057】テレビカメラ1の光軸の回転を許容する場
合においても、その回転量が小さければ、視差への影響
は平行移動から受ける輝度の変化成分が大きいので、視
点の平行移動方向における場合と同様に考えることがで
きる。テレビカメラ1の視野の関係から、ステレオマッ
チングにより3次元形状の復元を行う場合、テレビカメ
ラ1の光軸の回転量を、それほど大きくとる必要がない
ことが多い。
Even when the rotation of the optical axis of the television camera 1 is allowed, if the rotation amount is small, the effect on parallax is large because the change component of the luminance caused by the parallel movement is large. You can think the same way. Due to the field of view of the television camera 1, it is often not necessary to set the rotation amount of the optical axis of the television camera 1 so large when the three-dimensional shape is restored by stereo matching.

【0058】基準となる画像情報F0(q)に対して、
点qの対応点を別の画像情報F1(q)に対して求める
とき、画像情報F1(q)を撮るための視点移動は、点
qにおける輝度の勾配方向(最大の輝度変化が得られる
方向)、即ち、grad(F0(q))の方向とするの
が最良である。しかしながら視点の実際の移動方向が勾
配方向から大きくずれていなければ、対応点の誤差はそ
れほど顕著に増加しない。そこで、視点の移動方向をあ
まり細かく取る必要はないため、基準になる画像情報F
0(q)の各点について、勾配方向を予め求めておき、
その分布状態に対応して、視点の移動方向の角度や移動
回数を設定するようにすれば、自動的に視点を移動し、
物体や環境に応じた3次元形状の復元を行うことが可能
となる。
For the reference image information F 0 (q),
When the corresponding point of the point q is obtained for another image information F 1 (q), the viewpoint movement for taking the image information F 1 (q) is performed in the gradient direction of the luminance at the point q (the maximum luminance change is obtained). Direction), that is, the direction of grad (F 0 (q)). However, if the actual moving direction of the viewpoint does not greatly deviate from the gradient direction, the error at the corresponding points does not increase significantly. Therefore, since it is not necessary to take the moving direction of the viewpoint very finely, the reference image information F
For each point of 0 (q), the gradient direction is obtained in advance,
Depending on the distribution state, if you set the angle of the moving direction of the viewpoint and the number of movements, the viewpoint will move automatically,
It is possible to restore a three-dimensional shape according to an object or environment.

【0059】次に、このような3次元形状の復元を行う
ためのアルゴリズムの例について説明する。
Next, an example of an algorithm for restoring such a three-dimensional shape will be described.

【0060】図15は、最初のアルゴリズムの例を示し
ている。この実施例においては、最初にステップS21
において、テレビカメラ1が所定の初期位置に設定され
る。この初期位置は、例えば物体像が画面の中央部付近
にくる位置とすることができる。次にステップS22に
おいて、初期設定した位置から、テレビカメラ1により
物体を撮影して得られる画像を取り込む。そしてステッ
プS23において、この取り込んだ画像データから勾配
角の分布の演算を行う。即ち、全ての画素に対して、輝
度変化が最大となる方向(勾配角)が演算される。次に
ステップS24に進み、ステップS23における演算結
果に対応して、勾配角のヒストグラムが作成される。
FIG. 15 shows an example of the first algorithm. In this embodiment, first, step S21.
At, the television camera 1 is set to a predetermined initial position. This initial position can be, for example, a position where the object image comes near the center of the screen. Next, in step S22, an image obtained by shooting an object with the television camera 1 is captured from the initially set position. Then, in step S23, the distribution of the gradient angle is calculated from the captured image data. That is, the direction (gradient angle) that maximizes the luminance change is calculated for all pixels. Next, the process proceeds to step S24, and a gradient angle histogram is created corresponding to the calculation result in step S23.

【0061】図16(a)は、このようにして作成され
るヒストグラムの例を示している。同図において、横軸
が勾配角の絶対値を表しており、縦軸が画素数を示して
いる。勾配角θは、 θ=tan-1(Fy/Fx) とされる。ここでFx,Fyは、それぞれ画像情報のx方
向およびy方向の偏導関数である。
FIG. 16 (a) shows an example of the histogram created in this way. In the figure, the horizontal axis represents the absolute value of the gradient angle, and the vertical axis represents the number of pixels. The gradient angle θ is θ = tan −1 (F y / F x ). Here, F x and F y are partial derivatives of the image information in the x direction and the y direction, respectively.

【0062】このヒストグラムの場合、勾配角がθ0
ある画素が最も多いことが判る。
In the case of this histogram, it can be seen that the number of pixels having a gradient angle of θ 0 is the largest.

【0063】次にステップS25に進み、テレビカメラ
1の移動方向が決定される。この移動方向は、ステップ
S24において求められたヒストグラムの画素数のピー
ク値が求められ、このピーク値に対応する勾配角として
決定される。即ち、図16(a)の実施例においては、
θ0とされる。そしてステップS26において、テレビ
カメラ1がステップS25において決定した方向に移動
される。この移動距離は、テレビカメラ1により撮影さ
れている物体の大きさや、テレビカメラ1と物体との距
離に対応して、予め所定の値(例えば10cm)に設定
されている。
Next, in step S25, the moving direction of the television camera 1 is determined. For this moving direction, the peak value of the number of pixels of the histogram obtained in step S24 is obtained, and is determined as the gradient angle corresponding to this peak value. That is, in the embodiment of FIG. 16 (a),
θ 0 . Then, in step S26, the television camera 1 is moved in the direction determined in step S25. This moving distance is set in advance to a predetermined value (for example, 10 cm) corresponding to the size of the object photographed by the television camera 1 and the distance between the television camera 1 and the object.

【0064】次にステップS27に進み、移動した位置
において物体の撮影が行われ、その画像が取り込まれ
る。そしてステップS28において、ステップS22と
S27において取り込んだ画像から対応点の演算が行わ
れ、その対応点の奥行き距離が演算される。この演算
は、移動方向の角度θ0を中心として、勾配角が所定の
範囲内(例えば±30度以内)の画素について行われ
る。このとき、勾配が予め設定された所定の閾値より小
さい画素については、演算を行わないようにする。そし
て、解が求められた(対応点が求められた)画素は、以
後の演算の対象から外すようにする。このため、ステッ
プS29に進み、ヒストグラムが、対応点がまだ求めら
れていない画素だけのヒストグラムに更新される。
Next, in step S27, the object is photographed at the moved position and its image is captured. Then, in step S28, the corresponding points are calculated from the images captured in steps S22 and S27, and the depth distance of the corresponding points is calculated. This calculation is performed for pixels whose inclination angle is within a predetermined range (for example, within ± 30 degrees) around the angle θ 0 of the moving direction. At this time, the calculation is not performed for pixels whose gradient is smaller than a predetermined threshold value set in advance. Then, the pixel for which the solution has been obtained (the corresponding point has been obtained) is excluded from the target of the subsequent calculation. Therefore, the process proceeds to step S29, and the histogram is updated to a histogram of only pixels for which corresponding points have not yet been obtained.

【0065】即ち、図16(b)に示すように、勾配角
θ0を中心として±30度の範囲において対応点が求め
られた画素については、ヒストグラムから外され、対応
点がまだ求められていないか、求められたとしても、そ
の信頼性が低い画素に関してのみヒストグラムが作成さ
れる。
That is, as shown in FIG. 16B, the pixels for which corresponding points have been obtained within the range of ± 30 degrees around the gradient angle θ 0 are excluded from the histogram and the corresponding points are still obtained. Histograms are created only for those pixels that are absent or if not so reliable.

【0066】次にステップS30に進み、実質的に全て
の画素についての対応点の判定が終了したか否かが判定
され、終了していなければ、ステップS25に戻り、そ
れ以降の処理が繰り返される。
Next, in step S30, it is determined whether or not the determination of corresponding points has been completed for substantially all pixels. If not, the process returns to step S25 and the subsequent processing is repeated. .

【0067】このようにして、図16(b)乃至(d)
に示すように、勾配角θ0の次に、勾配角θ1,θ2,θ3
の順に(より大きな画素数に対応する勾配角の順に)、
画像の取り込みと対応点の演算、奥行き距離の演算、さ
らにヒストグラムの更新の処理が行われる。そして、図
16(e)に示すように、残りの画素の総数について変
化がなくなった時点において(即ち、勾配が所定の閾値
より小さい平坦な部分や、隠れによって対応する画素が
求められなかった画素だけが残ったとき)、ステップS
30において終了と判定され、処理が終了される。
In this way, FIGS. 16 (b) to 16 (d)
As shown in, the gradient angle θ 0 is followed by the gradient angles θ 1 , θ 2 , and θ 3
In order (in order of gradient angle corresponding to larger number of pixels),
An image is captured, a corresponding point is calculated, a depth distance is calculated, and a histogram is updated. Then, as shown in FIG. 16E, at the time when the total number of remaining pixels does not change (that is, a flat portion where the gradient is smaller than a predetermined threshold value, or a pixel for which a corresponding pixel cannot be obtained due to hiding). Only when left), step S
It is determined in 30 that the process has ended, and the process ends.

【0068】図17は、アルゴリズムの他の実施例を示
している。この実施例においては、最初にステップS4
1において、テレビカメラ1の初期位置が設定される。
そしてステップS42において、その初期位置における
画像が取り込まれる。次にステップS43に進み、勾配
角の分布が演算される。そしてステップS44におい
て、ヒストグラムが作成される。以上のステップS41
乃至S44の処理は、図15におけるステップS21乃
至S24における処理と同様である。これにより、図1
6(a)に示した場合と同様のヒストグラム(図18)
が作成される。
FIG. 17 shows another embodiment of the algorithm. In this embodiment, first step S4
1, the initial position of the television camera 1 is set.
Then, in step S42, the image at the initial position is captured. Next, in step S43, the distribution of gradient angles is calculated. Then, in step S44, a histogram is created. Step S41 above
The processing from S44 to S44 is the same as the processing from S21 to S24 in FIG. As a result,
Histogram similar to that shown in FIG. 6 (a) (FIG. 18)
Is created.

【0069】次にステップS45に進み、勾配角による
画素の分類処理が行われる。即ち、この実施例において
は、180度の勾配角の範囲が、例えば等間隔になるよ
うに予め所定の数mに区分される。この実施例において
は、図18に示すように、180度の勾配角の範囲が6
個(m=6)に区分され、30度ずつの勾配角の範囲が
1つのグループ(範囲)とされる。換言すれば、各画素
は、m=1からm=6までの各グループのいずれかに分
類される。移動方向は、各グループの中心の角度θ1
至θ6に設定される。
Next, in step S45, pixel classification processing is performed according to the gradient angle. That is, in this embodiment, the range of the gradient angle of 180 degrees is divided into a predetermined number m in advance so that the range is, for example, equal intervals. In this embodiment, as shown in FIG. 18, the range of the inclination angle of 180 degrees is 6
It is divided into pieces (m = 6) and the range of the gradient angle of 30 degrees is regarded as one group (range). In other words, each pixel is classified into any of the groups from m = 1 to m = 6. The movement direction is set to the angles θ 1 to θ 6 of the center of each group.

【0070】次にステップS46に進み、mが1に初期
設定される。そしてステップS47において、ステップ
S46で設定された範囲の勾配角θ1の方向に所定の距
離(例えば10cm)だけ移動される。そしてステップ
S48において、移動後の位置における物体の画像が撮
影され、取り込まれ、m=1の範囲に属する画素の対応
点が演算され、その対応点への距離が演算される。
Next, in step S46, m is initialized to 1. Then, in step S47, it is moved by a predetermined distance (for example, 10 cm) in the direction of the gradient angle θ 1 within the range set in step S46. Then, in step S48, an image of the object at the position after movement is photographed, captured, corresponding points of pixels belonging to the range of m = 1 are calculated, and a distance to the corresponding points is calculated.

【0071】次にステップS49に進み、mが1だけイ
ンクリメントされ、ステップS50において、このmが
最大値M(この実施例の場合、M=7)と等しいか、そ
れより小さいかどうか判定される。mが6以下である場
合においては、ステップS47に戻り、それ以降の処理
が繰り返される。即ち、これにより、m=1乃至m=6
までの範囲の対応点が求められる。そしてステップS5
0において、mが7と等しくなったと判定されたとき、
処理が終了される。
Next, in step S49, m is incremented by 1, and it is determined in step S50 whether this m is equal to or smaller than the maximum value M (M = 7 in this embodiment). . When m is 6 or less, the process returns to step S47, and the subsequent processes are repeated. That is, by this, m = 1 to m = 6
Corresponding points in the range up to are required. And step S5
At 0, when it is determined that m is equal to 7,
The process ends.

【0072】以上においては、画像の特徴量として輝度
情報を用いるようにしたが、輝度情報を微分した値を用
いることも可能である。さらにまた、特徴量としてエッ
ジ情報を使う場合においては、上述した勾配方向はエッ
ジの法線方向となる。
In the above, the brightness information is used as the feature amount of the image, but it is also possible to use a value obtained by differentiating the brightness information. Furthermore, when edge information is used as the feature amount, the above-described gradient direction is the edge normal direction.

【0073】[0073]

【発明の効果】以上の如く本発明の3次元形状復元方法
によれば、画像の特徴量の変化が大きい方向を求め、そ
の方向に視点を移動するようにしたので、物体の対応点
を確実に求めることができ、物体の3次元形状を正確に
復元することが可能になる。
As described above, according to the three-dimensional shape restoration method of the present invention, the direction in which the change in the feature amount of the image is large is obtained and the viewpoint is moved in that direction, so that the corresponding points of the object are surely obtained. And the three-dimensional shape of the object can be accurately restored.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の3次元形状復元方法による物体の撮影
方法を説明する図である。
FIG. 1 is a diagram illustrating a method of capturing an object by a three-dimensional shape restoration method of the present invention.

【図2】本発明の3次元形状復元方法による物体の撮影
方法の他の実施例を説明する図である。
FIG. 2 is a diagram for explaining another embodiment of the object photographing method by the three-dimensional shape restoration method of the present invention.

【図3】図4に示す画面が得られる撮影位置を説明する
図である。
FIG. 3 is a diagram illustrating a shooting position where the screen shown in FIG. 4 is obtained.

【図4】図3に示した位置において撮影したとき得られ
る画像を説明する図である。
FIG. 4 is a diagram illustrating an image obtained when the image is captured at the position shown in FIG.

【図5】参照点を所定の位置で撮影した場合における座
標軸を説明する図である。
FIG. 5 is a diagram illustrating coordinate axes when a reference point is photographed at a predetermined position.

【図6】図5において得られた座標を移動した場合の状
態を説明する図である。
FIG. 6 is a diagram illustrating a state when the coordinates obtained in FIG. 5 are moved.

【図7】本発明の3次元形状復元方法の一実施例の処理
ステップを示すフローチャートである。
FIG. 7 is a flowchart showing processing steps of an embodiment of the three-dimensional shape restoration method of the present invention.

【図8】本発明の3次元形状復元方法を実行するハード
ウェア構成を示すブロック図である。
FIG. 8 is a block diagram showing a hardware configuration for executing the three-dimensional shape restoration method of the present invention.

【図9】視点を移動させた場合における輝度の変化を説
明する図である。
FIG. 9 is a diagram illustrating a change in luminance when a viewpoint is moved.

【図10】円柱状の物体をテレビカメラで撮影する様子
を説明する図である。
FIG. 10 is a diagram for explaining how a television camera shoots a cylindrical object.

【図11】図10に示すように、テレビカメラを移動し
た場合において得られる画像を説明する図である。
FIG. 11 is a diagram illustrating an image obtained when the television camera is moved as shown in FIG.

【図12】図11において、x軸方向またはy軸方向に
おける輝度の変化を説明する図である。
FIG. 12 is a diagram illustrating a change in luminance in the x-axis direction or the y-axis direction in FIG. 11.

【図13】視点を移動した方向に大きな輝度勾配を有す
る場合の輝度変化を説明する図である。
FIG. 13 is a diagram illustrating a change in brightness when a large brightness gradient is provided in the direction in which the viewpoint is moved.

【図14】視点を移動した方向に僅かな輝度勾配を有す
る場合の輝度変化を説明する図である。
FIG. 14 is a diagram illustrating a change in brightness when there is a slight brightness gradient in the direction in which the viewpoint is moved.

【図15】本発明の3次元形状復元方法の他の実施例の
処理ステップを示すフローチャートである。
FIG. 15 is a flowchart showing processing steps of another embodiment of the three-dimensional shape restoration method of the present invention.

【図16】図15のステップS24およびS29の処理
を説明する図である。
16 is a diagram illustrating the processing of steps S24 and S29 of FIG.

【図17】本発明の3次元形状復元方法のさらに他の実
施例の処理ステップを示すフローチャートである。
FIG. 17 is a flowchart showing the processing steps of still another embodiment of the three-dimensional shape restoration method of the present invention.

【図18】図17のステップS45の処理を説明する図
である。
FIG. 18 is a diagram illustrating a process of step S45 of FIG.

【符号の説明】 1 テレビカメラ 2 A/D変換器 3 CPU 4 CRT 5 カメラ制御部 6 ROM 7 RAM[Explanation of Codes] 1 TV camera 2 A / D converter 3 CPU 4 CRT 5 Camera control unit 6 ROM 7 RAM

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 同一の物体を異なる視点で撮影して複数
の画像を得て、複数の前記画像から前記物体の対応点を
求め、前記物体の3次元形状を復元する3次元形状復元
方法において、 前記画像の特徴量の変化が大きい方向を求め、 その方向に前記視点を移動することを特徴とする3次元
形状復元方法。
1. A three-dimensional shape restoration method for reconstructing a three-dimensional shape of an object by obtaining the plurality of images of the same object from different viewpoints, obtaining corresponding points from the plurality of images. A three-dimensional shape restoration method, characterized in that a direction having a large change in the feature amount of the image is obtained and the viewpoint is moved in that direction.
【請求項2】 前記異なる視点は、 所定の第1の視点と、 前記第1の視点を、少なくとも平行移動または回転した
第2の視点を有することを特徴とする請求項1に記載の
3次元形状復元方法。
2. The three-dimensional structure according to claim 1, wherein the different viewpoints include a predetermined first viewpoint and a second viewpoint obtained by at least translating or rotating the first viewpoint. Shape restoration method.
【請求項3】 前記特徴量は、前記画像の輝度情報また
はエッジ情報であることを特徴とする請求項1または2
に記載の3次元形状復元方法。
3. The feature amount is brightness information or edge information of the image.
The method for restoring a three-dimensional shape according to 1.
【請求項4】 前記特徴量の変化が大きい方向に関する
ヒストグラムを作成し、 前記ヒストグラムのピーク値に対応して前記視点の移動
方向を決定することを特徴とする請求項1,2または3
に記載の3次元形状復元方法。
4. The histogram according to the direction in which the change in the characteristic amount is large, and the moving direction of the viewpoint is determined in accordance with the peak value of the histogram.
The method for restoring a three-dimensional shape according to 1.
【請求項5】 前記特徴量の変化が大きい方向を演算
し、 演算により求めた前記方向を所定の範囲毎に区分し、 前記区分毎に前記視点を移動することを特徴とする請求
項1,2または3に記載の3次元形状復元方法。
5. A method in which a direction in which the change in the feature amount is large is calculated, the direction obtained by the calculation is divided into predetermined ranges, and the viewpoint is moved in each of the divided sections. The method for restoring a three-dimensional shape according to item 2 or 3.
JP4275242A 1992-09-18 1992-09-18 Three-dimensional shape recovering method Withdrawn JPH06102027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4275242A JPH06102027A (en) 1992-09-18 1992-09-18 Three-dimensional shape recovering method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4275242A JPH06102027A (en) 1992-09-18 1992-09-18 Three-dimensional shape recovering method

Publications (1)

Publication Number Publication Date
JPH06102027A true JPH06102027A (en) 1994-04-12

Family

ID=17552681

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4275242A Withdrawn JPH06102027A (en) 1992-09-18 1992-09-18 Three-dimensional shape recovering method

Country Status (1)

Country Link
JP (1) JPH06102027A (en)

Similar Documents

Publication Publication Date Title
US8224069B2 (en) Image processing apparatus, image matching method, and computer-readable recording medium
JP4209938B2 (en) Image processing apparatus and method, image processing program, and image processor
WO2019049331A1 (en) Calibration device, calibration system, and calibration method
KR102149276B1 (en) Method of image registration
US20200177866A1 (en) Calibration apparatus, chart for calibration, chart pattern generation apparatus, and calibration method
US20070086645A1 (en) Method for synthesizing intermediate image using mesh based on multi-view square camera structure and device using the same and computer-readable medium having thereon program performing function embodying the same
JP2017091079A (en) Image processing device and method for extracting image of object to be detected from input data
CN113841384B (en) Calibration device, chart for calibration and calibration method
JP2007000205A (en) Image processing apparatus, image processing method, and image processing program
RU2627914C1 (en) Device for calculation of own position and method of calculation of own position
CN113554708A (en) Complete calibration method of linear structured light vision sensor based on single cylindrical target
JP5178538B2 (en) Method for determining depth map from image, apparatus for determining depth map
KR100574227B1 (en) Apparatus and method for separating object motion from camera motion
JP2009530701A5 (en)
US20120038785A1 (en) Method for producing high resolution image
KR20190027165A (en) Image Adjustment System and Method for Unifying Features of Multiple Images
JP3170345B2 (en) 3D information extraction method
JP6734994B2 (en) Stereo measuring device and system
JPH0814860A (en) Model creating device
JPH05314243A (en) Three-dimensional shape restoring method
JPH06102027A (en) Three-dimensional shape recovering method
WO2020250348A1 (en) Object recognition device and object recognition method
JP2005309782A (en) Image processor
JPH0981790A (en) Device and method for three-dimensional shape restoration
JP2001266129A (en) Navigation controller by picture of navigation body and navigation control method

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19991130