JP3545304B2 - Image mapping method - Google Patents

Image mapping method Download PDF

Info

Publication number
JP3545304B2
JP3545304B2 JP2000030691A JP2000030691A JP3545304B2 JP 3545304 B2 JP3545304 B2 JP 3545304B2 JP 2000030691 A JP2000030691 A JP 2000030691A JP 2000030691 A JP2000030691 A JP 2000030691A JP 3545304 B2 JP3545304 B2 JP 3545304B2
Authority
JP
Japan
Prior art keywords
source image
mapped
distance
axis
straight line
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
JP2000030691A
Other languages
Japanese (ja)
Other versions
JP2001222275A (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.)
Axell Corp
Original Assignee
Axell 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 Axell Corp filed Critical Axell Corp
Priority to JP2000030691A priority Critical patent/JP3545304B2/en
Publication of JP2001222275A publication Critical patent/JP2001222275A/en
Application granted granted Critical
Publication of JP3545304B2 publication Critical patent/JP3545304B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)

Description

【発明の属する技術分野】
この発明は、画像マッピング方法に関する。
【従来の技術】
従来の画像マッピング方法は、矩形領域で示されたマッピングされるソース画像の4つの頂点と、マッピングする四角形の4つの頂点を指定する方法で行われていた。また、マッピングする四角形の頂点でパラメータが決定されるアフィン変換により、ソース画像の画素の座標からマッピングする四角形の座標を算出していた。以下、図11を用いてその詳細について説明する。11aはマッピングする四角形、11bはマッピングされるソース画像である。ソース画像の頂点a,b,c,dはマッピングする四角形の頂点a’,b’,c’,d’にそれぞれ対応しており、aおよびa’をそれぞれの座標系の原点とする。ソース画像の幅と高さはcの座標(X,Y)で表されるのでそれぞれX,Yとなり、b’,c’,d’の座標はそれぞれ(Bx,By),(Cx,Cy),(Dx,Dy)である。これらのパラメーターからソース画像の画素の座標(x,y)に対して数1で表されるアフィン変換を行う事により、マッピングする四角形の画素の座標(x’,y’)を求めている。
【数1】

Figure 0003545304
【発明が解決しようとする課題】
しかしながら、以上の従来技術によれば、ソース画像の画素の座標からマッピングする四角形の座標を算出していたため、マッピングする画素数とマッピングされる画素数との大小関係により、マッピングする四角形内で、同じ画素に対して複数回のマッピングが行われたり、マッピングが行われない画素が発生してしまう場合があった。また、2D表示で擬似的に3D表示を実現する場合には、マッピングする四角形の各辺での直線性が保存されてしまうため、マッピングした画素が遠近法での失消点に対する直線とずれてしまい、不自然な画像となっていた。図12に8×8の桝目のソース画像をマッピングした例を示す。12aはX軸での分割間隔を均等にし、各消失点まで直線を引いた遠近法を表す図であり、12bは各辺での分割間隔を均等にし、対向する辺まで直線を引いた従来のマッピング方法を表す図である。
そこで、この発明は、マッピングする四角形内の座標から、マッピングされるソース画像の座標を算出する事と、遠近法での失消点に対する直線に沿った画素のマッピングを実現する事を課題とする。
【課題を解決するための手段】
以上の課題を解決するために、請求項1の発明は、X軸とY軸の座標系で構成される2次元空間内で、長方形または正方形の領域で示されたマッピングされるソース画像を、全ての内角が180度より小さい四角形に変形してマッピングする画像マッピングにおいて、ソース画像の4つの頂点の位置を指定する手段と、マッピングする座標系のX軸もしくはY軸上の2点A1、A2と、A1、A2とは同一軸上にはない任意の点A3を指定する手段と、A1、A2と同一軸上の2点B1、B2とB1、B2とは同一軸上にはない任意の点B3を指定する手段とを有し、A1、A2、A3からなる三角形Pもしくは、A1とA3からなる直線L1とL1と平行でA2を含む直線L2とで構成される平行線Qと、B1、B2、B3からなる三角形Rもしくは、B1とB3からなる直線L3とL3と平行でB2を含む直線L4とで構成される平行線Sもしくは、B1とB2からなる直線L5とL5と平行でB3を含む直線L6とで構成される平行線T、とを交差させることにより構成される四角形Uにソース画像をマッピングすることを特徴とし、四角形U内の画素の座標からマッピングされるソース画像の画素の座標を算出する画像マッピング方法である。
また、請求項2の発明は、請求項1記載の画像マッピング方法において、四角形Uを構成するために交差させる要素を三角形とした場合、指定する任意の点A3およびB3はそれぞれが頂点となる三角形内で、遠近法での失消点となるようにソース画像のマッピングを行うものである。
【発明の実施の形態】
以下に本発明の実施例を図1、図2、図3、図4、図5、図6、図7、図8、図9を用いて説明する。
図1は三角形Pと三角形Rを交差させて四角形Uを構成し、ソース画像を四角形Uにマッピングする様子を示した説明図である。1a はマッピングする四角形Uと指定する座標の関係を示し、1b はマッピングされるソース画像を示す。ソース画像の頂点a,b,c,d は四角形Uの頂点a’,b’,c’,d’にそれぞれ対応している。
図2は三角形Pと平行線Sを交差させて四角形Uを構成し、ソース画像を四角形Uにマッピングする様子を示した説明図である。2a はマッピングする四角形Uと指定する座標の関係を示し、2bはマッピングされるソース画像を示す。ソース画像の頂点a,b,c,d は四角形Uの頂点a’,b’,c’,d’にそれぞれ対応している。
図3は平行線Qと三角形Rを交差させて四角形Uを構成し、ソース画像を四角形Uにマッピングする様子を示した説明図である。3a はマッピングする四角形Uと指定する座標の関係を示し、3b はマッピングされるソース画像を示す。ソース画像の頂点a,b,c,d は四角形Uの頂点a’,b’,c’,d’にそれぞれ対応している。
図4は平行線Qと平行線Sを交差させて四角形Uを構成し、ソース画像を四角形Uにマッピングする様子を示した説明図である。4a はマッピングする四角形Uと指定する座標の関係を示し、4b はマッピングされるソース画像を示す。ソース画像の頂点a,b,c,d は四角形Uの頂点a’,b’,c’,d’にそれぞれ対応している。
図5は三角形Pと平行線Tを交差させて四角形Uを構成し、ソース画像を四角形Uにマッピングする様子を示した説明図である。5a はマッピングする四角形Uと指定する座標の関係を示し、5b はマッピングされるソース画像を示す。ソース画像の頂点a,b,c,d は四角形Uの頂点a’,b’,c’,d’にそれぞれ対応している。
図6は平行線Qと平行線Tを交差させて四角形Uを構成し、ソース画像を四角形Uにマッピングする様子を示した説明図である。6a はマッピングする四角形Uと指定する座標の関係を示し、6b はマッピングされるソース画像を示す。ソース画像の頂点a,b,c,d は四角形Uの頂点a’,b’,c’,d’にそれぞれ対応している。
図7は図1で示したマッピングの例における詳細な座標計算の様子を示した説明図である。
図8は図2で示したマッピングの例における詳細な座標計算の様子を示した説明図である。
図9は図5で示したマッピングの例における詳細な座標計算の様子を示した説明図である。
以下に、図7を用いて図1で示したマッピングの例の詳細な座標計算の様子を説明する。7b の(x,y)で示されるソース画像の画素の座標を7aの(x’.y’) にマッピングを行う場合には、X軸と平行で(x’.y’) を含むスキャンラインSL上での、直線A2−A3 との交点と直線A1−A3との交点との距離X’ 、直線A2−A3 との交点と(x’,y’)との距離px、直線B1−B3との交点と直線B2−B3との交点との距離Y’、直線B1−B3との交点と(x’,y’)との距離pyを数2、数3、数4、数5により求め、ソース画像のサイズであるX,Y とで数6に示す演算を行ってソース画像の画素の座標(x,y) を求めれば良い。
【数2】
Figure 0003545304
【数3】
Figure 0003545304
【数4】
Figure 0003545304
【数5】
Figure 0003545304
【数6】
Figure 0003545304
なお、数2、数3では0≦y’≦A3y 数4、数5では、0≦y’≦B3y 数6では、0≦Px≦X’、0≦Py≦Y’なので、乗除算部については線形補間演算が可能である。
さらに、以下に、図8を用いて図2で示したマッピングの例の詳細な座標計算の様子を説明する。8bの(x,y)で示されるソース画像の画素の座標を8aの(x’.y’)にマッピングを行う場合には、数2、数3、数5によりX’、px、pyを数7によりY’、を求め、ソース画像のサイズであるX,Yとで数6に示す演算を行ってソース画像の画素の座標(x,y)を求めれば良い。
【数7】
Figure 0003545304
さらに、以下に、図9を用いて図5で示したマッピングの例の詳細な座標計算の様子を説明する。9b の(x,y)で示されるソース画像の画素の座標を9aの(x’.y’) にマッピングを行う場合には、数2、数3によりX’、px 数8、数9によりY’、pyを求め、ソース画像のサイズであるX,Yとで数6に示す演算を行ってソース画像の画素の座標(x,y)を求めれば良い。なお、この時にB1x,B2x,B3xは演算には使用されない。
【数8】
Figure 0003545304
【数9】
Figure 0003545304
以上の様に、四角形Uを構成するために交差させる要素が三角形P、Rか平行線Q、Sか平行線Tかにより、X’、Y’およびpx、pyを求める演算を変更し、四角形Uの中の全ての画素の座標に上記の演算を行うことで、図1〜図6の全ての場合においてソース画像の画素の座標(x,y)を求める事が出来る。
「実施形態の効果」
この実施形態では、マッピングする四角形内の座標から、マッピングされるソース画像の座標を算出しているため、マッピングする画素数とマッピングされる画素数との大小関係に関わり無く、マッピングする四角形内で、同じ画素に対して複数回のマッピングが行われたり、マッピングが行われない画素が発生してしまう事は無い。
また、四角形Uを構成するために交差させる要素を三角形とした場合、指定する任意の点A3およびB3はそれぞれが頂点となる三角形内で、遠近法での失消点となるようにソース画像のマッピングが行われるので、2D表示で擬似的に3D表示を実現する場合には、マッピングした画素が遠近法での失消点に対する直線と一致し、自然な画像を得ることが出来る。
また、従来のマッピング方法に比べて乗算の演算回数が少なく、さらに、乗除算に関しても補間演算を用いる事が可能なのでマッピングのための演算量を減らすことが出来る。
「他の実施形態」
上記の実施形態では、A1,A2、B1、B2をX軸上に指定したが、これをY軸としてもよい。
また、A1とB1をパラメーターとして指定しているが、これをXY軸の原点(0,0)に固定して指定し、パラメーターを減らしてもよい。
また、マッピングされるソース画像の領域の辺はX軸もしくはY軸に平行としているが、斜めであったも良い。図10に辺がXY軸と45度の角度をなす正方形のソース画像の領域の例を示す。上記の実施形態で得られる10aに示す領域のソース画像の画素の座標(x,y)に数10の演算を行い(xr,yr)を新たなソース画像の画素の座標として用いることで10bに示すような領域が得られる。
【数10】
Figure 0003545304
【発明の効果】
以上説明したように、この発明によれば、マッピングする四角形内の座標から、マッピングされるソース画像の座標を算出しているため、マッピングする画素数とマッピングされる画素数との大小関係に関わり無く、マッピングする四角形内で、同じ画素に対して複数回のマッピングが行われたり、マッピングが行われない画素が発生してしまう事は無い。
また、四角形Uを構成するために交差させる要素を三角形とした場合、指定する任意の点A3およびB3はそれぞれが頂点となる三角形内で、遠近法での失消点となるようにソース画像のマッピングが行われるので、2D表示で擬似的に3D表示を実現する場合には、マッピングした画素が遠近法での失消点に対する直線と一致し、自然な画像を得ることが出来る。
また、従来のマッピング方法に比べて乗算の演算回数が少なく、さらに、乗除算に関しても補間演算を用いる事が可能なのでマッピングのための演算量を減らすことが出来る。
【図面の簡単な説明】
【図1】この発明の一実施形態の三角形Pと三角形Rが交差した場合の説明図である。
【図2】この発明の一実施形態の三角形Pと平行線Sが交差した場合の説明図である。
【図3】この発明の一実施形態の平行線Qと三角形Rが交差した場合の説明図である。
【図4】この発明の一実施形態の平行線Qと平行線Sが交差した場合の説明図である。
【図5】この発明の一実施形態の三角形Pと平行線Tが交差した場合の説明図である。
【図6】この発明の一実施形態の平行線Qと平行線Tが交差した場合の説明図である。
【図7】この発明の一実施形態の図1でのマッピングの詳細説明図である。
【図8】この発明の一実施形態の図2でのマッピングの詳細説明図である。
【図9】この発明の一実施形態の図5でのマッピングの詳細説明図である。
【図10】この発明の一実施形態のソース画像の領域の辺が斜めの場合の説明図である。
【図11】従来のマッピング方法を示す説明図である。
【図12】この発明の一実施形態と従来のマッピング方法との差を示す説明図である。
【符号の説明】
1a マッピングする四角形Uと指定する座標の関係
1b マッピングされるソース画像領域
2a マッピングする四角形Uと指定する座標の関係
2b マッピングされるソース画像領域
3a マッピングする四角形Uと指定する座標の関係
3b マッピングされるソース画像領域
4a マッピングする四角形Uと指定する座標の関係
4b マッピングされるソース画像領域
5a マッピングする四角形Uと指定する座標の関係
5b マッピングされるソース画像領域
6a マッピングする四角形Uと指定する座標の関係
6b マッピングされるソース画像領域
7a マッピングする四角形Uと指定する座標の関係の詳細
7b マッピングされるソース画像領域の詳細
8a マッピングする四角形Uと指定する座標の関係の詳細
8b マッピングされるソース画像領域の詳細
9a マッピングする四角形Uと指定する座標の関係の詳細
9b マッピングされるソース画像領域の詳細
10a 辺がXY軸に平行なマッピングされるソース画像領域
10b 辺がXY軸と45度の角度をなすマッピングされるソース画像領域
11a 従来のマッピング方法でのマッピングする四角形と指定する座標の関係
11b 従来のマッピング方法でのマッピングされるソース画像領域
12a 遠近法でのマッピング例
12b 従来のマッピング方法でのマッピング例TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image mapping method.
[Prior art]
The conventional image mapping method is performed by a method of designating four vertices of a source image to be mapped indicated by a rectangular area and four vertices of a quadrangle to be mapped. Further, the coordinates of the square to be mapped are calculated from the coordinates of the pixels of the source image by affine transformation in which parameters are determined at the vertices of the square to be mapped. Hereinafter, the details will be described with reference to FIG. 11a is a square to be mapped, and 11b is a source image to be mapped. The vertices a, b, c, and d of the source image correspond to the vertices a ', b', c ', and d' of the square to be mapped, respectively, and a and a 'are the origins of the respective coordinate systems. Since the width and height of the source image are represented by the coordinates (X, Y) of c, they become X and Y, respectively, and the coordinates of b ', c', and d 'are (Bx, By) and (Cx, Cy), respectively. , (Dx, Dy). From these parameters, the coordinates (x ′, y ′) of the square pixel to be mapped are obtained by performing the affine transformation represented by Equation 1 on the coordinates (x, y) of the pixels of the source image.
(Equation 1)
Figure 0003545304
[Problems to be solved by the invention]
However, according to the above prior art, since the coordinates of the square to be mapped are calculated from the coordinates of the pixels of the source image, the magnitude of the number of pixels to be mapped and the number of pixels to be mapped, within the square to be mapped, In some cases, mapping is performed a plurality of times for the same pixel, or pixels for which mapping is not performed may occur. Also, when pseudo 3D display is realized by 2D display, the linearity of each side of the square to be mapped is preserved, so that the mapped pixel is shifted from the straight line for the vanishing point in perspective. It was an unnatural image. FIG. 12 shows an example in which source images of 8 × 8 cells are mapped. 12a is a diagram showing a perspective in which the dividing interval on the X-axis is equalized and a straight line is drawn to each vanishing point, and 12b is a conventional one in which the dividing interval on each side is equalized and a straight line is drawn to the opposite side. It is a figure showing the mapping method.
Accordingly, an object of the present invention is to calculate coordinates of a source image to be mapped from coordinates in a rectangle to be mapped, and to realize mapping of pixels along a straight line to a vanishing point in perspective. .
[Means for Solving the Problems]
In order to solve the above problem, the invention according to claim 1 provides a method for mapping a source image mapped in a rectangular or square area in a two-dimensional space including a coordinate system of an X axis and a Y axis. In image mapping in which all interior angles are transformed into a quadrangle smaller than 180 degrees for mapping, means for designating the positions of four vertices of the source image, and two points A1 and A2 on the X axis or Y axis of the coordinate system to be mapped Means for specifying an arbitrary point A3 that is not on the same axis as A1 and A2, and two points B1 and B2 and B1 and B2 that are not on the same axis as A1 and A2 Means for designating a point B3, a parallel line Q comprising a triangle P comprising A1, A2, A3 or a straight line L1 comprising A1 and A3 and a straight line L2 parallel to L1 and comprising A2; , B2, B3 triangle Alternatively, it is constituted by a parallel line S composed of straight lines L3 and L3 consisting of B1 and B3 and a straight line L4 containing B2 and parallel to straight lines L5 and L5 consisting of B1 and B2 and a straight line L6 containing B3 and parallel to L5. An image mapping method for calculating a coordinate of a pixel of a source image to be mapped from a coordinate of a pixel in the rectangle U, wherein the source image is mapped to a rectangle U formed by intersecting a parallel line T It is.
According to a second aspect of the present invention, in the image mapping method according to the first aspect, when the elements to be intersected to form the quadrangle U are triangles, any specified points A3 and B3 are triangles each having a vertex. Within, the source image is mapped so as to be a vanishing point in perspective.
BEST MODE FOR CARRYING OUT THE INVENTION
An embodiment of the present invention will be described below with reference to FIGS. 1, 2, 3, 4, 5, 5, 6, 7, 8, and 9.
FIG. 1 is an explanatory diagram showing a state in which a triangle U is formed by intersecting a triangle P and a triangle R, and a source image is mapped to the square U. 1a shows the relationship between the quadrangle U to be mapped and the designated coordinates, and 1b shows the source image to be mapped. The vertices a, b, c, and d of the source image correspond to the vertices a ', b', c ', and d' of the square U, respectively.
FIG. 2 is an explanatory diagram showing a state in which a rectangle U is formed by intersecting a triangle P and a parallel line S, and a source image is mapped to the rectangle U. 2a shows the relationship between the quadrangle U to be mapped and the designated coordinates, and 2b shows the source image to be mapped. The vertices a, b, c, and d of the source image correspond to the vertices a ', b', c ', and d' of the square U, respectively.
FIG. 3 is an explanatory diagram showing a state in which a parallel line Q and a triangle R intersect to form a square U, and a source image is mapped onto the square U. 3a indicates the relationship between the quadrangle U to be mapped and the designated coordinates, and 3b indicates the source image to be mapped. The vertices a, b, c, and d of the source image correspond to the vertices a ', b', c ', and d' of the square U, respectively.
FIG. 4 is an explanatory diagram showing a state in which a parallel line Q and a parallel line S intersect to form a rectangle U, and a source image is mapped to the rectangle U. 4a shows the relationship between the rectangle U to be mapped and the designated coordinates, and 4b shows the source image to be mapped. The vertices a, b, c, and d of the source image correspond to the vertices a ', b', c ', and d' of the square U, respectively.
FIG. 5 is an explanatory diagram showing a state in which a rectangle U is formed by intersecting a triangle P and a parallel line T, and a source image is mapped to the rectangle U. 5a shows the relationship between the quadrangle U to be mapped and the designated coordinates, and 5b shows the source image to be mapped. The vertices a, b, c, and d of the source image correspond to the vertices a ', b', c ', and d' of the square U, respectively.
FIG. 6 is an explanatory diagram showing a state in which a parallel line Q and a parallel line T intersect to form a rectangle U, and a source image is mapped to the rectangle U. 6a shows the relationship between the quadrangle U to be mapped and the designated coordinates, and 6b shows the source image to be mapped. The vertices a, b, c, and d of the source image correspond to the vertices a ', b', c ', and d' of the square U, respectively.
FIG. 7 is an explanatory diagram showing a detailed coordinate calculation in the example of the mapping shown in FIG.
FIG. 8 is an explanatory diagram showing a detailed coordinate calculation in the example of the mapping shown in FIG.
FIG. 9 is an explanatory diagram showing a detailed coordinate calculation in the example of the mapping shown in FIG.
Hereinafter, a detailed coordinate calculation in the example of the mapping shown in FIG. 1 will be described with reference to FIG. When mapping the coordinates of the pixel of the source image indicated by (x, y) of 7b to (x'.y ') of 7a, a scan line parallel to the X axis and containing (x'.y') On the SL, the distance X 'between the intersection with the straight line A2-A3 and the intersection with the straight line A1-A3, the distance px between the intersection with the straight line A2-A3 and (x', y '), the straight line B1-B3 , And the distance py between the intersection with the straight line B1-B3 and (x ', y') is calculated by the formulas (2), (3), (4) and (5). The coordinates (x, y) of the pixels of the source image may be obtained by performing the operation shown in Equation 6 with X, Y, which is the size of the source image.
(Equation 2)
Figure 0003545304
[Equation 3]
Figure 0003545304
(Equation 4)
Figure 0003545304
(Equation 5)
Figure 0003545304
(Equation 6)
Figure 0003545304
In Equations 2 and 3, 0 ≦ y ′ ≦ A3y In Equations 4 and 5, 0 ≦ y ′ ≦ B3y In Equation 6, 0 ≦ Px ≦ X ′ and 0 ≦ Py ≦ Y ′. Can perform a linear interpolation operation.
Further, a detailed coordinate calculation in the example of the mapping shown in FIG. 2 will be described below with reference to FIG. When mapping the coordinates of the pixel of the source image represented by (x, y) of 8b to (x′.y ′) of 8a, X ′, px, py are calculated by Expressions 2, 3, and 5. The coordinates (x, y) of the pixels of the source image may be obtained by calculating Y ′ from Expression 7 and performing the operation shown in Expression 6 with X and Y, which are the sizes of the source image.
(Equation 7)
Figure 0003545304
Further, a detailed coordinate calculation in the example of the mapping shown in FIG. 5 will be described below with reference to FIG. When mapping the coordinates of the pixel of the source image indicated by (x, y) of 9b to (x′.y ′) of 9a, X ′ is calculated by Expressions 2 and 3, and X ′ is calculated by Expressions 8 and 9, The coordinates (x, y) of the pixels of the source image may be obtained by calculating Y ′, py and performing the operation shown in Expression 6 with X and Y, which are the sizes of the source image. At this time, B1x, B2x, and B3x are not used for calculation.
(Equation 8)
Figure 0003545304
(Equation 9)
Figure 0003545304
As described above, the calculation for obtaining X ′, Y ′ and px, py is changed depending on whether the elements to be intersected to form the quadrangle U are the triangles P, R or the parallel lines Q, S or the parallel lines T. By performing the above operation on the coordinates of all the pixels in U, the coordinates (x, y) of the pixels of the source image can be obtained in all the cases of FIGS.
"Effects of the embodiment"
In this embodiment, since the coordinates of the source image to be mapped are calculated from the coordinates in the rectangle to be mapped, regardless of the magnitude relationship between the number of pixels to be mapped and the number of pixels to be mapped, In addition, there is no possibility that mapping is performed a plurality of times on the same pixel or a pixel on which mapping is not performed occurs.
If the elements intersecting to form the quadrangle U are triangular, any specified points A3 and B3 are within the triangle having the vertices so that they become vanishing points in perspective in the source image. Since the mapping is performed, when the 3D display is simulated by the 2D display, the mapped pixels coincide with the straight line for the vanishing point in the perspective method, and a natural image can be obtained.
In addition, the number of multiplication operations is smaller than that of the conventional mapping method, and the interpolation operation can be used for multiplication and division, so that the amount of calculation for mapping can be reduced.
"Other embodiments"
In the above embodiment, A1, A2, B1, and B2 are designated on the X axis, but may be designated on the Y axis.
Although A1 and B1 are specified as parameters, they may be fixed at the origin (0, 0) of the XY axes and specified to reduce the parameters.
The side of the area of the source image to be mapped is parallel to the X axis or the Y axis, but may be oblique. FIG. 10 shows an example of a square source image area whose side forms an angle of 45 degrees with the XY axes. The coordinate (x, y) of the pixel of the source image in the region indicated by 10a obtained in the above embodiment is subjected to the operation of Expression 10 and (xr, yr) is used as the coordinate of the pixel of the new source image to obtain 10b. An area as shown is obtained.
(Equation 10)
Figure 0003545304
【The invention's effect】
As described above, according to the present invention, since the coordinates of the source image to be mapped are calculated from the coordinates in the rectangle to be mapped, there is no relation between the number of pixels to be mapped and the number of pixels to be mapped. In addition, there is no possibility that the same pixel is mapped a plurality of times within the square to be mapped, or that a pixel is not mapped.
If the elements intersecting to form the quadrangle U are triangular, any specified points A3 and B3 are within the triangle having the vertices so that they become vanishing points in perspective in the source image. Since the mapping is performed, when the 3D display is simulated by the 2D display, the mapped pixels coincide with the straight line for the vanishing point in the perspective method, and a natural image can be obtained.
In addition, the number of multiplication operations is smaller than that of the conventional mapping method, and the interpolation operation can be used for multiplication and division, so that the amount of calculation for mapping can be reduced.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram when a triangle P and a triangle R intersect according to an embodiment of the present invention.
FIG. 2 is an explanatory diagram of a case where a triangle P and a parallel line S intersect in one embodiment of the present invention.
FIG. 3 is an explanatory diagram of a case where a parallel line Q and a triangle R intersect according to one embodiment of the present invention;
FIG. 4 is an explanatory diagram when a parallel line Q and a parallel line S intersect in one embodiment of the present invention.
FIG. 5 is an explanatory diagram when a triangle P and a parallel line T intersect according to one embodiment of the present invention.
FIG. 6 is an explanatory diagram when a parallel line Q and a parallel line T intersect in one embodiment of the present invention.
FIG. 7 is a detailed explanatory diagram of the mapping in FIG. 1 according to the embodiment of the present invention;
FIG. 8 is a detailed explanatory diagram of the mapping in FIG. 2 according to the embodiment of the present invention;
FIG. 9 is a detailed explanatory diagram of the mapping in FIG. 5 according to the embodiment of the present invention;
FIG. 10 is an explanatory diagram of a case where a side of a region of a source image is oblique according to one embodiment of the present invention;
FIG. 11 is an explanatory diagram showing a conventional mapping method.
FIG. 12 is an explanatory diagram showing a difference between an embodiment of the present invention and a conventional mapping method.
[Explanation of symbols]
1a Relationship between rectangle U to be mapped and designated coordinates 1b Source image area 2a to be mapped Relationship between rectangle U and designated coordinates 2b Source image area to be mapped 3a Relationship between rectangle U to be mapped and designated coordinates 3b Source image area 4a Relationship between rectangle U to be mapped and specified coordinates 4b Source image area 5a to be mapped Relation between rectangle U to be specified and coordinates 5b Source image area 6a to be mapped Square U to be mapped and coordinates to be specified Relationship 6b Source image region 7a to be mapped 7a Details of the relationship between the rectangle U to be mapped and the coordinates to be specified 7b Details of the source image region to be mapped 8a Details of the relationship between the square U to be mapped and the coordinates to be specified 8b Source image region to be mapped Details 9a of the relationship between the rectangle U to be mapped and the coordinates to be specified 9b Details of the source image area to be mapped 10a The source image area 10b in which the sides are mapped parallel to the XY axes The sides have an angle of 45 degrees with the XY axes. Source image area 11a to be mapped Relationship between rectangle to be mapped and coordinates to be specified by conventional mapping method 11b Source image area 12a to be mapped by conventional mapping method Example 12b of perspective mapping 12b Conventional mapping method Mapping example

Claims (4)

X軸とY軸の座標系で構成される2次元空間内で、長方形または正方形の領域で示されたマッピングされるソース画像を、全ての内角が180度より小さい四角形に変形してマッピングする画像マッピングにおいて、ソース画像の4つの頂点の位置を指定する手段と、マッピングする座標系のX軸もしくはY軸上の2点A1、A2と、A1、A2とは同一軸上にはない任意の点A3を指定する手段と、A1、A2と同一軸上の2点B1、B2とB1、B2とは同一軸上にはない任意の点B3を指定する手段とを有し、A1、A2、A3からなる三角形Pと、B1、B2、B3からなる三角形Rとを交差させることにより構成される四角形Uにソース画像をマッピングし、ソース画像の画素の座標(x,y)を四角形U内の(x ’, y ) にマッピングを行う場合、X軸と平行で (x ’, y ) を含む直線SL上での、直線 A2-A3 との交点と直線 A1-A3 との交点との距離 X ’、直線 A2-A3 との交点と (x ,y ) との距離 px 、直線 B1-B3 との交点と直線 B2-B3 との交点との距離 Y ’、直線 B1-B3 との交点と (x ,y ) との距離 py を求め、距離 px とソース画像のx軸方向のサイズ X とを乗算し、乗算結果を距離 X ’で除算してソース画像のx座標を求め、距離 py とソース画像のy軸方向のサイズ Y とを乗算し、乗算結果を距離 Y ’で除算してソース画像のy座標を求め、四角形U内の画素の座標からマッピングされるソース画像の画素の座標を算出する画像マッピング方法。An image in which a mapped source image represented by a rectangular or square area is transformed into a quadrangle having all interior angles smaller than 180 degrees in a two-dimensional space composed of an X-axis and a Y-axis coordinate system. In mapping, means for specifying the positions of four vertices of the source image, two points A1, A2 on the X-axis or Y-axis of the coordinate system to be mapped, and arbitrary points not on the same axis as A1, A2 A1 has a means for designating A3 and means for designating an arbitrary point B3 which is not on the same axis as two points B1, B2 and B1, B2 on the same axis as A1, A2, A1, A2, A3 Is mapped to a quadrangle U formed by intersecting a triangle P composed of and a triangle R composed of B1, B2, and B3 , and coordinates (x, y) of pixels of the source image are represented by ( mappings x ', y' to) When performing grayed, in parallel to the X axis (x ', y') on the straight line SL including the distance between the intersection point of the intersection and the straight line A1-A3 of the straight line A2-A3 X ', straight A2-A3 and the intersection of the (x ', y') the distance Y between the intersection between the intersection and the straight line B2-B3 and the distance px, linear B1-B3 of 'the intersection of the straight line B1-B3 (x', y ') and determine the distance py of the distance px and multiplies the size X of the x-axis direction of the source image, the result of the multiplication distance X' is divided by seeking the x coordinate of the source image, the distance py source image An image that multiplies the size Y in the y-axis direction , divides the multiplication result by the distance Y ′ to obtain the y coordinate of the source image, and calculates the coordinates of the pixels of the source image mapped from the coordinates of the pixels in the rectangle U. Mapping method. X軸とY軸の座標系で構成される2次元空間内で、長方形または正方形の領域で示されたマッピングされるソース画像を、全ての内角が180度より小さい四角形に変形してマッピングする画像マッピングにおいて、ソース画像の4つの頂点の位置を指定する手段と、マッピングする座標系のX軸もしくはY軸上の2点A1、A2と、A1、A2とは同一軸上にはない任意の点A3を指定する手段と、A1、A2と同一軸上の2点B1、B2とB1、B2とは同一軸上にはない任意の点B3を指定する手段とを有し、A1とA3からなる直線L1とL1と平行でA2を含む直線L2とで構成される平行線Qと、B1とB3からなる直線L3とL3と平行でB2を含む直線L4とで構成される平行線Sとを交差させることにより構成される四角形Uにソース画像をマッピングし、ソース画像の画素の座標(x,y)を四角形U内の (x ’, y ) にマッピングを行う場合、X軸と平行で (x ’, y ) を含む直線SL上での、直線L1との交点と直線L2との交点との距離 X ’、直線L2との交点と (x ,y ) との距離 px 、直線L3との交点と直線L4との交点との距離 Y ’、直線L3との交点と (x ,y ) との距離 py を求め、距離 px とソース画像のx軸方向のサイズ X とを乗算し、乗算結果を距離 X ’で除算してソース画像のx座標を求め、距離 py とソース画像のy軸方向のサイズ Y とを乗算し、乗算結果を距離 Y ’で除算してソース画像のy座標を求め、四角形U内の画素の座標からマッピングされるソース画像の画素の座標を算出する画像マッピング方法 An image in which a mapped source image represented by a rectangular or square area is transformed into a quadrangle having all interior angles smaller than 180 degrees in a two-dimensional space composed of an X-axis and a Y-axis coordinate system. In mapping, means for specifying the positions of four vertices of the source image, two points A1, A2 on the X-axis or Y-axis of the coordinate system to be mapped, and arbitrary points not on the same axis as A1, A2 It has means for designating A3 and means for designating an arbitrary point B3 that is not on the same axis as two points B1, B2 and B1 on the same axis as A1 and A2, and is composed of A1 and A3. A parallel line Q composed of straight lines L1 and L1 and a straight line L2 including A2 intersects with a parallel line S composed of straight lines L3 composed of B1 and B3 and a straight line L4 parallel to L3 and including B2. A square composed by The source image is mapped to U, the coordinates (x, y) of the pixels of the source image in the square U (x ', y') when performing mapping, in parallel to the X axis (x ', y') On the included straight line SL, the distance X between the intersection with the straight line L1 and the intersection with the straight line L2 , the distance px between the intersection with the straight line L2 and (x , y ) , and the intersection with the straight line L3 and the straight line L4 'and the intersection of the straight line L3 (x' distance Y between the intersection of the, y ') determined the distance py between multiplies the size X of the distance px and the x-axis direction of the source image, the distance a multiplication result Divide by X 'to find the x coordinate of the source image , multiply the distance py by the size Y of the source image in the y-axis direction , divide the multiplication result by the distance Y ' to find the y coordinate of the source image, An image mapping method for calculating coordinates of pixels of a source image to be mapped from coordinates of pixels in U. 前記A1の座標位置<B1の座標位置、前記A2の座標値<A1の座標値、前記B1の座標値<B2の座標値の関係を有することを特徴とする請求項1または2記載の画像マッピング方法。3. The image mapping according to claim 1, wherein the coordinate position of A1 <the coordinate position of B1, the coordinate value of A2 <the coordinate value of A1, and the coordinate value of B1 <B2. Method. 角形Uを構成するために交差させる要素を三角形とした場合、指定する任意の点A3およびB3はそれぞれが頂点となる三角形内で、遠近法での失消点となるようにソース画像のマッピングを行うことを特徴とする請求項1から請求項3のいずれかに記載の画像マッピング方法When the element to be crossed in order to configure four rectangular U with triangular, with the triangle of each arbitrary point A3 and B3 to be specified is the apex, the mapping of the source image so that the loss vanishing point in perspective image mapping method according to any one of claims 3 to claim 1, wherein the line Ukoto.
JP2000030691A 2000-02-08 2000-02-08 Image mapping method Expired - Fee Related JP3545304B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000030691A JP3545304B2 (en) 2000-02-08 2000-02-08 Image mapping method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000030691A JP3545304B2 (en) 2000-02-08 2000-02-08 Image mapping method

Publications (2)

Publication Number Publication Date
JP2001222275A JP2001222275A (en) 2001-08-17
JP3545304B2 true JP3545304B2 (en) 2004-07-21

Family

ID=18555674

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000030691A Expired - Fee Related JP3545304B2 (en) 2000-02-08 2000-02-08 Image mapping method

Country Status (1)

Country Link
JP (1) JP3545304B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03198167A (en) * 1989-12-27 1991-08-29 Fuji Xerox Co Ltd Method and device for deforming two-dimensional bit map image
JP3517256B2 (en) * 1993-03-23 2004-04-12 大日本印刷株式会社 Image synthesis device

Also Published As

Publication number Publication date
JP2001222275A (en) 2001-08-17

Similar Documents

Publication Publication Date Title
KR101923562B1 (en) Method for efficient re-rendering objects to vary viewports and under varying rendering and rasterization parameters
CA2818362C (en) System and method for scaling vector-based graphic designs
Brosz et al. Single camera flexible projection
JP3744039B2 (en) Perspective drawing creation support method
JPH09330423A (en) Three-dimensional shape data transforming device
KR987001181A (en) Device and Method for Processing Image
EP2034445B1 (en) Method for drawing geometric shapes
JP3545304B2 (en) Image mapping method
JP4760550B2 (en) Image conversion apparatus and image conversion program
JPH07282292A (en) Texture mapping method and image processor
JP3090409B2 (en) Method and apparatus for designing three-dimensional shape using computer
JP4056118B2 (en) Image processing device
JPH11149566A (en) Three-dimensional cg plotting device for curved surface display
CN114359456B (en) Picture pasting method and device, electronic equipment and readable storage medium
JPH03198167A (en) Method and device for deforming two-dimensional bit map image
JPH07200876A (en) Three-dimensional image generating method
Kaneko et al. View interpolation with range data for navigation applications
JP4514943B2 (en) Image creating method and apparatus
JP4372282B2 (en) Parametric mapping apparatus and parametric mapping method
CN115457166A (en) Irregular round-corner polygon drawing method
JPH03278278A (en) Method for converting image
JPS63208985A (en) Image converting device
US5444831A (en) Developed product shape deciding method for a computer-aided design system
CN116245991A (en) Applique effect rendering method and device and electronic equipment
JPH08287286A (en) Plane image mapping method

Legal Events

Date Code Title Description
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: 20040330

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040407

R150 Certificate of patent or registration of utility model

Ref document number: 3545304

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20110416

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20120416

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20120416

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120416

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120416

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120416

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 9

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140416

Year of fee payment: 10

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees