JP4333452B2 - Coordinate transformation apparatus and program - Google Patents

Coordinate transformation apparatus and program Download PDF

Info

Publication number
JP4333452B2
JP4333452B2 JP2004113247A JP2004113247A JP4333452B2 JP 4333452 B2 JP4333452 B2 JP 4333452B2 JP 2004113247 A JP2004113247 A JP 2004113247A JP 2004113247 A JP2004113247 A JP 2004113247A JP 4333452 B2 JP4333452 B2 JP 4333452B2
Authority
JP
Japan
Prior art keywords
coordinate
weighting factor
quadrangle
coordinates
distance
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.)
Expired - Fee Related
Application number
JP2004113247A
Other languages
Japanese (ja)
Other versions
JP2005301425A (en
JP2005301425A5 (en
Inventor
俊一 木村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation 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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2004113247A priority Critical patent/JP4333452B2/en
Publication of JP2005301425A publication Critical patent/JP2005301425A/en
Publication of JP2005301425A5 publication Critical patent/JP2005301425A5/ja
Application granted granted Critical
Publication of JP4333452B2 publication Critical patent/JP4333452B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Description

本発明は、座標変換装置、座標変換方法およびプログラムに関する。   The present invention relates to a coordinate conversion device, a coordinate conversion method, and a program.

従来からコンピュータ上で現実感を持った画像を生成する手法としてコンピュータグラフィック(以下、CG)技術が広く利用されている。また、CG技術において、より現実的な物体表面を表現する方法の一つとして、テクスチャマッピングがある。さらに、3次元空間を透視投影した投影図内の物体に2次元テクスチャ画像をマッピングする方法として、射影変換方式が知られている。例えば、射影変換方式の内容は、非特許文献1で紹介されている。   Conventionally, a computer graphic (hereinafter referred to as CG) technique has been widely used as a method of generating a realistic image on a computer. In CG technology, texture mapping is one method for expressing a more realistic object surface. Furthermore, a projective transformation method is known as a method for mapping a two-dimensional texture image to an object in a projection view obtained by perspective projection of a three-dimensional space. For example, the contents of the projective transformation method are introduced in Non-Patent Document 1.

非特許文献1の射影変換方式に関して、図1を用いて説明する。図1は平面テクスチャ画像の透視投影説明図である。図1(a)において、2次元平面上に四角形ABCDがあるとする。また、四角形ABCD内にテクスチャが存在しているとする。図1(b)は、3次元空間を透視投影した投影図である。図1(a)の四角形ABCDが透視投影された結果、図1(b)の四角形abcdになるとする。ここで、点abcdは同一平面上にあるとする。四角形ABCD内のテクスチャは四角形abcd内にマッピングされる。   The projective transformation method of Non-Patent Document 1 will be described with reference to FIG. FIG. 1 is a perspective explanatory view of a planar texture image. In FIG. 1A, it is assumed that there is a quadrilateral ABCD on a two-dimensional plane. Further, it is assumed that a texture exists in the rectangle ABCD. FIG. 1B is a perspective view obtained by perspectively projecting a three-dimensional space. Assume that the quadrangle ABCD in FIG. 1A is perspective-projected, resulting in the quadrangle abcd in FIG. Here, it is assumed that the point abcd is on the same plane. The texture in the rectangle ABCD is mapped in the rectangle abcd.

非特許文献1で紹介されている方式は、四角形ABCD内のテクスチャを四角形abcd内にマッピングするために通常行われている一般的な方式(射影変換方式)である。入力四角形ABCD内の点の座標を(u,v)とする。点(u,v)上のテクスチャが、出力四角形abcd内の座標(S,L)に写るとすると、この(u,v)と(S,L)の関係は、式(1)、式(2)で表される。   The method introduced in Non-Patent Document 1 is a general method (projection conversion method) that is usually performed to map the texture in the rectangle ABCD into the rectangle abcd. Let the coordinates of the points in the input rectangle ABCD be (u, v). Assuming that the texture on the point (u, v) appears in the coordinates (S, L) in the output quadrangle abcd, the relationship between (u, v) and (S, L) is as follows: 2).

Figure 0004333452
Figure 0004333452

Figure 0004333452
上記(1)(2)式内の8つの係数p0、p、p2、q0、q、q2、r1、r2の値を求めることができれば、四角形ABCD内のテクスチャを四角形abcdにマッピングすることができる。ところで、今、頂点Aは、頂点aと対応している。頂点Aの座標を(uA,vA)、頂点aの座標を(Sa,La)とすると、以下の関係式(3)、(4)を得ることができる。
Figure 0004333452
If the values of the eight coefficients p 0 , p 1 , p 2 , q 0 , q 1 , q 2 , r 1 , r 2 in the above equations (1) and (2) can be obtained, the texture in the rectangle ABCD can be obtained. It can be mapped to a rectangle abcd. Now, the vertex A corresponds to the vertex a. When the coordinates of the vertex A are (uA, vA) and the coordinates of the vertex a are (Sa, La), the following relational expressions (3) and (4) can be obtained.

Figure 0004333452
Figure 0004333452

Figure 0004333452
同様に、頂点Bと頂点bの対応、頂点Cと頂点cの対応、頂点Dと頂点dの対応から、それぞれ2つの関係式を得ることができる。全てあわせると8つの関係式(一次式)を得る。よって、上記8つの未知数p0、p1、p2、q0、q1、q2、r1、r2は、これらの8つの連立一次方程式を解くことにより、決定することができる。以下、これら8つの変数p0、p1、p2、q0、q1、q2、r1、r2を射影変換パラメタと呼ぶことにする。
Figure 0004333452
Similarly, two relational expressions can be obtained from the correspondence between the vertex B and the vertex b, the correspondence between the vertex C and the vertex c, and the correspondence between the vertex D and the vertex d. When all are combined, eight relational expressions (primary expressions) are obtained. Therefore, the eight unknowns p 0 , p 1 , p 2 , q 0 , q 1 , q 2 , r 1 , r 2 can be determined by solving these eight simultaneous linear equations. Hereinafter, these eight variables p 0 , p 1 , p 2 , q 0 , q 1 , q 2 , r 1 , r 2 will be referred to as projective transformation parameters.

さて、次に、この射影変換を利用してテクスチャマッピングを行う例を示す。特許文献1記載の方式では、入力テクスチャ画像が複数の四角形に分割されている場合の例が述べられている。図2は、特許文献1記載の方法を説明するための図である。図2(a)に示すように、入力テクスチャ画像(四角形ABCD)が9つの四角形に分割されている場合を考える。特許文献1記載の方法においては、頂点間の対応付けを全ての(9つの)四角形の頂点に対して行うのではなく、代表の4つの頂点に対してのみ行う。例えば、頂点A、B、C、Dと、頂点a、b、c、dの4点のみに対して行う。その他の頂点位置は、計算によって算出する。特許文献1記載の方法では、よりリアリティのあるテクスチャマッピングを行うため、頂点位置を算出する際に、頂点位置にランダム誤差を加算するという方法の例が述べられている。   Now, an example in which texture mapping is performed using this projective transformation will be described. In the method described in Patent Document 1, an example in which an input texture image is divided into a plurality of quadrangles is described. FIG. 2 is a diagram for explaining the method described in Patent Document 1. In FIG. Consider a case where an input texture image (rectangle ABCD) is divided into nine rectangles as shown in FIG. In the method described in Patent Document 1, the correspondence between vertices is not performed for all (9) quadrangular vertices, but only for four representative vertices. For example, it is performed only for the four points of vertices A, B, C, and D and vertices a, b, c, and d. Other vertex positions are calculated. In the method described in Patent Document 1, an example of a method of adding a random error to the vertex position when calculating the vertex position is described in order to perform more realistic texture mapping.

次に、特許文献1内の公知例1として紹介されている、伊藤文子他「簡便さとリアリティを考慮したテクスチュアシミュレーションシステム」情報処理学会第39回(平成元年後期)全国大会について説明する(従来技術3)。従来技術3では、マウスを用いることによって、図1における(Aとa)、(Bとb)、(Cとc)、(Dとd)等の位置を指定する。マウスで指定された座標情報を(1)式や(2)式に代入することで、射影変換パラメタを計算することができる。   Next, Fumiko Ito et al., “Texture Simulation System Considering Convenience and Reality,” Information Processing Society 39th (late 1989) National Convention, introduced as Known Example 1 in Patent Document 1, will be described (conventional) Technology 3). In the prior art 3, the positions of (A and a), (B and b), (C and c), (D and d), etc. in FIG. 1 are designated by using a mouse. Projective transformation parameters can be calculated by substituting coordinate information designated by the mouse into the equations (1) and (2).

以上のように、特許文献1記載の方法や従来例3では、2次元平面上のテクスチャを平面上に透視投影した投影図にマッピングさせている。この透視投影の方法は非特許文献1で説明した。   As described above, in the method described in Patent Document 1 and Conventional Example 3, a texture on a two-dimensional plane is mapped to a projection view that is perspective-projected on the plane. This perspective projection method has been described in Non-Patent Document 1.

「Texture Mapping 3D Models of Real-World Scenes」ACM Computing Surveys, Vol. 29, No. 4, December 1997 pp. 325-365"Texture Mapping 3D Models of Real-World Scenes" ACM Computing Surveys, Vol. 29, No. 4, December 1997 pp. 325-365 特開平5−120439号公報JP-A-5-120439

しかしながら、従来例で行われているような頂点間の対応付けをする場合、特許文献1記載の方法では、マッピングする頂点の座標位置に人為的に誤差を与えてしまうという問題がある。また、従来例3では、手作業で、マッピングする頂点位置を与えている。この場合、位置を指定する時の誤差が発生してしまうという問題がある。また、特許文献1記載の方法や従来例3では、2次元テクスチャ画像をマッピングする対象を平面に限定している。   However, when associating vertices as in the conventional example, the method described in Patent Document 1 has a problem that an error is artificially given to the coordinate position of the vertex to be mapped. In Conventional Example 3, the vertex position to be mapped is given manually. In this case, there is a problem that an error occurs when the position is designated. Further, in the method described in Patent Document 1 and Conventional Example 3, the object to which the two-dimensional texture image is mapped is limited to a plane.

しかしながら、テクスチャマッピングを行う対象面は、平面であるとは限らない。平面以外の面にテクスチャマッピングを行おうとするとき、図2で示したように、特許文献1で述べられているように、テクスチャ画像を小さな四角形(以下、小四角形)に分割し、各小四角形ごとに頂点の対応を取って、四角形ごとに投影変換を行いマッピングを行う方法が考えられる。ただし、上記対象面の形状によっては、各小四角形を隙間や重複無く対象面に並べることが不可能である場合がある。一般にガウス曲率が全面に渡って0の曲面以外では、その曲面は展開不可能であり、各小四角形を隙間や重複無く対象面に並べることはできない。   However, the target surface on which texture mapping is performed is not necessarily a flat surface. When texture mapping is to be performed on a surface other than a plane, as shown in FIG. 2, the texture image is divided into small squares (hereinafter referred to as small squares) as shown in FIG. A method is conceivable in which mapping is performed by taking projection correspondence for each quadrangle by taking correspondence between vertices every time. However, depending on the shape of the target surface, it may be impossible to arrange the small squares on the target surface without gaps or overlap. In general, the curved surface cannot be developed except for a curved surface having a Gaussian curvature of 0 over the entire surface, and the small squares cannot be arranged on the target surface without gaps or overlaps.

上記に挙げた3つの例は、
(1)四角形の頂点位置に誤差が生じる場合、あるいは、
(2)複数の小四角形を隙間や重複無く3次元内の物体表面に並べることができない場合の存在を示している。これらのような場合、頂点位置に対する射影変換は上手く行くが、頂点間の辺においてテクスチャが不連続になってしまうという問題点がある。
The three examples listed above are
(1) When an error occurs in the vertex position of the rectangle, or
(2) The existence when a plurality of small squares cannot be arranged on the object surface in three dimensions without gaps or overlaps is shown. In these cases, the projective transformation with respect to the vertex positions is successful, but there is a problem that the texture becomes discontinuous at the edges between the vertices.

以下、この問題点に関して図3を用いて説明する。図3はテクスチャ不連続点に関する説明図である。図3(a)は、平面テクスチャ画像であるとする。平面テクスチャ画像は、2つの四角形ABCDと四角形DCEFに分割されているものとする。四角形ABCDと四角形DCEFは辺CDを共有しているものとする。図3(a)の四角形ABCDと四角形DCEFが、投影された結果、図3(b)の四角形abcdと、四角形dcefとなるとする。ここで、頂点Aはaに投影される。同様にBはbに、Cはcに、Dはdに、Eはeに、Fはfに投影される。   Hereinafter, this problem will be described with reference to FIG. FIG. 3 is an explanatory diagram relating to texture discontinuities. FIG. 3A is a planar texture image. It is assumed that the planar texture image is divided into two quadrangular ABCD and quadrangular DCEF. It is assumed that the rectangle ABCD and the rectangle DCEF share the side CD. Assume that the quadrangle ABCD and the quadrangle DCEF in FIG. 3A are projected to become a quadrangle abcd and a quadrangle dcef in FIG. Here, vertex A is projected onto a. Similarly, B is projected on b, C is projected on c, D is projected on d, E is projected on e, and F is projected on f.

実際には、誤差のない場合や、平面から平面に投影される場合には図3(b)のような形状にはならないのであるが、上記で述べたように、誤差が存在していたり、平面から展開不可能な面に投影する場合には、このような形状になることがあり得る。   Actually, when there is no error or when it is projected from the plane to the plane, the shape as shown in FIG. 3B is not obtained. However, as described above, there is an error, When projecting from a plane onto a non-deployable surface, this shape can occur.

ここで、図3(a)内の点G、H、Iを考える。ここで、一例として、Gは線分ABの中点、Hは線分CDの中点、Iは線分EFの中点であるとする。四角形ABCDから、四角形abcdに射影変換されるとき、点Aはaに、点Bはbに、点Cはcに、点Dはdに写る。点Gは、線分ab内の点gに写る。   Now consider points G, H, and I in FIG. Here, as an example, G is the midpoint of the line segment AB, H is the midpoint of the line segment CD, and I is the midpoint of the line segment EF. When projective transformation is performed from the rectangle ABCD to the rectangle abcd, the point A appears in a, the point B in b, the point C in c, and the point D in d. The point G appears on the point g in the line segment ab.

このとき、Gは線分ABの中点であるが、射影変換の結果、gは線分abの中点となるとは限らない。図3のように、長方形ABCDが台形abcdに写って、ad<bcであるような場合、gは、bよりもaに近い点となる。同様にHも線分cd上の点h1に写る。h1は、線分cdの中点ではなく、cよりもdに近い点である。同様に、四角形DCEFから四角形dcefへの投影変換を考える。四角形DCEFの辺上の点Hは、四角形dcefの辺上の点h2に写る。このときも同様に、h2の位置は、線分cdの中点とは限らない。   At this time, G is the midpoint of the line segment AB, but g is not always the midpoint of the line segment ab as a result of the projective transformation. As shown in FIG. 3, when the rectangle ABCD is reflected in the trapezoid abcd and ad <bc, g is closer to a than b. Similarly, H also appears at a point h1 on the line segment cd. h1 is not a midpoint of the line segment cd but a point closer to d than c. Similarly, a projection conversion from the square DCEF to the square dcef is considered. A point H on the side of the quadrangle DCEF appears in a point h2 on the side of the quadrangle dcef. Similarly, at this time, the position of h2 is not necessarily the midpoint of the line segment cd.

以上の結果、図3(a)に示されたように、一直線だったはずの直線GIが、投影変換の結果、図3(b)に示されるように、点Hの部分で不連続になってしまうという問題点が発生する。すなわち、隣接する四角形間で共有されるべき点の位置が、四角形によって異なるため、テクスチャが四角形の辺上で不連続になってしまうという問題点が発生する。   As a result, as shown in FIG. 3A, the straight line GI that should have been a straight line becomes discontinuous at the point H as shown in FIG. The problem of end up occurs. That is, since the positions of the points to be shared between the adjacent quadrangles differ depending on the quadrilateral, there arises a problem that the texture becomes discontinuous on the sides of the quadrilateral.

そこで、本発明は、上記従来例の問題点に鑑み、隣接する四角形間で座標値が連続になるように座標変換を行うことができる座標変換装置、座標変換方法およびプログラムを提供することを目的とする。   In view of the above-described problems of the conventional example, the present invention provides a coordinate conversion apparatus, a coordinate conversion method, and a program that can perform coordinate conversion so that coordinate values are continuous between adjacent quadrangles. And

上記課題を解決するために、本発明は、請求項1に記載のように、複数の隣接する四角形内の座標を複数の隣接する四角形内に変換する座標変換装置であって、入力座標と隣接する四角形間の距離を用いて重み係数を算出する重み係数算出部と、前記入力座標が属する四角形に対応する射影変換を用いて得られる座標と、前記入力座標が属する四角形に隣接する四角形に対応する射影変換を用いて得られる座標とを、前記重み係数で重み付けして加算することによって出力座標を算出する座標算出部とを有することを特徴とする。   In order to solve the above-described problem, the present invention provides a coordinate conversion device for converting coordinates in a plurality of adjacent rectangles into a plurality of adjacent rectangles, as described in claim 1, wherein the coordinates are adjacent to input coordinates. A weighting factor calculation unit that calculates a weighting factor using the distance between the rectangles to be coordinated, coordinates obtained using projective transformation corresponding to the rectangle to which the input coordinates belong, and a rectangle adjacent to the rectangle to which the input coordinates belong And a coordinate calculation unit that calculates the output coordinates by weighting the coordinates obtained by using the projective transformation with the weighting factor and adding the coordinates.

請求項1記載の発明によれば、入力座標が属する四角形に対応する射影変換を用いて得られる座標と、入力座標が属する四角形に隣接する四角形に対応する射影変換を用いて得られる座標とを、重み付けして加算することにより、出力座標を算出するので、隣接する四角形間で座標値が連続になるように、片方の四角形内の座標から、もう一方の四角形内の座標を計算することができる。例えば、複数の隣接する四角形を透視投影する場合でも、四角形間で共有する辺上でテクスチャが不連続にならないように、テクスチャマッピングを行うことができる。   According to the first aspect of the present invention, the coordinates obtained using the projective transformation corresponding to the quadrangle to which the input coordinates belong, and the coordinates obtained using the projective transformation corresponding to the quadrangle adjacent to the quadrangle to which the input coordinates belong are obtained. Since the output coordinates are calculated by weighting and adding, the coordinates in the other rectangle can be calculated from the coordinates in one rectangle so that the coordinate values are continuous between adjacent rectangles. it can. For example, even when a plurality of adjacent rectangles are perspective-projected, texture mapping can be performed so that the texture does not become discontinuous on the side shared between the rectangles.

また、本発明は、請求項2に記載のように、請求項1記載の座標変換装置において、前記重み係数算出部は、射影先の四角形の頂点位置が変わらないように重み係数を算出することを特徴とする。請求項2記載の発明によれば、射影先の四角形の頂点位置は変わらないようにし、四角形の頂点を拘束することで、四角形の頂点位置での誤差を無くすことができる。   According to a second aspect of the present invention, in the coordinate transformation device according to the first aspect, the weighting factor calculation unit calculates the weighting factor so that the vertex position of the quadrangular projection destination does not change. It is characterized by. According to the second aspect of the present invention, it is possible to eliminate an error in the vertex position of the quadrangle by restraining the vertex of the quadrangle so that the vertex of the quadrangle of the projection destination is not changed.

また、本発明は、請求項3に記載のように、請求項1または請求項2記載の座標変換装置において、前記重み係数算出部は、2つの四角形によって共有される辺上では、該2つの四角形に対応する重み係数を等しくすることを特徴とする。請求項3記載の発明によれば、2つの四角形によって共有される辺上では、これら2つの四角形に対応する重み係数を等しくすることで、共有する辺上での不連続性を解消できる。   According to a third aspect of the present invention, in the coordinate transformation device according to the first or second aspect, the weighting factor calculation unit is configured so that the two of the two sides are shared by two squares. The weighting factor corresponding to the quadrangle is made equal. According to the third aspect of the invention, discontinuity on the shared side can be eliminated by making the weighting coefficients corresponding to the two quadrilaterals equal on the side shared by the two quadrangles.

また、本発明は、請求項4に記載のように、請求項1から請求項3の何れか一項に記載の座標変換装置において、更に、前記入力座標が属する四角形を4つの領域に分割する領域決定部を有し、前記重み係数算出部は、前記分割した各領域において、前記入力座標が属する四角形を含む4つの隣接する四角形に対応する重み係数を算出し、その他の四角形の重み係数を0とすることを特徴とする。請求項4記載の発明によれば、入力座標が属する四角形を4つの領域に分割し、この分割した各領域において、入力座標が属する四角形を含む4つの隣接する四角形に対応する重み付けを行い、その他の四角形の重み係数は0とするので、より遠い四角形に対する重み係数ほど小さくすることで、自然な座標変換を行うことができる。   According to a fourth aspect of the present invention, in the coordinate transformation device according to any one of the first to third aspects, the quadrangle to which the input coordinates belong is further divided into four regions. An area determination unit, and the weighting factor calculation unit calculates a weighting factor corresponding to four adjacent quadrilaterals including the quadrilateral to which the input coordinates belong in each of the divided regions, and calculates the weighting factor of the other quadrangle. It is characterized by zero. According to the invention described in claim 4, the quadrangle to which the input coordinates belong is divided into four regions, and in each of the divided regions, weighting corresponding to four adjacent quadrilaterals including the quadrangle to which the input coordinates belong is performed, Since the weighting coefficient of the quadrangle is 0, natural coordinate conversion can be performed by decreasing the weighting coefficient for a farther quadrangle.

また、本発明は、請求項5に記載のように、請求項1から請求項4の何れか一項に記載の座標変換装置において、更に、前記入力座標から、縦方向に存在する隣接四角形への距離と、前記入力座標から横方向に存在する隣接四角形への距離を算出する距離算出部を有し、前記重み係数算出部は、前記縦方向に存在する四角形への距離の比と前記横方向に存在する四角形への距離の比を乗算することによって重み係数を算出することを特徴とする。請求項5記載の発明によれば、縦方向の距離の比と横方向の距離の比を乗算することによって重み係数を算出するので、縦方向の距離の比と横方向の距離の比に応じてより自然な座標変換を行うことができる。   According to a fifth aspect of the present invention, in the coordinate conversion device according to any one of the first to fourth aspects, the input coordinate is further changed to an adjacent quadrangle existing in the vertical direction. And a distance calculation unit that calculates a distance from the input coordinates to an adjacent quadrangle that exists in the horizontal direction, and the weighting factor calculation unit calculates a ratio of the distance to the quadrangle that exists in the vertical direction and the horizontal The weighting factor is calculated by multiplying the ratio of the distance to the square existing in the direction. According to the fifth aspect of the invention, the weighting factor is calculated by multiplying the ratio of the distance in the vertical direction and the ratio of the distance in the horizontal direction. More natural coordinate transformation.

また、本発明は、請求項6に記載のように、請求項4または請求項5記載の座標変換装置において、前記距離算出部は、前記入力座標と、前記入力座標が属する領域の各辺との距離を算出し、該各辺との距離の比をその辺と隣接する四角形との距離とすることを特徴とする。請求項6記載の発明によれば、各辺との距離をその辺と隣接する四角形との距離とすること計算が多くなってしまうという問題点を解決できる。   Further, according to a sixth aspect of the present invention, in the coordinate transformation device according to the fourth or fifth aspect, the distance calculation unit includes the input coordinates and each side of the region to which the input coordinates belong. The distance between each side is calculated as the distance between the side and the adjacent rectangle. According to the sixth aspect of the invention, it is possible to solve the problem that the calculation increases when the distance between each side is set as the distance between the side and the adjacent rectangle.

また、本発明は、請求項7に記載のように、請求項5記載の座標変換装置において、前記重み係数算出部は、前記距離の比を単調増加関数に代入して得られた値を新たな距離の比として用いることを特徴とする。請求項7記載の発明によれば、距離の比を単調増加関数に代入して得られた値を新たな距離の比として用いるので、距離の比に応じた自然な座標変換を行うことができる。   Further, according to the present invention, as described in claim 7, in the coordinate transformation device according to claim 5, the weighting factor calculation unit newly calculates a value obtained by substituting the distance ratio into a monotonically increasing function. It is used as a ratio of various distances. According to the seventh aspect of the invention, since the value obtained by substituting the distance ratio into the monotonically increasing function is used as the new distance ratio, natural coordinate conversion according to the distance ratio can be performed. .

また、本発明は、請求項8に記載のように、請求項6記載の座標変換装置において、前記距離算出部は、前記入力座標が属する領域を四角形とし、該四角形の各頂点を任意の平行四辺形の各頂点に写す射影変換を用いて、前記入力座標を前記平行四辺形内に写し、写像先の座標を用いて、各領域の辺までの距離を算出することを特徴とする。請求項8記載の発明によれば、入力座標が属する四角形の各頂点を任意の平行四辺形の各頂点に写す射影変換を用いて、入力座標をその平行四辺形内に写し、写像先の座標を用いて、各領域の辺までの距離を計測するので、平行四辺形内の連続に移動する直線を用いることで、より自然な座標変換を行うことができる。   Further, according to the present invention, as described in claim 8, in the coordinate conversion device according to claim 6, the distance calculation unit sets a region to which the input coordinates belong to a rectangle, and each vertex of the rectangle is arbitrarily parallel. The input coordinates are mapped into the parallelogram using projective transformation projected onto each vertex of the quadrilateral, and the distance to the side of each region is calculated using the coordinates of the mapping destination. According to the eighth aspect of the present invention, the input coordinates are mapped into the parallelogram by projective transformation that maps each vertex of the rectangle to which the input coordinates belong to each vertex of an arbitrary parallelogram, and the coordinates of the mapping destination Is used to measure the distance to the side of each region, so that a more natural coordinate transformation can be performed by using straight lines that move continuously in the parallelogram.

また、本発明は、請求項9に記載のように、請求項1から請求項8の何れか一項に記載の座標変換装置において、前記重み係数算出部は、四角形の各頂点上ではその頂点を共有する四角形に対応する重み係数を四分の1とすることを特徴とする。請求項9記載の発明によれば、頂点を共有する4つの四角形から同等の影響を与えることができる。   Further, according to a ninth aspect of the present invention, in the coordinate transformation device according to any one of the first to eighth aspects, the weight coefficient calculation unit is configured such that the weight coefficient calculation unit has a vertex on each vertex of the quadrangle. The weighting factor corresponding to the quadrangle that shares is reduced to a quarter. According to the ninth aspect of the present invention, it is possible to exert the same effect from the four quadrangles sharing the vertex.

また、本発明は、請求項10に記載のように、請求項1から請求項9の何れか一項に記載の座標変換装置において、前記重み係数算出部は、四角形の各辺上にその辺を共有する四角形に対応する重み係数を二分の1となる点を少なくとも1点以上設定することを特徴とする。   Further, according to a tenth aspect of the present invention, in the coordinate transformation device according to any one of the first to ninth aspects, the weighting factor calculation unit is configured such that the weighting factor calculating unit is arranged on each side of the quadrangle. The weight coefficient corresponding to the quadrangle that shares is set to at least one point that is ½.

また、本発明は、請求項11に記載のように、請求項1から請求項10の何れか一項に記載の座標変換装置において、前記重み係数算出部は、四角形内にその四角形の重み係数を1とし、他の四角形の重み係数を0とする点を1点以上設定することを特徴とする。   Further, according to the present invention, as described in claim 11, in the coordinate transformation device according to any one of claims 1 to 10, the weighting factor calculation unit includes a weighting factor of the rectangle within the rectangle. 1 or more, and one or more points where the weighting factor of other squares is 0 are set.

また、本発明は、請求項12に記載のように、請求項4から請求項11の何れか一項に記載の座標変換装置において、前記領域決定部は、四角形の辺の中点を通る直線あるいは曲線で領域を分割することを特徴とする。   Further, according to the present invention, as described in claim 12, in the coordinate transformation device according to any one of claims 4 to 11, the region determination unit is a straight line passing through a midpoint of a square side. Alternatively, the region is divided by a curve.

また、本発明は、請求項13に記載のように、請求項4から請求項11の何れか一項に記載の座標変換装置において、前記領域決定部は、四角形の相対する辺の中点同士を結ぶ直線を通る直線で領域を分割することを特徴とする。   Further, according to the present invention, as described in claim 13, in the coordinate transformation device according to any one of claims 4 to 11, the region determination unit is configured such that the area determination units are arranged at midpoints of opposite sides of a quadrangle. The region is divided by a straight line passing through a straight line connecting the two.

また、本発明は、請求項14に記載のように、請求項1から13の何れか一項に記載の座標変換装置において、前記重み係数算出部は、各四角形の重み係数の和を1とし、かつ、重み係数は0以上1以下の実数とすることを特徴とする。   Further, according to the present invention, as described in claim 14, in the coordinate transformation device according to any one of claims 1 to 13, the weighting factor calculation unit sets the sum of the weighting factors of each square to 1. The weighting factor is a real number of 0 or more and 1 or less.

また、本発明は、請求項15に記載のように、請求項4から請求項14に何れか一項に記載の座標変換装置において、前記重み係数算出部は、各領域の四角形の辺以外の境界線上では、前記入力座標が存在する四角形と最も近い四角形以外に対応する重み係数を0とすることを特徴とする。請求項15記載の発明によれば、より遠い四角形に対応する重み係数ほど小さくできる。   Further, according to the present invention, as described in claim 15, in the coordinate transformation device according to any one of claims 4 to 14, the weight coefficient calculation unit is configured to have a function other than a square side of each region. On the boundary line, the weighting coefficient corresponding to a rectangle other than the rectangle closest to the rectangle where the input coordinates exist is set to 0. According to the fifteenth aspect of the present invention, the weighting factor corresponding to a farther quadrangle can be made smaller.

また、本発明のプログラムは、請求項16に記載のように、複数の隣接する四角形内の座標を複数の隣接する四角形内に変換するためにコンピュータに、入力座標と隣接する四角形間の距離を用いて重み係数を算出する重み係数算出ステップと、入力座標が属する四角形に対応する射影変換を用いて得られる座標と、前記入力座標が属する四角形に隣接する四角形に対応する射影変換を用いて得られる座標とを、前記重み係数で重み付けして加算することによって出力座標を算出する座標算出ステップとを実行させる。 According to a sixteenth aspect of the present invention, there is provided a program for calculating a distance between an input coordinate and an adjacent rectangle in order to convert coordinates in a plurality of adjacent rectangles into a plurality of adjacent rectangles. Using a weighting factor calculating step to calculate a weighting factor, coordinates obtained using a projective transformation corresponding to the quadrangle to which the input coordinate belongs, and a projective transformation corresponding to a quadrangle adjacent to the quadrangle to which the input coordinate belongs. A coordinate calculation step of calculating an output coordinate by weighting and adding the obtained coordinates with the weighting coefficient.

請求項16記載の発明によれば、入力座標が属する四角形に対応する射影変換を用いて得られる座標と、入力座標が属する四角形に隣接する四角形に対応する射影変換を用いて得られる座標とを、重み付けして加算することにより、出力座標を算出するので、隣接する四角形間で座標値が連続になるように、片方の四角形内の座標から、もう一方の四角形内の座標を計算することができる。例えば、複数の隣接する四角形を透視投影する場合でも、四角形間で共有する辺上でテクスチャが不連続にならないように、テクスチャマッピングを行うことができる。



According to the invention described in claim 16 , the coordinates obtained by using the projective transformation corresponding to the quadrangle to which the input coordinates belong, and the coordinates obtained by using the projective transformation corresponding to the quadrangle adjacent to the quadrangle to which the input coordinates belong are obtained. Since the output coordinates are calculated by weighting and adding, the coordinates in the other rectangle can be calculated from the coordinates in one rectangle so that the coordinate values are continuous between adjacent rectangles. it can. For example, even when a plurality of adjacent rectangles are perspective-projected, texture mapping can be performed so that the texture does not become discontinuous on the side shared between the rectangles.



本発明によれば、隣接する四角形間で座標値が連続になるように座標変換を行うことができる座標変換装置、座標変換方法およびプログラムを提供できる。   According to the present invention, it is possible to provide a coordinate conversion device, a coordinate conversion method, and a program capable of performing coordinate conversion so that coordinate values are continuous between adjacent quadrangles.

以下、本発明を実施するための最良の形態について説明する。まず、最初に本発明の概念を述べる。図4は発明概念を説明するための図であり、同図(a)は投影前画像を示す図、同図(b)は投影後画像を示す図である。図4(a)のように隣接する9つの四角形(0から9)が、図4(b)のように隣接する9つの四角形(0から9)に透視投影されているとする。また、図4(a)と図4(b)で、同一の番号が与えられた四角形同士が対応しているものとする。   Hereinafter, the best mode for carrying out the present invention will be described. First, the concept of the present invention will be described. 4A and 4B are diagrams for explaining the concept of the invention. FIG. 4A is a diagram showing an image before projection, and FIG. 4B is a diagram showing an image after projection. Assume that nine adjacent squares (0 to 9) as shown in FIG. 4A are perspective-projected into nine adjacent squares (0 to 9) as shown in FIG. 4B. In addition, in FIG. 4A and FIG. 4B, it is assumed that squares assigned with the same number correspond to each other.

ここでは、図4(a)の投影前画像の四角形0内のテクスチャを、図4(b)の投影後画像の四角形0内へマッピングする例を示す。図4(a)に示す投影後画像内のテクスチャを図4(b)に示す投影後画像にマッピングするには、投影後画像内の座標(u,v)を入力して、その座標に対応する投影前画像内の座標を得ることができれば良い。すなわち、投影前画像の四角形0の頂点をA、B、C、Dとし、投影後画像の四角形0の頂点をa、b、c、dとすると、四角形abcd内の点の座標を入力し、四角形ABCD内の点へ写像しその座標を求めることができればよい。ここで、投影後画像内の入力座標(u,v)に対応する投影前画像内の出力座標をX(u,v)とする。X(u,v)は2次元ベクトルである。   Here, an example is shown in which the texture in the square 0 of the pre-projection image in FIG. 4A is mapped into the square 0 of the post-projection image in FIG. 4B. To map the texture in the post-projection image shown in FIG. 4 (a) to the post-projection image shown in FIG. 4 (b), input the coordinates (u, v) in the post-projection image and correspond to the coordinates. It is only necessary that the coordinates in the pre-projection image to be obtained can be obtained. That is, if the vertices of the square 0 of the pre-projection image are A, B, C, and D, and the vertices of the square 0 of the post-projection image are a, b, c, and d, the coordinates of the points in the quadrangle abcd are input, It is only necessary that the coordinates can be obtained by mapping to a point in the rectangle ABCD. Here, the output coordinates in the pre-projection image corresponding to the input coordinates (u, v) in the post-projection image are X (u, v). X (u, v) is a two-dimensional vector.

以下、順にX(u,v)の計算方法を述べる。図5は座標変換方法の処理フローチャートである。
(1)まず、対応する各四角形間の射影変換パラメタを算出する(ステップS1)。従来例で述べたように、各四角形毎に、4つの頂点の座標を用いて射影変換パラメタを計算することができる。従来例で述べた例は座標(S,L)から、座標(u,v)を得るための数式であったが、座標(u,v)から座標(S,L)を得るためには、適宜変数を変換すればよい。以下、四角形iに対応する射影変換をSiとする。
(2)図4(b)に示す投影後画像の四角形0内の入力座標(u,v)に対応する図4(a)に示す投影前画像内の出力座標X0(u,v)を、四角形0の射影変換パラメタを用いて計算することができる(ステップS2)。X0(u,v)は、2次元ベクトルである。
(3)同様に、図4(b)投影後画像の四角形0内の入力座標(u,v)に対応する図4(a)の投影前画像内の出力座標Xi(u,v)を、四角形i(i=1,2,…,8)の射影変換パラメタを用いて計算することができる(ステップS3)。Xi(u,v)は、2次元ベクトルである。
Hereinafter, the calculation method of X (u, v) will be described in order. FIG. 5 is a process flowchart of the coordinate conversion method.
(1) First, projective transformation parameters between corresponding quadrangles are calculated (step S1). As described in the conventional example, the projective transformation parameters can be calculated for each quadrangle using the coordinates of the four vertices. The example described in the conventional example is a mathematical formula for obtaining the coordinates (u, v) from the coordinates (S, L), but in order to obtain the coordinates (S, L) from the coordinates (u, v), What is necessary is just to convert a variable suitably. Hereinafter, the projective transformation corresponding to the rectangle i is denoted by Si.
(2) The output coordinates X0 (u, v) in the pre-projection image shown in FIG. 4 (a) corresponding to the input coordinates (u, v) in the square 0 of the post-projection image shown in FIG. Calculation can be performed using the projective transformation parameter of the square 0 (step S2). X0 (u, v) is a two-dimensional vector.
(3) Similarly, the output coordinates Xi (u, v) in the pre-projection image of FIG. 4 (a) corresponding to the input coordinates (u, v) in the quadrangle 0 of the post-projection image of FIG. Calculation can be performed using the projective transformation parameters of the rectangle i (i = 1, 2,..., 8) (step S3). Xi (u, v) is a two-dimensional vector.

(4)図4(b)投影後画像の四角形0内の入力座標(u,v)に対応する図4(a)投影前画像内の最終的な出力座標X(u,v)は、投影前画像内の出力座標Xi(u,v)を、四角形番号iの関数である重み係数Wi(u,v)(i=0,1,2,…,8)で、重み付けして加算することにより求めることができる(ステップS4)。これを式(5)に示す。   (4) FIG. 4 (b) The final output coordinates X (u, v) in the pre-projection image in FIG. 4 (a) corresponding to the input coordinates (u, v) in the square 0 of the post-projection image are projected. The output coordinates Xi (u, v) in the previous image are weighted and added with a weighting coefficient Wi (u, v) (i = 0, 1, 2,..., 8) that is a function of the square number i. (Step S4). This is shown in equation (5).

Figure 0004333452
ただし、0≦Wi(u,v)≦1、かつ、
Figure 0004333452
However, 0 ≦ Wi (u, v) ≦ 1, and

Figure 0004333452
である。すなわち、各四角形の重み係数の和を1とし、かつ、重み係数は0以上1以下の実数とする。
Figure 0004333452
It is. That is, the sum of the weighting factors of each square is set to 1, and the weighting factor is a real number from 0 to 1.

上記式(5)は、入力座標(u,v)が属する四角形0に対応する射影変換S0を用いて得られる座標X0(u,v)と、入力座標(u,v)が属する四角形0に隣接する四角形i(i≠0)に対応する射影変換Siを用いて得られる座標Xi(u,v)とを、重み係数Wiで重み付けして加算することによって最終的な出力座標X(u,v)を算出できることを示している。   The above equation (5) is obtained by converting the coordinate X0 (u, v) obtained using the projective transformation S0 corresponding to the rectangle 0 to which the input coordinate (u, v) belongs and the rectangle 0 to which the input coordinate (u, v) belongs. The final output coordinates X (u, v) are obtained by weighting and adding the coordinates Xi (u, v) obtained by using the projective transformation Si corresponding to the adjacent quadrilateral i (i ≠ 0) with the weighting factor Wi. v) can be calculated.

以下、四角形番号iに対応する点xの重み係数をWi(x)、四角形番号iに対応する点xの出力座標値をXi(x)と書くこともある。あるいは、線分xy上の点の重み係数はWi(xy)、領域R内の重み係数はWi(R)等とも表記する。   Hereinafter, the weighting coefficient of the point x corresponding to the quadrangle number i may be written as Wi (x), and the output coordinate value of the point x corresponding to the quadrangle number i may be written as Xi (x). Alternatively, the weighting coefficient of a point on the line segment xy is also expressed as Wi (xy), the weighting coefficient in the region R is also expressed as Wi (R), and the like.

次に、重み係数Wi(u,v)の算出方法について説明する。本発明では、テクスチャの不連続性を解消するため、上記の重み係数Wi(u,v)を、以下の条件を満たすように定める。
条件(1) 「点aは点Aに写る。同様に、点bは点Bに、点cは点Cに、点dは点Dに写る(四角形の頂点の拘束条件)。」
条件(2) 「辺ab上の点が四角形0に属するとして計算した時の結果と、四角形1に属するとして計算した時の結果が等しい。同様に、辺bc上の点が四角形0に属するとして計算した時の結果と、四角形3に属するとして計算した時の結果が等しい。辺cd上の点が四角形0に属するとして計算した時の結果と、四角形5に属するとして計算した時の結果が等しい。辺da上の点が四角形0に属するとして計算した時の結果と、四角形7に属するとして計算した時の結果が等しい。(共有する辺上での不連続性を解消するための必要条件)。」
条件(3) 「入力座標の滑らかな変化に対応して、重み係数はできるだけ滑らかに変化する。また、より遠い四角形に対応する重み係数ほど小さくなる。さらに、等しい距離にある四角形に対応する重み係数は等しくする。(より自然なテクスチャとするための条件)」。ここでは距離の定義は考えていないので、本条件(3)は定性的なものである。
Next, a method for calculating the weighting coefficient Wi (u, v) will be described. In the present invention, in order to eliminate the discontinuity of the texture, the weighting factor Wi (u, v) is determined so as to satisfy the following condition.
Condition (1) “Point a appears at point A. Similarly, point b appears at point B, point c appears at point C, and point d appears at point D (restriction condition for quadrangular vertices).”
Condition (2) “The result when the point on the side ab is calculated as belonging to the rectangle 0 is equal to the result when the point is calculated as belonging to the rectangle 1. Similarly, it is assumed that the point on the side bc belongs to the rectangle 0. The calculation result is the same as the result when it is calculated that it belongs to the rectangle 3. The result when the point on the side cd is calculated as belonging to the rectangle 0 and the result when it is calculated as belonging to the rectangle 5 are equal. The result when the point on the side da is calculated as belonging to the rectangle 0 is equal to the result when the point is calculated as belonging to the rectangle 7. (Requirements for eliminating the discontinuity on the shared side) . "
Condition (3) “The weighting factor changes as smoothly as possible in response to a smooth change in input coordinates. Also, the weighting factor corresponding to a farther quadrangle becomes smaller. Further, the weight corresponding to a quadrangle at an equal distance. Coefficients are equal (conditions for a more natural texture). Since the definition of distance is not considered here, this condition (3) is qualitative.

次に、上記の条件を満たすような、妥当な重み係数Wiを定めることとする。さて、頂点aを例にとり、条件(1)を満たすための重み係数Wiの条件を考える。頂点aを共有する四角形は、四角形0、1、7、8である。点aを四角形0に対応する射影変換S0で変換するとAに写る。すなわち、X0(a)=Aである。また、同様に点aを四角形1に対応する射影変換S1で変換するとAに写る。すなわち、X1(a)=Aである。点aを四角形7に対応する射影変換S7で変換するとAに写る。すなわち、X7(a)=Aである。点aを四角形8に対応する射影変換S8で変換するとAに写る。すなわち、X8(a)=Aである。これらの結果から、点aにおいては、重み係数は、
wi(a)=0(i≠0,1,7,8)
とすることによって、(5)式はX(a)=Σwi×Xi(a)=Aとすることができる。
Next, an appropriate weighting factor Wi that satisfies the above conditions is determined. Now, taking the vertex a as an example, consider the condition of the weighting coefficient Wi to satisfy the condition (1). The rectangles sharing the vertex a are the rectangles 0, 1, 7, and 8. When the point a is transformed by the projective transformation S0 corresponding to the square 0, it appears in A. That is, X0 (a) = A. Similarly, when the point a is converted by the projective transformation S1 corresponding to the rectangle 1, it is shown in A. That is, X1 (a) = A. When the point a is transformed by the projective transformation S7 corresponding to the rectangle 7, it appears in A. That is, X7 (a) = A. When the point a is transformed by the projective transformation S8 corresponding to the rectangle 8, it appears in A. That is, X8 (a) = A. From these results, at point a, the weighting factor is
wi (a) = 0 (i ≠ 0,1,7,8)
Thus, the equation (5) can be set to X (a) = Σwi × Xi (a) = A.

そこで、本発明では、頂点を共有する四角形の重み係数は、
Wi(a)=0(i≠0,1,7,8)、
Wi(b)=0(i≠0,1,2,3)、
Wi(c)=0(i≠0,3,4,5)、
Wi(d)=0(i≠0,5,6,7)
とする。このように、射影先の四角形の頂点位置が変わらないような重み係数を用いる。
Therefore, in the present invention, the weighting factor of the rectangle sharing the vertex is
Wi (a) = 0 (i ≠ 0,1,7,8),
Wi (b) = 0 (i ≠ 0,1,2,3),
Wi (c) = 0 (i ≠ 0,3,4,5),
Wi (d) = 0 (i ≠ 0,5,6,7)
And In this way, a weighting coefficient that does not change the vertex position of the quadrangle at the projection destination is used.

また、各頂点では、その頂点を共有する4つの四角形から同等の影響を与えられると考えるのが自然である。あるいは、四角形0の4つの頂点における重み係数は対称に与えるのが自然である。そのため、以下、四角形0の4つの頂点における重み係数は、
Wi(a)=1/4(i=0,1,7,8)、
Wi(b)=1/4(i=0,1,2,3)、
Wi(c)=1/4(i=0,3,4,5)、
Wi(d)=1/4(i=0,5,6,7)
とする。このように、四角形の各頂点上ではその頂点を共有する四角形に対応する重み係数を四分の1とすることにより、頂点を共有する4つの四角形から同等の影響を与えることができる。
In addition, it is natural that each vertex is considered to have the same influence from four rectangles that share the vertex. Alternatively, it is natural that the weighting coefficients at the four vertices of the square 0 are given symmetrically. Therefore, hereinafter, the weighting coefficients at the four vertices of the square 0 are
Wi (a) = 1/4 (i = 0,1,7,8),
Wi (b) = 1/4 (i = 0,1,2,3),
Wi (c) = 1/4 (i = 0,3,4,5),
Wi (d) = 1/4 (i = 0,5,6,7)
And In this way, on each vertex of the quadrangle, by setting the weighting factor corresponding to the quadrangle sharing the vertex to a quarter, it is possible to exert the same influence from the four quadrangle sharing the vertex.

次に、図6を用いて考察を行う。図6は発明概念の説明図である。図6では、例えば、四角形0内で、四角形3と四角形7から等距離にある曲線(直線の場合もありうる)を考える。この曲線と辺abの交点をe、辺cdの交点をgとする。同様に、四角形0内で、四角形1と四角形5から等距離にある曲線(直線の場合もありうる)を考える。この曲線と辺bcとの交点をf、辺daとの交点をhとする。曲線egと曲線fhの交点をpとする。pは、四角形1、3、5、7から最も遠い距離にある点とすることができる。   Next, consideration will be given using FIG. FIG. 6 is an explanatory diagram of the inventive concept. In FIG. 6, for example, consider a curve (possibly a straight line) that is equidistant from the rectangle 3 and the rectangle 7 within the rectangle 0. Let e be the intersection of this curve and side ab, and g be the intersection of side cd. Similarly, consider a curve (possibly a straight line) that is equidistant from the rectangle 1 and the rectangle 5 within the rectangle 0. Let the intersection of this curve and the side bc be f, and the intersection of the side da be h. Let p be the intersection of the curve eg and the curve fh. p can be a point at the farthest distance from the squares 1, 3, 5, 7.

四角形0内の点の中で、その四角形0の重み係数をW0=1とし、他の四角形の重み係数をWi=0(i≠0)となる点を一点だけ定めるとするならば、この点pを選択するのが自然である。また、元々(重み付けをしない場合)は、四角形0の全面に渡ってW0=1、Wi=0(i≠0)だったのであるから、四角形0の中にW0=1,Wi=0(i≠0)となる点が存在するほうが自然である。よって、以下、本発明では、点pの重み係数を、
W0(p)=1、Wi(p)=0(i≠0)
とする。このように、四角形内にその四角形の重み係数を1とし、他の四角形の重み係数を0とする点を1点以上設定することで、自然な座標変換が可能となる。また、この点pを、以下、四角形0の中心点とする。
If the weighting factor of the square 0 is W0 = 1 and the weighting factor of the other square is determined as one point where Wi = 0 (i ≠ 0) among the points in the square 0, this point It is natural to choose p. Originally (when weighting is not performed), W0 = 1 and Wi = 0 (i ≠ 0) over the entire surface of the square 0, so that W0 = 1 and Wi = 0 (i It is natural that there is a point where ≠ 0). Therefore, hereinafter, in the present invention, the weighting coefficient of the point p is
W0 (p) = 1, Wi (p) = 0 (i ≠ 0)
And In this way, by setting one or more points in the quadrangle where the weighting factor of the quadrangle is 1 and the weighting factor of the other quadrangle is 0, natural coordinate conversion is possible. Further, this point p is hereinafter referred to as a center point of the square 0.

次に曲線pe上の点の重み係数を考える。曲線pe上の点は点pよりも、四角形4、5、6から遠いと考えられる。また、四角形3、7からも遠いと考えるのが自然である。また、点pにおいて、重み係数はW1=W2=W3=W4=W5=W6=W7=0である。よって、条件(3)より、曲線pe上では、重み係数をW3=W4=W5=W6=W7=0とするのが自然である。   Next, consider the weighting factors of points on the curve pe. The point on the curve pe is considered to be farther from the squares 4, 5, 6 than the point p. Moreover, it is natural to think that it is far from the squares 3 and 7. At the point p, the weighting factor is W1 = W2 = W3 = W4 = W5 = W6 = W7 = 0. Therefore, from the condition (3), on the curve pe, it is natural that the weighting coefficient is W3 = W4 = W5 = W6 = W7 = 0.

さらに、曲線pe上の点からは、四角形3のほうが四角形2より近いと考えるのが自然である。よって、重み係数W3=0から、重み係数W2=0とするのが自然である。同様に四角形8のほうが四角形7より遠いと考えるのが自然なので、重み係数W8=0とするのが自然である。よって、本発明では、曲線pe上では、重み係数をWi=0(i=2,3,4,5,6,7,8)とする。   Further, from the point on the curve pe, it is natural to think that the square 3 is closer to the square 2. Therefore, it is natural that the weighting factor W3 = 0 is changed to the weighting factor W2 = 0. Similarly, since it is natural that the square 8 is farther than the square 7, it is natural to set the weighting factor W8 = 0. Therefore, in the present invention, the weighting coefficient is set to Wi = 0 (i = 2, 3, 4, 5, 6, 7, 8) on the curve pe.

同様に、曲線pg上では、重み係数をWi=0(i=6,7,8,1,2,3,4)とし、曲線pf上では、重み係数をWi=0(i=4,5,6,7,8,1,2)とし、曲線ph上では、重み係数をWi=0(i=8,1,2,3,4,5,6)とする。   Similarly, on the curve pg, the weighting coefficient is Wi = 0 (i = 6,7,8,1,2,3,4), and on the curve pf, the weighting coefficient is Wi = 0 (i = 4,5 , 6, 7, 8, 1, 2), and on the curve ph, the weighting coefficient is Wi = 0 (i = 8, 1, 2, 3, 4, 5, 6).

図6に示されるように、ae、ep、ph、haで囲まれた領域をRaとし、eb、bf、fp、peで囲まれた領域をRbとし、pf、fc、cg、gpで囲まれた領域をRcとし、hp、pg、gd、dhで囲まれた領域をRdとする。このように、各領域(Ra、Rb、Rc、Rd)の四角形の辺以外の境界線上(曲線pe、pf、pg、ph)では、入力座標が存在する四角形と最も近い四角形以外に対応する重み係数を0とすることで、より遠い四角形に対応する重み係数ほど小さくできる。   As shown in FIG. 6, the region surrounded by ae, ep, ph, and ha is Ra, the region surrounded by eb, bf, fp, and pe is Rb, and is surrounded by pf, fc, cg, and gp. The region surrounded by hp, pg, gd, and dh is Rd. Thus, on the boundary lines (curves pe, pf, pg, ph) other than the sides of the rectangle of each region (Ra, Rb, Rc, Rd), the weights corresponding to the rectangle other than the rectangle closest to the rectangle where the input coordinates exist. By setting the coefficient to 0, the weight coefficient corresponding to a farther square can be made smaller.

次に、これらの領域内の重み係数について説明する。   Next, the weighting factors in these areas will be described.

領域Ra内の点は、pより四角形3、4、5から遠いので、重み係数をW3=W4=W5=0とし、peより四角形2、3、4から遠いので、重み係数をW2=W3=W4=0とし、さらに、phより四角形4、5、6から遠いので、重み係数をW4=W5=W6とする。よって、領域Ra内では、重み係数をWi=0(i=2,3,4,5,6)とするのが自然である。   Since the points in the region Ra are farther from the squares 3, 4, and 5 than p, the weighting factor is W3 = W4 = W5 = 0 and far from the squares 2, 3, and 4 than pe, so the weighting factor is W2 = W3 = Since W4 = 0, and further away from the squares 4, 5, and 6 than ph, the weight coefficient is set to W4 = W5 = W6. Therefore, it is natural that the weighting coefficient is Wi = 0 (i = 2, 3, 4, 5, 6) in the region Ra.

同様に、領域Rb内の点は、pより四角形5、6、7から遠いので、重み係数をW5=W6=W7=0とし、peより四角形6、7、8から遠いので、重み係数をW6=W7=W8=0とし、さらに、pfより四角形4、5、6から遠いので、重み係数をW4=W5=W6とする。よって、領域Ra内では、重み係数をWi=0(i=4,5,6,7,8)とするのが自然である。   Similarly, since the point in the region Rb is farther from the squares 5, 6, and 7 than p, the weighting factor is set to W5 = W6 = W7 = 0, and since the point far from the squares 6, 7, and 8 is less than pe, the weighting factor is set to W6. = W7 = W8 = 0, and further, the weight coefficient is W4 = W5 = W6 because it is farther from the squares 4, 5, and 6 than pf. Therefore, it is natural that the weighting coefficient is Wi = 0 (i = 4, 5, 6, 7, 8) in the region Ra.

領域Rc内の点では、pより四角形1、7、8から遠いので、重み係数をW1=W7=W8=0とし、pgより四角形6、7、8から遠いので、重み係数をW6=W7=W8=0とし、さらに、pfより四角形1、2、8から遠いので、重み係数をW1=W2=W8とする。よって、領域Rc内では、重み係数をWi=0(i=6,7,8,1,2)とする。   Since the points in the region Rc are farther from the squares 1, 7, and 8 than p, the weighting coefficient is W1 = W7 = W8 = 0, and the points that are farther from the squares 6, 7, and 8 than pg are the weighting coefficients W6 = W7 = Since W8 = 0 and further from the squares 1, 2, and 8 than pf, the weighting coefficient is set to W1 = W2 = W8. Therefore, in the region Rc, the weighting coefficient is set to Wi = 0 (i = 6, 7, 8, 1, 2).

領域Rd内の点では、pより四角形1、2、3から遠いので、重み係数をW1=W2=W3=0とし、pgより四角形2、3、4から遠いので、重み係数をW2=W3=W4=0とし、さらに、phより四角形1、2、8から遠いので、重み係数をW1=W2=W8とする。よって、領域Rd内では、重み係数をWi=0(i=8,1,2,3,4)とする。   Since the points in the region Rd are far from the squares 1, 2, and 3 from p, the weighting factor is W1 = W2 = W3 = 0, and the points from the squares 2, 3, and 4 are far from pg, so the weighting factor is W2 = W3 = Since W4 = 0 and further far from the squares 1, 2, and 8 from ph, the weighting coefficient is set to W1 = W2 = W8. Therefore, in the region Rd, the weight coefficient is set to Wi = 0 (i = 8, 1, 2, 3, 4).

このように、入力座標が属する四角形0を4つの領域(Ra、Rb、Rc、Rd)に分割し、分割した各領域において、入力座標が属する四角形0を含む4つの隣接する四角形に対応する重み付けを行い、その他の四角形の重み係数を0とすることで、より遠い四角形に対する重み係数を小さくできる。   In this way, the quadrilateral 0 to which the input coordinates belong is divided into four areas (Ra, Rb, Rc, Rd), and the weights corresponding to the four adjacent quadrilaterals including the quadrilateral 0 to which the input coordinates belong in each divided area. And the weighting factors for other rectangles are set to 0, so that the weighting factors for the farther rectangles can be reduced.

次に、点e、f、g、hの位置の制限について考察する。辺ab上において、重み係数がW3=W7となる点はeである。また、重み係数がW2=W8となる点も点eとするのが自然である。すなわち、各辺上で、各四角形を分割するために与える点(e、f、g、hにあたる点)の位置は、共有する辺上では同位置にあることとする。さらに、点eは、四角形0と四角形1の状況を共に考慮して定める必要がある。このような場合に、妥当で自然な位置は、点eを辺abの中点にすることである。   Next, the limitation on the positions of the points e, f, g, and h will be considered. On the side ab, the point where the weighting coefficient is W3 = W7 is e. In addition, it is natural that the point where the weight coefficient is W2 = W8 is also the point e. That is, the positions of points (points corresponding to e, f, g, and h) given to divide each quadrangle on each side are the same on the shared side. Further, the point e needs to be determined in consideration of the situation of the square 0 and the square 1 together. In such a case, a reasonable and natural position is to make point e the midpoint of side ab.

例えば、点eは、辺abの中点、点fは、辺bcの中点、点gは、辺cdの中点、点hは、辺daの中点とすれば良い。これまでは、2つの四角形から等距離となる位置egとfhを曲線としていたが、以下では、上記等距離曲線は直線であるとする。   For example, the point e may be the midpoint of the side ab, the point f may be the midpoint of the side bc, the point g may be the midpoint of the side cd, and the point h may be the midpoint of the side da. So far, the positions eg and fh that are equidistant from the two quadrangles have been curved, but in the following, the equidistant curve is assumed to be a straight line.

次に、線分be上の点に関して考察する。条件(2)より、線分be上の点は、その点が四角形0に存在する場合と、四角形1に存在する場合とで、写像先が同じになればよい。つまり、2つの四角形によって共有される辺上では、この2つの四角形に対応する重み係数を等しくすることで共有する辺上での座標変換の不連続性を解消できる。例えば線分be上における重み係数を対称にすると条件(2)が成り立つ。すなわち、重み係数がW0(be)=W1(be)、かつ、W3(be)=W2(be)であればよい。同様に、重み係数をW0(bf)=W3(bf)、W1(bf)=W2(bf)等とできる。   Next, a point on the line segment be will be considered. From the condition (2), the point on the line segment be only needs to be the same in the case where the point exists in the square 0 and in the case where the point exists in the square 1. That is, on the side shared by the two quadrangles, the discontinuity of the coordinate transformation on the shared side can be eliminated by making the weighting coefficients corresponding to the two quadrangles equal. For example, if the weighting coefficient on the line be is symmetric, the condition (2) is satisfied. That is, the weighting coefficients may be W0 (be) = W1 (be) and W3 (be) = W2 (be). Similarly, the weighting factor can be set to W0 (bf) = W3 (bf), W1 (bf) = W2 (bf), and the like.

以上の考察をまとめる。例えば領域Rb(四角形Pebf)において、重み係数は、
点p条件:W0=1,Wi=0(i≠0)
点e条件:W0=W1=1/2,Wi=0(i≠0,1)
点f条件:W0=W3=1/2,Wi=0(i≠0,3)
点b条件:W0=W1=W2=W3=1/4,Wi=0(i≠0,1,2,3)
線分pe条件:Wi=0(i≠0,1)
線分pf条件:Wi=0(i≠0,3)
線分be条件:W0=W1,W3=W2,Wi=0 (i≠4,5,6,7,8)
線分bf条件:W0=W3,W1=W2,Wi=0(i≠4,5,6,7,8)
ただし、線分pe条件と線分pf条件が満たされれば、点p条件も満たされる。また、線分pe条件と線分be条件が満たされれば、点e条件が満たされる。同様に、線分pf条件と線分bf条件が満たされれば点f条件も満たされる。線分be条件と線分bf条件が満たされれば、点b条件も満たされる。よって、境界条件は以下の4つになる。
The above considerations are summarized. For example, in the region Rb (rectangle Pebf), the weighting factor is
Point p condition: W0 = 1, Wi = 0 (i ≠ 0)
Point e condition: W0 = W1 = 1/2, Wi = 0 (i ≠ 0,1)
Point f condition: W0 = W3 = 1/2, Wi = 0 (i ≠ 0,3)
Point b condition: W0 = W1 = W2 = W3 = 1/4, Wi = 0 (i ≠ 0,1,2,3)
Line pe condition: Wi = 0 (i ≠ 0,1)
Line segment pf condition: Wi = 0 (i ≠ 0,3)
Line segment be condition: W0 = W1, W3 = W2, Wi = 0 (i ≠ 4,5,6,7,8)
Line segment bf condition: W0 = W3, W1 = W2, Wi = 0 (i ≠ 4,5,6,7,8)
However, if the line segment pe condition and the line segment pf condition are satisfied, the point p condition is also satisfied. If the line segment pe condition and the line segment be condition are satisfied, the point e condition is satisfied. Similarly, if the line segment pf condition and the line segment bf condition are satisfied, the point f condition is also satisfied. If the line segment be condition and the line segment bf condition are satisfied, the point b condition is also satisfied. Therefore, there are the following four boundary conditions.

<境界条件>
線分pe条件:Wi=0(i≠0,1)
線分pf条件:Wi=0(i≠0,3)
線分be条件:W0=W1,W3=W2,Wi=0(i≠4,5,6,7,8)
線分bf条件:W0=W3,W1=W2,Wi=0(i≠4,5,6,7,8)
上記の境界条件を満たすような重み係数の決定法に関して、以下述べる。
<Boundary conditions>
Line pe condition: Wi = 0 (i ≠ 0,1)
Line segment pf condition: Wi = 0 (i ≠ 0,3)
Line segment be condition: W0 = W1, W3 = W2, Wi = 0 (i ≠ 4,5,6,7,8)
Line segment bf condition: W0 = W3, W1 = W2, Wi = 0 (i ≠ 4,5,6,7,8)
A method for determining a weighting factor that satisfies the above boundary conditions will be described below.

以下、入力座標が領域Rbにある場合を例に採り、Rb内の重み係数設定方法を説明する。図7は、入力座標が領域Rbにある場合を例に採り、Rb内の重み係数設定方法を説明する。図7において、入力座標Q=(u,v)が領域Rb内にあるとする。このとき、まず、重み係数はW4=W5=W6=W7=W8=0とできる。   Hereinafter, the case where the input coordinates are in the region Rb is taken as an example, and the weighting coefficient setting method in Rb will be described. FIG. 7 illustrates a method for setting a weighting factor in Rb, taking as an example the case where the input coordinates are in the region Rb. In FIG. 7, it is assumed that the input coordinate Q = (u, v) is in the region Rb. At this time, first, the weighting factor can be W4 = W5 = W6 = W7 = W8 = 0.

以下、点Qから四角形0、1、3までの距離を水平方向(四角形0と四角形1の並ぶ方向)、垂直方向(四角形0と四角形3の並ぶ方向)の2方向に分割して考える。以下の距離α、β、γ、δを用いて、遠くに中心点が存在する四角形に対応する重み係数を小さくするように重み係数を決定する。点Qから四角形0までの水平方向距離をα、点Qから四角形1までの水平方向距離をβ、点Qから四角形0までの垂直方向距離をγ、点Qから四角形3までの垂直方向距離をδとする。   Hereinafter, the distance from the point Q to the squares 0, 1, and 3 will be divided into two directions, the horizontal direction (the direction in which the squares 0 and 1 are arranged) and the vertical direction (the direction in which the squares 0 and 3 are arranged). Using the following distances α, β, γ, and δ, the weighting factor is determined so as to reduce the weighting factor corresponding to the quadrangle having the center point in the distance. The horizontal distance from point Q to square 0 is α, the horizontal distance from point Q to square 1 is β, the vertical distance from point Q to square 0 is γ, and the vertical distance from point Q to square 3 is Let δ.

本発明では、以下の式(9)〜(12)のように重み係数Wi(u,v)を設定する。まず、λ、μを式(7)、(8)のように定める。   In the present invention, the weighting coefficient Wi (u, v) is set as in the following formulas (9) to (12). First, λ and μ are determined as shown in equations (7) and (8).

Figure 0004333452
Figure 0004333452

Figure 0004333452
とする。
Figure 0004333452
And

Figure 0004333452
Figure 0004333452

Figure 0004333452
Figure 0004333452

Figure 0004333452
Figure 0004333452

Figure 0004333452
ただし、ここで、F()はF(0)=0、F(1/2)=1/2となる単調増加関数である。
Figure 0004333452
Here, F () is a monotonically increasing function that satisfies F (0) = 0 and F (1/2) = 1/2.

上記式(9)〜(12)は、隣接する四角形が縦方向、横方向に規則正しく並んでいる場合に、入力座標Qから、縦方向に存在する隣接四角形3への距離と、入力座標Qから横方向に存在する隣接四角形1への距離を算出し、縦方向の距離の比と横方向の距離の比を乗算することによって重み係数を求めることを示している。上記(9)〜(12)式は、例えば、F(x)=xのとき、以下のようになる。   The above formulas (9) to (12) are obtained from the distance from the input coordinate Q to the adjacent quadrangle 3 existing in the vertical direction and the input coordinate Q when the adjacent squares are regularly arranged in the vertical and horizontal directions. The distance to the adjacent quadrangle 1 existing in the horizontal direction is calculated, and the weighting coefficient is obtained by multiplying the ratio of the distance in the vertical direction and the ratio of the distance in the horizontal direction. The above formulas (9) to (12) are as follows when, for example, F (x) = x.

Figure 0004333452
Figure 0004333452

Figure 0004333452
Figure 0004333452

Figure 0004333452
Figure 0004333452

Figure 0004333452
上記式(13)〜(16)は、距離の比λ、μを単調増加関数F()に代入して得られた新たな値を距離の比として用いて、この距離の比を乗算することによって重み係数を求めることを示している。
Figure 0004333452
The above equations (13) to (16) are obtained by multiplying the distance ratio by using the new values obtained by substituting the distance ratios λ and μ into the monotonically increasing function F () as the distance ratio. Indicates that the weighting coefficient is obtained.

ここで、本当であれば、近隣の四角形までの距離βとδを用いて重み係数を算出することが理想である。しかし、常に上記<境界条件>(1)〜(4)を満たすような距離を設定することは非常に困難である。また、近隣の四角形の形状を考慮すると、計算が多くなってしまうという問題が生ずる。そこで、本発明では、四角形0内の形状のみを考慮して、上記βとδを近似する。   Here, if true, it is ideal to calculate the weighting coefficient using the distances β and δ to the neighboring squares. However, it is very difficult to set a distance that always satisfies the above <boundary conditions> (1) to (4). In addition, when the shape of a neighboring quadrangle is taken into account, there arises a problem that the calculation is increased. Therefore, in the present invention, β and δ are approximated considering only the shape in the rectangle 0.

具体的には、まず、αは点Qから線分pfまでの距離とする。γは点Qから線分peまでの距離とする。さらに、点Qから線分beまでの距離をε、点Qから線分bfまでの距離をζとする。ここで、
β=α+2ε、δ=γ+2ζ (17)
であるとみなす。このようにみなすと、上記式(7)、(8)を以下のようにできる。
Specifically, first, α is a distance from the point Q to the line segment pf. γ is a distance from the point Q to the line segment pe. Further, ε is the distance from the point Q to the line segment be, and ζ is the distance from the point Q to the line segment bf. here,
β = α + 2ε, δ = γ + 2ζ (17)
It is considered. In this way, the above equations (7) and (8) can be obtained as follows.

Figure 0004333452
Figure 0004333452

Figure 0004333452
このとき、線分be上ではε=0なので、λ=1/2となる。このとき、重み係数はW0=W1={1-F(μ)}/2、W3=W2=F(μ)/2となり、線分be条件が成り立つ。同様に、線分bf上ではζ=0なので、μ=1/2であり、重み係数はW0=W3={1-F(λ)}/2、W1=W2=F(λ)/2となり、線分bf条件が成り立つ。線分pe上では、γ=0なので、μ=0となる。よって重み係数はW3=W2=0となり、線分pe条件が成り立つ。同様に線分pf上では、α=0なので、λ=0となる。よって重み係数はW1=W2=0となり、線分pf条件が成り立つ。以上より、(17)式を導入したとき、境界条件(1)から(4)が成り立つことを示した。
Figure 0004333452
At this time, since ε = 0 on the line segment be, λ = 1/2. At this time, the weighting coefficients are W0 = W1 = {1-F (μ)} / 2 and W3 = W2 = F (μ) / 2, and the line segment be condition is satisfied. Similarly, since ζ = 0 on the line segment bf, μ = 1/2, and the weighting coefficients are W0 = W3 = {1-F (λ)} / 2 and W1 = W2 = F (λ) / 2. The line segment bf condition is satisfied. Since γ = 0 on the line segment pe, μ = 0. Therefore, the weight coefficient is W3 = W2 = 0, and the line segment pe condition is satisfied. Similarly, since α = 0 on the line segment pf, λ = 0. Therefore, the weighting coefficient becomes W1 = W2 = 0, and the line segment pf condition is satisfied. From the above, it was shown that the boundary conditions (1) to (4) are satisfied when the equation (17) is introduced.

このように、入力座標と、入力座標が属する領域の各辺との距離を計測し、各辺との距離の比をその辺と隣接する四角形との距離とすることにより、計算量を少なくすることができる。   Thus, the amount of calculation is reduced by measuring the distance between the input coordinate and each side of the region to which the input coordinate belongs, and setting the distance ratio between each side as the distance between the side and the adjacent rectangle. be able to.

次に、単調増加関数F()の内容の例を示す。図8は単調増加関数Fの内容の例を示す図である。図8に様々な単調増加関数F()の例と、単調増加関数F()に対応した重み係数W0の形状を示す。図8は、入力座標が領域Rbにあるときの例である。図8(ア)〜(エ)の(a)において、横軸はp点からの距離x、縦軸は単調増加関数F()を示しており、(b)は各点の重み係数WOを示している。   Next, an example of the content of the monotonically increasing function F () is shown. FIG. 8 is a diagram showing an example of the content of the monotonically increasing function F. FIG. 8 shows various examples of the monotonically increasing function F () and the shape of the weighting factor W0 corresponding to the monotonically increasing function F (). FIG. 8 is an example when the input coordinates are in the region Rb. 8A to 8D, the horizontal axis indicates the distance x from the point p, the vertical axis indicates the monotonically increasing function F (), and (b) indicates the weighting coefficient WO of each point. Show.

(1)単調増加関数F(x)=xのとき、図8(ア)に示されるように、重み係数WOは、点pでは1、点e,fでは1/2、点bでは1/4となる。
(2)単調増加関数F(x)が図8(イ)に示されるような形状のとき(x=0の近辺でF(x)=0となる部分がある場合)、図8(イ)に示されるように、中心点pの周囲の重み係数はW0=1となる領域(斜線部)を形成できる。
(3)単調増加関数F(x)が図8(c)に示されるような形状のとき(x=1/2の近辺でF(x)=1/2となる部分がある場合)、図8(c)に示されるように、点bの周囲の重み係数W0=1/4となる領域(斜線部)を形成できる。
(4)単調増加関数F(x)を非線形とする場合である。上記のように線形な関数では、導関数が不連続になる部分で、視覚的に不連続性が見えてしまう場合があると考えられる。その場合には、単調増加関数F(x)を図8(e)に示されるような非線形関数としても良い。周囲の領域との繋ぎ目を滑らかに見せることができる。図8(ア)〜(ウ)の(b)では、四角形の各辺上にその辺を共有する四角形に対応する重み係数を二分の1となる点を少なくとも1点以上設定している例を示している。
(1) When the monotonically increasing function F (x) = x, as shown in FIG. 8A, the weight coefficient WO is 1 at the point p, 1/2 at the points e and f, and 1 / at the point b. 4.
(2) When the monotonically increasing function F (x) has a shape as shown in FIG. 8 (a) (when there is a portion where F (x) = 0 in the vicinity of x = 0), FIG. As shown in FIG. 5, a region (shaded portion) where the weighting coefficient around the center point p is W0 = 1 can be formed.
(3) When the monotonically increasing function F (x) has a shape as shown in FIG. 8C (when there is a portion where F (x) = 1/2 in the vicinity of x = 1/2) As shown in FIG. 8C, a region (shaded portion) where the weight coefficient W0 = 1/4 around the point b can be formed.
(4) This is a case where the monotonically increasing function F (x) is nonlinear. In the linear function as described above, it is considered that the discontinuity may be visually observed at the portion where the derivative is discontinuous. In that case, the monotonically increasing function F (x) may be a non-linear function as shown in FIG. The joints with the surrounding area can be shown smoothly. In (b) of FIGS. 8A to 8C, an example is set in which at least one point at which a weighting factor corresponding to a quadrangle sharing the side is divided by half is set on each side of the quadrangle. Show.

次に、点Qから線分pf、pe、be、bfへの距離の計測の方法を定める。図9は点Qから線分pf、pe、be、bfへの距離の計測の方法を説明する図である。図9に示されるように、p1は四角形1の中心点、f1は四角形1の左右の四角形から等距離にある直線と、四角形1と四角形2との共有辺との交点とする。上記条件(2)を満たすような距離の定義を行う。   Next, a method for measuring the distance from the point Q to the line segments pf, pe, be, bf is determined. FIG. 9 is a diagram for explaining a method of measuring the distance from the point Q to the line segments pf, pe, be, bf. As shown in FIG. 9, p1 is a center point of the rectangle 1 and f1 is an intersection of a straight line equidistant from the left and right rectangles of the rectangle 1 and the shared side of the rectangle 1 and the rectangle 2. The distance that satisfies the above condition (2) is defined.

例えば、線分be上の点Qが四角形0にあるとするとき、その点から、線分bfまでの距離をζ0とし、線分peまでの距離をγ0とする。同様に、線分be上の点Qが四角形1にあるとするとき、その点から、線分b−f1までの距離をζ1とし、線分p1−eまでの距離をγ1とする。このとき、点Qが四角形0内に存在していると仮定したときのμ0   For example, when the point Q on the line segment be is in the square 0, the distance from that point to the line segment bf is ζ0, and the distance to the line segment pe is γ0. Similarly, when the point Q on the line segment be is in the square 1, the distance from that point to the line segment b-f1 is ζ1, and the distance to the line segment p1-e is γ1. At this time, μ 0 when it is assumed that the point Q exists in the square 0

Figure 0004333452
と、点Qが四角形1内に存在していると仮定した時のμ1
Figure 0004333452
And μ1 when it is assumed that the point Q exists in the rectangle 1

Figure 0004333452
が等しくなければならない。μ0=μ1とするための、最も簡単な方法は、γ0=γ1、かつ、ζ0=ζ1とすることである。γ0=γ1、かつ、ζ0=ζ1とするために、本発明では、γ0=γ1=線分Qeの長さ、ζ0=ζ1=線分Qbの長さとして定義する。
Figure 0004333452
Must be equal. The simplest method for setting μ0 = μ1 is to set γ0 = γ1 and ζ0 = ζ1. In order to satisfy γ0 = γ1 and ζ0 = ζ1, in the present invention, γ0 = γ1 = the length of the line segment Qe and ζ0 = ζ1 = the length of the line segment Qb are defined.

次に、点Qが線分pf上にあるときを考える。点Qが領域Rb内にある場合と、点Qが領域Rc内にある場合との2つの場合に分けることができる。点Qがいずれの領域に存在したとしても、重み係数が同じになるように距離の定義をしなければならない。この場合も同様で、点Qから線分peまでの距離=点Qから線分pgまでの距離=線分Qpの長さ、点Qから線分fbまでの距離=点Qから線分fcまでの距離=線分Qfの長さとして定義すれば良い。   Next, consider a case where the point Q is on the line segment pf. There are two cases: the case where the point Q is in the region Rb and the case where the point Q is in the region Rc. Regardless of the region where the point Q exists, the distance must be defined so that the weighting factor is the same. In this case as well, the distance from the point Q to the line segment pe = the distance from the point Q to the line segment pg = the length of the line segment Qp, the distance from the point Q to the line segment fb = from the point Q to the line segment fc The distance may be defined as the length of the line segment Qf.

以上は、水平方向の距離について説明したが、垂直方向の距離に関しても同様に定義することができる。これで、点Qが四角形pebfの辺上にある場合の距離を定義できた。   Although the distance in the horizontal direction has been described above, the distance in the vertical direction can be similarly defined. Thus, the distance when the point Q is on the side of the square pebf can be defined.

次に点Qが四角形pebfの内部にある場合を考える。図10は点Qが四角形pebfの内部にある場合を説明する図である。境界条件(辺にある場合)と、できるだけ連続になるように、内部にある場合の距離を定義する必要がある。例えば、四角形pebfが図10(a)のような形状をしているとする。これまでに考察してきたように、各辺上では、その辺の方向に沿って距離を計測すればよい。   Next, consider a case where the point Q is inside the square pebf. FIG. 10 is a diagram for explaining a case where the point Q is inside the square pebf. It is necessary to define the boundary condition (if it is on the edge) and the distance when it is inside so as to be as continuous as possible. For example, it is assumed that the square pebf has a shape as shown in FIG. As discussed so far, on each side, the distance may be measured along the direction of that side.

図10(a)には、点Qが線分be上にある場合や、線分pf上にある場合の距離を示している。点Qが線分be上から線分pf上に移動するとする。このとき、点Qから線分bfへの距離や線分pe上への距離を計測する直線は、線分beから線分pfに移動する。この移動が、図10(b)に示されるようにできるだけ連続な変化になるようにしたい。このような連続に移動する直線を求めるため、本実施例では、以下のような手法を用いる。   FIG. 10A shows the distance when the point Q is on the line segment be or on the line segment pf. It is assumed that the point Q moves from the line be to the line pf. At this time, the straight line for measuring the distance from the point Q to the line segment bf and the distance on the line segment pe moves from the line segment be to the line segment pf. This movement is desired to be as continuous as possible as shown in FIG. In order to obtain such a continuously moving straight line, the following method is used in this embodiment.

図11は連続に移動する直線を求めるための方法を説明する図である。図11(a)に示されるような四角形pebfがあるとする。図11(b)に示されるような長方形PEBFを用意する。PEBFは正方形や平行四辺形であっても良い。
(1)入力座標qが属する四角形pebfの各頂点p、e、b、fを任意の平行四辺形である長方形PEBFの各頂点P、E、B、Fに写すような射影変換Sを求める。
(2)同様に、長方形PEBFの頂点P、E、B、Fを四角形pebfの頂点p、e、b、fの写すような射影変換S’(Sの逆変換)を求める。
(3)四角形pebf内の点qを射影変換Sを用いて、四角形PEBF内の点Qに写す。以下、写像先の座標Qを用いて、各領域の辺までの距離を算出する。
(4)点Qを通って、辺PFおよびBEに平行な直線を引く。その直線とPEとの交点をJ、BFとの交点をKとする。
(5)点Qを通って、辺PEおよびBFに平行な直線を引く。その直線とPFとの交点をL、BEとの交点をMとする。
(6)J、K、L、Mを射影変換S’を用いて、四角形pebfの辺上に写す。写った先をそれぞれ、j、k、l、mとする。
(7)qから線分peまでの距離=線分qjの長さ、qから線分bfまでの距離=線分qkの長さ、qから線分pfまでの距離=線分qlの長さ、qから線分beまでの距離=線分qmの長さとする。
FIG. 11 is a diagram for explaining a method for obtaining a straight line that moves continuously. Assume that there is a square pebf as shown in FIG. A rectangular PEBF as shown in FIG. 11B is prepared. The PEBF may be a square or a parallelogram.
(1) Find a projective transformation S that maps the vertices p, e, b, and f of the quadrangle pebf to which the input coordinate q belongs to the vertices P, E, B, and F of the rectangular PEBF that is an arbitrary parallelogram.
(2) Similarly, a projective transformation S ′ (inverse transformation of S) is obtained in which the vertices P, E, B, and F of the rectangular PEBF are copied to the vertices p, e, b, and f of the quadrilateral pebf.
(3) The point q in the quadrangle pebf is copied to the point Q in the quadrangle PEBF using the projective transformation S. Hereinafter, the distance to the side of each region is calculated using the coordinates Q of the mapping destination.
(4) A straight line passing through the point Q and parallel to the sides PF and BE is drawn. The intersection between the straight line and PE is J, and the intersection with BF is K.
(5) Draw a straight line passing through the point Q and parallel to the sides PE and BF. Let L be the intersection of the straight line and PF, and M be the intersection of BE.
(6) Copy J, K, L, and M onto the sides of the square pebf using the projective transformation S ′. Let j, k, l, and m be the captured points, respectively.
(7) Distance from q to line segment pe = length of line segment qj, distance from q to line segment bf = length of line segment qk, distance from q to line segment pf = length of line segment ql , Q to the line segment be = the length of the line segment qm.

上記で、距離α、ε、γ、ζの計測の方法を示したが、他の方法を採ることもできる。以下、他の距離α、ε、γ、ζの計測方法例を示す。
(1)正方形p’e’b’f’を用意する。この正方形は平行四辺形であっても良い。大きさは何でも良い。
(2)四角形pebfと正方形p’e’b’f’の間のバイリニア変換係数を求める。バイリニア変換とは、下記の演算式(22)、(23)で定義できるものである。

Figure 0004333452
Figure 0004333452
この変換の未知数は、射影変換パラメタの未知数と同じ8つである。射影変換パラメタを求めたときと同様に、四角形と四角形の対応関係を基に、8つの一次式を得ることができる。この連立一次方程式を解くことによって、バイリニア変換係数p0,p1,p2,p3, q0,q1,q2,q3を求めることができる。
(1)図7における点Qの座標を上記バイリニア変換で変換する。変換後の点をQ’とする。
(2)点Q’と線分p’f’とのユークリッド距離をαとする(四角形p’e’b’f’が長方形の場合はユークリッド距離、四角形p’e’b’f’が平行四辺形の場合は点Q’から線分b’f’に平行に引いた線上で距離を計測する。以下同様)。点Q’と線分e’b’とのユークリッド距離をεとする。点Q’と線分p’e’とのユークリッド距離をγとする。点Q’と線分b’f’とのユークリッド距離をζとする。 Although the method for measuring the distances α, ε, γ, and ζ has been described above, other methods can be adopted. Hereinafter, other examples of measuring the distances α, ε, γ, and ζ will be described.
(1) Prepare a square p'e'b'f '. This square may be a parallelogram. Any size is acceptable.
(2) A bilinear transformation coefficient between the square pebf and the square p'e'b'f 'is obtained. Bilinear conversion can be defined by the following arithmetic expressions (22) and (23).
Figure 0004333452
Figure 0004333452
The number of unknowns in this conversion is the same as the number of unknowns in the projective transformation parameter. As in the case of obtaining the projective transformation parameter, eight linear expressions can be obtained based on the correspondence between the rectangles. By solving the simultaneous linear equations, bilinear transformation coefficients p 0 , p 1 , p 2 , p 3 , q 0 , q 1 , q 2 , q 3 can be obtained.
(1) The coordinates of the point Q in FIG. 7 are converted by the bilinear conversion. Let Q 'be the converted point.
(2) The Euclidean distance between the point Q ′ and the line segment p′f ′ is α (when the square p′e′b′f ′ is a rectangle, the Euclidean distance is parallel and the square p′e′b′f ′ is parallel). In the case of a quadrilateral, the distance is measured on a line drawn parallel to the line segment b'f 'from the point Q'. The Euclidean distance between the point Q ′ and the line segment e′b ′ is ε. The Euclidean distance between the point Q ′ and the line segment p′e ′ is γ. The Euclidean distance between the point Q ′ and the line segment b′f ′ is ζ.

バイリニア変換は、四角形の辺上の点とその辺の2つの端点との距離の比は変化させない。そのため、点Qが辺上にある場合、点Qが四角形0にあると仮定しても、四角形1にあると仮定しても、その辺の二つの端点までの距離が同じである。よって、辺上でのテクスチャの連続性を保つことができる。   Bilinear transformation does not change the distance ratio between a point on the side of the quadrangle and the two end points of the side. Therefore, when the point Q is on the side, the distance to the two end points on the side is the same regardless of whether the point Q is in the square 0 or the square 1. Therefore, the continuity of the texture on the side can be maintained.

以上で、点Qからpf、pe、be、bfへの距離の計測の方法を示すことができた。他の領域Ra、Rc、Rd内の座標に関しても、同様に重み係数を求めることができる。このように、入力座標qが属する領域を四角形pebfとし、この四角形の各頂点p、e、b、fを任意の平行四辺形PEBFの各頂点P、E、B、Fに写す射影変換Sを用いて、入力座標qを平行四辺形PEBF内に写し、写像先の座標Qを用いて、各領域の辺までの距離を算出する。このため、平行四辺形内の連続に移動する直線を用いることができるので、より自然な座標変換を行うことができる。   As described above, the method for measuring the distance from the point Q to pf, pe, be, bf can be shown. For the coordinates in the other regions Ra, Rc, Rd, the weight coefficient can be obtained in the same manner. In this way, the region to which the input coordinate q belongs is a square pebf, and the projective transformation S that maps each vertex p, e, b, f of this square to each vertex P, E, B, F of an arbitrary parallelogram PEBF. Then, the input coordinate q is copied into the parallelogram PEBF, and the distance to the side of each region is calculated using the coordinate Q of the mapping destination. For this reason, since the straight line which moves continuously in a parallelogram can be used, more natural coordinate conversion can be performed.

次に、以下の2種類の実施例に関して説明を行う。なお、これまでは、2次元平面上のテクスチャを3次元空間内の物体表面にマッピングして投影する例を述べてきた。しかし、ここで述べているテクスチャマッピング方式は、四角形を四角形に射影変換する方式であるため、どちらの四角形が2次元平面上にあって、どちらの平面が投影図上にあるかには依存していない。そのため、3次元空間を透視投影した投影図内の物体表面を2次元テクスチャ画像上にマッピングするために用いることも可能である。あるいは、一方の画像が2次元平面上に無ければならないということもない。両方の画像の各四角形が射影変換で対応付けられていればよい。   Next, the following two types of embodiments will be described. Heretofore, an example has been described in which a texture on a two-dimensional plane is mapped and projected onto an object surface in a three-dimensional space. However, since the texture mapping method described here is a method for projective transformation of a quadrangle to a quadrangle, it depends on which quadrangle is on the two-dimensional plane and which plane is on the projection view. Not. Therefore, it is also possible to use the object surface in the projection view obtained by perspective projection of the three-dimensional space for mapping on the two-dimensional texture image. Alternatively, one image does not have to be on a two-dimensional plane. It suffices if the squares of both images are associated by projective transformation.

また、これまでの説明では、投影後画像内の座標から、投影前画像内の座標を得ることによって、テクスチャマッピングを行うとした。しかし、テクスチャマッピングを行うためには、投影前画像内の座標から、投影後画像内の座標を求める手法によっても良い。すなわち、いずれにしても、前提としては、隣接している複数の四角形と、それらの四角形と個々に頂点の座標の対応が取れている複数の四角形が存在していれば良い。本発明の目的は、隣接する四角形間で座標値が連続になるように、片方の四角形内の座標から、もう一方の四角形内の座標を計算することである。以下、実施例の説明を行う。   In the above description, the texture mapping is performed by obtaining the coordinates in the pre-projection image from the coordinates in the post-projection image. However, in order to perform texture mapping, a method of obtaining coordinates in the post-projection image from coordinates in the pre-projection image may be used. That is, in any case, as a premise, it is only necessary to have a plurality of adjacent quadrangles and a plurality of quadrangles in which the coordinates of the vertices can be individually associated with the quadrangles. An object of the present invention is to calculate the coordinates in the other rectangle from the coordinates in one rectangle so that the coordinate values are continuous between adjacent rectangles. Hereinafter, examples will be described.

まず、実施例1について説明する。実施例1は、同一形状の平行四辺形(あるいは、長方形や正方形)で分割された領域内の座標を入力とする場合の例である。実施例1の前提条件を図12を用いて説明する。図12(a)は実施例1に係る入力投影面を示す図、(b)は出力投影面を示す図である。図12(a)に示されるように、同一形状の正方形で分割された投影面を入力とする。入力投影面を分割している正方形の各頂点は、出力投影面上の各頂点に対応している。例えば、図12において、入力投影面の頂点aは、出力投影面の頂点Aに対応している。同様に頂点bは頂点Bに対応している。   First, Example 1 will be described. The first embodiment is an example in which coordinates in an area divided by parallelograms (or rectangles or squares) having the same shape are input. The precondition of Example 1 is demonstrated using FIG. FIG. 12A is a diagram illustrating an input projection plane according to the first embodiment, and FIG. 12B is a diagram illustrating an output projection plane. As shown in FIG. 12A, a projection plane divided by squares having the same shape is input. Each square vertex dividing the input projection plane corresponds to each vertex on the output projection plane. For example, in FIG. 12, the vertex a of the input projection plane corresponds to the vertex A of the output projection plane. Similarly, vertex b corresponds to vertex B.

本実施例においては、これら頂点間の対応付けと、各頂点の座標が既に求められているものとする。すなわち、図12においては、(a)入力投影面の25個の頂点の座標、(b)出力投影面の25の頂点の座標、および、それら25個の対応付けがなされているものとする。図12(b)に示す出力投影面では、入力投影面の形状が変化しており、入力時は正方形であったものが、凸四角形となっている。尚、ここで示している入力投影面とは、上記で述べた投影後画像に対応させ、また、出力投影面とは上記で述べた投影前画像に対応させることができる。投影後画像内の座標を入力として、投影前画像内の座標を求めることが、本実施例の目的である。ここでは、入力投影面の座標を入力し、出力投影面の座標を出力する。   In this embodiment, it is assumed that the correspondence between these vertices and the coordinates of each vertex have already been obtained. That is, in FIG. 12, it is assumed that (a) the coordinates of the 25 vertices of the input projection plane, (b) the coordinates of the 25 vertices of the output projection plane, and the association of the 25 vertices. In the output projection plane shown in FIG. 12 (b), the shape of the input projection plane changes, and a square shape at the time of input is a convex quadrangle. The input projection plane shown here can correspond to the post-projection image described above, and the output projection plane can correspond to the pre-projection image described above. An object of this embodiment is to obtain the coordinates in the pre-projection image using the coordinates in the post-projection image as input. Here, the coordinates of the input projection plane are input, and the coordinates of the output projection plane are output.

次に、図13を用いて第1実施例の動作の説明を行う。図13は実施例1に係る座標変換装置のブロック図である。図13に示すように、座標変換装置100は、射影変換パラメタ算出部102、領域決定部104、隣接四角形間距離算出部105、重み係数算出部106、出力座標算出部107を備える。   Next, the operation of the first embodiment will be described with reference to FIG. FIG. 13 is a block diagram of the coordinate conversion apparatus according to the first embodiment. As illustrated in FIG. 13, the coordinate conversion apparatus 100 includes a projective conversion parameter calculation unit 102, a region determination unit 104, an adjacent quadrangle distance calculation unit 105, a weight coefficient calculation unit 106, and an output coordinate calculation unit 107.

座標変換装置100は、複数の隣接する四角形内の座標を複数の隣接する四角形内に変換するものである。図12(a)に示す入力投影面と同図(b)に示す出力投影面の頂点座標101が射影変換パラメタ算出部102に入力される。射影変換パラメタ算出部102は、入力された入力投影面と出力投影面の頂点座標101を基に射影変換パラメタを算出する。領域決定部104には、図12(a)に示す入力投影面の入力座標103が領域決定部104に入力される。領域決定部104は、入力された入力投影面の入力座標103を基に入力座標103がどの領域に属するかを決定する等の処理を行う。隣接四角形間距離算出部105は、入力座標103と隣接する四角形間の距離を算出する。重み係数算出部106は、隣接四角形間距離を用いて隣接四角形の重み係数を算出する。   The coordinate conversion apparatus 100 converts coordinates in a plurality of adjacent rectangles into a plurality of adjacent rectangles. The input projection plane shown in FIG. 12A and the vertex coordinates 101 of the output projection plane shown in FIG. 12B are input to the projective transformation parameter calculation unit 102. The projective transformation parameter calculation unit 102 calculates a projective transformation parameter based on the input input projection plane and the vertex coordinates 101 of the output projection plane. The input coordinates 103 of the input projection plane shown in FIG. 12A are input to the region determination unit 104 to the region determination unit 104. The area determination unit 104 performs processing such as determining which area the input coordinates 103 belong to based on the input coordinates 103 of the input projection plane. The distance between adjacent rectangles calculation unit 105 calculates the distance between the input coordinates 103 and the adjacent rectangles. The weighting factor calculation unit 106 calculates the weighting factor of the adjacent rectangle using the distance between adjacent rectangles.

出力座標算出部107は、入力座標が属する四角形に対応する射影変換を用いて得られる座標と、入力座標が属する四角形に隣接する四角形に対応する射影変換を用いて得られる座標とを、重み係数算出部106で算出した重み係数で重み付けして加算することによって出力座標を算出する。   The output coordinate calculation unit 107 calculates the weight coefficient by using the coordinates obtained using the projective transformation corresponding to the rectangle to which the input coordinates belong and the coordinates obtained using the projective transformation corresponding to the rectangle adjacent to the rectangle to which the input coordinates belong. The output coordinates are calculated by weighting with the weighting coefficient calculated by the calculation unit 106 and adding them.

以下、それぞれの動作を詳しく述べる。まず、射影変換パラメタ算出部102の動作を説明する。まず、射影変換パラメタ算出部102では、頂点座標101に基づき入力投影面内と、出力投影面内の対応する四角形を一つずつ抽出する。入力投影面内の四角形iに対し、出力投影面内の四角形Iが対応しているとする。また、四角形iの4つの頂点の座標と、四角形Iの4つの頂点の座標との対応付けがなされているとする。このとき、従来例において、式(1)〜式(4)を用いて説明したように、四角形iを四角形Iに変換するような、8つの射影変換パラメタを算出することができる。以下、四角形iに対応する射影変換パラメタをSiとする。   Each operation will be described in detail below. First, the operation of the projective transformation parameter calculation unit 102 will be described. First, the projective transformation parameter calculation unit 102 extracts the corresponding quadrangles in the input projection plane and the output projection plane one by one based on the vertex coordinates 101. Assume that the quadrilateral I in the output projection plane corresponds to the quadrilateral i in the input projection plane. In addition, it is assumed that the coordinates of the four vertices of the rectangle i are associated with the coordinates of the four vertices of the rectangle I. At this time, in the conventional example, as described using Expressions (1) to (4), it is possible to calculate eight projective transformation parameters for converting the square i into the square I. Hereinafter, the projective transformation parameter corresponding to the rectangle i is assumed to be Si.

ここでは、例えば、投影後画像の座標値から投影前画像の座標値を逆に求める例を示しているので、式(1)、(2)とは逆の射影変換パラメタの定義を行う。これを式(24)(25)に示す。入力座標を(u,v)、(u,v)を射影変換した後の出力座標値を(S,L)とする。   Here, for example, an example in which the coordinate value of the pre-projection image is obtained in reverse from the coordinate value of the post-projection image is shown, so that the projective transformation parameter is defined opposite to equations (1) and (2). This is shown in equations (24) and (25). The input coordinate is (u, v), and the output coordinate value after projective transformation of (u, v) is (S, L).

Figure 0004333452
Figure 0004333452

Figure 0004333452
(u,v)と(S,L)に上記の関係があるとき、p0、p1、p2、q0、q1、q2、r1、r2を射影変換パラメタとして定義する。図13において、射影変換パラメタ算出は、重み係数算出と独立に行われているが、必ずしも独立に行う必要は無く、出力座標算出に必要な射影変換パラメタを都度算出するようにしても良い。
Figure 0004333452
When (u, v) and (S, L) have the above relationship, p 0 , p 1 , p 2 , q 0 , q 1 , q 2 , r 1 , r 2 are defined as projective transformation parameters. In FIG. 13, the projective transformation parameter calculation is performed independently of the weighting factor calculation. However, it is not always necessary to perform the projective transformation parameter, and the projective transformation parameter necessary for the output coordinate calculation may be calculated each time.

次に、領域決定部104の動作を示す。領域決定部104は、入力座標103が入力投影面内のどの四角形内に存在しているか調べる。ここで、領域決定部104は、入力座標103が存在している四角形を四角形0とする。次に、領域決定部104は、入力座標103が四角形0内のどの領域(RaかRbかRcか、あるいは、Rdか)に存在しているか調べる。ここでは、一例として、座標を入力して、その座標が存在している四角形と領域を求めたが、実際には、四角形と領域をまず指定して、その中に存在している座標を決定するといったやりかたでも、もちろん良い。この場合の構成図を、図14に示す。   Next, the operation of the area determination unit 104 will be described. The region determination unit 104 checks in which square in the input projection plane the input coordinate 103 exists. Here, the region determination unit 104 sets the quadrangle where the input coordinates 103 exist as the quadrangle 0. Next, the region determination unit 104 checks in which region (Ra, Rb, Rc, or Rd) the input coordinate 103 exists within the square 0. Here, as an example, the coordinates are input and the rectangle and the area where the coordinates exist are obtained, but actually, the rectangle and the area are first specified, and the coordinates existing therein are determined. Of course, you can do it. FIG. 14 shows a configuration diagram in this case.

図14は、実施例1に係る座標変換装置の変形例を示す図である。図14に示すように、座標変換装置200は、射影変換パラメタ算出部102、座標出力部110、隣接四角形間距離算出部105、重み係数算出部106、出力座標算出部107を備える。座標出力部110は、入力された領域109を基に、四角形の中に存在している座標を決定する。図13と同一箇所については同一符号を付してその説明を省略する。   FIG. 14 is a diagram illustrating a modification of the coordinate conversion apparatus according to the first embodiment. As shown in FIG. 14, the coordinate conversion apparatus 200 includes a projective conversion parameter calculation unit 102, a coordinate output unit 110, a distance calculation unit 105 between adjacent rectangles, a weighting factor calculation unit 106, and an output coordinate calculation unit 107. The coordinate output unit 110 determines the coordinates existing in the rectangle based on the input area 109. The same parts as those in FIG. 13 are denoted by the same reference numerals, and the description thereof is omitted.

次に、領域決定部104が行う領域分割について説明する。図15は領域分割方式を説明するための図である。領域決定部104は、入力投影面の各正方形の中心、すなわち正方形の対角線の交点を中心点Pとする。また、領域決定部104は、中心点Pから、各辺の中点に下ろした線分を用いて正方形を4つの領域Ra、Rb、Rc、Rdに分割する。   Next, the area division performed by the area determination unit 104 will be described. FIG. 15 is a diagram for explaining the region division method. The area determination unit 104 sets the center of each square of the input projection plane, that is, the intersection of the square diagonal lines as the center point P. In addition, the region determination unit 104 divides the square into four regions Ra, Rb, Rc, and Rd using a line segment extending from the center point P to the midpoint of each side.

図15において、四角形0を入力座標103がその中に存在する四角形であるとする。図15に示されるように、四角形0の各頂点をa、b、c、dとする。また、辺abの中点をe、辺bcの中点をf、辺cdの中点をG、辺daの中点をhとする。四角形0の中心点Pは、線分egと線分fhの交点とする。また、四角形0は、線分Pe、Pf、Pg、Phを用いて4つの領域Ra、Rb、Rc、Rdに分割される。このように、領域決定部104は、四角形の辺の中点を通る直線あるいは曲線で領域を分割する。   In FIG. 15, it is assumed that a square 0 is a square in which the input coordinates 103 exist. As shown in FIG. 15, the vertices of the square 0 are a, b, c, and d. Also, e is the midpoint of the side ab, f is the midpoint of the side bc, G is the midpoint of the side cd, and h is the midpoint of the side da. The center point P of the quadrangle 0 is the intersection of the line segment eg and the line segment fh. The square 0 is divided into four regions Ra, Rb, Rc, and Rd using line segments Pe, Pf, Pg, and Ph. As described above, the region determination unit 104 divides the region by a straight line or a curve passing through the midpoint of the quadrangular side.

次に、隣接四角形間距離算出部105の動作を説明する。図16は、隣接平行四辺形間距離を説明するための図である。隣接四角形間距離算出部105は以下のようにして隣接四角形間距離を算出する。図16に示されるように、四角形0は四角形1〜8と隣接しているとする。また、四角形i(i=0,1,2,…,8)の中心はPiであるとする。Piの座標を(ui,vi)とする。さらに、入力座標をQ=(u,v)とする。隣接四角形間距離は、既に述べたα、β、γ、δの値である。これら4つの値は、以下のように算出する。   Next, the operation of the distance calculation unit 105 between adjacent squares will be described. FIG. 16 is a diagram for explaining the distance between adjacent parallelograms. The distance between adjacent rectangles calculation unit 105 calculates the distance between adjacent rectangles as follows. As shown in FIG. 16, it is assumed that the square 0 is adjacent to the squares 1 to 8. In addition, it is assumed that the center of the square i (i = 0, 1, 2,..., 8) is Pi. Let the coordinates of Pi be (ui, vi). Further, assume that the input coordinates are Q = (u, v). The distance between adjacent squares is the value of α, β, γ, and δ already described. These four values are calculated as follows.

まず、点Qの属する領域に関係なく、α=|u-u0|、γ=|v-v0|である。また、
(1)点Qが領域Raにあるとき、β=|u-u1|、δ=|v-v7|、
(2)点Qが領域Rbにあるとき、β=|u-u1|、δ=|v-v3|、
(3)点Qが領域Rcにあるとき、β=|u-u5|、δ=|v-v3|、
(4)点Qが領域Rdにあるとき、β=|u-u5|、δ=|v-v7|
となる。例えば、点Qが領域Rbにある場合のα、β、γ、δの長さが図16に例示されている。この場合、αは点QとP0の横方向の距離、βは点QとP1の横方向の距離、γは点QとP0の縦方向の距離、δは点QとP3の縦方向の距離である。
First, regardless of the region to which the point Q belongs, α = | u-u0 | and γ = | v-v0 |. Also,
(1) When the point Q is in the region Ra, β = | u-u1 |, δ = | v-v7 |
(2) When the point Q is in the region Rb, β = | u-u1 |, δ = | v-v3 |,
(3) When the point Q is in the region Rc, β = | u-u5 |, δ = | v-v3 |,
(4) When the point Q is in the region Rd, β = | u-u5 |, δ = | v-v7 |
It becomes. For example, the lengths of α, β, γ, and δ when the point Q is in the region Rb are illustrated in FIG. In this case, α is the horizontal distance between the points Q and P0, β is the horizontal distance between the points Q and P1, γ is the vertical distance between the points Q and P0, and δ is the vertical distance between the points Q and P3. It is.

なお、図16を用いて説明した手法は、隣接四角形間距離算出の一例であり、隣接四角形間距離算出部105は、上記発明概念で説明した手法を用いて隣接四角形間の距離を算出することもできる。   The method described using FIG. 16 is an example of calculating the distance between adjacent rectangles, and the distance calculation unit 105 between adjacent rectangles calculates the distance between adjacent rectangles using the method described in the above concept of the invention. You can also.

次に、重み係数算出部106の動作を説明する。重み係数算出部106は以下のようにして重み係数を算出する。ここでは、入力座標Q=(u,v)に対応する重み係数Wi(i=0,1,...,8)を求める。まず、点Qの属する領域に関係なく、重み係数W0は式(26)により決定される。   Next, the operation of the weight coefficient calculation unit 106 will be described. The weight coefficient calculation unit 106 calculates the weight coefficient as follows. Here, a weighting coefficient Wi (i = 0, 1,..., 8) corresponding to the input coordinate Q = (u, v) is obtained. First, regardless of the region to which the point Q belongs, the weighting factor W0 is determined by equation (26).

Figure 0004333452
次に、(1)点Qが領域Raにあるとき、重み係数W2=W3=W4=W5=W6=0、W1、W7、W8は式(27)〜(29)により決定される。
Figure 0004333452
Next, (1) when the point Q is in the region Ra, the weighting factors W2 = W3 = W4 = W5 = W6 = 0, W1, W7, W8 are determined by the equations (27) to (29).

Figure 0004333452
Figure 0004333452

Figure 0004333452
Figure 0004333452

Figure 0004333452
(2)点Qが領域Rbにあるとき、重み係数W4=W5=W6=W7=W8=0、W1、W2、W3は式(30)〜(32)により決定される。
Figure 0004333452
(2) When the point Q is in the region Rb, the weighting factors W4 = W5 = W6 = W7 = W8 = 0, W1, W2, W3 are determined by the equations (30) to (32).

Figure 0004333452
Figure 0004333452

Figure 0004333452
Figure 0004333452

Figure 0004333452
(3)点Qが領域Rcにあるとき、重み係数W1=W2=W6=W7=W8=0、W3、W4、W5は式(33)〜(35)により決定される。
Figure 0004333452
(3) When the point Q is in the region Rc, the weighting factors W1 = W2 = W6 = W7 = W8 = 0, W3, W4, W5 are determined by the equations (33) to (35).

Figure 0004333452
Figure 0004333452

Figure 0004333452
Figure 0004333452

Figure 0004333452
(4)点Qが領域Rdにあるとき、重み係数W1=W2=W3=W4=W8=0、W5、W6、W7は式(36)〜(38)により決定される。
Figure 0004333452
(4) When the point Q is in the region Rd, the weighting factors W1 = W2 = W3 = W4 = W8 = 0, W5, W6, W7 are determined by the equations (36) to (38).

Figure 0004333452
Figure 0004333452

Figure 0004333452
Figure 0004333452

Figure 0004333452
とする。上記では、βやδの距離を計測したが、概念で述べたように、εやζの距離を計算しても、もちろん良い。
Figure 0004333452
And In the above description, the distances β and δ are measured. However, as described in the concept, it is of course possible to calculate the distances ε and ζ.

なお、ここで説明した手法は、重み係数算出法の一例であり、重み係数算出部106は、上記発明概念で説明した手法を用いて重み係数を算出することもできる。   Note that the method described here is an example of a weighting factor calculation method, and the weighting factor calculation unit 106 can also calculate the weighting factor using the method described in the above concept of the invention.

次に、出力座標算出部107の動作の説明を行う。既に重み係数算出部106において、W0〜W8の重み係数が算出されている。また、既に、射影変換パラメタ算出部102において、各四角形0〜8の射影変換パラメタS0〜S8が算出されている。出力座標算出部107は、まず、四角形iの射影変換パラメタSi(i=0,1,2,…,8)と、入力座標Q=(u,v)を用いて、各四角形に対応する出力座標Xiを算出する。例えば、四角形0の射影変換パラメタは、入力投影面中の四角形0と出力投影面中の四角形0に射影するパラメタである。このパラメタをp0、p1、p2、q0、q1、q2、r1、r2とする。 Next, the operation of the output coordinate calculation unit 107 will be described. The weighting factor calculation unit 106 has already calculated the weighting factors W0 to W8. In addition, the projective transformation parameter calculation unit 102 has already calculated the projective transformation parameters S0 to S8 of the respective squares 0 to 8. First, the output coordinate calculation unit 107 uses the projective transformation parameters Si (i = 0, 1, 2,..., 8) of the rectangle i and the input coordinates Q = (u, v) to output corresponding to each rectangle. The coordinate Xi is calculated. For example, the projective transformation parameter of the quadrangle 0 is a parameter that projects onto the quadrangle 0 in the input projection plane and the quadrangle 0 in the output projection plane. These parameters are assumed to be p 0 , p 1 , p 2 , q 0 , q 1 , q 2 , r 1 , r 2 .

出力座標算出部107は、四角形0に対する射影変換パラメタS0、式(24)、(25)を用いて、入力座標をQ=(u,v)に対する出力座標X0(S0,L0)を求める。   The output coordinate calculation unit 107 obtains the output coordinate X0 (S0, L0) for the input coordinate Q = (u, v) using the projective transformation parameter S0 for the square 0 and the equations (24) and (25).

同様に、出力座標算出部107は、他の四角形iに対応する射影変換パラメタSi、式(24)、(25)を用いて、入力座標Q(u,v)に対応する出力座標(Si,Li)を求める。ここで、四角形iの射影変換パラメタを用いて算出した出力座標値をXi=(Si,Li)とする。Xiは2次元ベクトルである。   Similarly, the output coordinate calculation unit 107 uses the projective transformation parameters Si corresponding to the other quadrilateral i and the expressions (24) and (25) to output the output coordinates (Si, Li). Here, the output coordinate value calculated using the projective transformation parameter of the square i is assumed to be Xi = (Si, Li). Xi is a two-dimensional vector.

出力座標算出部107は、式(39)に示すように、上記出力座標Xiを重み係数Wiで重み付けして加算することにより、最終的な出力座標X(S,L)を求める。   The output coordinate calculation unit 107 obtains the final output coordinate X (S, L) by weighting and adding the output coordinate Xi with the weighting coefficient Wi as shown in Expression (39).

Figure 0004333452
このとき、iがWi=0の場合の出力座標値Xiは特に算出する必要はない。
Figure 0004333452
At this time, it is not necessary to calculate the output coordinate value Xi when i is Wi = 0.

このように、出力座標算出部107は、式(39)を用いて、入力座標Q(u,v)が属する四角形0に対応する射影変換S0を用いて得られる出力座標X0(S0,L0)と、入力座標Q(u,v)が属する四角形0に隣接する四角形i(i≠0)に対応する射影変換Siを用いて得られる座標Xi(Si,Li)とを、重み係数Wiで重み付けして加算することによって最終的な出力座標X(S,L)を算出できることを示している。   As described above, the output coordinate calculation unit 107 uses the expression (39) to output the output coordinates X0 (S0, L0) obtained by using the projective transformation S0 corresponding to the rectangle 0 to which the input coordinates Q (u, v) belong. And the coordinates Xi (Si, Li) obtained by using the projective transformation Si corresponding to the quadrilateral i (i ≠ 0) adjacent to the quadrilateral 0 to which the input coordinates Q (u, v) belong are weighted by the weighting factor Wi. It is shown that the final output coordinates X (S, L) can be calculated by adding together.

なお、ここで説明した手法は、出力座標算出法の一例であり、出力座標算出部107は、上記発明概念で説明した手法を用いて出力座標を算出することもできる。   Note that the method described here is an example of an output coordinate calculation method, and the output coordinate calculation unit 107 can also calculate output coordinates using the method described in the above concept of the invention.

また、以上の実施例1では、入力投影図が同一形状の正方形で分割されている例を示した。上記の手法は、正方形ではなく、同一形状の長方形で分割されていても、全く同様に用いることができる。さらに、上記の手法は、長方形ではなく、同一形状の平行四辺形で分割されている場合にも用いることができる。平行四辺形の場合には、隣接四角形間距離算出部の動作が若干異なる。もちろん正方形や長方形も平行四辺形であるので、正方形や長方形の場合も、以下に述べる平行四辺形の手法を用いることができる。   Moreover, in the above Example 1, the example in which the input projection figure was divided | segmented by the square of the same shape was shown. The above method can be used in the same manner even when divided by a rectangle having the same shape instead of a square. Furthermore, the above-described method can be used even when divided not by a rectangle but by a parallelogram having the same shape. In the case of a parallelogram, the operation of the distance calculation unit between adjacent squares is slightly different. Of course, since squares and rectangles are also parallelograms, the parallelogram method described below can also be used for squares and rectangles.

図16を用いて、平行四辺形の場合の説明を行う。図16において、四角形0〜四角形8は同一形状の平行四辺形であるとする。四角形0は4つの頂点a、b、c、dを持つとする。隣接四角形間距離算出部105は、α、β、γ、δを、以下のように求める。点Qが領域Rbにある場合を例にとって説明する。点Qを通って、線分ad(あるいは線分bc)に平行な直線(直線1)を引く。さらに、点Qを通って線分ab(あるいは線分cd)に平行な直線(直線2)を引く。   The case of a parallelogram will be described with reference to FIG. In FIG. 16, it is assumed that squares 0 to 8 are parallelograms having the same shape. The square 0 has four vertices a, b, c, and d. The adjacent quadrangle distance calculation unit 105 calculates α, β, γ, and δ as follows. A case where the point Q is in the region Rb will be described as an example. A straight line (straight line 1) parallel to the line segment ad (or line segment bc) is drawn through the point Q. Further, a straight line (straight line 2) parallel to the line segment ab (or line segment cd) is drawn through the point Q.

直線1と線分P0−P3の交点をS30、直線1と線分P1−P2の交点をS12、直線2と線分P2−P3の交点をS23、直線2と線分P0−P1の交点をS01とする。αは線分Q−S30の長さ、βは線分Q−S12の長さ、γは線分Q−S01の長さ、δは線分Q−S23の長さである。点Qが他の領域にある場合も同様に、点Qから四角形の辺との平行線を引いてその平行線と中心点との交点との長さを計測すれば良い。   The intersection of line 1 and line segment P0-P3 is S30, the intersection of line 1 and line segment P1-P2 is S12, the intersection of line 2 and line segment P2-P3 is S23, and the intersection of line 2 and line segment P0-P1 is S01. α is the length of the line segment Q-S30, β is the length of the line segment Q-S12, γ is the length of the line segment Q-S01, and δ is the length of the line segment Q-S23. Similarly, when the point Q is in another region, the length of the intersection of the parallel line and the center point may be measured by subtracting a parallel line from the point Q to the square side.

隣接四角形間距離算出部105、出力座標算出部107が、特許請求の範囲における距離算出部、座標算出部にそれぞれ相当する。   The distance calculation unit 105 between adjacent squares and the output coordinate calculation unit 107 correspond to a distance calculation unit and a coordinate calculation unit in the claims.

次に第2実施例について説明する。実施例1では、同一形状の平行四辺形で分割された入力投影図の座標から、出力投影図内の座標を計算する手法を示した。実施例2では、凸四角形で分割された入力投影図の座標から、出力投影図内の座標を計算する手法を示す。実施例2における構成は、実施例1において、図13を用いて説明したものと同じである。実施例1と異なる点は、領域決定部104による領域の分割方法、および、隣接四角形間距離算出部105、重み係数算出部106の動作である。ここでは、既に射影変換パラメタが求まっているものとする。また、入力座標の領域が決定されているものとする。   Next, a second embodiment will be described. In the first embodiment, the method of calculating the coordinates in the output projection map from the coordinates of the input projection map divided by the parallelograms having the same shape is shown. The second embodiment shows a method for calculating coordinates in the output projection map from the coordinates of the input projection map divided by the convex quadrangle. The configuration in the second embodiment is the same as that described in the first embodiment with reference to FIG. The differences from the first embodiment are the region dividing method by the region determining unit 104 and the operations of the distance calculation unit 105 between adjacent rectangles and the weighting factor calculating unit 106. Here, it is assumed that the projective transformation parameter has already been obtained. Also, it is assumed that the input coordinate area has been determined.

まず、領域の分割方法に関して述べる。図17は領域決定部104による領域分割を説明するための図である。図17において、四角形0だけを示し、隣接する四角形1〜8は省略する。実施例1と同様に、入力座標Q=(u,v)が属する四角形を四角形0とする。また、実施例1と同様に、図17に示されるように、中心点pと、辺ab上の点e、辺bc上の点f、辺cd上の点g、辺da上の点hを用いて、領域が分割されるものとする。点p、e、f、g、hの位置は、任意に定めても良い。   First, the region dividing method will be described. FIG. 17 is a diagram for explaining region division by the region determination unit 104. In FIG. 17, only the square 0 is shown, and the adjacent squares 1 to 8 are omitted. As in the first embodiment, the rectangle to which the input coordinate Q = (u, v) belongs is defined as a rectangle 0. Similarly to the first embodiment, as shown in FIG. 17, the center point p, the point e on the side ab, the point f on the side bc, the point g on the side cd, and the point h on the side da are Use the region to be divided. The positions of the points p, e, f, g, and h may be arbitrarily determined.

ただし、点eは四角形1でも同様に辺abの分割点、点fは四角形3でも同様に辺bcの分割点、点gは四角形5でも同様に辺cdの分割点、点hは四角形7でも同様に辺daの分割点となるように設定しなければならない。例えば、点eは、辺abの中点、点fは、辺bcの中点、点gは、辺cdの中点、点hは、辺daの中点、かつ、点pは、線分egと、線分fhの交点であるとするのが一例である。図17に示されるように、線分pe、pf、pg、phを用いて、四角形0を分割し、領域Ra、Rb、Rc、Rdを形成する。   However, the point e is also the division point of the side ab in the square 1, the point f is the division point of the side bc in the same way as the square 3, the point g is the division point of the side cd in the same way as the square 5, and the point h is the square 7 Similarly, it must be set to be a dividing point of the side da. For example, the point e is the midpoint of the side ab, the point f is the midpoint of the side bc, the point g is the midpoint of the side cd, the point h is the midpoint of the side da, and the point p is a line segment An example is an intersection of eg and line segment fh. As shown in FIG. 17, a square 0 is divided using line segments pe, pf, pg, and ph to form regions Ra, Rb, Rc, and Rd.

このように、領域決定部104は、四角形の相対する辺の中点同士を結ぶ直線を通る直線で領域を分割する。   As described above, the region determination unit 104 divides the region by a straight line that passes through a straight line that connects the midpoints of opposite sides of the quadrangle.

次に、隣接四角形間距離算出部105の動作を説明する。隣接四角形間距離は既述のα、γ、ε、ζの値のことである。これらの値は、概念として述べた既述の方式により求めることができる。次に、重み係数算出部106の動作を説明する。重み係数算出部106では、上記、α、γ、ε、ζの値と、(9)〜(12)式を用いて、重み係数を求める。さらに、出力座標算出部107では、上記で求めた重み係数を用いて出力座標を求める。この求め方は実施例1あるいは概念の部分で述べた方法と同じであるので、ここでは説明を省略する。   Next, the operation of the distance calculation unit 105 between adjacent squares will be described. The distance between adjacent squares is the above-described values of α, γ, ε, and ζ. These values can be obtained by the above-described method described as a concept. Next, the operation of the weight coefficient calculation unit 106 will be described. The weighting factor calculation unit 106 obtains a weighting factor using the above values of α, γ, ε, and ζ and the equations (9) to (12). Further, the output coordinate calculation unit 107 obtains output coordinates using the weighting factor obtained above. Since this method is the same as the method described in the first embodiment or the concept portion, the description is omitted here.

上記各実施例によれば、入力座標が属する四角形に対応する射影変換を用いて得られる座標と、入力座標が属する四角形に隣接する四角形に対応する射影変換を用いて得られる座標とを、重み付けして加算することにより、出力座標を算出するので、隣接する四角形間で座標値が連続になるように、片方の四角形内の座標から、もう一方の四角形内の座標を計算することができる。これにより、複数の隣接する四角形を、複数の隣接する四角形にそれぞれ射影変換して、その四角形中のテクスチャをマッピングする場合に、四角形の形状によっては、隣接する辺において、座標が不連続になるという不具合があるのに対し、本手法を用いることによって、座標の不連続性を解消できるため、より高品質なテクスチャマッピングが可能になる。   According to each of the embodiments described above, the coordinates obtained using the projective transformation corresponding to the rectangle to which the input coordinates belong and the coordinates obtained using the projective transformation corresponding to the rectangle adjacent to the rectangle to which the input coordinates belong are weighted. Since the output coordinates are calculated by adding the values, the coordinates in the other rectangle can be calculated from the coordinates in one rectangle so that the coordinate values are continuous between adjacent rectangles. As a result, when a plurality of adjacent quadrilaterals are projectively transformed into a plurality of adjacent quadrilaterals and the texture in the quadrangle is mapped, the coordinates are discontinuous on the adjacent sides depending on the shape of the quadrangle. On the other hand, by using this method, the discontinuity of coordinates can be eliminated, which enables higher quality texture mapping.

また、上記座標変換装置または座標変換方法を用いることで、ある物体上の表面を平面上に投影した画像中のテクスチャを、別の物体上の表面にマッピングしてさらに平面上に投影した図を作成する方法および装置、より詳細には、2次元平面上のテクスチャを3次元空間内の物体を2次元平面上に投影した図にマッピングするテクスチャマッピング装置または方法を提供することができる。   In addition, by using the coordinate conversion device or the coordinate conversion method, a figure in which a texture in an image obtained by projecting a surface on one object onto a plane is mapped onto a surface on another object and further projected onto a plane is displayed. It is possible to provide a method and apparatus for creating, and more particularly, a texture mapping apparatus or method for mapping a texture on a two-dimensional plane to a figure obtained by projecting an object in a three-dimensional space onto the two-dimensional plane.

なお、上記図5で説明した座標変換方法や図13または図14で説明した座標変換装置は、例えば、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)等を用いて実現され、プログラムをハードディスク装置や、CD−ROM、DVDまたはフレキシブルディスクなどの可搬型記憶媒体等からインストールし、または通信回路からダウンロードし、CPUがこのプログラムを実行することで、図5で説明した各ステップや図13または図14に示した各機能が実現される。   The coordinate conversion method described in FIG. 5 and the coordinate conversion apparatus described in FIG. 13 or FIG. 14 use, for example, a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. FIG. 5 illustrates that the program is installed from a hard disk device, a portable storage medium such as a CD-ROM, a DVD, or a flexible disk, or downloaded from a communication circuit, and the CPU executes the program. Each step and each function shown in FIG. 13 or FIG. 14 are realized.

以上本発明の好ましい実施例について詳述したが、本発明は係る特定の実施例に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形、変更が可能である。   Although the preferred embodiments of the present invention have been described in detail above, the present invention is not limited to the specific embodiments, and various modifications, within the scope of the gist of the present invention described in the claims, It can be changed.

平面テクスチャ画像の透視投影説明図である。It is perspective projection explanatory drawing of a plane texture image. 特許文献1記載の方法を説明するための図である。It is a figure for demonstrating the method of patent document 1. FIG. テクスチャ不連続点に関する説明図である。It is explanatory drawing regarding a texture discontinuity point. 発明概念を説明するための図であり、(a)は投影前画像を示す図、(b)は投影後画像を示す図である。It is a figure for demonstrating an invention concept, (a) is a figure which shows a pre-projection image, (b) is a figure which shows a post-projection image. 座標変換方法の処理フローチャートである。It is a processing flowchart of a coordinate transformation method. 発明概念の説明図である。It is explanatory drawing of an invention concept. 入力座標が領域Rbにある場合を例に採り、Rb内の重み係数設定方法を説明する。Taking the case where the input coordinates are in the region Rb as an example, a method for setting the weighting factor in Rb will be described. 単調増加関数Fの内容の例を示す図である。It is a figure which shows the example of the content of the monotone increase function F. 点Qから線分pf、pe、be、bfへの距離の計測の方法を説明する図である。It is a figure explaining the method of measuring the distance from the point Q to line segment pf, pe, be, bf. 点Qが四角形pebfの内部にある場合を説明する図である。It is a figure explaining the case where the point Q exists in the inside of square pebf. 連続に移動する直線を求めるための方法を説明する図である。It is a figure explaining the method for calculating | requiring the straight line which moves continuously. (a)は実施例1に係る入力投影面を示す図、(b)は出力投影面を示す図である。(A) is a figure which shows the input projection surface which concerns on Example 1, (b) is a figure which shows an output projection surface. 実施例1に係る座標変換装置のブロック図である。1 is a block diagram of a coordinate conversion device according to Embodiment 1. FIG. 実施例1に係る座標変換装置の変形例を示す図である。It is a figure which shows the modification of the coordinate transformation apparatus which concerns on Example 1. FIG. 領域分割方式を説明するための図である。It is a figure for demonstrating an area division system. 隣接平行四辺形間距離を説明するための図である。It is a figure for demonstrating the distance between adjacent parallelograms. 領域決定部による領域分割を説明するための図である。It is a figure for demonstrating the area | region division by an area | region determination part.

符号の説明Explanation of symbols

100、200 座標変換装置
102 射影変換パラメタ算出部
104 領域決定部
105 隣接四角形間距離算出部
106 重み係数算出部
107 出力座標算出部
110 座標出力部
DESCRIPTION OF SYMBOLS 100,200 Coordinate transformation apparatus 102 Projection transformation parameter calculation part 104 Area | region determination part 105 Distance calculation part between adjacent squares 106 Weight coefficient calculation part 107 Output coordinate calculation part 110 Coordinate output part

Claims (16)

複数の隣接する四角形内の座標を複数の隣接する四角形内に変換する座標変換装置であって、
入力座標と隣接する四角形間の距離を用いて重み係数を算出する重み係数算出部と、
前記入力座標が属する四角形に対応する射影変換を用いて得られる座標と、前記入力座標が属する四角形に隣接する四角形に対応する射影変換を用いて得られる座標とを、前記重み係数で重み付けして加算することによって出力座標を算出する座標算出部とを有することを特徴とする座標変換装置。
A coordinate conversion device that converts coordinates in a plurality of adjacent rectangles into a plurality of adjacent rectangles,
A weighting factor calculating unit that calculates a weighting factor using the distance between the input coordinates and the adjacent rectangle;
The weight obtained by weighting the coordinates obtained using the projective transformation corresponding to the quadrangle to which the input coordinate belongs and the coordinate obtained using the projective transformation corresponding to the quadrangle adjacent to the quadrangle to which the input coordinate belongs A coordinate conversion apparatus comprising: a coordinate calculation unit that calculates an output coordinate by adding.
前記重み係数算出部は、射影先の四角形の頂点位置が変わらないように重み係数を算出することを特徴とする請求項1記載の座標変換装置。 The coordinate conversion apparatus according to claim 1, wherein the weighting factor calculation unit calculates a weighting factor so that a vertex position of a quadrangular projection destination does not change. 前記重み係数算出部は、2つの四角形によって共有される辺上では、該2つの四角形に対応する重み係数を等しくすることを特徴とする請求項1または請求項2記載の座標変換装置。 The coordinate conversion apparatus according to claim 1, wherein the weighting factor calculation unit equalizes the weighting factors corresponding to the two rectangles on an edge shared by the two rectangles. 前記座標変換装置は更に、前記入力座標が属する四角形を4つの領域に分割する領域決定部を有し、
前記重み係数算出部は、前記分割した各領域において、前記入力座標が属する四角形を含む4つの隣接する四角形に対応する重み係数を算出し、その他の四角形の重み係数を0とすることを特徴とする請求項1から請求項3の何れか一項に記載の座標変換装置。
The coordinate conversion device further includes a region determination unit that divides a quadrangle to which the input coordinates belong into four regions,
The weighting factor calculation unit calculates weighting factors corresponding to four adjacent quadrilaterals including the quadrilateral to which the input coordinates belong in each divided area, and sets the weighting factors of the other quadrilaterals to 0. The coordinate transformation device according to any one of claims 1 to 3.
前記座標変換装置は更に、前記入力座標から、縦方向に存在する隣接四角形への距離と、前記入力座標から横方向に存在する隣接四角形への距離を算出する距離算出部を有し、
前記重み係数算出部は、前記縦方向に存在する四角形への距離の比と前記横方向に存在する四角形への距離の比を乗算することによって重み係数を算出することを特徴とする請求項1から請求項4の何れか一項に記載の座標変換装置。
The coordinate conversion device further includes a distance calculation unit that calculates a distance from the input coordinates to an adjacent quadrangle that exists in the vertical direction and a distance from the input coordinates to an adjacent quadrangle that exists in the horizontal direction,
The weighting factor calculation unit calculates the weighting factor by multiplying a ratio of a distance to the quadrangle existing in the vertical direction and a ratio of a distance to the quadrangle present in the horizontal direction. The coordinate transformation device according to any one of claims 4 to 5.
前記距離算出部は、前記入力座標と、前記入力座標が属する領域の各辺との距離を算出し、該各辺との距離の比をその辺と隣接する四角形との距離とすることを特徴とする請求項4または請求項5記載の座標変換装置。 The distance calculation unit calculates a distance between the input coordinate and each side of the region to which the input coordinate belongs, and sets a distance ratio between the side and a square adjacent to the side as a distance. The coordinate transformation device according to claim 4 or 5. 前記重み係数算出部は、前記距離の比を単調増加関数に代入して得られた値を新たな距離の比として用いることを特徴とする請求項5記載の座標変換装置。 6. The coordinate transformation apparatus according to claim 5, wherein the weighting factor calculation unit uses a value obtained by substituting the distance ratio into a monotonically increasing function as a new distance ratio. 前記距離算出部は、前記入力座標が属する領域を四角形とし、該四角形の各頂点を任意の平行四辺形の各頂点に写す射影変換を用いて、前記入力座標を前記平行四辺形内に写し、写像先の座標を用いて、各領域の辺までの距離を算出することを特徴とする請求項6記載の座標変換装置。 The distance calculation unit takes a region to which the input coordinate belongs as a rectangle and projects the input coordinate into the parallelogram using projective transformation that maps each vertex of the rectangle to each vertex of an arbitrary parallelogram, The coordinate conversion apparatus according to claim 6, wherein the distance to the side of each region is calculated using the coordinates of the mapping destination. 前記重み係数算出部は、四角形の各頂点上ではその頂点を共有する四角形に対応する重み係数を四分の1とすることを特徴とする請求項1から請求項8の何れか一項に記載の座標変換装置。 9. The weighting factor calculation unit according to any one of claims 1 to 8, wherein the weighting factor corresponding to the quadrangle sharing the vertex is set to a quarter on each vertex of the quadrangle. Coordinate conversion device. 前記重み係数算出部は、四角形の各辺上にその辺を共有する四角形に対応する重み係数を二分の1となる点を少なくとも1点以上設定することを特徴とする請求項1から請求項9の何れか一項に記載の座標変換装置。 The weighting factor calculation unit sets at least one point or two or more points on each side of the quadrangle that is a half of the weighting factor corresponding to the quadrangle sharing the side. The coordinate transformation device according to any one of the above. 前記重み係数算出部は、四角形内にその四角形の重み係数を1とし、他の四角形の重み係数を0とする点を1点以上設定することを特徴とする請求項1から請求項10の何れか一項に記載の座標変換装置。 The weighting factor calculation unit sets one or more points in the quadrangle where the weighting factor of the quadrangle is set to 1 and the weighting factor of the other quadrangle is set to 0. 11. A coordinate conversion apparatus according to claim 1. 前記領域決定部は、四角形の辺の中点を通る直線あるいは曲線で領域を分割することを特徴とする請求項4から請求項11の何れか一項に記載の座標変換装置。 The coordinate transformation device according to any one of claims 4 to 11, wherein the region determination unit divides the region by a straight line or a curve passing through a midpoint of a quadrangle side. 前記領域決定部は、四角形の相対する辺の中点同士を結ぶ直線を通る直線で領域を分割することを特徴とする請求項4から請求項11の何れか一項に記載の座標変換装置。 The coordinate transformation device according to any one of claims 4 to 11, wherein the region determination unit divides the region by a straight line passing through a straight line connecting the midpoints of opposite sides of the quadrangle. 前記重み係数算出部は、各四角形の重み係数の和を1とし、かつ、重み係数は0以上1以下の実数とすることを特徴とする請求項1から13の何れか一項に記載の座標変換装置。 The coordinate according to any one of claims 1 to 13, wherein the weighting factor calculation unit sets the sum of the weighting factors of each quadrature to 1, and the weighting factor is a real number of 0 or more and 1 or less. Conversion device. 前記重み係数算出部は、各領域の四角形の辺以外の境界線上では、前記入力座標が存在する四角形と最も近い四角形以外に対応する重み係数を0とすることを特徴とする請求項4から請求項14に何れか一項に記載の座標変換装置。 The weighting factor calculation unit sets the weighting factor corresponding to a rectangle other than the rectangle closest to the rectangle in which the input coordinates exist on a boundary line other than the sides of the rectangle of each region to 0. Item 15. The coordinate conversion device according to any one of Items 14 to 14. 複数の隣接する四角形内の座標を複数の隣接する四角形内に変換するためにコンピュータに、To convert coordinates in multiple adjacent rectangles into multiple adjacent rectangles,
入力座標と隣接する四角形間の距離を用いて重み係数を算出する重み係数算出ステップと、  A weighting factor calculating step for calculating a weighting factor using the distance between the input coordinates and the adjacent rectangle;
入力座標が属する四角形に対応する射影変換を用いて得られる座標と、前記入力座標が属する四角形に隣接する四角形に対応する射影変換を用いて得られる座標とを、前記重み係数で重み付けして加算することによって出力座標を算出する座標算出ステップとを実行させるためのプログラム。  The coordinates obtained using the projective transformation corresponding to the rectangle to which the input coordinates belong and the coordinates obtained using the projective transformation corresponding to the rectangle adjacent to the rectangle to which the input coordinates belong are added by weighting with the weighting factor. A program for executing a coordinate calculation step of calculating output coordinates by doing.
JP2004113247A 2004-04-07 2004-04-07 Coordinate transformation apparatus and program Expired - Fee Related JP4333452B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004113247A JP4333452B2 (en) 2004-04-07 2004-04-07 Coordinate transformation apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004113247A JP4333452B2 (en) 2004-04-07 2004-04-07 Coordinate transformation apparatus and program

Publications (3)

Publication Number Publication Date
JP2005301425A JP2005301425A (en) 2005-10-27
JP2005301425A5 JP2005301425A5 (en) 2007-05-17
JP4333452B2 true JP4333452B2 (en) 2009-09-16

Family

ID=35332921

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004113247A Expired - Fee Related JP4333452B2 (en) 2004-04-07 2004-04-07 Coordinate transformation apparatus and program

Country Status (1)

Country Link
JP (1) JP4333452B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9910572B2 (en) 2015-04-15 2018-03-06 International Business Machines Corporation Duplication of objects with positioning based on object distance

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100914846B1 (en) * 2007-12-15 2009-09-02 한국전자통신연구원 Method and system for texturing of 3d model in 2d environment
JP5007271B2 (en) * 2008-05-12 2012-08-22 京セラドキュメントソリューションズ株式会社 Image forming apparatus and error processing method of image forming apparatus
KR20130057327A (en) * 2011-11-23 2013-05-31 엘지이노텍 주식회사 Preprocessing apparatus in stereo matching system
CN113884036B (en) * 2021-09-22 2023-09-29 浙江省水利河口研究院(浙江省海洋规划设计研究院) Coordinate conversion method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9910572B2 (en) 2015-04-15 2018-03-06 International Business Machines Corporation Duplication of objects with positioning based on object distance

Also Published As

Publication number Publication date
JP2005301425A (en) 2005-10-27

Similar Documents

Publication Publication Date Title
US20070024632A1 (en) Transfer of attributes between geometric surfaces of arbitrary topologies with distortion reduction and discontinuity preservation
US9881417B2 (en) Multi-view drawing apparatus of three-dimensional objects, and method
WO2000002165A1 (en) Method for generating polygon data and image display using the same
US7295204B2 (en) Rapid zippering for real time tesselation of bicubic surfaces
US20080043023A1 (en) Approximating subdivision surfaces with bezier patches
Barnhill et al. Surfaces defined on surfaces
CN115495938A (en) Three-dimensional dynamic simulation and visualization method for sea surface waves
Ye et al. Dirichlet energy of Delaunay meshes and intrinsic Delaunay triangulations
JP4333452B2 (en) Coordinate transformation apparatus and program
US20120069037A1 (en) Resolution independent rendering of quadratic bezier curves using programmable graphics hardware
Bauer et al. Generating parametric models of tubes from laser scans
WO2009104218A1 (en) Map display device
US11605200B2 (en) System for optimizing a 3D mesh
Osudin et al. Rendering non-euclidean space in real-time using spherical and hyperbolic trigonometry
Melançon Living flows: enhanced exploration of edge-bundled graphs based on GPU-intensive edge rendering
JP6093704B2 (en) Drawing apparatus, drawing method, and drawing program
WO2004053741A1 (en) Method of calculating intersecions between triangle and line segment and progam therefor
JP2007179272A (en) Computer assisted design device, and program and method therefor
JP6727931B2 (en) Hole-covered curved surface generation device and hole-covered curved surface generation program
Leung et al. Localized construction of curved surfaces from polygon meshes: A simple and practical approach on GPU
Kovacs et al. Real-time creased approximate subdivision surfaces with displacements
Mahdavi-Amiri et al. Adaptive atlas of connectivity maps
JP6727932B2 (en) Curved surface generator by point cloud surface fitting and curved surface generation program
Tóth Towards an optimal texture reconstruction
do Nascimento et al. Procedural Editing of Virtual Terrains Using 3D Bézier Curves

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070326

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070326

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090602

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090615

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

Free format text: PAYMENT UNTIL: 20120703

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120703

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130703

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees