JPH03175583A - Deforming method for two-dimensional bit map picture - Google Patents

Deforming method for two-dimensional bit map picture

Info

Publication number
JPH03175583A
JPH03175583A JP1314300A JP31430089A JPH03175583A JP H03175583 A JPH03175583 A JP H03175583A JP 1314300 A JP1314300 A JP 1314300A JP 31430089 A JP31430089 A JP 31430089A JP H03175583 A JPH03175583 A JP H03175583A
Authority
JP
Japan
Prior art keywords
image
picture
dimensional
processing
horizontal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1314300A
Other languages
Japanese (ja)
Inventor
Hiroaki Takagi
高城 宏明
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
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 filed Critical Fuji Xerox Co Ltd
Priority to JP1314300A priority Critical patent/JPH03175583A/en
Publication of JPH03175583A publication Critical patent/JPH03175583A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

PURPOSE:To easily obtain a three-dimensional picture looking like a cylindrical form by combining the processing, which continuously changes the picture element density of a uniform-density square two-dimensional bit map original picture in horizontal and vertical directions, and the processing which changes the rough form of the whole of this picture. CONSTITUTION:The picture element density of the rectangular two-dimensional bit map original picture in the horizontal direction is converted, and that in the vertical direction is converted, and the size of this picture is converted by independent longitudinal and transverse variable magnifications, and the size in the vertical direction is changed in the horizontal direction by positional difference, and the whole of the picture is shifted in the vertical direction along a curve, and the picture width in the horizontal direction is changed to form the picture into a trapezoid, thereby deforming the picture into a cylindrical form. Thus, the three-dimensional picture looking like a cylindrical form is easily obtained, and a plane picture can be stuck to the picture having the cylindrical form projected in a two-dimensional plane by the easy operation.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は二次元のビットマツプ画像の形状を変える画像
変形方法に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to an image transformation method for changing the shape of a two-dimensional bitmap image.

(従来の技術) 複数のオリジナル画像から新たな画像を作り出す場合に
は画像の合成作業が行われる。その作業において複数の
画像を不自然なく貼りあわせていくには、貼りつける側
の画像を貼りあわされる対象画像の形状に合うように変
形することが必要となるが、この機能の中で二次元ビッ
トマツプ画像内に写っている立体形状物に平面画像を不
自然なく貼りつけられるように変形したいとの要求があ
る。立体形状物といってもその形状には様々な種類のも
のが考えられ、きりがないが、その中でもパースや円筒
や球体等の基本的な形状に対して貼りつけられるように
変形したいとの要求が多い。
(Prior Art) When creating a new image from a plurality of original images, image compositing work is performed. In order to paste multiple images together without looking unnatural, it is necessary to transform the image to be pasted to match the shape of the target images to be pasted together. There is a demand for deformation so that a two-dimensional image can be pasted onto a three-dimensional object appearing in a bitmap image without any unnaturalness. There are many different shapes that can be considered as three-dimensional objects, but among them, there are those who want to transform them so that they can be pasted onto basic shapes such as perspective, cylinders, and spheres. There are many demands.

ここでは様々な立体形状の中で円筒形状を取り上げるこ
ととする。
Here, we will take up the cylindrical shape among various three-dimensional shapes.

さて、従来二次元ビットマツプの平面画像を立体形状と
なるように変形するものとして放送局等で使われている
特殊効果装置がある。この装置では二次元平面画像を三
次元空間内に立体的に、ここでは円筒状となるように配
置し、その後で透視変換する演算を行うことにより画像
を変形している。
Now, there is a special effect device used in broadcasting stations and the like that transforms a two-dimensional bitmap planar image into a three-dimensional shape. In this device, a two-dimensional planar image is arranged three-dimensionally in a three-dimensional space, in this case in a cylindrical shape, and then the image is transformed by performing a perspective transformation operation.

この変形方法によれば三次元情報を用いて画像を変形し
ているため正確な形状の円筒画像を得ることができる。
According to this deformation method, since the image is deformed using three-dimensional information, a cylindrical image with an accurate shape can be obtained.

この方法で貼りつける側の原画像の形状を二次元ビット
マツプ画像内に写っている円@画像の大きさや形状にあ
うようにするには次の操作を行うことになる。すなわち
三次元空間内で展開した円筒画像をその空間内で移動・
拡大/縮小・回転させて、変形対象画像と同形となるよ
うに視点から見たときの向きや大きさを調整する。とこ
ろがこの作業は三次元画像を扱うことになるので、二次
元平面内の立体対象画像の形にあわせるには、操作が大
変難しく、作業効率が悪くなるという問題があった。
In order to make the shape of the original image to be pasted match the size and shape of the circle @ image in the two-dimensional bitmap image using this method, the following operation is performed. In other words, a cylindrical image developed in three-dimensional space can be moved and
Enlarge/reduce/rotate the image to adjust its orientation and size when viewed from the viewpoint so that it has the same shape as the image to be transformed. However, since this work involves handling three-dimensional images, there is a problem in that it is very difficult to operate to match the shape of a three-dimensional object image in a two-dimensional plane, and the work efficiency is poor.

(発明が解決しようとする課題) 本発明は、上記した画像変形処理の作業性に関わる問題
を解決するために提案されたもので、平面画像を二次元
平面内に写っている円筒形状の画像に簡単な操作で貼り
つけられるように変形する手法を提供することを目的と
するものである。
(Problems to be Solved by the Invention) The present invention was proposed in order to solve the problems related to the workability of image deformation processing described above. The purpose of this project is to provide a method for transforming the image so that it can be pasted on the screen with a simple operation.

(ff!fflを解決するための手段)本発明は、矩形
状の二次元ビットマツプ原画像に対し、水平方向の画素
密度を変換する処理と、垂直方向の画素密度を変換する
処理と、画像の大きさを縦横独立変倍により変換する処
理と、垂直方向の大きさを水平方向の位置の違いにより
変更する処理と、曲線状に沿って画像全体を垂直方向に
シフトさせる処理と、水平方向の画像幅を変えて台形化
する処理との組み合せにより画像を円筒形状となるよう
に変形する二次元ビットマツプ画像の変形方法である。
(Means for solving ff!ffl) The present invention provides processing for converting the pixel density in the horizontal direction, processing for converting the pixel density in the vertical direction, and processing for converting the pixel density in the vertical direction for a rectangular two-dimensional bitmap original image. There is a process to convert the size by vertical and horizontal independent scaling, a process to change the vertical size by changing the horizontal position, a process to shift the entire image vertically along a curve, and a process to change the horizontal size. This is a method of transforming a two-dimensional bitmap image in which the image is transformed into a cylindrical shape by combining the process of changing the image width and making it into a trapezoid.

(作用) 第1図に示すように、本発明は、矩形状の二次元ビット
マツプ原llj像に対し、水平方向の画素密度を変換し
く第1図[ア])、垂直方向の画素密度を変換°シ([
イコ)、画像の大きさを縦横独立変倍により変換しく[
ウコ)、垂直方向の大きさを水平方向の位置の違いによ
り変更しく[工])、曲線状に沿って画像全体を垂直方
向にシフトさせ([オコ)、水平方向の画像幅を変えて
台形化する([力])ことにより画像を円筒形状となる
ように変形する。
(Function) As shown in FIG. 1, the present invention converts the pixel density in the horizontal direction and the pixel density in the vertical direction for a rectangular two-dimensional bitmap original image. °shi([
Convert the size of the image by vertical and horizontal independent scaling [
(Uko), change the vertical size according to the difference in horizontal position [Engine]), shift the entire image vertically along the curve ([Oko]), and change the horizontal image width to create a trapezoid. ([force]) to transform the image into a cylindrical shape.

本発明によれば、等密度の矩形二次元ビットマツプ原画
像に対し、水平および垂直の方向に画素密度を連続的に
変化させる処理と、画像全体の概形を変える処理とを組
み合せることにより、円筒形状(円錐形状を含む)らし
く見える立体的な画像を容易に得ることができる。従っ
て、平面画像を二次元平面内に写っている内時形状の画
像に簡単な操作で張り付けたりすることができるように
なる。
According to the present invention, by combining a process of continuously changing the pixel density in the horizontal and vertical directions and a process of changing the outline of the entire image on a rectangular two-dimensional bitmap original image of equal density, A three-dimensional image that looks like a cylinder (including a cone) can be easily obtained. Therefore, it becomes possible to paste a planar image onto an image of the internal shape shown in a two-dimensional plane with a simple operation.

(実施例) 本発明の一実施例を図面を参照しながら説明する。第2
図は変形処理前後の画像の例であり、第2rgJ(a)
は変形前の矩形である原画像、第2図(b)は貼りつけ
られる対象となる内溝形状の画像である。この第2図(
b)の画像の形状が最終的に変形させようとする形状で
ある。話をわかりやすくするために円筒画像の右半分側
のみを扱うこととする。第2図において、21,22,
23゜24は原画像の4隅の頂点P、Pz、Ps、P4
であり、25.2B、27.28は原画像の各頂点P1
.P8.P1.P、に対応する変形後の画像の4隅の頂
点Q、Q2.Q3.Q、である。これから第2図のよう
な変形を行う手法およびその演算法につ〜1て説明する
(Example) An example of the present invention will be described with reference to the drawings. Second
The figure shows an example of images before and after deformation processing, and the second rgJ(a)
is an original image which is a rectangle before deformation, and FIG. 2(b) is an image of an inner groove shape to be pasted. This second figure (
The shape of the image b) is the shape to be finally transformed. To make the discussion easier to understand, we will only deal with the right half of the cylindrical image. In Figure 2, 21, 22,
23°24 are the four corner vertices P, Pz, Ps, P4 of the original image
25.2B, 27.28 are each vertex P1 of the original image
.. P8. P1. The four corner vertices Q, Q2. of the transformed image corresponding to P, Q2. Q3. Q. The method of performing the transformation as shown in FIG. 2 and its calculation method will now be explained.

第2図(b)の変形対象画像に着目してみると、25の
点Q1は視点に一番近くにあり、その点から離れるに従
い、画素の大きさが少しずつ小さくなることがわかる。
If we pay attention to the image to be deformed in FIG. 2(b), we can see that the point Q1 of 25 is closest to the viewpoint, and the size of the pixel gradually decreases as we move away from that point.

この特徴を利用して等密度の画像に対して画素密度を連
続的に変化させて画素の大きさを変えて行くことにより
画像に立体感を与えることができる。次に第2図の(a
)と(b)を見比べると矩形四角形とLllILaを含
む四角形というように画像全体の概形が異なることが明
かにわかる。概形を変えれば画像内部の密度に不自然さ
が残ったとしても円筒の形状らしく見せることができる
。そこで今まで述べたように二次元の平面画像に対して
画素密度を変える処理と全体の概形を変える処理を組み
合せることにより立体らしく変形できるのではないかと
考えられる。
Utilizing this characteristic, it is possible to give an image a three-dimensional effect by continuously changing the pixel density and changing the pixel size for an image of equal density. Next, in Figure 2 (a
) and (b), it is clearly seen that the general shapes of the entire image are different, such as a rectangular square and a square containing LllILa. By changing the outline, the image can be made to look like a cylinder even if the density inside the image remains unnatural. Therefore, as mentioned above, it is thought that it is possible to transform a two-dimensional planar image into a 3D-like image by combining the process of changing the pixel density with the process of changing the overall outline.

ではその方法、すなわち三次元情報を用いずに二次元画
像のまま、立体らしく変形する本発明の方法の一例を説
明する。
Now, an example of the method of the present invention, that is, the method of the present invention that transforms a two-dimensional image to look like three-dimensional without using three-dimensional information, will be explained.

先はどの説明では円筒形状に変形するために画素密度を
変える処理と画像全体の概形を変える処理の二つを組み
合せると述べたが、実際にはそれぞれの処理はさらに単
純な処理の組み合せから構成される。第1図は第2図(
a)の原画像に対して幾つかの変形処理を一つずつ加え
ていき、第2図(b)の最終変形画像を得るまでの様子
を示したものである。その処理を、図の流れに沿って説
明する。
In the previous explanation, I said that in order to transform the image into a cylindrical shape, two processes are combined: changing the pixel density and changing the overall shape of the image, but in reality, each process is a combination of simpler processes. It consists of Figure 1 is similar to Figure 2 (
This figure shows how several deformation processes are applied one by one to the original image in a) until the final deformed image in FIG. 2B is obtained. The process will be explained along the flow of the figure.

第1図(a)は原画像であり、第2図(a)と同じもの
である。
FIG. 1(a) is the original image, which is the same as FIG. 2(a).

[ア] 初めに第1図(a)の原画像に対し水平方向の
画素密度を変える処理を行う。これは円筒画像の視点に
一番近い領域から軸回り方向の端部に向かうほど密度が
高くなることを表現するものである。第2図(b)でい
うと点Ql−Q2側ρ辺から点Q、〜Q4側の辺への軸
回り方向の密度変化を指す。この処理のための式を(1
)式?こ示す。
[A] First, processing to change the pixel density in the horizontal direction is performed on the original image shown in FIG. 1(a). This expresses that the density increases from the region closest to the viewpoint of the cylindrical image toward the end in the direction around the axis. In FIG. 2(b), it refers to the density change in the direction around the axis from the ρ side of the point Ql-Q2 to the side of the points Q to Q4. The formula for this process is (1
)formula? This is shown.

式中でx、yはこの処理を行う前の入力座標値で、X’
+ y+は処理を行った後の出力座標値である。
In the formula, x and y are the input coordinate values before this process, and X'
+y+ is the output coordinate value after processing.

以降の式についてもXy y* X’+ ’I’は各々
の処理に対して同じことを表すものとする。関数f、(
x)は水平方向の位置によって密度分布を変える関数で
、水平座標値に関わる三角関数式を用いている。この変
形により得られる画像を第1図(b)に示す。
Also in the following equations, Xy y* X'+'I' represents the same thing for each process. Function f, (
x) is a function that changes the density distribution depending on the horizontal position, and uses trigonometric expressions related to horizontal coordinate values. The image obtained by this modification is shown in FIG. 1(b).

x’=f+ (x) ly’=y      (1)[
イコ 2番目1こ垂直方向の画素密度を変える処理を行
う。これは円閤軸に沿う方向、第2図(b)でいうと点
Q、〜Q、側の辺から点Q2〜Q3側の辺の方に向かう
に連れて密度が高< 1することを表現するものである
。密度の変更法であるが、垂直方向について変倍率を連
続的に変化させながら画像を変倍させる0辺Q、Q、上
の垂直方向の画素の大きさは等倍のままとし、辺Q *
 Q 、上の同方向の大きさは辺Q1Q4上に比べてl
 QIXQ4X l /1QaxQsxlとなるように
処理する。この処理のための式を(2)式に示す。関数
f* (y)は垂直方向の位置によりその方向に対する
変倍率を変える関数で、計算式fx(y)Xyは垂直M
標値に係わる二次関数式である。この変形により得られ
る画像を第1図(C)に示す。
x'=f+ (x) ly'=y (1) [
Iko 2nd 1 Performs processing to change the pixel density in the vertical direction. This means that the density becomes higher < 1 in the direction along the circle axis, from the side of points Q, ~Q, in Figure 2 (b) toward the side of points Q2 ~ Q3. It is something to express. In this method of changing the density, the image is scaled while continuously changing the scaling factor in the vertical direction.The size of the pixels in the vertical direction above the 0 sides Q and Q remains the same size, and the size of the pixels in the vertical direction on the 0 side Q *
Q, the size of the top in the same direction is l compared to the side Q1Q4
Processing is performed so that QIXQ4X l /1QaxQsxl. The equation for this process is shown in equation (2). The function f*(y) is a function that changes the magnification in that direction depending on the vertical position, and the calculation formula fx(y)Xy is the vertical M
This is a quadratic function equation related to the target price. The image obtained by this modification is shown in FIG. 1(C).

y’= r2(y)Xy、x°=x     (2)[
つ] 33番に画像の大きさを変える処理を行う。これ
は先の[アコ、[イ]の処理を終えて大きさの変化した
画像全体の大きさを円筒形状の対象画像の大きさにあわ
せるためのもので、縦横独立変倍を用いる。変倍後の大
きさは、垂直方向がI Ql−Qawl 、水平方向が
I Ql−Ql−1となるようにする。この処理のため
の式を(3)式に示す。関数f、とf4は定数である。
y'= r2(y)Xy, x°=x (2) [
] Step 33: Perform processing to change the size of the image. This is to adjust the size of the entire image, which has changed in size after completing the processing in [A, B], to the size of the cylindrical target image, and uses vertical and horizontal independent scaling. The size after scaling is set to be IQl-Qawl in the vertical direction and IQl-Ql-1 in the horizontal direction. The equation for this process is shown in equation (3). The functions f and f4 are constants.

この変形により得られる画像を第1図(d)に示す。The image obtained by this transformation is shown in FIG. 1(d).

X’=fsXXx y’=f<xy   (3)3番目
となる[つ]の処理は単なる変倍であるが、以上までが
画素密度を変えるための処理である。
X'=fsXXx y'=f<xy (3) The third process is simply scaling, but the processes up to this point are for changing the pixel density.

続いて画像全体の概形を変えるための処理にうつる0円
筒形状である対象画像の上辺と下辺は曲線形であるので
ここではその効果を与える処理を行う。対象画像の下辺
の形状に着目して、下辺の曲線形状に沿って画像を全体
的にシフトさせる処理を行う。ところが対象画像の上辺
と下辺の形状は異なっている。具体的には2つの辺の水
平と垂直方向の長さが異なっているため、単純なシフト
処理だけでは不十分である。そこで2つの曲線の垂直方
向の高さをあわせるための処理から行う。
Next, processing is performed to change the general shape of the entire image.Since the upper and lower sides of the target image, which has a cylindrical shape, are curved, processing is performed here to give that effect. Focusing on the shape of the lower side of the target image, processing is performed to shift the entire image along the curved shape of the lower side. However, the shapes of the upper and lower sides of the target image are different. Specifically, since the horizontal and vertical lengths of the two sides are different, a simple shift process is insufficient. Therefore, processing is performed to match the heights of the two curves in the vertical direction.

[工] 4番目に水平方向の位置の違いにより異なる値
をもつ垂直方向の変倍率を用いて垂直方向に変倍する。
[Engineer] Fourth, the magnification is changed in the vertical direction using a vertical magnification ratio that has a different value depending on the horizontal position.

つまり垂直方向の長さを水平方向の位置の違いにより変
更する。この処理のための式を(4)式に示す。関v!
If aは水平方向の軸輪をQl−Ql−1とし、垂直
方向の軸輻をI(!Q+−Q*yl −l QswQa
v l ) lとする楕円式を含む式である。この式で
値(I Ql−Qawl −l Qs−Qa−1)が正
のときは楕円形の上半分、負のときは下半分を用いるこ
とにする。この変形により得られる画像を第1図(e)
に示す。
In other words, the vertical length is changed depending on the horizontal position. The equation for this process is shown in equation (4). Seki v!
If a, the horizontal axis is Ql-Ql-1, and the vertical axis is I(!Q+-Q*yl-l QswQa
v l ) This is an equation including an elliptic equation with l. In this equation, when the value (I Ql-Qawl -l Qs-Qa-1) is positive, the upper half of the ellipse is used, and when it is negative, the lower half is used. The image obtained by this transformation is shown in Figure 1(e).
Shown below.

y’=fs(x+y)Xy+  x’=x  (4)[
オコ 5番目に円筒対象画像の下辺と同じ曲線形に沿っ
て全体的にシフトさせる。この処理のための式を(5)
式に示す。関数f、は水平方向の軸輪をI Ql、Ql
、 lとし、垂直方向の軸輪をQl、Ql、lとする楕
円式である。この変形により得られる画像を第1図(f
)に示す。
y'=fs(x+y)Xy+ x'=x (4) [
Oko Fifth, shift the entire image along the same curved line as the bottom edge of the cylindrical target image. The formula for this process is (5)
As shown in the formula. The function f is the horizontal axis I Ql, Ql
, l, and the vertical axis wheels are Ql, Ql, l. The image obtained by this transformation is shown in Figure 1 (f
).

y’= fs (x+ y) +y+ x’=x   
 (5)[力] 6番目に垂直方向の位置の違いによっ
て倍率を変えて水平方向に変倍する。つまり水平方向の
画像の幅を変えていく処理、すむわち台形化する処理を
加える。この処理のための式を(6)式に示す。関数f
、は台形化のための式でxyを含む二次関数式である。
y'= fs (x+ y) +y+ x'=x
(5) [Force] Sixth, change the magnification depending on the difference in vertical position and change the magnification in the horizontal direction. In other words, a process is added to change the width of the image in the horizontal direction, thus making it trapezoidal. The equation for this process is shown in equation (6). function f
, is an equation for trapezoidization and is a quadratic function equation including xy.

この変形により得られる画像は第1図(g)に示すもの
で、最終的に得られる第2図(b)と同じ画像である。
The image obtained by this transformation is shown in FIG. 1(g), and is the same as the finally obtained image in FIG. 2(b).

y’=fv (X、y)+:/+ y”=y  (8)
以上のように大きくは画素密度を変える処理と画像全体
の概形を変える処理との組み合せで最終的な円筒形状の
画像が得られる。細かくは1次元方向の単純な処理の組
み合せを利用している。実際の処理では細かい処理を1
つずつ行って少しずつ変形した画像を得るのではなく、
1度で変形画像を得る。
y'=fv (X, y)+:/+ y''=y (8)
As described above, a final cylindrical image can be obtained by combining the process of changing the pixel density and the process of changing the general shape of the entire image. Specifically, a combination of simple processing in one-dimensional direction is used. In actual processing, detailed processing is carried out 1
Rather than going one step at a time and getting a slightly deformed image,
Obtain a deformed image in one go.

以上に詳述した本発明の実施例の方法を実行するための
ハードウェア構成の一例について説明する。
An example of a hardware configuration for executing the method of the embodiment of the present invention detailed above will be described.

第31!Iはそのハードウェア構成を示すもので、同図
において、31は計算機、32は中央演算処理装置、3
3は画像変形処理部、34は画像メモリ、35は入力装
置、36はデイスプレィ、37はスキャナ、38はプリ
ンタ、39はバスである。
31st! I indicates its hardware configuration, and in the figure, 31 is a computer, 32 is a central processing unit, and 3 is a computer.
3 is an image transformation processing unit, 34 is an image memory, 35 is an input device, 36 is a display, 37 is a scanner, 38 is a printer, and 39 is a bus.

入力装置35は計算機に命令等を与えるためのものであ
る。デイスプレィ36は画像を出力表示するものである
。スキャナ37は画像を入力するもので、プリンタ38
は画像出力するものである。
The input device 35 is for giving commands etc. to the computer. The display 36 outputs and displays images. The scanner 37 is for inputting images, and the printer 38
outputs an image.

パス39は画像データや制御情報を受渡しする役割を果
たす。画像メモリ34は画像データを記憶するものであ
り、中央演算処理袋+132は画像処理装置全体の制御
や一般的な演算を行うものである。
The path 39 serves to transfer image data and control information. The image memory 34 stores image data, and the central processing module 132 controls the entire image processing apparatus and performs general calculations.

画像変形処理部33は本発明の特徴とするところの画像
変形のための処理を行うもので、変形処理部は第4図に
示すように、変形前後の4頂点座標を初期値として取り
込む変形初期値入力部41と、入力された初期値より変
形関数式の逆写像関数を求める逆写像計算部42と、逆
写像関数を用いてトレースされる変形後の画像領域の座
標値から原画像上の座標値を計算する逆写像座標計算部
43と、計算された座標値から補間演算により変形後の
画像上の新画素値を計算する補間処理部44と、画素値
の書き込みと読み込みを行う画素入出力制御部45から
構成されている。46は変形前後の画像データが記憶さ
れている画像メモリである。
The image deformation processing section 33 performs processing for image deformation, which is a feature of the present invention.As shown in FIG. A value input section 41, an inverse mapping calculation section 42 that calculates an inverse mapping function of the deformation function formula from the input initial value, and a An inverse mapping coordinate calculation unit 43 that calculates coordinate values, an interpolation processing unit 44 that calculates new pixel values on the transformed image from the calculated coordinate values by interpolation, and a pixel input unit that writes and reads pixel values. It is composed of an output control section 45. 46 is an image memory in which image data before and after transformation is stored.

以上の構成において、画素値の読みだしから座標計算等
をへて書き込みまでを行う全体的な処理フローについて
説明する。第5図に計算手順の処理フローを示す。
In the above configuration, the overall processing flow from reading out pixel values to performing coordinate calculations and writing will be described. FIG. 5 shows the processing flow of the calculation procedure.

■ 変形初期値入力部41により初期値となる変形前後
の画像の4隅の頂点の座標値を入力する。
(2) The coordinate values of the vertices of the four corners of the image before and after transformation, which will be the initial values, are input using the transformation initial value input section 41.

■ 逆写像関数計算部42において、まず初期値として
入力された座標値より変形座標関数を求める。初期値は
4頂点座標値のみであり、座標関数は細かく分けると前
記(1)〜(6)式の6種類の式から成るが、各計算式
の計数は一意に決る。
(2) In the inverse mapping function calculating section 42, a deformed coordinate function is first calculated from the coordinate values input as initial values. The initial values are only the coordinate values of the four vertices, and the coordinate function is divided into six types of equations (1) to (6) described above, but the count of each calculation equation is uniquely determined.

次に、この座標関数のそれぞれの計算式について逆写像
関数式を求める。前述のように順座標関数式は一次関数
、二次関数、三角関数による0*な式であるため逆写像
関数式は求まる。
Next, an inverse mapping function formula is determined for each calculation formula of this coordinate function. As mentioned above, since the forward coordinate function formula is a 0* formula using linear functions, quadratic functions, and trigonometric functions, the inverse mapping function formula can be found.

■ 逆写像座標計算部13では、まず、変形後画像の領
域のトレースを開始する。
(2) The inverse mapping coordinate calculation unit 13 first starts tracing the area of the transformed image.

■ 次に、逆写像座標計算部43は、変形後画像領域の
トレースした座標値を用いて逆写像関数により原画像上
の座標値を計算する。
(2) Next, the inverse mapping coordinate calculation unit 43 calculates coordinate values on the original image by an inverse mapping function using the traced coordinate values of the transformed image area.

■ 補間処理部44では、まず、ステップ■で求めた座
標値の近傍にある複数の画素値を読み出す。
(2) The interpolation processing unit 44 first reads out a plurality of pixel values in the vicinity of the coordinate values determined in step (2).

■ 次に、補間処理部44は、読み出した画素値を基に
補間処理を行い新たな画素値を計算する。
(2) Next, the interpolation processing unit 44 performs interpolation processing based on the read pixel values to calculate new pixel values.

補間の方式は要求される画質や処理速度に応じて適切な
ものを選択すればよい。例えば算出された座標値の周囲
の4点にある画素値を用いる4点線形補間などが一例と
してあげられる。
An appropriate interpolation method may be selected depending on the required image quality and processing speed. For example, four-point linear interpolation using pixel values at four points around the calculated coordinate value is given as an example.

■ 画素入出力制御部45は、補間処理部45で求めた
新画素値を、画像メモリ46内のトレースした変形画像
領域の座標位置に書き込む。
(2) The pixel input/output control unit 45 writes the new pixel value obtained by the interpolation processing unit 45 to the coordinate position of the traced deformed image area in the image memory 46.

■ 変形後の画像領域内のトレースが終了したか否かを
判定する。Yesの場合には処理を終了し、Noの場合
にはステップ■に戻る。
(2) Determine whether tracing in the image area after deformation has been completed. If Yes, the process ends; if No, the process returns to step (2).

この処理フローでは変形座標関数の逆写像関数式を用い
て変形後面像領域をトレースして座標計算する例を示し
たが、必ずしもこの方法によらなくてもよい。例えば、
特殊効果装置で行っている方法のように、原画像領域を
小平面パッチに分割し、各パッチの頂点座標値に対して
順変形座標関数にて変形画像上の座標値を計算し、変形
後のパッチから再び逆写像関数式により原画像上の座標
値を求めて補間処理を行ってもよい。ここでは゛その方
法の説明は省略する。
Although this processing flow shows an example in which the coordinates are calculated by tracing the deformed image area using the inverse mapping function expression of the deformed coordinate function, this method is not necessarily required. for example,
Similar to the method used in special effects equipment, the original image area is divided into small plane patches, and the coordinate values on the deformed image are calculated using a forward deformation coordinate function for the vertex coordinate values of each patch. The interpolation process may be performed by calculating the coordinate values on the original image from the patch again using the inverse mapping function formula. The explanation of the method will be omitted here.

上記実施例では変形対象となる画像の形状を円筒形状と
したが、本発明は円錐形状に適用することも可能である
。円錐形状への変形処理方法は前記(1)〜(6)式の
うち最後の台形化する(6)式を三角形化するものに変
更するだけであり、計算式としては係数が変るだけであ
る。
In the above embodiment, the shape of the image to be deformed is cylindrical, but the present invention can also be applied to a conical shape. The processing method for deformation into a conical shape is simply to change the last of the equations (1) to (6) above, formula (6) for trapezoidalization, to one for triangularization, and the only difference in the calculation formula is the coefficients. .

(発明の効果) 以上に詳述したように、本発明によれば、等密度の矩形
二次元ビットマツプ原画像に対し、水平および垂直の方
向に画素密度を連続的に変化させる処理と、画像全体の
概形を変える処理とを組み合せることにより、円筒形状
(円錐形状を含む〉らしく見える立体的な画像を容易に
得ることができる。従って、平面画像を二次元平面内に
写っている円筒形状の画像に簡単な操作で張り付けたり
することができるようになる。
(Effects of the Invention) As described in detail above, according to the present invention, processing for continuously changing the pixel density in the horizontal and vertical directions for a rectangular two-dimensional bitmap original image of equal density, and By combining this with processing that changes the outline of You will be able to paste images into images with simple operations.

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

第1図(a)〜(g)は、原画像である平面画像から最
終的な円筒形状画像を得るまでの本発明による変形過程
の様子を示す図である。 第2図(a)(b)は、平面画像から円筒形状画像への
変形処理前後の画像の例を示す図である。 第3図は本発明を実施するためのハードウェア構成の一
例を示す図である。 第4図は、画像変形処理部の構成を示すブロック図であ
る。 第5図は、画素値の読み出しから座標計算等をへて書き
込みまでを行う全体的な計算手順の処理フローである。 41・・・変形初期値入力部、42・・・逆写像関数計
算部、43・・・逆写像座標計算部、44・・・補間処
理部、45・・・画素入出力制御部、46・・・画像メ
モリ。
FIGS. 1(a) to 1(g) are diagrams showing the deformation process according to the present invention from a planar image, which is an original image, to obtaining a final cylindrical image. FIGS. 2(a) and 2(b) are diagrams showing examples of images before and after transformation processing from a planar image to a cylindrical image. FIG. 3 is a diagram showing an example of a hardware configuration for implementing the present invention. FIG. 4 is a block diagram showing the configuration of the image transformation processing section. FIG. 5 is a processing flow of the overall calculation procedure from reading out pixel values to calculating coordinates and writing. 41... Deformation initial value input section, 42... Inverse mapping function calculation section, 43... Inverse mapping coordinate calculation section, 44... Interpolation processing section, 45... Pixel input/output control section, 46. ...Image memory.

Claims (1)

【特許請求の範囲】[Claims] 矩形状の二次元ビットマップ原画像に対し、水平方向の
画素密度を変換する処理と、垂直方向の画素密度を変換
する処理と、画像の大きさを縦横独立変倍により変換す
る処理と、垂直方向の大きさを水平方向の位置の違いに
より変更する処理と、曲線状に沿って画像全体を垂直方
向にシフトさせる処理と、水平方向の画像幅を変えて台
形化する処理との組み合せにより画像を円筒形状となる
ように変形することを特徴とする二次元ビットマップ画
像の変形方法。
For a rectangular two-dimensional bitmap original image, there is a process to convert the pixel density in the horizontal direction, a process to convert the pixel density in the vertical direction, a process to convert the image size by vertical and horizontal independent scaling, and a process to convert the pixel density in the vertical direction. The image is created by a combination of processing that changes the size of the image depending on the difference in horizontal position, processing that shifts the entire image vertically along a curve, and processing that changes the horizontal image width to create a trapezoid. A method of transforming a two-dimensional bitmap image, the method comprising transforming a two-dimensional bitmap image into a cylindrical shape.
JP1314300A 1989-12-05 1989-12-05 Deforming method for two-dimensional bit map picture Pending JPH03175583A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1314300A JPH03175583A (en) 1989-12-05 1989-12-05 Deforming method for two-dimensional bit map picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1314300A JPH03175583A (en) 1989-12-05 1989-12-05 Deforming method for two-dimensional bit map picture

Publications (1)

Publication Number Publication Date
JPH03175583A true JPH03175583A (en) 1991-07-30

Family

ID=18051701

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1314300A Pending JPH03175583A (en) 1989-12-05 1989-12-05 Deforming method for two-dimensional bit map picture

Country Status (1)

Country Link
JP (1) JPH03175583A (en)

Similar Documents

Publication Publication Date Title
US7414636B2 (en) Rendering apparatus, rendering processing method and computer program product
USRE44348E1 (en) Detail-in-context terrain displacement algorithm with optimizations
EP0437074B1 (en) Special effects using polar image coordinates
JPWO2003001458A1 (en) Information processing equipment
CN105128539A (en) Optical projection laser marking method and laser marking system
CN112767486B (en) Monocular 6D attitude estimation method and device based on deep convolutional neural network
CN112102489A (en) Navigation interface display method and device, computing equipment and storage medium
KR101552827B1 (en) Method Of Dividing Three-dimensional Object Model
JPH08123969A (en) Mapping device
CN113808272A (en) Texture mapping method in three-dimensional virtual human head and face modeling
JP2837584B2 (en) How to create terrain data
JPH03175583A (en) Deforming method for two-dimensional bit map picture
WO2004053741A1 (en) Method of calculating intersecions between triangle and line segment and progam therefor
JP2976512B2 (en) 2D image transformation device
JPH11149566A (en) Three-dimensional cg plotting device for curved surface display
Brosz et al. Shape defined panoramas
JP4925112B2 (en) Free viewpoint image generation method
JPH03198167A (en) Method and device for deforming two-dimensional bit map image
JP3071495B2 (en) Object model editing device
CN116245736B (en) Orthogonal position coding representation method of image block and up-sampling module implementation method
JP5371596B2 (en) Information processing apparatus, information processing method, and program
JP2000207576A (en) Method and device for processing image and recording medium recording image processing program
JPH0433069A (en) Deforming device for two-dimensional picture
JPH04167077A (en) Deformation device for two-dimensional raster image
JPH07320088A (en) Image generation device