JPH05120439A - Lattice point calculating method and texture mapping method - Google Patents

Lattice point calculating method and texture mapping method

Info

Publication number
JPH05120439A
JPH05120439A JP3279263A JP27926391A JPH05120439A JP H05120439 A JPH05120439 A JP H05120439A JP 3279263 A JP3279263 A JP 3279263A JP 27926391 A JP27926391 A JP 27926391A JP H05120439 A JPH05120439 A JP H05120439A
Authority
JP
Japan
Prior art keywords
point
texture mapping
image
points
projection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3279263A
Other languages
Japanese (ja)
Inventor
Toyohisa Morita
豊久 森田
Makoto Kato
誠 加藤
Shinichiro Miyaoka
伸一郎 宮岡
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP3279263A priority Critical patent/JPH05120439A/en
Priority to US07/964,293 priority patent/US5537638A/en
Publication of JPH05120439A publication Critical patent/JPH05120439A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the work amount of the extraction of a coordinate value by calculating the coordinate value on a projected figure on which a three- dimensional space necessary for the setting of the parameter of a projection conversion is perspective-projected, from the coordinate value of a specific point. CONSTITUTION:An area surrounded by lattices are respectively defined as a mapping area 416, and the mapping of a texture picture indicated by a figure (b) is operated. That is, the parameter of the projection conversion of the plane of a figure (c) into the projected figure of a figure (a) is detected from the coordinate values of a point a11 (411), point a41 (412), point a14 (413), point a44 (414) of the figure (a), and point b11 (421), point b41 (422), point b14 (423), and point b44 (424) of the figure (c), and the coordinate value of a point bij (425), so that the coordinate value of a point aij (415) can be decided. The texture mapping matched with the structure of the perspective projection can be obtained by using the parameter of the above mentioned projection conversion.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、画像や写真等に見出さ
れる格子点の位置情報を算出する方法、及び、テクスチ
ャマッピング方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for calculating position information of grid points found in images, photographs and the like, and a texture mapping method.

【0002】[0002]

【従来の技術】画像内の任意点の位置情報を抽出するに
は、入力情報によって位置が動く点を画像上に重ね書き
し、抽出したい点にこの動点が重なったときの動点の入
力情報によって、この点の位置情報を抽出する。計算機
上のディジタル画像に対して、その画像内の任意点の座
標値を抽出するには、通常、対象の画像をディスプレイ
に表示し、それにマウスカーソルを重畳表示し、マウス
を移動させることにより、マウスカーソルを移動させ、
抽出したい点に一致したときのマウスへの入力座標値を
もってその点の座標値としている。以下、上記の原理で
の座標値の抽出を「マウス等による直接抽出」と呼ぶこ
とにする。しかし、計算機の入力機器にはマウス以外に
もトラックボールやライトペンやタッチパネルやディジ
タイザなどがあり、それらでも同様のことができるの
で、この操作はマウスのみに限るものではない。
2. Description of the Related Art To extract position information of an arbitrary point in an image, a point whose position moves according to input information is overwritten on the image, and a moving point is input when the moving point overlaps the point to be extracted. The position information of this point is extracted by the information. To extract the coordinate value of an arbitrary point in a digital image on a computer, usually, by displaying the target image on the display, superimposing the mouse cursor on it, and moving the mouse, Move the mouse cursor,
The coordinate value input to the mouse when it coincides with the point to be extracted is the coordinate value of that point. Hereinafter, the extraction of the coordinate value based on the above principle will be referred to as “direct extraction with a mouse or the like”. However, the input device of the computer includes a trackball, a light pen, a touch panel, a digitizer, and the like in addition to the mouse, and the same can be done with these, so this operation is not limited to the mouse.

【0003】伊藤文子他 簡便さとリアリティを考慮し
たテクスチュアシミュレーションシステム、情報処理学
会第39回(平成元年後期)全国大会(以下、公知例1
という)では、三次元空間を透視投影した投影図に対し
て、テクスチャ画像を合成するテクスチャマッピングに
おいて、投影図内の透視投影の構図に合致するようにテ
クスチャ画像を合成するには、テクスチャ画像と投影図
の2枚の画像において対応する四辺形の頂点の座標値を
マウス等によって直接抽出し、これらの座標値から2枚
の画像間の射影変換のパラメータを算出し、この射影変
換でテクスチャ画像を変換して合成するという手法の記
述がある。
Fumiko Ito et al. Texture simulation system considering simplicity and reality, IPSJ 39th (second half of 1989) national convention (hereinafter, known example 1
In the texture mapping that synthesizes a texture image with a perspective view that is a perspective projection of a three-dimensional space, in order to synthesize a texture image that matches the composition of the perspective projection in the projection diagram, The coordinate values of the corresponding quadrilateral vertices in the two images of the projected view are directly extracted with a mouse or the like, the parameters of the projective transformation between the two images are calculated from these coordinate values, and the texture image is obtained by this projective transformation. There is a description of the method of converting and synthesizing.

【0004】また、上記公知例1において、第1の画像
に第2の画像を合成するテクスチャマッピングにおい
て、第1の画像上でテクスチャマッピングを行う領域の
輪郭を、マウス等による直接抽出によって決定してお
き、これによってテクスチャマッピングを行う範囲を限
定するという手法の記述がある。
Further, in the above-mentioned known example 1, in the texture mapping for synthesizing the second image with the first image, the contour of the area to be texture-mapped on the first image is determined by direct extraction with a mouse or the like. There is a description of a method of limiting the range in which texture mapping is performed.

【0005】[0005]

【発明が解決しようとする課題】かかる従来の方法で
は、次のような課題がある。
The conventional method has the following problems.

【0006】画像内の任意点の位置情報を抽出するとき
に、必要な点すべてをマウス等によって直接抽出する方
法について、その課題を以下に述べる(課題1)。例え
ば、抽出したい複数の点の位置情報の間に規則性がある
ような場合でも、この方法では必要な数の点すべてで同
様の手続きを繰返して行うことになり、数が多いとき
は、仕事量が膨大になるという問題がある。また、その
場合、独立した手続きによる位置情報の抽出のため、本
来の位置情報の規則性を無視してしまうという難点があ
る。
The problem to be solved by directly extracting all the necessary points with a mouse or the like when extracting the position information of an arbitrary point in the image will be described below (Problem 1). For example, even if there is regularity between the position information of multiple points to be extracted, this method repeats the same procedure for all the required number of points. There is a problem that the amount becomes huge. Further, in that case, since the position information is extracted by an independent procedure, the regularity of the original position information is ignored.

【0007】また、三次元空間を透視投影した投影図に
対して、テクスチャ画像を合成するテクスチャマッピン
グで、テクスチャ画像と投影図の2枚の画像において対
応する四辺形の頂点の座標値をマウス等によって直接抽
出し、これらの座標値から2枚の画像間の射影変換のパ
ラメータを算出し、この射影変換でテクスチャ画像を変
換して合成するという方法について、その課題を以下に
述べる(課題2)。例えば、3次元空間では同一平面上
であるところの投影図上の複数の領域に、同一のテクス
チャ画像を次々にマッピングするようなとき、抽出した
い複数の点の座標値の間に規則性があるような場合で
も、この方法では必要な数の点すべてで同様の手続きを
繰返して行うことになり、数が多いときは、仕事量が膨
大になるという問題がある。また、その場合、独立した
手続きによる座標値の抽出のため、本来の座標値の規則
性を無視してしまうという難点がある。
Further, in a texture mapping for synthesizing a texture image with respect to a perspective view which is a perspective projection of a three-dimensional space, the coordinate values of the vertices of the corresponding quadrangle in the two images of the texture image and the perspective view are set by a mouse or the like. A method of extracting directly by using the coordinate values, calculating parameters of projective transformation between two images from these coordinate values, and converting and synthesizing a texture image by this projective transformation will be described below. .. For example, when the same texture image is successively mapped to a plurality of regions on a projection view on the same plane in a three-dimensional space, there is regularity between coordinate values of a plurality of points to be extracted. Even in such a case, this method repeats the same procedure for all the necessary points, and when the number is large, the amount of work becomes enormous. Further, in that case, since the coordinate values are extracted by an independent procedure, the regularity of the original coordinate values is ignored.

【0008】また、第1の画像に第2の画像を合成する
テクスチャマッピングにおいて、第1の画像上でテクス
チャマッピングを行う領域の輪郭を、マウス等による直
接抽出によって決定しておき、テクスチャマッピングを
行う範囲を限定するという方法について、その課題を以
下に述べる(課題3)。この方法では、第2の画像につ
いての範囲の限定がないので、第2の画像として、どの
画素もテクスチャマッピングが行えるような画像を用意
する必要があるという問題がある。また、第1の画像の
テクスチャマッピングの範囲の限定に際し、領域の輪郭
を指定するような方法では、第1の画像の1画素ごとに
テクスチャマッピングを行うか否かを替えたいような場
合には、その領域の指定が非常に煩雑で、膨大な仕事量
になるという問題がある。
Further, in the texture mapping for synthesizing the second image with the first image, the contour of the area to be texture-mapped on the first image is determined by direct extraction with a mouse or the like, and the texture mapping is performed. The subject of the method of limiting the range to be performed is described below (subject 3). In this method, there is no limitation on the range of the second image, so there is a problem in that it is necessary to prepare an image in which any pixel can be texture-mapped as the second image. In addition, when limiting the range of the texture mapping of the first image, in a method of designating the contour of the area, when it is desired to change whether or not to perform the texture mapping for each pixel of the first image, There is a problem that designation of the area is very complicated and a huge amount of work is required.

【0009】本発明の第1の目的は、三次元空間内のあ
る平面上の格子点を透視投影した点について、その投影
図上での位置情報を求める際に、求めたいすべての格子
点についてマウス等によって抽出するのではなく、より
少ない数の点についてマウス等によって抽出し、残りの
点については、透視投影の構図に合致するように位置情
報を算出する方法を提供することにある。
A first object of the present invention is to obtain all the lattice points to be obtained when the position information on the projection diagram is obtained with respect to the perspective projection of the lattice points on a certain plane in the three-dimensional space. It is an object of the present invention to provide a method of extracting a smaller number of points with a mouse or the like instead of extracting with a mouse or the like, and calculating position information for the remaining points so as to match the composition of perspective projection.

【0010】本発明の第2の目的は、三次元空間を透視
投影した投影図に対して、テクスチャ画像を射影変換し
て合成を行うテクスチャマッピングにおいて、投影前の
三次元空間では同一平面上であるところの投影図上の複
数の領域に、同一のテクスチャ画像を次々にマッピング
する際に、領域ごとの射影変換のパラメータ設定のため
に必要となる、それぞれの領域に対応した4点の投影図
上の座標値を求める際に、すべての領域に対して4点ず
つ投影図上でマウス等によって抽出するのではなく、よ
り少ない数の点についてマウス等によって抽出し、残り
の点については、透視投影の構図に合致するように座標
値を算出する方法を提供することにある。また、このテ
クスチャマッピングによって透視投影の構図に合致した
投影図上の座標値が算出されるが、あまりにも人工的に
整然とテクスチャ画像が並ぶ構図をより自然に見せるテ
クスチャマッピング方法を提供することにある。さら
に、上記算出された座標値は、マウス等による直接抽出
の際の誤差や、画像の歪や、元の空間内で格子点が同一
平面上に正確には乗っていないこと等の理由により、投
影図上で真の位置を示していないことがありえるが、こ
れを補正して、より正確なマッピングを実現できるテク
スチャマッピング方法を提供することにある。本発明の
第3の目的は、第1の画像に第2の画像を合成するテク
スチャマッピングにおいて、第1の画像と第2の画像の
少なくとも一方の画像の画素ごとにテクスチャマッピン
グを行うか否かを容易に制御できるテクスチャマッピン
グ方法を提供することにある。
A second object of the present invention is to perform texture mapping in which a texture image is projectively transformed and combined with respect to a projection view obtained by perspectively projecting a three-dimensional space. In the three-dimensional space before projection, the texture mapping is performed on the same plane. When mapping the same texture image to a plurality of areas on a certain projection map one after another, it is necessary to set the parameters for projective transformation for each area. When obtaining the above coordinate values, instead of extracting four points for every region on the projection diagram with a mouse or the like, a smaller number of points are extracted with a mouse or the like, and the remaining points are perspective-viewed. It is to provide a method of calculating coordinate values so as to match a projection composition. Further, although the coordinate values on the projection drawing that match the composition of the perspective projection are calculated by this texture mapping, it is to provide a texture mapping method that makes the composition in which the texture images are too artificially arranged in a more natural way. .. Furthermore, the calculated coordinate value is due to an error in direct extraction with a mouse or the like, distortion of the image, and the reason that the grid points are not exactly on the same plane in the original space. Although it is possible that the true position is not shown on the projection view, it is to correct this and provide a texture mapping method that can realize more accurate mapping. A third object of the present invention is to determine whether or not texture mapping is performed for each pixel of at least one of the first image and the second image in the texture mapping for synthesizing the second image with the first image. The object of the present invention is to provide a texture mapping method that can easily control the texture.

【0011】[0011]

【課題を解決するための手段】上記第1の目的を達成す
るために、三次元空間内の平面上の格子構造と4点の格
子点の平面上の位置情報と該4点の投影図上での位置情
報から、平面から投影図への射影変換のパラメータを算
出し、平面上のすべての格子点の投影図上に投影された
点の位置情報を算出するものである。
In order to achieve the first object, a lattice structure on a plane in a three-dimensional space, positional information on the plane of four lattice points and a projected view of the four points are provided. The parameter of the projective transformation from the plane to the projection drawing is calculated from the position information in (3), and the position information of the points projected on the projection drawing of all the grid points on the plane is calculated.

【0012】また、上記第2の目的を達成するために、
領域ごとの射影変換のパラメータ設定のために必要とな
る、それぞれの領域に対応した4点の投影図上の座標値
を、該4点の平面上の座標値と、領域によらない一組の
4点の平面上及び投影図上の座標値から算出するもので
ある。また、射影変換のパラメータ設定のために必要と
なる座標値を算出した後に、その座標値に外乱を与えて
乱し、その結果得られた座標値を射影変換のパラメータ
設定のために用いるものである。また、射影変換のパラ
メータ設定のために必要となる座標値を算出した後に、
その座標値の周辺で真の位置を探索し、その結果得られ
た座標値を射影変換のパラメータ設定のために用いるも
のである。
Further, in order to achieve the second object,
The coordinate values on the projection diagram of the four points corresponding to each area, which are necessary for setting the parameters of the projective transformation for each area, and the coordinate values on the plane of the four points, It is calculated from the coordinate values of the four points on the plane and on the projected view. Also, after calculating the coordinate values required for setting the parameters of the projective transformation, the disturbance is given to the coordinate values and disturbed, and the resulting coordinate values are used for setting the parameters of the projective transformation. is there. Also, after calculating the coordinate values necessary for setting the parameters of projective transformation,
A true position is searched for around the coordinate value, and the coordinate value obtained as a result is used for setting a parameter for projective transformation.

【0013】さらに、上記第3の目的を達成するため
に、第1の画像と第2の画像の少なくとも一方の画像の
画素ごとにテクスチャマッピングを行うか否かの情報が
記述されたデータを保持し、それを参照することによっ
て、テクスチャマッピングを行うか否かを判定するよう
にしたものである。
Further, in order to achieve the above-mentioned third object, data holding information describing whether or not texture mapping is performed for each pixel of at least one of the first image and the second image is held. Then, by referring to it, it is determined whether or not to perform texture mapping.

【0014】[0014]

【作用】三次元空間内の平面上の格子構造と4点の格子
点の平面上の位置情報と該4点の投影図上での位置情報
から、平面から投影図への射影変換のパラメータを算出
し、平面上のすべての格子点の投影図上に投影された点
の位置情報を算出する方法について、作用を以下に述べ
る。
From the lattice structure on the plane in the three-dimensional space, the positional information on the planes of the four lattice points, and the positional information on the projected views of the four points, the parameters of the projective transformation from the plane to the projected plan The operation of the method of calculating and calculating the position information of the points projected on the projection view of all the grid points on the plane will be described below.

【0015】三次元空間内のある平面上に格子点があ
り、それが透視投影された投影図があり、格子点の投影
図上での位置情報を求めたいという場合を考える。
Consider a case in which a grid point is present on a plane in a three-dimensional space, there is a perspective projection projection of the grid point, and it is desired to obtain position information on the projection view of the grid point.

【0016】格子点はn個で、その平面上、及び投影図
上での位置をそれぞれ、(xi yi),(x′i
y′i)(ここで(i=1…n))と表す。
The number of grid points is n, and their positions on the plane and on the projected view are (xi yi) and (x'i), respectively.
y'i) (here (i = 1 ... n)).

【0017】ここで、(xi yi) (i=1…n)
は既知とする。
Here, (xi yi) (i = 1 ... n)
Is known.

【0018】また、4点につき、(x′i y′i)が
既知とする。
Further, it is assumed that (x'i y'i) is known for each of the four points.

【0019】ここで、既知である点をi=1,2,3,
4とするが、この設定は何ら一般性を損なうものではな
い。
Here, known points are i = 1, 2, 3,
4 is set, but this setting does not impair generality.

【0020】また、ここで、格子構造が既知とは、(x
i yi) (i=1…n)が既知ということである。
The known lattice structure means that (x
i yi) (i = 1 ... n) is known.

【0021】(xi yi) (i=1…n)は同一平
面上にあり、(x′i y′i)(i=1…n)も同一
平面上にあるので、すべてのiについて数1が成立する
定行列A(数2)が存在する。ここで同次座標系を用い
る。
Since (xi yi) (i = 1 ... n) is on the same plane, and (x'i y'i) (i = 1 ... n) is also on the same plane, the formula 1 is satisfied for all i. There exists a constant matrix A (Equation 2) that holds. Here, the homogeneous coordinate system is used.

【0022】[0022]

【数1】 [Equation 1]

【0023】[0023]

【数2】 [Equation 2]

【0024】数1及び数2より数3が導かれる。Equation 3 is derived from Equations 1 and 2.

【0025】[0025]

【数3】 [Equation 3]

【0026】数3を通常座標で表現すると数4が得られ
る。
Expression 4 is obtained by expressing Expression 3 in normal coordinates.

【0027】[0027]

【数4】 [Equation 4]

【0028】数4より数5及び数6が導かれる。From Equation 4, Equation 5 and Equation 6 are derived.

【0029】[0029]

【数5】 [Equation 5]

【0030】[0030]

【数6】 [Equation 6]

【0031】ここで、i=1,2,3,4について、ま
とめると、数7及び数8のようになる。
Here, when i = 1, 2, 3, and 4 are summarized, the formulas 7 and 8 are obtained.

【0032】[0032]

【数7】 [Equation 7]

【0033】[0033]

【数8】 [Equation 8]

【0034】ここで、行列T1が正則行列ならば、逆行
列T2が求まる(数9)。
Here, if the matrix T1 is a regular matrix, the inverse matrix T2 is obtained (Equation 9).

【0035】[0035]

【数9】 [Equation 9]

【0036】i=1,2,3,4については、(xi
yi),(x′i y′i)が既知なので、数10のよ
うにして、行列Aの各要素が決定される。
For i = 1, 2, 3, 4, (xi
Since yi) and (x'i y'i) are known, each element of the matrix A is determined by the equation (10).

【0037】[0037]

【数10】 [Equation 10]

【0038】数1及び数2によれば、すべての格子点の
投影図上での位置情報が得られる。以上に述べた方法に
よれば、平面上のすべての格子点の投影図上への投影点
の位置情報を、より少ない数の格子点の位置情報から算
出できるので、仕事量が軽減される。また、透視投影の
構図に合致する位置情報が得られる。
According to the equations (1) and (2), the position information on the projection view of all the lattice points can be obtained. According to the method described above, the position information of the projection points on the projection view of all the grid points on the plane can be calculated from the position information of the smaller number of grid points, so that the workload is reduced. In addition, position information that matches the composition of perspective projection is obtained.

【0039】また、領域ごとの射影変換のパラメータ設
定のために必要となる、それぞれの領域に対応した4点
の投影図上の座標値を、該4点の平面上の座標値と、領
域によらない一組の4点の平面上及び投影図上の座標値
から算出する方法について、作用を以下に述べる。
Further, the coordinate values on the projection diagram of the four points corresponding to each area, which are necessary for setting the parameters of the projective transformation for each area, are set to the coordinate values on the plane of the four points and the area. The operation of the method of calculating from a set of coordinate values on a plane and a projected view of four points that do not depend will be described below.

【0040】上記格子点算出方法の作用の説明と同様に
(xi yi)を平面上の点とし、(x′i y′i)
を投影図上の点と考える。また、ここで、座標値が既知
な、領域によらない4点をi=1,2,3,4の各点と
し、(x′i y′i)が未知な点をiが5以上になる
ように割り付ける。
Similarly to the explanation of the operation of the above-mentioned grid point calculation method, (xi yi) is a point on the plane, and (x'i y'i)
Is a point on the projection. Further, here, four points which have known coordinate values and do not depend on the area are set as i = 1, 2, 3, 4, and points where (x′i y′i) is unknown are set to i = 5 or more. Allocate so that

【0041】ここでも、数1を成り立たせる行列A(数
2)が存在する。数5及び数6につき、i=1,2,
3,4についてまとめると、数7及び数8が得られる。
ここで、行列T1の逆行列T2を求めると、数10のよ
うにして行列Aの各要素が決定される。
Here again, there is a matrix A (Equation 2) that establishes Equation 1. For equations 5 and 6, i = 1, 2,
Summarizing about 3 and 4, the following equations 7 and 8 are obtained.
Here, when the inverse matrix T2 of the matrix T1 is obtained, each element of the matrix A is determined as in Expression 10.

【0042】数1及び数2によれば、(xi yi)を
与えれば、対応する(x′i y′i)が算出される。
According to Equations 1 and 2, given (xi yi), the corresponding (x'i y'i) is calculated.

【0043】以上の手続きによれば、平面内と投影図内
で4点の対応が付いていれば、マッピング先が同一平面
上の複数領域であるとき、各領域について射影変換のパ
ラメータを設定するためにある点の座標値が必要になっ
たとき、その点を上記のiが5以上の点として割り付け
ておけば、その投影図上の座標値を容易に得ることがで
きる。
According to the above-mentioned procedure, if four points are associated in the plane and the projection drawing, when the mapping destination is a plurality of areas on the same plane, the projective transformation parameter is set for each area. Therefore, when the coordinate value of a certain point is needed, if the point is assigned as a point where the above i is 5 or more, the coordinate value on the projection diagram can be easily obtained.

【0044】また、射影変換のパラメータ設定のために
必要となる座標値を算出した後に、その座標値に外乱を
与えて乱し、その結果得られた座標値を射影変換のパラ
メータ設定のために用いる方法について、作用を以下に
述べる。
Further, after calculating the coordinate values necessary for setting the parameters of the projective transformation, the coordinate values are disturbed by disturbance, and the resulting coordinate values are set for the parameter setting of the projective transformation. The operation of the method used will be described below.

【0045】上記のようにして算出された投影図上の点
の座標値(x′i y′i)に対して、外乱の影響を与
える。
The influence of disturbance is exerted on the coordinate values (x'i y'i) of the points on the projection drawing calculated as described above.

【0046】乱数が返される関数をR()とする。x′
i及びy′iにそれぞれR()を作用させた値をそれぞ
れ、x′′i及びy′′iとし、これを射影変換のパラ
メータ設定のために用いる。
The function that returns a random number is R (). x '
The values obtained by applying R () to i and y′i are respectively defined as x ″ i and y ″ i, which are used for setting the parameters of the projective transformation.

【0047】以上の手続きによれば、座標値を算出する
手法に依存する傾向を緩和することができる。
According to the above procedure, the tendency depending on the method of calculating coordinate values can be alleviated.

【0048】また、射影変換のパラメータ設定のために
必要となる座標値を算出した後に、その座標値の周辺で
真の位置を探索し、その結果得られた座標値を射影変換
のパラメータ設定のために用いる方法について、作用を
以下に述べる。
Further, after calculating the coordinate values necessary for setting the parameters of the projective transformation, the true position is searched for around the coordinate values, and the coordinate values obtained as a result are set for the parameter setting of the projective transformation. The operation of the method used for this will be described below.

【0049】上記のようにして算出された投影図上の点
(x′i y′i)の近傍で、真の位置を探索する。真
の位置が、投影図上で画像処理によって抽出できる特徴
点となっているとき、それを抽出するに適当な空間フィ
ルタを作り、この点の近傍で位置を変えながら作用させ
てみて、テンプレートマッチング操作によって相関値の
高い位置の座標値をもって真の値とする。
A true position is searched for in the vicinity of the point (x'i y'i) on the projection drawing calculated as described above. When the true position is a feature point that can be extracted by image processing on the projection diagram, create a suitable spatial filter to extract it and try to operate it while changing the position near this point, and perform template matching. The coordinate value of the position having a high correlation value is set as the true value by the operation.

【0050】以上の手続きによれば、より正確なテクス
チャマッピングを実現できる。
According to the above procedure, more accurate texture mapping can be realized.

【0051】さらに、第1の画像と第2の画像の少なく
とも一方の画像の画素ごとにテクスチャマッピングを行
うか否かの情報が記述されたデータを保持し、それを参
照することによって、テクスチャマッピングを行うか否
かを判定する方法について、その作用を以下に述べる。
Further, the data in which the information as to whether or not the texture mapping is performed is described for each pixel of at least one of the first image and the second image is held, and the texture mapping is performed by referring to the data. The operation of the method for determining whether or not to perform is described below.

【0052】画像は、画素ごとにそれがどのような色ま
たは濃度を表すかを示す、画素値をもっている。
The image has a pixel value that indicates for each pixel what color or density it represents.

【0053】このデータに加えて、その画素はテクスチ
ャ画像の画素となって他の画像にマッピングされてよい
画素かどうか、また、その画素は他の画像からマッピン
グされて画素値が書き替えられてよい画素かどうかとい
うことを、画素ごとに記述したデータを持つことにす
る。このデータを参照して、テクスチャマッピングを行
うか否かを判定する。
In addition to this data, whether the pixel is a pixel of a texture image and may be mapped to another image, and whether the pixel is mapped from another image and the pixel value is rewritten. Whether or not a pixel is a good pixel will have data described for each pixel. By referring to this data, it is determined whether or not texture mapping is performed.

【0054】また、このデータは上記では画素ごとに持
つという記述を行ったが、このデータがランレングスデ
ータのような圧縮された形で持つことも可能であるし、
それが、画素の位置によって決まる関数の記述をとり、
それをデータとして持つという拡張も可能である。ま
た、上記関数の記述が画素値の関数ともなっているよう
な記述も可能である。
Although it has been described above that this data is held for each pixel, it is also possible that this data is held in a compressed form such as run length data.
It takes a description of the function determined by the position of the pixel,
It is possible to extend it to have it as data. It is also possible to make a description such that the description of the above function also functions as a pixel value.

【0055】以上の手続きにより、第1の画像と第2の
画像の少なくとも一方の画像の画素ごとにテクスチャマ
ッピングを行うか否かの情報が記述されたデータを保持
し、それを参照して、テクスチャマッピングを行うか否
かを画素ごとに判定することにより、テクスチャマッピ
ングを行うか否かを第1の画像と第2の画像のいずれか
一方の画像の1画素ごとに制御をする、ということが可
能であり、また、テクスチャマッピングを行うか否かを
第1の画像と第2の画像の両方の画像の1画素ごとに制
御をするということも可能となる。
By the above-mentioned procedure, the data in which the information as to whether or not the texture mapping is performed is stored for each pixel of at least one of the first image and the second image is held, and with reference to it, By determining whether or not to perform texture mapping for each pixel, whether or not to perform texture mapping is controlled for each pixel of either one of the first image and the second image. It is also possible to control whether or not to perform texture mapping for each pixel of both the first image and the second image.

【0056】[0056]

【実施例】本発明の格子点算出方法の1実施例につき、
図1から図3を用いて詳細に説明する。
[Embodiment] Regarding one embodiment of the grid point calculation method of the present invention,
This will be described in detail with reference to FIGS. 1 to 3.

【0057】図1(b)に示すような平面130上の格
子点(点b11121,点b21125,点b31 1
22,点b12 123,点b22 126,点b32
124)が三次元空間内に置かれ、透視投影されて図1
(a)のように見えている(点a11 111,点a2
1 115,点a31 112,点a12 113,点a2
2 116,点a32 114)。投影では、点bij
が点aijに対応している(ここで、i=1,2,3,
j=1,2)。
Lattice points (point b11121, point b21125, point b31 1 on the plane 130 as shown in FIG. 1B).
22, point b12 123, point b22 126, point b32
124) is placed in a three-dimensional space and is perspectively projected to obtain the image shown in FIG.
It looks like (a) (point a11 111, point a2
1 115, point a31 112, point a12 113, point a2
2 116, point a32 114). In projection, the point bij
Corresponds to the point aij (where i = 1, 2, 3,
j = 1, 2).

【0058】このとき、点bijの座標値すべてと、点
a11,点a31,点a12,点a32の座標値が得ら
れているとする。
At this time, it is assumed that all the coordinate values of the point bij and the coordinate values of the points a11, a31, a12, and a32 are obtained.

【0059】ここで、それぞれの点の座標値を、 点a11(x′1 y′1),点a21(x′5 y′
5),点a31(x′2y′2),点a12(x′3
y′3),点a22(x′6 y′6),点a32
(x′4 y′4) 点b11(x1 y1),点b21(x5 y5),点
b31(x2 y2),点b12(x3 y3),点b
22(x6 y6),点b32(x4 y4) とすれば、作用で記述した手続きによって、点a21と
点a22の座標値が算出できる。
Here, the coordinate value of each point is represented by a point a11 (x'1 y'1) and a point a21 (x'5 y ').
5), point a31 (x'2y'2), point a12 (x'3
y'3), point a22 (x'6 y'6), point a32
(X'4 y'4) Point b11 (x1 y1), point b21 (x5 y5), point b31 (x2 y2), point b12 (x3 y3), point b
22 (x6 y6) and point b32 (x4 y4), the coordinate values of the points a21 and a22 can be calculated by the procedure described in the action.

【0060】上記実施例中で、格子を図1のような6点
からなる格子として説明を行ったが、これは、本実施例
を図1のような格子の構造に制限するものではなく、ど
のような格子でもよく、例えば、図2のように離れてい
る格子があるような場合でも、同一平面上の格子であれ
ば、上記と同様の手続きが行えるので、このような拡張
を妨げるものではない。
In the above-mentioned embodiment, the description has been made assuming that the lattice is composed of 6 points as shown in FIG. 1, but this does not limit the present embodiment to the lattice structure as shown in FIG. Any grid may be used. For example, even when there are grids that are separated as shown in FIG. 2, if the grids are on the same plane, the procedure similar to the above can be performed, so that such expansion is hindered. is not.

【0061】また、上記実施例中で、既知であるaij
の点を図1にあるような4点にしたが、もちろん他の4
点を選んでもよい。ただし、作用の中で記述した逆行列
T2が存在するように選ぶ必要がある。
Further, in the above-mentioned embodiment, the known aij
The points of 4 were set as shown in Fig. 1, but of course the other 4
You may choose a point. However, it is necessary to select so that the inverse matrix T2 described in the operation exists.

【0062】さらに、上記実施例中で、平面側で点bi
jの座標値を定める座標空間は、線形空間を構成するも
のであれば、どのようなものでもよい。例えば、図3の
ように、座標軸(1)301のように取っても、座標軸
(2)302のように取っても、これを用いて算出され
る投影図側の座標値には影響しない。これによれば、例
えば図1(b)の場合では、点bijすべての座標値の
情報の代わりに、「合同な正方形が2つ一辺を共有して
左右に並んでいて、左側の正方形の左上の点が点b11
で、左下の点が点b12で、右側の正方形の右上の点が
点b31で、右下の点が点b32である」という記述に
取り替えることも可能である。すなわち、相似な図形と
して確定でき、各点が対応するような記述であれば十分
である。以上のようにして、透視投影の構図に合致する
ような、投影図上のすべての格子点の座標値が算出され
る。
Further, in the above embodiment, the point bi on the plane side
The coordinate space for defining the coordinate value of j may be any one as long as it constitutes a linear space. For example, as shown in FIG. 3, whether the coordinate axis (1) 301 is taken or the coordinate axis (2) 302 is taken, it does not affect the coordinate values on the projection drawing side calculated using the coordinate axis (1) 301. According to this, for example, in the case of FIG. 1B, instead of the information of the coordinate values of all the points bij, “two congruent squares are arranged side by side with one side in common, and the upper left corner of the left square Point is point b11
, The lower left point is the point b12, the upper right point of the right square is the point b31, and the lower right point is the point b32. " That is, it is sufficient if the description can be determined as a similar figure and the points correspond to each other. As described above, the coordinate values of all grid points on the projection view that match the composition of the perspective projection are calculated.

【0063】本発明のテクスチャマッピング方法の1実
施例につき、図4と図5を用いて詳細に説明する。
An embodiment of the texture mapping method of the present invention will be described in detail with reference to FIGS. 4 and 5.

【0064】図4(c)に示すような平面上の格子点
(点b11 421,点b41 422,点b14 42
3,点b44 424を始めとする点bij425)が
三次元空間内に置かれ、透視投影されて図4(a)のよ
うに見えている。投影図上で平面上の点bij 425
に対応する点をそれぞれ点aij 415とする(ここ
で、i=1,2,3,4 j=1,2,3,4)。
Lattice points (point b11 421, point b41 422, point b14 42) on the plane as shown in FIG.
A point bij 425 including the third point b44 424) is placed in the three-dimensional space, and is perspectively projected to look like FIG. 4A. A point bij 425 on the plane on the projection view
Let points aij 415 respectively correspond to (here, i = 1, 2, 3, 4 j = 1, 2, 3, 4).

【0065】ここで、格子に囲まれた領域をそれぞれマ
ッピング領域416として、図4(b)にあるようなテ
クスチャ画像をマッピングすることを考える。
Here, let us consider mapping the texture image as shown in FIG. 4B by setting the regions surrounded by the lattice as the mapping regions 416, respectively.

【0066】ここで、点bijの座標値すべてと、点a
11 411,点a41412,点a14 413,点
a44 414の座標値が得られているとする。
Here, all the coordinate values of the point bij and the point a
It is assumed that the coordinate values of 11 411, point a41412, point a14 413, and point a44 414 have been obtained.

【0067】それぞれの点の座標値を、 点a11(x′1 y′1),点a41(x′2 y′
2),点a14(x′3y′3),点a44(x′4
y′4) 点b11(x1 y1),点b41(x2 y2),点
b14(x3 y3),点b44(x4 y4) とすれば、作用で記述した手続きによって、bijの座
標値からaijの座標値が算出できる。
The coordinate values of the respective points are point a11 (x'1 y'1) and point a41 (x'2 y ').
2), point a14 (x'3y'3), point a44 (x'4)
y′4) If a point b11 (x1 y1), a point b41 (x2 y2), a point b14 (x3 y3), and a point b44 (x4 y4) are used, the coordinate value of bij is converted from the coordinate value of bij by the procedure described in the action. The value can be calculated.

【0068】上記実施例中で、格子を図4のような16
点からなる格子として説明を行ったが、これは、本実施
例を図4のような格子の構造に制限するものではなく、
どのようなマッピング領域の集合でもよく、例えば、図
5のように離れているマッピング領域があるような場合
でも、同一平面上のマッピング領域であれば、上記と同
様の手続きが行えるので、このような拡張を妨げるもの
ではない。
In the above-mentioned embodiment, the lattice is 16 as shown in FIG.
Although the description has been given as a lattice of dots, this does not limit the present embodiment to the lattice structure shown in FIG.
Any set of mapping regions may be used. For example, even when there are mapping regions that are separated as shown in FIG. 5, the same procedure as above can be performed if the mapping regions are on the same plane. It does not prevent the expansion.

【0069】また、上記実施例中で、既知であるaij
の点を図4にあるような端の4点にしたが、もちろん他
の4点を選んでもよい。ただし、作用の中で記述した逆
行列T2が存在するように選ぶ必要がある。
Also, in the above embodiment, the known aij
Although the four points are set at the four end points as shown in FIG. 4, other four points may of course be selected. However, it is necessary to select so that the inverse matrix T2 described in the operation exists.

【0070】さらに、上記実施例中で、平面側で点bi
jの座標値を定める座標空間は、線形空間を構成するも
のであれば、どのようなものでもよい。これによれば、
例えば図4(c)の場合では、点bijすべての座標値
の情報の代わりに、「正方格子が縦に4個、横に4個の
合計16個並んでいて、点a11に対応する点b11は
左上の点で、点a14に対応する点b14は左下の点
で、点a41に対応する点b41は右上の点で、点a4
4に対応する点b44は右下の点である」という記述に
取り替えることも可能である。すなわち、相似な図形と
して確定でき、点同士が対応するような記述であれば十
分である。
Furthermore, in the above embodiment, the point bi on the plane side
The coordinate space for defining the coordinate value of j may be any one as long as it constitutes a linear space. According to this
For example, in the case of FIG. 4C, instead of the information of the coordinate values of all the points bij, “a total of 16 square lattices are arranged in the vertical direction and 4 in the horizontal direction, and the point b11 corresponding to the point a11 is displayed. Is the upper left point, the point b14 corresponding to the point a14 is the lower left point, the point b41 corresponding to the point a41 is the upper right point, and the point a4
The point b44 corresponding to 4 is the lower right point. " That is, it is sufficient if the description can be determined as similar figures and the points correspond to each other.

【0071】以上のようにして得られた点aijの座標
値から、各マッピング領域ごとに、射影変換のパラメー
タ設定のために必要な4点の座標値が得られるので、そ
の射影変換のパラメータを設定することができる。
From the coordinate values of the points aij obtained as described above, the coordinate values of the four points necessary for setting the parameters of the projective transformation can be obtained for each mapping area. Can be set.

【0072】その射影変換のパラメータを用いると、透
視投影の構図に合致するようなテクスチャマッピングが
実現できる。
By using the projective transformation parameters, texture mapping that matches the composition of perspective projection can be realized.

【0073】また、本実施例において、算出された座標
値を、そのまま射影変換のパラメータの設定のために用
いるのではなく、以下のような処理を行った後に得られ
た値を用いるという変更も可能である。
Further, in the present embodiment, there is a change in that the calculated coordinate values are not used as they are for setting the parameters of the projective transformation, but the values obtained after performing the following processing are used. It is possible.

【0074】一つには、乱数を与えて値を乱すという処
理である。
One is a process of giving a random number to disturb the value.

【0075】座標値に対して外乱の上限値をRmaxと
し、呼ばれるたびに−1から1までの範囲で乱数を発生
する関数をR()とする。上記算出された座標値を(x′
iy′i)とすると、(x′i+RmaxR() y′
i+RmaxR())を射影変換のパラメータ設定のた
めに用いる。
Let Rmax be the upper limit of the disturbance with respect to the coordinate value, and R () be a function that generates a random number in the range from -1 to 1 each time it is called. The calculated coordinate value is (x ′
iy′i), (x′i + RmaxR () y ′
i + RmaxR () is used to set the parameters of the projective transformation.

【0076】さらに、もう一つには、算出された座標値
の周辺で真の位置を探索して、正確な値を得るという処
理である。
Further, the other is a process of searching for a true position around the calculated coordinate value to obtain an accurate value.

【0077】交差する線分を検出するために、図6に示
すようなマトリクスを用いて、算出された座標値の周辺
で、マトリクスの成分と対応する画素値との積和をと
り、相関の高い点を検出することによって、真の位置を
得、この位置の座標値を射影変換のパラメータ設定のた
めに用いる。
In order to detect the intersecting line segments, a matrix as shown in FIG. 6 is used, and the product of the matrix component and the corresponding pixel value is calculated around the calculated coordinate values to obtain the correlation. The true position is obtained by detecting the high point, and the coordinate value of this position is used for the parameter setting of the projective transformation.

【0078】上記実施例において用いたマトリクスは交
差する線分を検出するためのマトリクスの一例であり、
同様の効果を挙げられるものであれば、他のものでもよ
い。本発明のテクスチャマッピング方法のさらに別の実
施例につき、図7から図9を用いて以下に詳細に説明す
る。
The matrix used in the above embodiment is an example of a matrix for detecting intersecting line segments,
Other materials may be used as long as they can achieve the same effect. Another embodiment of the texture mapping method of the present invention will be described in detail below with reference to FIGS. 7 to 9.

【0079】画像1に、画像2をテクスチャマッピング
するとき、画像2の一画素ごとにマッピングをするか否
かを制御できるテクスチャマッピング方法の一実施例に
つき、図7を用いて説明する。画像1(図7(a))に
画像2(図7(b))を等倍でテクスチャマッピングす
ることを考える。画像2に関して、画素値のデータ(図
7(b))とは別に、マッピングしてよい部分を表す画
素701が1で、マッピングしてはいけない部分を表す
画素702が0になっているデータ(図7(d))をあ
らかじめ作っておき、テクスチャマッピングの際は、こ
のデータが1となっている画素のみを画像1(図7
(a))にテクスチャマッピングすると図7(c)のよ
うに、画像2の一画素ごとにマッピングするか否かを制
御したマッピング結果が得られる。このとき、0や1と
いうデータの書き方は上記にはとらわれない。また、テ
クスチャマッピングの方法も何ら制限されるものではな
く、等倍の合成であろうと、射影変換を行う合成であろ
うと構わない。
An example of a texture mapping method capable of controlling whether or not to map the image 2 on the image 1 for each pixel of the image 2 will be described with reference to FIG. Consider that the image 2 (FIG. 7B) is texture-mapped to the image 1 (FIG. 7A) at the same size. Regarding the image 2, in addition to the pixel value data (FIG. 7B), the pixel 701 indicating a portion that may be mapped is 1 and the pixel 702 indicating a portion that should not be mapped is 0 ( FIG. 7D is created in advance, and at the time of texture mapping, only the pixels whose data is 1 are displayed in the image 1 (FIG. 7D).
When the texture mapping is performed in (a)), as shown in FIG. 7C, a mapping result in which it is controlled whether or not each pixel of the image 2 is mapped is obtained. At this time, how to write data such as 0 or 1 is not limited to the above. Further, the texture mapping method is not limited at all, and it may be a composition of equal size or a composition of performing projective transformation.

【0080】画像1に、画像2をテクスチャマッピング
するとき、画像1の一画素ごとにマッピングをするか否
かを制御できるテクスチャマッピング方法の一実施例に
つき、図8を用いて説明する。画像1(図8(a))に
画像2(図8(b))を等倍でテクスチャマッピングす
ることを考える。画像1に関して、画素値のデータ(図
8(a))とは別に、マッピングしてよい部分を表す画
素801が1で、マッピングしてはいけない部分を表す
画素802は0になっているデータ(図8(d))をあ
らかじめ作っておき、テクスチャマッピングの際は、こ
のデータが1となっている画素にのみを画像2からテク
スチャマッピングをすると図8(c)のように、画像1の
一画素ごとにマッピングするか否かを制御したマッピン
グ結果が得られる。このとき、0や1というデータの書
き方は上記にはとらわれない。また、テクスチャマッピ
ングの方法も何ら制限されるものではなく、等倍の合成
であろうと、射影変換を行う合成であろうと構わない。
An embodiment of a texture mapping method capable of controlling whether or not to perform mapping for each pixel of the image 1 when the image 2 is texture-mapped on the image 1 will be described with reference to FIG. Consider that the image 2 (FIG. 8B) is texture-mapped to the image 1 (FIG. 8A) at the same size. Regarding the image 1, in addition to the pixel value data (FIG. 8A), the pixel 801 representing the part that may be mapped is 1 and the pixel 802 representing the part that should not be mapped is 0 ( FIG. 8D) is created in advance, and when texture mapping is performed, if texture mapping is performed from the image 2 only on the pixels for which this data is 1, one of the images of the image 1 is obtained as shown in FIG. 8C. A mapping result that controls whether or not to perform mapping for each pixel is obtained. At this time, how to write data such as 0 or 1 is not limited to the above. Further, the texture mapping method is not limited at all, and it may be a composition of equal size or a composition of performing projective transformation.

【0081】画像1に、画像2をテクスチャマッピング
するとき、画像1と画像2の両方の画像の一画素ごとに
マッピングをするか否かを制御できるテクスチャマッピ
ング方法の一実施例につき、図9を用いて説明する。画
像1(図9(a))に画像2(図9(b))を等倍でテ
クスチャマッピングすることを考える。画像1に関し
て、画素値のデータ(図9(a))とは別に、マッピン
グしてよい部分を表す画素901が1で、マッピングし
てはいけない部分を表す画素902は0になっているデ
ータ(図9(d))をあらかじめ作っておき、また、画
像2に関して、画素値のデータ(図9(b))とは別
に、マッピングしてよい部分を表す画素903が1で、マ
ッピングしてはいけない部分を表す画素904は0にな
っているデータ(図9(e))をあらかじめ作ってお
き、テクスチャマッピングの際は、これらのデータが1
となっている場合についてのみ画像2から画像1へテク
スチャマッピングをすると図9(c)のように、画像1
と画像2の両方の画像の一画素ごとにマッピングするか
否かを制御したマッピング結果が得られる。このとき、
0や1というデータの書き方は上記にはとらわれない。
また、テクスチャマッピングの方法も何ら制限されるも
のではなく、等倍の合成であろうと、射影変換を行う合
成であろうと構わない。
FIG. 9 shows an embodiment of a texture mapping method capable of controlling whether or not to perform the image mapping of the image 2 on the image 1 for each pixel of both the images 1 and 2. It will be explained using. Consider that the image 2 (FIG. 9B) is texture-mapped to the image 1 (FIG. 9A) at the same size. Regarding the image 1, in addition to the pixel value data (FIG. 9A), the pixel 901 indicating a portion that may be mapped is 1 and the pixel 902 indicating a portion that should not be mapped is 0 ( 9 (d)) is created in advance, and in addition to the pixel value data (FIG. 9 (b)) in the image 2, the pixel 903 representing a portion that may be mapped is 1, and mapping is not performed. Data (FIG. 9 (e)) in which the pixel 904 representing a prohibited portion is 0 is created in advance, and these data are set to 1 when texture mapping is performed.
If texture mapping is performed from image 2 to image 1 only when
It is possible to obtain a mapping result that controls whether or not mapping is performed for each pixel in both images of the image 2 and the image 2. At this time,
How to write data such as 0 or 1 is not limited to the above.
Further, the texture mapping method is not limited at all, and it may be a composition of equal size or a composition of performing projective transformation.

【0082】また、このデータは上記では画素ごとに持
つという記述を行ったが、このデータがランレングスデ
ータのような圧縮された形で持つことも可能である。こ
れにより、より少ない容量で等価の情報を持つことがで
きる。
Further, although it has been described above that this data is held for each pixel, it is also possible to hold this data in a compressed form such as run length data. This makes it possible to have equivalent information with a smaller capacity.

【0083】また、それが、画素の位置によって決まる
関数の記述をとり、それをデータとして持つという拡張
も可能である。例えば、画像の横方向の座標をiとし、
縦方向の座標をjとして、画像の左上を原点にとり、
i,jそれぞれ、右方向、下方向に正の方向をとるとす
る。このとき、例えば、j<i+100なる(i,j)
の画素はテクスチャマッピングを行うという条件によ
り、テクスチャマッピングをするか否かを判定するよう
にもできる。これは画素ごとのデータを持つ必要はない
が、画素に対応してテクスチャマッピングを行うか否か
を決定できる情報をデータとして持つということで、上
記実施例の一変形として実施が可能である。これによ
り、より少ない容量で情報を持つことができる。
It is also possible to extend it by describing a function determined by the position of a pixel and having it as data. For example, if the horizontal coordinate of the image is i,
The vertical coordinate is j, the upper left corner of the image is the origin,
It is assumed that i and j take positive directions in the rightward and downward directions, respectively. At this time, for example, j <i + 100 (i, j)
It is also possible to determine whether or not to perform texture mapping on the condition that the pixel of is subjected to texture mapping. This does not need to have data for each pixel, but it can be implemented as a modification of the above-described embodiment by having information that can determine whether or not to perform texture mapping for each pixel as data. As a result, information can be held with a smaller capacity.

【0084】また、画素値r,g,bが0から255ま
での値をとるとしたとき、例えば、r<50かつg<5
0かつb>200なる画素はテクスチャマッピングを行
うという条件により、テクスチャマッピングをするか否
かを判定するようにもできる。これは画素ごとのデータ
を持つ必要はないが、画素に対応してテクスチャマッピ
ングを行うか否かを決定できる情報をデータとして持つ
ということで、上記実施例の一変形として実施が可能で
ある。これにより、色空間の中での画素の存在領域に応
じて、テクスチャマッピングを行うか否かを決定でき
る。
When the pixel values r, g, b take values from 0 to 255, for example, r <50 and g <5.
It is also possible to determine whether or not to perform texture mapping on the condition that pixels having 0 and b> 200 are subjected to texture mapping. This does not need to have data for each pixel, but it can be implemented as a modification of the above-described embodiment by having information that can determine whether or not to perform texture mapping for each pixel as data. As a result, it is possible to determine whether or not to perform texture mapping according to the area where the pixels exist in the color space.

【0085】また、上述の、三次元空間を透視投影した
投影図上の複数の領域をマッピング領域としてテクスチ
ャ画像を射影変換して合成を行う際に、投影図上の座標
を算出することにより仕事量を減らし、かつ、透視投影
の構図に合致したテクスチャマッピングができる、とい
うテクスチャマッピング方法の実施例において、投影図
とテクスチャ画像の少なくとも一方の画像の画素ごと
に、上述のテクスチャマッピングを行うか否かの情報が
記述されたデータを保持し、それを参照して、テクスチ
ャマッピングを行うか否かを画素ごとに判定するという
テクスチャマッピングの実施も可能である。
In addition, when the texture image is projectively transformed and combined by using a plurality of regions on the projection diagram perspectively projecting the three-dimensional space as described above, work is performed by calculating coordinates on the projection diagram. In the embodiment of the texture mapping method in which the amount can be reduced and the texture mapping that matches the composition of perspective projection can be performed, whether or not the texture mapping described above is performed for each pixel of at least one of the projected view and the texture image It is also possible to carry out texture mapping in which data in which the information is described is held, and by referring to it, whether or not to perform texture mapping is determined for each pixel.

【0086】また、該テクスチャマッピングの実施に際
して、上述の、算出された座標値に外乱を加える、とい
う処理を加えた実施も、また、上述の、算出された座標
値の周辺で真の値を探索して求める、という処理を加え
た実施もそれぞれ可能である。
In addition, in the execution of the texture mapping, the above-mentioned processing of adding a disturbance to the calculated coordinate value is also added, and a true value is obtained in the vicinity of the calculated coordinate value. It is also possible to add the processing of searching and obtaining.

【0087】[0087]

【発明の効果】本発明によれば以下の効果がある。The present invention has the following effects.

【0088】(1)本発明による格子点算出方法によれ
ば、三次元空間内のある平面上の格子点を透視投影した
点について、その投影図上での位置情報を求める際に、
求めたいすべての格子点についてマウス等によって抽出
するのではなく、より少ない数の点についてマウス等に
よって抽出し、残りの点については、透視投影の構図に
合致するように位置情報を算出することにより、仕事量
が軽減される。また、透視投影の構図に合致する位置情
報が得られる。
(1) According to the grid point calculating method of the present invention, when the position information on the projection diagram is obtained for the perspective projection point of the grid point on a certain plane in the three-dimensional space,
Instead of extracting with a mouse etc. for all the grid points you want to obtain, extract a smaller number of points with a mouse etc., and for the remaining points, calculate the position information so that it matches the composition of the perspective projection. , The workload is reduced. In addition, position information that matches the composition of perspective projection is obtained.

【0089】(2)本発明によるテクスチャマッピング
方法によれば、三次元空間を透視投影した投影図に対し
て、テクスチャ画像を射影変換して合成を行うテクスチ
ャマッピングにおいて、投影前の三次元空間では同一平
面上であるところの投影図上の複数の領域に、同一のテ
クスチャ画像を次々にマッピングする際に、領域ごとの
射影変換のパラメータ設定のために必要となる、それぞ
れの領域に対応した4点の投影図上の座標値を求める際
に、すべての領域に対して4点ずつ投影図上でマウス等
によって抽出するのではなく、より少ない数の点につい
てマウス等によって抽出し、残りの点については、透視
投影の構図に合致するように座標値を算出することによ
り、仕事量が軽減される。また、透視投影の構図に合致
する座標値が得られる。
(2) According to the texture mapping method of the present invention, in texture mapping in which a texture image is projectively transformed and combined with a perspective view of a three-dimensional space, a three-dimensional space before projection is used. When mapping the same texture image to a plurality of regions on the projection drawing on the same plane one after another, it is necessary to set the parameters of the projective transformation for each region. When calculating the coordinate values of the points on the projection diagram, instead of extracting four points for each region on the projection diagram with a mouse or the like, a smaller number of points are extracted with a mouse or the like and the remaining points are extracted. With respect to, the workload is reduced by calculating the coordinate values so as to match the composition of the perspective projection. In addition, coordinate values that match the composition of perspective projection are obtained.

【0090】また、射影変換のパラメータ設定のために
必要となる座標値を算出した後に、その座標値に外乱を
与えて乱し、その結果得られた座標値を射影変換のパラ
メータ設定のために用いることにより、座標値を算出す
る手法に依存する傾向を緩和することができ、あまりに
も人工的に整然とテクスチャ画像が並ぶ構図をより自然
に見せることができる。
Further, after the coordinate values required for setting the parameters of the projective transformation are calculated, the coordinate values are disturbed and disturbed, and the resulting coordinate values are set for the parameter setting of the projective transformation. By using it, the tendency depending on the method of calculating the coordinate values can be eased, and the composition in which the texture images are arranged artificially and neatly can be made more natural.

【0091】さらに、上記算出された座標値は、マウス
等による直接抽出の際の誤差や、画像の歪や、元の空間
内で格子点が同一平面上に正確には乗っていないこと等
の理由により、投影図上で真の位置を示していないこと
がありえるが、上記算出された座標値の周辺で真の位置
を探索し、その結果得られた座標値を射影変換のパラメ
ータ設定のために用いることにより、より正確なマッピ
ングを実現できる。
Furthermore, the calculated coordinate values may include errors in direct extraction with a mouse or the like, image distortion, and the fact that lattice points are not exactly on the same plane in the original space. For some reason, it is possible that the true position is not shown on the projection view, but the true position is searched for around the calculated coordinate values above, and the resulting coordinate values are used to set the parameters for projective transformation. More accurate mapping can be realized by using

【0092】(3)また、本発明によるテクスチャマッ
ピング方法によれば、第1の画像に第2の画像を合成す
るテクスチャマッピングにおいて、第1の画像と第2の
画像の少なくとも一方の画像の画素ごとにテクスチャマ
ッピングを行うか否かの情報が記述されたデータを保持
し、それを参照して、テクスチャマッピングを行うか否
かを画素ごとに判定することにより、テクスチャマッピ
ングを行うか否かを第1の画像と第2の画像のいずれか
一方の画像の1画素ごとに容易に制御ができる。また、
テクスチャマッピングを行うか否かを第1の画像と第2
の画像の両方の画像の1画素ごとに容易に制御ができ
る。
(3) Further, according to the texture mapping method of the present invention, in texture mapping for synthesizing the second image with the first image, the pixels of at least one of the first image and the second image Data that describes whether or not to perform texture mapping is stored for each pixel, and whether or not to perform texture mapping is determined by referring to it and determining whether or not to perform texture mapping for each pixel. It is possible to easily control for each pixel of either one of the first image and the second image. Also,
The first image and the second
The control can be easily performed for each pixel of both images.

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

【図1】本発明の格子点算出方法の実施例の説明図であ
る。
FIG. 1 is an explanatory diagram of an embodiment of a grid point calculation method of the present invention.

【図2】本発明の格子点算出方法の実施例において、格
子構造には制限がないことを説明する図である。
FIG. 2 is a diagram for explaining that the lattice structure is not limited in the embodiment of the lattice point calculation method of the present invention.

【図3】本発明の格子点算出方法の実施例において、平
面の座標の取り方には、座標空間が線形空間であるとい
う条件以外には制限がないことを説明する図である。
FIG. 3 is a diagram illustrating that, in the embodiment of the grid point calculation method of the present invention, there are no restrictions on how to take coordinates on a plane other than the condition that the coordinate space is a linear space.

【図4】本発明のテクスチャマッピング方法の実施例の
説明図である。
FIG. 4 is an explanatory diagram of an embodiment of a texture mapping method of the present invention.

【図5】本発明のテクスチャマッピング方法の実施例に
おいて、マッピング領域の存在の仕方には制限がないこ
とを説明する図である。
FIG. 5 is a diagram illustrating that there is no limitation on the way of existence of a mapping area in the embodiment of the texture mapping method of the present invention.

【図6】本発明のテクスチャマッピング方法の実施例に
おいて、算出された座標値の周辺で真の位置を探索する
ためのマトリクスの一例を示す図である。
FIG. 6 is a diagram showing an example of a matrix for searching for a true position around a calculated coordinate value in the embodiment of the texture mapping method of the present invention.

【図7】本発明のテクスチャマッピング方法の実施例に
おいて、第1の画像に第2の画像をテクスチャマッピン
グするとき、第2の画像の一画素ごとにテクスチャマッ
ピングを行うか否かを制御できる方法を説明する図であ
る。
FIG. 7 is a method for controlling whether or not to perform texture mapping for each pixel of the second image when texture mapping the second image to the first image in the embodiment of the texture mapping method of the present invention. It is a figure explaining.

【図8】本発明のテクスチャマッピング方法の実施例に
おいて、第1の画像に第2の画像をテクスチャマッピン
グするとき、第1の画像の一画素ごとにテクスチャマッ
ピングを行うか否かを制御できる方法を説明する図であ
る。
FIG. 8 is a method for controlling whether or not texture mapping is performed for each pixel of the first image when texture mapping the second image to the first image in the embodiment of the texture mapping method of the present invention. It is a figure explaining.

【図9】本発明のテクスチャマッピング方法の実施例に
おいて、第1の画像に第2の画像をテクスチャマッピン
グするとき、第1の画像と第2の画像の両方の画像の一
画素ごとにテクスチャマッピングを行うか否かを制御で
きる方法を説明する図である。
FIG. 9 is a diagram illustrating a texture mapping method according to an embodiment of the present invention, wherein when texture mapping a second image to a first image, texture mapping is performed for each pixel of both images of the first image and the second image. It is a figure explaining the method which can control whether to perform.

【符号の説明】[Explanation of symbols]

111…点a11、112…点a31、113…点a1
2、114…点a32、115…点a21、116…点
a22、121…点b11、122…点b31、123
…点b12、124…点b32、125…点b21、1
26…点b22、130…平面、301…座標軸
(1)、302…座標軸(2)、411…点a11、4
12…点a41、413…点a14、414…点a4
4、415…点aij、416…マッピング領域、42
1…点b11、422…点b41、423…点b14、4
24…点b44、425…点bij、701…マッピン
グしてよい部分を表す画素、702…マッピングしては
いけない部分を表す画素、801…マッピングしてよい
部分を表す画素、802…マッピングしてはいけない部
分を表す画素、901…マッピングしてよい部分を表す
画素、902…マッピングしてはいけない部分を表す画
素、903…マッピングしてよい部分を表す画素、90
4…マッピングしてはいけない部分を表す画素。
111 ... point a11, 112 ... point a31, 113 ... point a1
2, 114 ... Point a32, 115 ... Point a21, 116 ... Point a22, 121 ... Point b11, 122 ... Point b31, 123
... point b12,124 ... point b32,125 ... point b21,1
26 ... Point b22, 130 ... Plane, 301 ... Coordinate axis (1), 302 ... Coordinate axis (2), 411 ... Point a11, 4
12 ... Point a41, 413 ... Point a14, 414 ... Point a4
4, 415 ... Point aij, 416 ... Mapping area, 42
1 ... Point b11, 422 ... Point b41, 423 ... Point b14, 4
24 ... Point b44, 425 ... Point bij, 701 ... Pixel representing a part that may be mapped, 702 ... Pixel representing a part that should not be mapped, 801 ... Pixel representing a part that may be mapped, 802 ... Pixel representing a prohibited part, 901 ... Pixel representing a part that may be mapped, 902 ... Pixel representing a part that should not be mapped, 903 ... Pixel representing part that may be mapped, 90
4 ... A pixel that represents a portion that should not be mapped.

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】三次元空間内のある平面上の格子点が透視
投影されている投影図において、上記平面上の格子構造
と4点の格子点の上記平面上の位置情報と該4点の投影
図上の位置情報から、投影図上のすべての格子点の位置
情報を算出する格子点算出方法。
1. In a projection view in which a grid point on a plane in a three-dimensional space is perspectively projected, a grid structure on the plane, positional information on the grid point of four points, and position information on the four points. A grid point calculation method for calculating the position information of all grid points on the projection drawing from the position information on the projection drawing.
【請求項2】三次元空間を透視投影した投影図に対し
て、テクスチャ画像を射影変換して合成を行うテクスチ
ャマッピングにおいて、投影前の三次元空間では同一平
面上であるところの投影図上の複数の領域に、同一のテ
クスチャ画像を次々にマッピングする際に、領域ごとの
射影変換のパラメータ設定のために必要となる、それぞ
れの領域に対応した4点の投影図上の座標値を、該4点
の平面上の座標値と、領域によらない一組の4点の平面
上及び投影図上の座標値から算出するテクスチャマッピ
ング方法。
2. In texture mapping in which a texture image is projectively transformed and combined with respect to a perspective view which is a perspective projection of a three-dimensional space, on a projection view which is on the same plane in the three-dimensional space before projection. When mapping the same texture image to a plurality of areas one after another, the four coordinate values on the projection diagram corresponding to each area, which are necessary for setting the parameters of the projective transformation for each area, A texture mapping method that is calculated from coordinate values on a plane of four points and a set of coordinate values on a plane and a projected view of a set of four points that do not depend on a region.
【請求項3】上記算出された4点の投影図上の座標値に
外乱を与えて変更した座標値を射影変換のパラメータ設
定のために用いる請求項2のテクスチャマッピング方
法。
3. The texture mapping method according to claim 2, wherein the coordinate values obtained by applying disturbance to the calculated coordinate values on the projection diagram of the four points are used to set the parameters of the projective transformation.
【請求項4】上記算出された4点の投影図上の座標値の
周辺を探索して、投影図上の真の位置を求めて、その真
の位置の座標値を射影変換のパラメータ設定のために用
いる請求項2のテクスチャマッピング方法。
4. A search is performed around the calculated coordinate values of the four points on the projection diagram to find a true position on the projection diagram, and the coordinate value of the true position is set as a parameter for projective transformation. The texture mapping method according to claim 2, which is used for
【請求項5】第1の画像に第2の画像を合成するテクス
チャマッピングにおいて、第1の画像と第2の画像の少
なくとも一方の画像の画素ごとにテクスチャマッピング
を行うか否かの情報が記述されたデータを保持し、該デ
ータの形式に従って、テクスチャマッピングを行うか否
かを画素ごとに判定するテクスチャマッピング方法。
5. In texture mapping for synthesizing a second image with a first image, information on whether or not to perform texture mapping is described for each pixel of at least one of the first image and the second image. A texture mapping method for holding the stored data and determining for each pixel whether or not to perform the texture mapping according to the format of the data.
【請求項6】上記テクスチャマッピングは、画素ごとの
判定をする請求項2のテクスチャマッピング方法。
6. The texture mapping method according to claim 2, wherein the texture mapping is performed for each pixel.
【請求項7】上記テクスチャマッピングは、画素ごとの
判定をする請求項3のテクスチャマッピング方法。
7. The texture mapping method according to claim 3, wherein the texture mapping is performed for each pixel.
【請求項8】上記テクスチャマッピングは、画素ごとの
判定をする請求項4のテクスチャマッピング方法。
8. The texture mapping method according to claim 4, wherein the texture mapping is performed for each pixel.
JP3279263A 1991-10-25 1991-10-25 Lattice point calculating method and texture mapping method Pending JPH05120439A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP3279263A JPH05120439A (en) 1991-10-25 1991-10-25 Lattice point calculating method and texture mapping method
US07/964,293 US5537638A (en) 1991-10-25 1992-10-20 Method and system for image mapping

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3279263A JPH05120439A (en) 1991-10-25 1991-10-25 Lattice point calculating method and texture mapping method

Publications (1)

Publication Number Publication Date
JPH05120439A true JPH05120439A (en) 1993-05-18

Family

ID=17608730

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3279263A Pending JPH05120439A (en) 1991-10-25 1991-10-25 Lattice point calculating method and texture mapping method

Country Status (1)

Country Link
JP (1) JPH05120439A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08212357A (en) * 1994-11-25 1996-08-20 Matsushita Electric Ind Co Ltd Device and method for interpolation, and image generating device
WO1999063488A1 (en) * 1998-06-02 1999-12-09 Sony Corporation Image processing device and image processing method
JP2004171168A (en) * 2002-11-19 2004-06-17 Fujitsu Ltd Image simulation program
JP2018081430A (en) * 2016-11-15 2018-05-24 富士ゼロックス株式会社 Image processing apparatus, image processing method, image processing system, and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08212357A (en) * 1994-11-25 1996-08-20 Matsushita Electric Ind Co Ltd Device and method for interpolation, and image generating device
WO1999063488A1 (en) * 1998-06-02 1999-12-09 Sony Corporation Image processing device and image processing method
US6556195B1 (en) 1998-06-02 2003-04-29 Sony Corporation Image processing device and image processing method
JP2004171168A (en) * 2002-11-19 2004-06-17 Fujitsu Ltd Image simulation program
JP2018081430A (en) * 2016-11-15 2018-05-24 富士ゼロックス株式会社 Image processing apparatus, image processing method, image processing system, and program

Similar Documents

Publication Publication Date Title
JP5991423B2 (en) Display device, display method, display program, and position setting system
JP6144364B2 (en) Work support data creation program
JP3104638B2 (en) 3D image creation device
JP3744039B2 (en) Perspective drawing creation support method
JPH0696174A (en) Bound point type graphic editing device and its processing method
JPH05120439A (en) Lattice point calculating method and texture mapping method
CN104346771B (en) A kind of electronic map tiered management approach
CN115546349A (en) Method for realizing proportion and position switching of map background map based on Openlayer
JP3642923B2 (en) Video generation processing apparatus and structured data creation apparatus for creating structured data used in the apparatus
JP3309841B2 (en) Synthetic moving image generating apparatus and synthetic moving image generating method
US11074670B2 (en) Image processing apparatus, control method thereof, recording medium, and information processing system
JP6248445B2 (en) LSI design equipment
JPH0816826A (en) Solid graphic arrangement input method and graphic system
JP6508797B1 (en) Work support apparatus, work support method, program, and object detection model.
JP2002312810A (en) Device and method for generating composite moving image
KR20220129759A (en) Device, method and computer program for managing a plurality of single space models
US20220284667A1 (en) Image processing method and image processing device for generating 3d content by means of 2d images
JP2949594B2 (en) Video display device
JP3535598B2 (en) Figure data matching method
JP3535594B2 (en) Figure processing method
JPH10334217A (en) Space information data display method
JPS6023889A (en) Indication of multicursor
JP2023061112A (en) Drawing processor, drawing processing method, and program
JP3684218B2 (en) Graphic information processing method and apparatus
JP2023043794A (en) Method, information processing device and program