JP2000057377A - Image processor, image processing method and medium - Google Patents

Image processor, image processing method and medium

Info

Publication number
JP2000057377A
JP2000057377A JP11146796A JP14679699A JP2000057377A JP 2000057377 A JP2000057377 A JP 2000057377A JP 11146796 A JP11146796 A JP 11146796A JP 14679699 A JP14679699 A JP 14679699A JP 2000057377 A JP2000057377 A JP 2000057377A
Authority
JP
Japan
Prior art keywords
image
dimensional
point
dimensional object
buffer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP11146796A
Other languages
Japanese (ja)
Inventor
Takushi Totsuka
卓志 戸塚
Rui Yamada
類 山田
Mitsuharu Oki
光晴 大木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP11146796A priority Critical patent/JP2000057377A/en
Publication of JP2000057377A publication Critical patent/JP2000057377A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To easily perform three-dimensional editing, etc., to a two-dimensional image. SOLUTION: In the case that the two-dimensional image (Fig. (A)) on which a three-dimensional object to simulate a house is displayed is stored in a noticing buffer, for example, when four vertexes of a grid wall are specified as feature points together with shape information that the shape of the wall is rectangular by a user, a developed image (Fig. (B)) formed by developing the grid wall on a two-dimensional plane is generated and stored in a paste buffer based on the shape information and the feature points. A two-dimensional image (Fig. (C)) of a cylinder is stored in the noticing buffer and when a specified point on the side of the cylinder is specified as the feature point together with the shape information that the two-dimensional image is the side of the cylinder by the user, the image (Fig. (B)) stored in the paste buffer is pasted on the side of the cylinder in the noticing buffer (Fig. (D)), based on the shape information and the feature point.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像処理装置およ
び画像処理方法、並びに媒体に関し、特に、例えば、2
次元画像に表示された3次元物体に対して、容易に、3
次元的な編集等を施すことができるようにする画像処理
装置および画像処理方法、並びに媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus, an image processing method, and a medium.
For 3D objects displayed in 3D images,
The present invention relates to an image processing apparatus, an image processing method, and a medium that enable dimensional editing and the like to be performed.

【0002】[0002]

【従来の技術】従来より、2次元画像に対して、各種の
処理を施し、また、その処理を施すために必要な情報
を、2次元画像から抽出する様々な方法が提案されてい
る。かかる方法が記載された文献としては、例えば、Ja
mes D.Foley, Andries van Dam,Steven K.Feiner, John
F.Hughes, "Computer Graphics, principles and prac
tice", ADDISON-WESLEY PUBLISHING COMPANY, 1996(以
下、文献1という)、Paul E.Debevec, Camillo J.Tayl
or, Jitendra Malik, "Modeling and Rendering Archit
ecture from Photographs: A hybrid geometry-and ima
ge-based approach", proceedings of SIGGRAPH 96, p
p.11-20(以下、文献2という)、Oliver Faugeras, "T
hree-dimensional computer version", The MIT press
(以下、文献3という)、Kenneth P.Fishkin, Brian
A.Barsky, "A Family of New Algorithms for Soft Fil
ling", proceedings of SIGGRAPH 84, pp235-244(以
下、文献4という)、Pat Hanrahan and Paul Haeberl
i, "Direct WYSIWYG Painting andTexuturing on 3D Sh
apes", proceedings of SIGGRAPH 90, pp.215-233(以
下、文献5という)、Youichi Horry, Ken-ichi Anjyo,
Kiyoshi Arai, "Tour Into the Picture: Using a Spi
dery Mesh Interface to Make Animation from a Singl
e Image", proceedings of SIGGRAPH 97, pp.255-232
(以下、文献6という)、Michael Gleicher, "Image S
napping", proceedings of SIGGRAPH 95, pp.183-190
(以下、文献7という)などがある。
2. Description of the Related Art Hitherto, various methods have been proposed for performing various processes on a two-dimensional image and extracting information necessary for performing the process from the two-dimensional image. Documents describing such a method include, for example, Ja
mes D. Foley, Andries van Dam, Steven K. Feiner, John
F. Hughes, "Computer Graphics, principles and prac
tice ", ADDISON-WESLEY PUBLISHING COMPANY, 1996 (hereinafter referred to as Reference 1), Paul E. Debevec, Camillo J. Tayl
or, Jitendra Malik, "Modeling and Rendering Archit
ecture from Photographs: A hybrid geometry-and ima
ge-based approach ", proceedings of SIGGRAPH 96, p
p.11-20 (hereinafter referred to as reference 2), Oliver Faugeras, "T
hree-dimensional computer version ", The MIT press
(Hereinafter referred to as Reference 3), Kenneth P. Fishkin, Brian
A. Barsky, "A Family of New Algorithms for Soft Fil
ling ", proceedings of SIGGRAPH 84, pp235-244 (hereinafter referred to as reference 4), Pat Hanrahan and Paul Haeberl
i, "Direct WYSIWYG Painting and Texuturing on 3D Sh
apes ", proceedings of SIGGRAPH 90, pp.215-233 (hereinafter referred to as Reference 5), Youichi Horry, Ken-ichi Anjyo,
Kiyoshi Arai, "Tour Into the Picture: Using a Spi
dery Mesh Interface to Make Animation from a Singl
e Image ", proceedings of SIGGRAPH 97, pp.255-232
(Hereinafter referred to as Reference 6), Michael Gleicher, "Image S
napping ", proceedings of SIGGRAPH 95, pp.183-190
(Hereinafter referred to as Reference 7).

【0003】文献1には、デザイナなどが、絵筆やエア
ブラシ(絵の具を粉末状にして紙に飛ばして絵を描く技
術)を用いて、紙に絵を描くのと同様の作業をコンピュ
ータに行わせる、2D(2次元)ペイントと呼ばれる画
像処理技術が記載されている。
[0003] In Document 1, a designer or the like causes a computer to perform the same work as drawing a picture on paper using a paintbrush or an airbrush (a technique of drawing a paint into powder and flying it on paper). An image processing technique called 2D (two-dimensional) paint is described.

【0004】しかしながら、従来の2Dペイントでは、
画像に3次元物体が表示されている場合でも、画像自体
が2次元の平面で取り扱われるため、そのような2次元
画像に表示された3次元物体の3次元空間における向き
等を考慮せずに、文字を描画したり、また、図形を追加
すると、画像が不自然なものとなる。
However, in the conventional 2D paint,
Even when a three-dimensional object is displayed in an image, the image itself is handled in a two-dimensional plane, and therefore, the orientation of the three-dimensional object displayed in such a two-dimensional image in a three-dimensional space is not considered. If a character is drawn or a figure is added, the image becomes unnatural.

【0005】即ち、例えば、図1(A)に示すような、
家屋を模した3次元物体が、2次元画像に表示されてい
る場合において、家屋の壁の部分に、その向きを考慮せ
ずに、文字を描いたときには、図1(B)に示すよう
に、文字は、壁に描かれているようにはならない。ま
た、家屋の壁の部分に、直方体形状の部屋を追加しよう
として、長方形を描いても、その向きを考慮せずに、長
方形を描いたのでは、図1(C)に示すように、画像は
不自然なものとなる。さらに、例えば、図2(A)に示
すように、円柱が、2次元画像に表示されている場合に
おいて、その側面に文字を描いても、その側面の向きを
無視したのでは、図2(B)に示すように、文字は、円
柱の側面に描かれているようにはならない。
That is, for example, as shown in FIG.
When a three-dimensional object imitating a house is displayed in a two-dimensional image and characters are drawn on the wall of the house without considering its orientation, as shown in FIG. , The letters do not look like they are drawn on the wall. In addition, even if a rectangle is drawn to add a rectangular parallelepiped room to the wall of a house, if the rectangle is drawn without considering its orientation, as shown in FIG. Becomes unnatural. Further, for example, as shown in FIG. 2A, when a cylinder is displayed in a two-dimensional image, even if a character is drawn on the side surface, the orientation of the side surface is ignored. As shown in B), the characters do not become drawn on the side of the cylinder.

【0006】従って、2Dペイントを行う場合におい
て、画像を不自然なものとしないようにするには、2次
元画像に表示された3次元物体の向きにあわせて、文字
や図形を変形しながら、その描画を行う必要があるが、
そのような描画のための操作を行うには、ある程度の熟
練を要する。
Therefore, in order to prevent the image from being unnatural when performing 2D painting, characters and figures are deformed according to the orientation of the three-dimensional object displayed in the two-dimensional image. You need to do that drawing,
Performing such an operation for drawing requires some skill.

【0007】そこで、ユーザに、2次元画像に表示され
た3次元物体の傾き角などを、テンキーやGUI(Grap
hic User Interface)などを用いて入力してもらい、コ
ンピュータにおいて、その入力に基づいて、新たに描画
する文字や図形を変形する方法がある。しかしながら、
この方法では、ユーザが、描画結果を見ながら、それが
不自然なものにならないように、コンピュータに入力す
る3次元物体の傾き角を調整する必要があり、その調整
には、やはり、ある程度の熟練を要する。
[0007] Therefore, the user can input the tilt angle and the like of the three-dimensional object displayed on the two-dimensional image using a numeric keypad or a GUI (Graph).
There is a method in which a character or a figure to be newly drawn is deformed based on the input by having the input be performed using a hic user interface) or the like. However,
In this method, it is necessary for the user to adjust the tilt angle of the three-dimensional object input to the computer while viewing the drawing result so that the result does not become unnatural. Requires skill.

【0008】上述のように、ユーザが、2次元画像に表
示された3次元物体の向きを考慮せずに、文字や図形を
描画した場合に、コンピュータにおいて、その描画結果
を自然なものとすること、即ち、あたかも、その文字や
図形が存在する状態で撮影を行ったかのような描画結果
を得ることができないのは、2次元画像に表示された3
次元物体が、3次元空間上のどこに位置し、さらに、そ
の2次元画像が、どの位置から撮影を行うことにより得
られたものであるかに関する情報(2次元画像が絵画を
撮影したものである場合には、その絵画に表された風景
等を観察した位置)が欠落していることに起因する。
As described above, when a user draws a character or a figure without considering the orientation of a three-dimensional object displayed on a two-dimensional image, the computer makes the drawing result natural. That is, the fact that it is not possible to obtain a drawing result as if the photographing was performed in a state where the character or figure is present is due to the 3D image displayed on the 2D image.
Information on where the two-dimensional object is located in the three-dimensional space and from which position the two-dimensional image is obtained by photographing (the two-dimensional image is a picture of a painting In such a case, the position at which the landscape or the like shown in the painting is observed) is missing.

【0009】そこで、2次元画像から、そこに表示され
た3次元物体の3次元空間における位置およびその撮影
位置を、画像認識(Computer Vision)の技術を用いて
求める方法がある。
Therefore, there is a method of obtaining the position of the three-dimensional object displayed thereon in the three-dimensional space and the photographing position from the two-dimensional image by using an image recognition (Computer Vision) technique.

【0010】即ち、文献2では、複数枚の写真に撮影さ
れた建造物に、直方体などの3次元形状を、GUIを用
いて対応させ、その建造物のサイズおよび撮影位置を求
める方法が開示されている。また、文献3では、3次元
物体の位置およびその撮影位置を求めるための、その他
の各種の方法が開示されている。
That is, Document 2 discloses a method in which a three-dimensional shape such as a rectangular parallelepiped is made to correspond to a building photographed in a plurality of photographs by using a GUI, and the size and the photographing position of the building are obtained. ing. Reference 3 discloses various other methods for obtaining the position of a three-dimensional object and its shooting position.

【0011】しかしながら、このような画像認識の技術
を用いた3次元物体の位置およびその撮影位置の算出方
法は、三角測量の原理を利用している。従って、同一の
3次元物体を、複数の撮影位置から撮影した複数の画像
が必要となるが、2Dペイントを行う場合に、そのよう
な複数の画像を用意することができるとは限らないし、
さらに、2次元画像が絵画を撮影したものであるときに
は、上述のような複数の画像が存在しないのが一般的で
ある。
However, the method of calculating the position of a three-dimensional object and its photographing position using such an image recognition technique utilizes the principle of triangulation. Therefore, a plurality of images obtained by photographing the same three-dimensional object from a plurality of photographing positions are required. However, when performing 2D painting, it is not always possible to prepare such a plurality of images.
Furthermore, when the two-dimensional image is a picture of a painting, it is general that the plurality of images do not exist as described above.

【0012】また、同一の3次元物体を、複数の撮影位
置から撮影した複数の画像を用意することができる場合
であっても、コンピュータに、その複数の画像から、3
次元物体の位置およびその撮影位置を算出させるには、
複数の画像に表示された同一の3次元物体どうしの対応
する位置(例えば、3次元物体である建造物の屋根の頂
点など)を指定する必要があり、複数の画像それぞれに
ついて、そのような指定を行う操作は面倒であり、時間
も要する。さらに、2次元画像に表示された3次元物体
の3次元空間における位置および撮影位置に基づいて、
3次元的に自然な描画を行う場合には、2次元画像を取
り扱うのにもかかわらず、撮影位置から3次元物体を見
たときの3次元の座標等の3次元のデータを処理しなけ
ればならず、そのための計算量は膨大なものとなる。
[0012] Even if a plurality of images of the same three-dimensional object can be prepared from a plurality of photographing positions, a computer can obtain three-dimensional images from the plurality of images.
To calculate the position of the three-dimensional object and its shooting position,
It is necessary to specify the corresponding position of the same three-dimensional object displayed in a plurality of images (for example, a vertex of a roof of a building which is a three-dimensional object), and such specification is performed for each of the plurality of images. Is troublesome and time-consuming. Furthermore, based on the position in the three-dimensional space and the photographing position of the three-dimensional object displayed in the two-dimensional image,
In the case of performing three-dimensional natural drawing, it is necessary to process three-dimensional data such as three-dimensional coordinates when a three-dimensional object is viewed from a shooting position, even though a two-dimensional image is handled. Instead, the amount of calculation for this is enormous.

【0013】次に、文献4では、2Dペイントを行う際
の色の処理方法が開示されている。
Next, Document 4 discloses a method of processing colors when performing 2D painting.

【0014】即ち、2Dペイントでは、例えば、ユーザ
が、GUIによって、描画に用いる色を選択し、その色
で描画を行うが、2次元画像に表示された3次元物体の
色や明るさは、その面の向きと光源との位置関係によっ
て変化する。従って、例えば、3次元物体のある面の全
体を、同一の色(同一のRGB(Red, Green, Blue)
値)で塗ると、その描画結果は不自然なものとなる。従
って、描画結果を自然なものとするには、色を塗る面の
向きと光源との位置関係を考慮して、塗る色を段階的に
変化させる必要がある。特に、色を塗る面が曲面である
場合においては、描画結果を自然なものとするには、画
素値を連続的に変化させる必要があり、従って、例え
ば、数画素ごとに、塗る色を選択し直さなければなら
ず、その作業量は膨大なものとなる。
That is, in 2D paint, for example, a user selects a color to be used for drawing using a GUI and performs drawing with that color. However, the color and brightness of a three-dimensional object displayed in a two-dimensional image are: It changes according to the positional relationship between the direction of the surface and the light source. Therefore, for example, the entire surface of a three-dimensional object is represented by the same color (the same RGB (Red, Green, Blue)).
Value), the drawing result will be unnatural. Therefore, in order to make the drawing result natural, it is necessary to change the color to be painted stepwise in consideration of the orientation of the surface to be painted and the positional relationship with the light source. In particular, when the surface to be colored is a curved surface, it is necessary to continuously change the pixel value in order to make the drawing result natural, and therefore, for example, the color to be painted is selected every several pixels. It has to be done again, and the amount of work is enormous.

【0015】そこで、文献4では、画素の色が、ある2
色を混合したものであり、かつその2色が分かっている
場合には、そのうちの一色を別の色に変更することがで
きるティントフィル(tint fill)と呼ばれる方法が記
載されている。しかしながら、ティントフィルでは、例
えば、前景と背景とが混ざっているような部分には有効
に対処することができるが、物体の陰影や、物体による
照明の反射に対処するのは困難である。
Therefore, in Reference 4, the color of a pixel is
A method called tint fill is described, which is a mixture of colors, and when two colors are known, one of them can be changed to another color. However, the tint fill can effectively cope with, for example, a portion where foreground and background are mixed, but it is difficult to cope with shading of an object and reflection of illumination by the object.

【0016】次に、文献5では、タブレットやマウスな
どを操作することにより入力した文字や手書きの図形
を、2次元画像に表示された3次元物体の面(表面)に
沿うように変形して貼り付ける方法が開示されている。
Next, in Document 5, a character or a handwritten figure input by operating a tablet or a mouse is deformed along the surface (surface) of a three-dimensional object displayed in a two-dimensional image. A method of attaching is disclosed.

【0017】しかしながら、文献5に開示されている方
法は、2次元画像に表示された3次元物体に関する3次
元情報(例えば、3次元空間における3次元物体の位
置、撮影位置、サイズ、傾きなど)を用いるものであ
り、従って、その3次元情報を、上述したような画像認
識技術を利用して正確に認識する必要があるが、3次元
情報を、画像認識技術を利用して認識する場合には、上
述したように、複数の画像が必要となり、計算量も多く
なる。
[0017] However, the method disclosed in Reference 5 discloses three-dimensional information on a three-dimensional object displayed in a two-dimensional image (for example, the position, photographing position, size, and inclination of the three-dimensional object in a three-dimensional space). Therefore, it is necessary to accurately recognize the three-dimensional information using the image recognition technology as described above. However, when the three-dimensional information is recognized using the image recognition technology, As described above, a plurality of images are required, and the amount of calculation increases.

【0018】また、文献5の方法は、コンピュータ内部
で生成した3次元物体の3次元モデルを利用することも
可能であるが、この場合でも、3次元のデータを取り扱
うことが必要であり、その計算量は膨大なものとなる。
The method of Reference 5 can use a three-dimensional model of a three-dimensional object generated inside a computer. However, in this case, it is necessary to handle three-dimensional data. The amount of calculation is enormous.

【0019】ここで、3次元モデルを生成する方法とし
ては、例えば、画像認識の技術を用いて、2次元画像か
ら、そこに表示された3次元物体の形状の概略を抽出
し、その形状の表面に、撮影した画像を貼り付ける(テ
クスチャマッピングを行う)ものがあり、この方法を用
いて、自由な視点から見た(自由な撮影位置から撮影し
た)2次元画像を生成する手法が、上述の文献2に開示
されている。しかしながら、この手法は、画像認識の技
術を用いて、2次元画像から、そこに表示された3次元
物体の形状の概略を抽出するために、上述した場合と同
様に、複数の画像が必要となる。
Here, as a method of generating a three-dimensional model, for example, an outline of the shape of a three-dimensional object displayed thereon is extracted from a two-dimensional image using an image recognition technique, and the shape of the three-dimensional object is extracted. There is a method of attaching a photographed image to the surface (performing texture mapping), and the method of generating a two-dimensional image viewed from a free viewpoint (photographed from a free photographing position) using this method is described above. Reference 2 has been disclosed. However, this method requires a plurality of images, as in the case described above, in order to extract the outline of the shape of the three-dimensional object displayed thereon from the two-dimensional image using image recognition technology. Become.

【0020】次に、文献6では、1枚の2次元画像か
ら、その撮影位置以外の視点から見た画像を生成する方
法が開示されている。しかしながら、この方法では、撮
影位置以外の別の視点から見た画像が生成されるだけで
あり、さらに、2次元画像に表示された物体やその周囲
にある物が、板状の極めて単純な形状であることを前提
としているため、別の視点から見た画像を近似的に生成
するだけであれば、それほど大きな問題はないが、2次
元画像に文字や図形を追加等する場合に、その描画結果
を自然なものとすることは困難である。具体的には、例
えば、2次元画像に円柱が表示されている場合に、その
円柱の側面等に文字や図形を追加した、自然な画像を得
るのは困難である。
Next, Document 6 discloses a method of generating an image viewed from a viewpoint other than the shooting position from one two-dimensional image. However, this method only generates an image viewed from another viewpoint other than the shooting position, and furthermore, the object displayed in the two-dimensional image and the objects around the two-dimensional image have a very simple plate-like shape. Since it is assumed that this is the case, it is not so much a problem if the image is only approximately generated from another viewpoint. However, when a character or a figure is added to the two-dimensional image, the drawing is not performed. It is difficult to make the results natural. Specifically, for example, when a cylinder is displayed on a two-dimensional image, it is difficult to obtain a natural image in which characters and figures are added to the side surfaces of the cylinder.

【0021】また、2次元画像を対象とした処理を行う
場合、ユーザには、その2次元画像中の、例えば、3次
元物体の頂点などの所定の特徴点の指定を行うことが要
求されることが多い。この指定は、マウスや、ペンなど
が操作されることにより行われるが、2次元画像中の3
次元物体の頂点などを、正確に指定するのは困難であ
る。そこで、文献7では、2次元画像の中のエッジ(明
るさや色が大きく変化する部分)を抽出し、カーソル
が、エッジの近傍に位置する場合には、カーソルをエッ
ジ上に移動させる方法が開示されている。しかしなが
ら、文献7の方法では、2次元画像の中のエッジすべて
を検出するため、その2次元画像のノイズやテクスチャ
に敏感に反応し、不必要な位置に、カーソルが移動され
ることがある。
Further, when processing is performed on a two-dimensional image, the user is required to specify a predetermined feature point such as a vertex of a three-dimensional object in the two-dimensional image. Often. This designation is performed by operating a mouse, a pen, or the like.
It is difficult to accurately specify vertices of a three-dimensional object. Therefore, in Document 7, a method is disclosed in which an edge (a portion where brightness or color greatly changes) in a two-dimensional image is extracted, and the cursor is moved over the edge when the cursor is located near the edge. Have been. However, in the method of Reference 7, since all edges in a two-dimensional image are detected, the cursor may be moved to an unnecessary position in response to the noise or texture of the two-dimensional image.

【0022】[0022]

【発明が解決しようとする課題】以上のように、従来よ
り、多くの画像処理技術が提案されているが、2次元画
像に対して、文字や図形の3次元的な追加や削除、移
動、変形、色や模様の変更、光源の変更等の編集や加工
等を施す場合に、特に適した方法は、まだ提案されてい
ない。
As described above, many image processing techniques have been conventionally proposed. However, three-dimensional addition, deletion, movement, and the like of a character or a figure with respect to a two-dimensional image have been proposed. A method particularly suitable for performing editing or processing such as deformation, change of color or pattern, or change of light source has not yet been proposed.

【0023】即ち、従来の方法では、2次元画像に対し
て、3次元的な編集や加工等を施すには、ある程度の操
作の熟練と時間を要したり、同一物を異なる方向から撮
影した複数の画像を必要とする。また、計算量が膨大に
なることや、不要なカーソルの移動がされることなどが
ある。さらに、2次元画像中の3次元物体等を削除した
場合には、その削除後の領域に、その背景を再現する必
要があるが、上述の文献1乃至7に記載された方法で
は、そのような背景の再現は困難である。
That is, in the conventional method, to perform three-dimensional editing and processing on a two-dimensional image, a certain amount of operation skill and time is required, or the same object is photographed from different directions. Requires multiple images. In addition, the amount of calculation may be enormous, and unnecessary cursor movement may occur. Further, when a three-dimensional object or the like in a two-dimensional image is deleted, it is necessary to reproduce the background in the area after the deletion. However, in the methods described in the above-mentioned documents 1 to 7, such a method is used. It is difficult to reproduce a perfect background.

【0024】本発明は、このような状況に鑑みてなされ
た物であり、2次元画像に対して、容易に、3次元的な
編集等を施すことができるようにするものである。
The present invention has been made in view of such a situation, and is intended to easily perform three-dimensional editing or the like on a two-dimensional image.

【0025】[0025]

【課題を解決するための手段】本発明の画像処理装置
は、第1の2次元画像の中に表示された第1の3次元物
体を構成する面の形状に関する第1の形状情報と、その
面を構成する、第1の2次元画像上の点である第1の特
徴点とを指定するときに操作される第1の操作手段と、
第1の形状情報および第1の特徴点に基づいて、第1の
2次元画像の中の第1の3次元物体を構成する面を、2
次元平面に展開した画像である展開画像に変換するため
の第1の変換式を算出する第1の算出手段と、第1の変
換式に基づいて、第1の2次元画像の中の第1の3次元
物体を構成する面を、展開画像に変換する第1の変換手
段と、展開画像を記憶する記憶手段と、第2の3次元物
体を構成する面の形状に関する第2の形状情報と、その
面を構成させる第2の2次元画像上の点である第2の特
徴点とを指定するときに操作される第2の操作手段と、
第2の形状情報および第2の特徴点に基づいて、記憶手
段に記憶された画像を、第2の3次元物体を構成する面
を投影した画像である投影画像に変換するための第2の
変換式を算出する第2の算出手段と、第2の変換式に基
づいて、記憶手段に記憶された画像を、投影画像に変換
する第2の変換手段と、投影画像を、第2の2次元画像
における第2の特徴点によって特定される部分に貼り付
ける貼り付け手段とを備える。
According to the present invention, there is provided an image processing apparatus comprising: first shape information relating to a shape of a surface constituting a first three-dimensional object displayed in a first two-dimensional image; First operation means operated when designating a first feature point that is a point on a first two-dimensional image that constitutes a surface;
Based on the first shape information and the first feature point, the surface constituting the first three-dimensional object in the first two-dimensional image is defined as 2
First calculating means for calculating a first conversion formula for converting into a developed image which is an image developed on a two-dimensional plane; and a first calculating means for calculating a first conversion formula in the first two-dimensional image based on the first conversion formula. First converting means for converting the surface constituting the three-dimensional object into a developed image, storage means for storing the developed image, second shape information relating to the shape of the surface constituting the second three-dimensional object, Second operation means operated when designating a second feature point which is a point on a second two-dimensional image forming the surface;
A second image for converting the image stored in the storage unit into a projection image which is an image obtained by projecting a surface constituting a second three-dimensional object, based on the second shape information and the second feature point. A second calculating means for calculating a conversion formula; a second converting means for converting an image stored in the storage means into a projection image based on the second conversion formula; Pasting means for pasting to a portion specified by the second feature point in the two-dimensional image.

【0026】本発明の画像処理方法は、第1の形状情報
および第1の特徴点に基づいて、第1の2次元画像の中
の第1の3次元物体を構成する面を、2次元平面に展開
した画像である展開画像に変換するための第1の変換式
を算出する第1の算出ステップと、第1の変換式に基づ
いて、第1の2次元画像の中の第1の3次元物体を構成
する面を、展開画像に変換する第1の変換ステップと、
展開画像を、記憶手段に記憶させる記憶ステップと、第
2の形状情報および第2の特徴点に基づいて、記憶手段
に記憶された画像を、第2の3次元物体を構成する面を
投影した画像である投影画像に変換するための第2の変
換式を算出する第2の算出ステップと、第2の変換式に
基づいて、記憶手段に記憶された画像を、投影画像に変
換する第2の変換ステップと、投影画像を、第2の2次
元画像における第2の特徴点によって特定される部分に
貼り付ける貼り付けステップとを備える。
According to the image processing method of the present invention, a surface constituting a first three-dimensional object in a first two-dimensional image is converted into a two-dimensional plane based on first shape information and a first feature point. A first calculating step of calculating a first conversion formula for converting the image into a developed image which is a developed image, and a first three-dimensional image in the first two-dimensional image based on the first conversion formula. A first conversion step of converting a surface constituting the three-dimensional object into a developed image;
Based on the storage step of storing the developed image in the storage unit and the second shape information and the second feature point, the image stored in the storage unit is projected onto a surface forming a second three-dimensional object. A second calculation step of calculating a second conversion equation for converting the image into a projection image, and a second step of converting the image stored in the storage unit into a projection image based on the second conversion equation. And a pasting step of pasting the projection image to a portion specified by the second feature point in the second two-dimensional image.

【0027】本発明の媒体がコンピュータに実行させる
コンピュータプログラムは、第1の形状情報および第1
の特徴点に基づいて、第1の2次元画像の中の第1の3
次元物体を構成する面を、2次元平面に展開した画像で
ある展開画像に変換するための第1の変換式を算出する
第1の算出ステップと、第1の変換式に基づいて、第1
の2次元画像の中の第1の3次元物体を構成する面を、
展開画像に変換する第1の変換ステップと、展開画像
を、記憶手段に記憶させる記憶ステップと、第2の形状
情報および第2の特徴点に基づいて、記憶手段に記憶さ
れた画像を、第2の3次元物体を構成する面を投影した
画像である投影画像に変換するための第2の変換式を算
出する第2の算出ステップと、第2の変換式に基づい
て、記憶手段に記憶された画像を、投影画像に変換する
第2の変換ステップと、投影画像を、第2の2次元画像
における第2の特徴点によって特定される部分に貼り付
ける貼り付けステップとを備える。
The computer program which the medium of the present invention causes a computer to execute includes first shape information and first shape information.
Based on the feature points of the first three-dimensional image in the first two-dimensional image
A first calculating step of calculating a first conversion formula for converting a surface forming the two-dimensional object into a developed image that is a developed image on a two-dimensional plane; and a first calculating step based on the first conversion formula.
The surface constituting the first three-dimensional object in the two-dimensional image of
A first converting step of converting the image into a developed image, a storing step of storing the developed image in the storage means, and an image stored in the storage means based on the second shape information and the second feature point. A second calculation step of calculating a second conversion formula for converting a surface constituting the two three-dimensional objects into a projection image, and storing the second conversion formula in a storage unit based on the second conversion formula. And a pasting step of pasting the projected image to a portion specified by the second feature point in the second two-dimensional image.

【0028】[0028]

【発明の実施の形態】図3は、本発明を適用した画像処
理装置の一実施の形態の構成例を示している。この画像
処理装置は、コンピュータをベースに構成されており、
2次元画像に対して、容易に、3次元的な編集等を施す
ことができるようになされている。
FIG. 3 shows an example of the configuration of an embodiment of an image processing apparatus to which the present invention is applied. This image processing apparatus is configured based on a computer,
Three-dimensional editing or the like can be easily performed on a two-dimensional image.

【0029】即ち、演算処理回路1は、例えば、CPU
(Central Processing Unit)などで構成され、プログ
ラムメモリ2に記憶(ロード)されたOS(Operating
System)の制御の下、同じくプログラムメモリ2に記憶
されたアプリケーションプログラムを実行することで、
2次元画像に対して、後述するような各種の処理を施す
ようになされている。プログラムメモリ2は、例えば、
RAM(Random Access Memory)などでなり、外部記憶
装置7に記憶(記録)されているOSやアプリケーショ
ンプログラムを一時記憶するようになされている。デー
タメモリ3は、例えば、RAMなどでなり、演算処理回
路1の処理上必要なデータを一時記憶するようになされ
ている。フレームメモリ4は、例えば、RAMなどでな
り、画像表示装置5に表示させる画像データを記憶する
ようになされている。画像表示装置5は、例えば、CR
T(Cathode Ray Tube)や液晶ディスプレイなどでな
り、フレームメモリ4に記憶された画像データを表示す
るようになされている。入力装置6は、例えば、マウス
や、ペンおよびタブレットの組み合わせ、キーボードな
どでなり、必要なコマンドやデータを入力するときや、
画像表示装置5に画面上の所定の位置を指示するときな
どに操作されるようになされている。外部記憶装置7
は、例えば、ハードディスクやフロッピーディスク、C
D−ROM(Compact Disc ROM)、光磁気ディスクなど
でなり、OSやアプリケーションプログラムを記憶して
いる。また、外部記憶装置7は、演算処理回路1の動作
上必要なデータや、処理の対象となる2次元画像(ディ
ジタルデータ)も記憶するようになされている。外部イ
ンターフェイス8は、例えば、カメラ9などで撮影され
た2次元画像や、図示せぬ通信回線を介して送信されて
くるデータなど、外部から供給されるデータを取り込む
ためのインターフェイスとして機能するようになされて
いる。
That is, the arithmetic processing circuit 1 includes, for example, a CPU
(Central Processing Unit) and the like (OS) stored (loaded) in the program memory 2.
By executing an application program also stored in the program memory 2 under the control of the
Various processes described below are performed on the two-dimensional image. The program memory 2 is, for example,
It is composed of a RAM (Random Access Memory) or the like, and temporarily stores the OS and application programs stored (recorded) in the external storage device 7. The data memory 3 is, for example, a RAM or the like, and temporarily stores data necessary for the processing of the arithmetic processing circuit 1. The frame memory 4 is, for example, a RAM or the like, and stores image data to be displayed on the image display device 5. The image display device 5 is, for example, a CR
It comprises a T (Cathode Ray Tube), a liquid crystal display, or the like, and displays image data stored in the frame memory 4. The input device 6 includes, for example, a mouse, a combination of a pen and a tablet, and a keyboard, and is used to input necessary commands and data.
The operation is performed when the image display device 5 is instructed to a predetermined position on the screen. External storage device 7
Is, for example, a hard disk or floppy disk, C
It comprises a D-ROM (Compact Disc ROM), a magneto-optical disk, etc., and stores an OS and application programs. Further, the external storage device 7 stores data necessary for the operation of the arithmetic processing circuit 1 and two-dimensional images (digital data) to be processed. The external interface 8 functions as an interface for taking in data supplied from the outside, such as a two-dimensional image captured by the camera 9 or the like, or data transmitted via a communication line (not shown). It has been done.

【0030】なお、演算処理装置1、プログラムメモリ
2、データメモリ3、フレームメモリ4、入力装置6、
外部記憶装置7、外部インターフェイス8は、相互に、
バスを介して接続されており、プログラムやデータ等
は、このバスを介して、各ブロックの間でやりとりされ
る。
The arithmetic processing unit 1, the program memory 2, the data memory 3, the frame memory 4, the input device 6,
The external storage device 7 and the external interface 8 mutually
They are connected via a bus, and programs and data are exchanged between the blocks via the bus.

【0031】以上のように構成される画像処理装置で
は、電源が投入されると、外部記憶装置7に記憶された
OSが読み出され、プログラムメモリ2に展開されて、
演算処理回路1により実行される。そして、アプリケー
ションプログラムを実行するように、入力装置6が操作
されると、演算処理回路1において、OSの制御の下、
外部記憶装置7からアプリケーションプログラムが読み
出され、プログラムメモリ2に展開されて実行される。
これにより、例えば、カメラ9によって撮影され、外部
インターフェイス8を介して、外部記憶装置7に記憶さ
れた2次元画像に対して、各種の処理が施される。
In the image processing apparatus configured as described above, when the power is turned on, the OS stored in the external storage device 7 is read out, expanded in the program memory 2, and
This is executed by the arithmetic processing circuit 1. Then, when the input device 6 is operated so as to execute the application program, the arithmetic processing circuit 1 operates under the control of the OS.
The application program is read from the external storage device 7, expanded in the program memory 2, and executed.
Thus, for example, various processes are performed on the two-dimensional image captured by the camera 9 and stored in the external storage device 7 via the external interface 8.

【0032】図4は、演算処理回路1がアプリケーショ
ンプログラムを実行することにより実現される、図3の
画像処理装置の機能的構成例を示している。
FIG. 4 shows an example of a functional configuration of the image processing apparatus of FIG. 3, which is realized by the arithmetic processing circuit 1 executing an application program.

【0033】入力イベント処理部11には、OSからの
GUIイベントが供給されるようになされており、入力
イベント処理部11は、そのGUIイベントを解析し、
その解析結果にしたがって、コピー操作処理部12、ペ
ースト操作処理部13、ペーストバッファ選択処理部1
4、イレース操作処理部15、マット操作処理部16、
物体属性操作処理部17、ペイント処理部18を起動し
て処理を行わせるようになされている。
The input event processing unit 11 is supplied with a GUI event from the OS. The input event processing unit 11 analyzes the GUI event,
According to the analysis result, the copy operation processing unit 12, the paste operation processing unit 13, the paste buffer selection processing unit 1
4, erase operation processing unit 15, mat operation processing unit 16,
The object attribute operation processing unit 17 and the paint processing unit 18 are activated to perform processing.

【0034】ここで、GUIイベントとしては、例え
ば、マウスカーソルの移動、マウスのクリック(マウス
ボタンの押し下げや押し上げ)、GUI上のメニューの
選択やボタンの操作などがある。GUIイベントは、例
えば、X Windowなどのウインドウシステムで定義されて
いる。
Here, the GUI event includes, for example, a movement of a mouse cursor, a click of a mouse (pressing or pushing a mouse button), a menu selection on the GUI, and an operation of a button. The GUI event is defined in a window system such as X Window, for example.

【0035】コピー操作処理部12は、後述するペース
トバッファに画像を記憶させる(コピーする)コピー処
理を行うようになされている。ペースト操作処理部13
は、ペーストバッファに記憶された画像を、後述する画
像バッファに記憶された2次元画像に貼り付ける(ペー
ストする)ペースト処理を行うようになされている。ペ
ーストバッファ選択処理部14は、画像バッファの中か
ら、ペーストバッファとするものを選択し、そのバッフ
ァID(Identification)をバッファID記憶部21に
記憶させるペーストバッファ選択処理を行うようになさ
れている。
The copy operation processing section 12 performs a copy process of storing (copying) an image in a paste buffer described later. Paste operation processing unit 13
Is configured to perform a paste process of pasting (pasting) an image stored in a paste buffer to a two-dimensional image stored in an image buffer described later. The paste buffer selection processing unit 14 performs a paste buffer selection process of selecting an image buffer to be used as a paste buffer and storing the buffer ID (Identification) in the buffer ID storage unit 21.

【0036】ここで、データメモリ3には、画像の画素
値を、例えば、1画面単位などで記憶する領域が、画像
バッファとして確保されるようになされている。ここで
は、画像バッファは、データメモリ3の中に複数確保さ
れるようになされており、また、各画像バッファには、
それぞれを識別することができるように、バッファID
が付されている。複数の画像バッファのうち、バッファ
ID記憶部21にバッファIDが記憶されているもの
が、特に、ペーストバッファと呼ばれる。なお、画像バ
ッファは、2次元画像の画素値(例えば、RGB値な
ど)を記憶することができる他、その2次元画像に表示
された物体のマット(matte)も記憶することができる
ようになされている。マットについては後述する。
Here, in the data memory 3, an area for storing pixel values of an image in units of one screen, for example, is secured as an image buffer. Here, a plurality of image buffers are secured in the data memory 3, and each image buffer has
Buffer ID so that each can be identified
Is attached. Among the plurality of image buffers, the buffer whose buffer ID is stored in the buffer ID storage unit 21 is particularly called a paste buffer. The image buffer can store pixel values (for example, RGB values, etc.) of a two-dimensional image, and can also store a matte of an object displayed in the two-dimensional image. ing. The mat will be described later.

【0037】イレース操作処理部15は、ペーストバッ
ファに記憶された画像の一部を削除するイレース処理を
行うようになされている。マット操作処理部16は、画
像バッファに記憶された2次元画像に表示された3次元
物体について、マットを生成するマット処理を行うよう
になされている。物体属性操作処理部17は、画像バッ
ファに記憶された2次元画像に表示された3次元物体の
色や材質感などの、いわゆる材質属性(material prope
rty)を変更する物体属性処理や、光源を変更(画像バ
ッファに記憶された2次元画像中の3次元物体の照明の
具合を変更)する光源変更処理を行うようになされてい
る。ペイント処理部18は、ペーストバッファに記憶さ
れた画像に対して、2Dペイントを施すペイント処理を
行うようになされている。
The erase operation processing section 15 performs an erase process for deleting a part of the image stored in the paste buffer. The mat operation processing unit 16 performs a mat process for generating a mat for the three-dimensional object displayed on the two-dimensional image stored in the image buffer. The object attribute operation processing unit 17 is a so-called material property (such as a material property) such as the color and texture of the three-dimensional object displayed in the two-dimensional image stored in the image buffer.
rty) and a light source change process for changing the light source (changing the lighting condition of the three-dimensional object in the two-dimensional image stored in the image buffer). The paint processing unit 18 performs a paint process for applying 2D paint to the image stored in the paste buffer.

【0038】変換指定処理部19は、コピー操作処理部
12、ペースト操作処理部13の指示にしたがって、ユ
ーザが入力装置6を操作することにより指定した、画像
バッファに記憶された2次元画像上の特徴点の位置を補
正し、その補正後の特徴点を、コピー操作処理部12、
ペースト操作処理部13に戻すようになされている。画
像変換処理部20は、コピー操作処理部12、ペースト
操作処理部13の指示にしたがい、画像バッファまたは
ペーストバッファに記憶された画像を変換するようにな
されている。バッファID記憶部21は、ペーストバッ
ファ選択処理部14によってペーストバッファとして選
択された画像バッファのバッファIDを記憶するように
なされている。なお、バッファID記憶部21に記憶さ
れたバッファIDは、イレース操作処理部15、ペイン
ト処理部18、および画像変換処理部20に供給される
ようになされており、これにより、イレース操作処理部
15、ペイント処理部18、および画像変換処理部20
は、ペーストバッファとなっている画像バッファを認識
するようになされている。
The conversion designation processing unit 19 is configured to operate the input device 6 in accordance with the instructions of the copy operation processing unit 12 and the paste operation processing unit 13 and to specify the two-dimensional image on the two-dimensional image stored in the image buffer. The position of the feature point is corrected, and the corrected feature point is used as the copy operation processing unit 12,
The processing is returned to the paste operation processing unit 13. The image conversion processing unit 20 converts an image stored in an image buffer or a paste buffer in accordance with instructions from the copy operation processing unit 12 and the paste operation processing unit 13. The buffer ID storage unit 21 stores the buffer ID of the image buffer selected as the paste buffer by the paste buffer selection processing unit 14. The buffer ID stored in the buffer ID storage unit 21 is supplied to the erase operation processing unit 15, the paint processing unit 18, and the image conversion processing unit 20, whereby the erase operation processing unit 15 , Paint processing unit 18 and image conversion processing unit 20
Recognizes an image buffer serving as a paste buffer.

【0039】表示処理部22は、画像バッファに記憶さ
れた2次元画像を、画像表示装置5に表示するのに必要
な処理を施すようになされている。なお、表示処理部2
2が出力する画像データは、OSの表示処理に渡される
ようになされており、これにより、その画像データは、
フレームメモリ4に書き込まれ、画像表示装置5に表示
されるようになされている。
The display processing unit 22 performs processing necessary for displaying the two-dimensional image stored in the image buffer on the image display device 5. The display processing unit 2
2 is passed to the display processing of the OS, whereby the image data is
The data is written in the frame memory 4 and displayed on the image display device 5.

【0040】なお、図4におけるブロックのうち、デー
タメモリ3およびバッファID記憶部21を除いたブロ
ックは、演算処理回路1がアプリケーションプログラム
を実行することで実現されるが、それぞれのブロックに
相当するプログラムは、例えばモジュール化されてい
る。
The blocks in FIG. 4 except for the data memory 3 and the buffer ID storage unit 21 are realized by the arithmetic processing circuit 1 executing the application program, and correspond to the respective blocks. The program is, for example, modularized.

【0041】以上のように構成される画像処理装置によ
れば、例えば、図5(A)に示すような、家屋を模した
3次元物体が表示された2次元画像が、画像バッファに
記憶されている場合において、家屋の壁の向きを特に意
識せずに、文字を描いても、図5(B)に示すように、
文字が、壁に沿って描かれているかのような2次元画像
を得ることができるようになされている。また、家屋の
壁の向きを意識せずに、長方形を描いても、図5(C)
に示すように、家屋の壁に、直方体形状の部屋が追加さ
れている2次元画像を得ることができるようになされて
いる。さらに、例えば、図6(A)に示すように、円柱
が表示された2次元画像が、画像バッファに記憶されて
いる場合において、その側面の向きを特に意識せずに、
文字を描いても、図6(B)に示すように、その側面に
沿って文字が描かれているかのような2次元画像を得る
ことができるようになされている。
According to the image processing apparatus configured as described above, for example, a two-dimensional image displaying a three-dimensional object imitating a house as shown in FIG. 5A is stored in the image buffer. In this case, even if the characters are drawn without being conscious of the direction of the wall of the house, as shown in FIG.
It is made possible to obtain a two-dimensional image as if a character is drawn along a wall. In addition, even if a rectangle is drawn without considering the direction of the wall of the house, FIG. 5 (C)
As shown in FIG. 1, a two-dimensional image in which a rectangular parallelepiped room is added to the wall of a house can be obtained. Further, for example, as shown in FIG. 6A, when a two-dimensional image in which a cylinder is displayed is stored in an image buffer, the direction of the side surface is not particularly conscious, and
Even if a character is drawn, a two-dimensional image can be obtained as if the character is drawn along the side surface, as shown in FIG. 6 (B).

【0042】即ち、例えば、ビデオカメラ9で、文字等
の描かれている3次元物体を実際に撮影しなくても、文
字等の描かれていない3次元物体を、ビデオカメラ9で
撮影した2次元画像に、3次元的な操作を加え、これに
より、その文字等の描かれている3次元物体を、実際に
撮影したかのような2次元画像を、容易に得ることがで
きるようになされている。
That is, for example, a three-dimensional object on which a character or the like is not drawn is actually captured by the video camera 9 without actually capturing the three-dimensional object on which the character or the like is drawn. A three-dimensional operation is performed on the three-dimensional image, thereby making it possible to easily obtain a two-dimensional image as if the three-dimensional object on which the character or the like is drawn is actually photographed. ing.

【0043】次に、図7のフローチャートを参照して、
図4の画像処理装置の処理について説明する。
Next, referring to the flowchart of FIG.
The processing of the image processing apparatus in FIG. 4 will be described.

【0044】演算処理回路1(図3)において、アプリ
ケーションプログラムが実行されると、画像表示装置5
には、例えば、図8に示すようなメインウインドウが表
示される。メインウインドウの右側には、コマンドボタ
ン(Command)31と形状ボタン(Shape)32が表示さ
れ、その左側には、画像バッファに記憶された2次元画
像が表示されたウインドウ(以下、適宜、バッファウイ
ンドウ)が表示される。
When the application program is executed in the arithmetic processing circuit 1 (FIG. 3), the image display device 5
For example, a main window as shown in FIG. 8 is displayed. On the right side of the main window, a command button (Command) 31 and a shape button (Shape) 32 are displayed, and on the left side thereof, a window in which a two-dimensional image stored in the image buffer is displayed (hereinafter referred to as a buffer window as appropriate). ) Is displayed.

【0045】ここで、コマンドボタン31は、コマンド
を入力するときに操作されるもので、図8の実施の形態
では、ペーストバッファ選択処理を行うときに操作され
る「Paste Sel.」ボタン、コピー処理を行うときに操作
される「Copy」ボタン、ペースト処理を行うときに操作
される「Paste」ボタン、イレース処理を行うときに操
作される「Erase」ボタン、マット処理を行うときに操
作される「Matte」ボタン、物体属性処理を行うときに
操作される「Material」ボタン、光源変更処理を行うと
きに操作される「Light」ボタン、ペイント処理を行う
ときに操作される「Paint」ボタンが設けられている。
Here, the command button 31 is operated when inputting a command. In the embodiment of FIG. 8, the "Paste Sel.""Copy" button operated when performing processing, "Paste" button operated when performing paste processing, "Erase" button operated when performing erase processing, operated when performing matte processing "Matte" button, "Material" button operated when performing object attribute processing, "Light" button operated when performing light source change processing, "Paint" button operated when performing paint processing Have been.

【0046】また、形状ボタン32は、処理対象となる
3次元物体の面の形状(形状情報)を入力するときに操
作されるもので、図8の実施の形態では、長方形である
こと、円柱の側面であること、球面であること、円錐の
側面であることを、それぞれ指定するときに操作される
「Rectangle」ボタン、「Cylinder」ボタン、「Spher
e」ボタン、「Cone」ボタンが設けられている。
The shape button 32 is operated to input the shape (shape information) of the surface of the three-dimensional object to be processed. In the embodiment shown in FIG. "Rectangle" button, "Cylinder" button, "Spher"
An "e" button and a "Cone" button are provided.

【0047】さらに、図8の実施の形態では、3つのバ
ッファウインドウが表示されており、それぞれには、複
数の画像バッファのうちの、画像バッファ#1,#2,
#3の記憶内容が表示されている(画像バッファ#iの
サフィックスiは、例えば、バッファIDを表す)。な
お、バッファウインドウが複数表示されている場合に
は、その複数のバッファウインドウのうちの、例えば、
後述する注目バッファの記憶内容が表示されているもの
が、最も手前に表示される(アクティブにされる)よう
になされている。
Further, in the embodiment shown in FIG. 8, three buffer windows are displayed. Each of the three buffer windows is provided with image buffers # 1, # 2, and # 2 among a plurality of image buffers.
The storage content of # 3 is displayed (the suffix i of the image buffer #i represents, for example, a buffer ID). When a plurality of buffer windows are displayed, for example, of the plurality of buffer windows,
The storage contents of the buffer of interest, which will be described later, are displayed at the foreground (activated).

【0048】メインウインドウの操作は、基本的に、処
理の対象とする画像バッファを選択し、その後に処理を
選択するというユーザインターフェイスに統一されてお
り、従って、ユーザは、まず最初に、メインウインドウ
に表示されたバッファウインドウのうちのいずれかを、
入力装置6を操作することによりクリックすることで、
処理の対象とする画像バッファを選択する。
The operation of the main window is basically unified with a user interface for selecting an image buffer to be processed and then selecting a process. Therefore, the user first operates the main window. One of the buffer windows displayed in
By clicking by operating the input device 6,
Select the image buffer to be processed.

【0049】即ち、ユーザが、いずれかのバッファウイ
ンドウをクリックすると、ステップS1において、入力
イベント処理部11は、そのバッファウインドウに記憶
内容が表示されている画像バッファを、注目バッファと
して選択する。
That is, when the user clicks on one of the buffer windows, in step S1, the input event processing unit 11 selects an image buffer whose contents are displayed in the buffer window as a buffer of interest.

【0050】その後、ユーザは、コマンドボタン31の
うちのいずれかをクリックする。この場合、ステップS
2において、入力イベント処理部11は、コマンドボタ
ン31のうちのいずれがクリックされたかを認識し、ス
テップS3に進み、その認識結果に基づいて、どのよう
な処理(操作)を行うことが指示されたのかを判定す
る。ステップS3において、ペーストバッファ選択処理
を行うことが指示されたと判定された場合、即ち、コマ
ンドボタン31の中の「Paste Sel.」ボタンが操作(ク
リック)された場合、ステップS4に進み、入力イベン
ト処理部11は、ペーストバッファ選択処理部14を起
動し、ペーストバッファ選択処理を行わせる。即ち、こ
の場合、ペーストバッファ選択処理部14は、注目バッ
ファのバッファIDを、バッファID記憶部21に上書
きし、これにより、いま注目バッファとなっている画像
バッファを、ペーストバッファとして、ステップS1に
戻る。
Thereafter, the user clicks one of the command buttons 31. In this case, step S
In step 2, the input event processing unit 11 recognizes which of the command buttons 31 has been clicked, and proceeds to step S3 to instruct what kind of processing (operation) based on the recognition result. Judge whether it is. If it is determined in step S3 that the paste buffer selection processing has been instructed, that is, if the “Paste Sel.” Button in the command button 31 has been operated (clicked), the process proceeds to step S4, and the input event The processing unit 11 activates the paste buffer selection processing unit 14 to perform the paste buffer selection processing. That is, in this case, the paste buffer selection processing unit 14 overwrites the buffer ID of the buffer of interest in the buffer ID storage unit 21, whereby the image buffer that is currently the buffer of interest is used as the paste buffer and the process proceeds to step S 1. Return.

【0051】また、ステップS3において、コピー処理
またはペースト処理のうちのいずれかを行うことが指示
されたと判定された場合、即ち、コマンドボタン31の
中の「Copy」ボタンまたは「Paste」ボタンが操作され
た場合、形状ボタン32が操作されるのを待って、ステ
ップS5に進む。即ち、コピー処理は、注目バッファに
記憶された2次元画像に表示された3次元物体を構成す
る面を、2次元平面に展開した展開画像を生成し、ペー
ストバッファに記憶させる処理であり、ペースト処理
は、ペーストバッファに記憶された2次元平面上の画像
を、3次元物体を構成する面に貼り付けてスクリーンに
投影した投影画像を生成し、その投影画像を、注目バッ
ファに記憶された2次元画像に貼り付ける処理であり、
いずれも3次元物体を構成する面を処理の対象とするこ
とから、ユーザは、「Copy」ボタンまたは「Paste」ボ
タンを操作した場合、続けて、コピー処理またはペース
ト処理の対象とする3次元物体の面の形状に関する形状
情報を、形状ボタン32を操作することで指定(入力)
する。
If it is determined in step S3 that one of the copy processing and the paste processing is instructed, that is, if the "Copy" button or the "Paste" button of the command buttons 31 is operated. If so, the process waits for the shape button 32 to be operated, and then proceeds to step S5. That is, the copy process is a process of generating a developed image in which a surface constituting the three-dimensional object displayed in the two-dimensional image stored in the buffer of interest is developed on a two-dimensional plane and storing the developed image in a paste buffer. The process generates a projection image by pasting the image on the two-dimensional plane stored in the paste buffer onto the surface constituting the three-dimensional object and projecting the projection image on the screen, and stores the projection image in the buffer stored in the buffer of interest. It is a process of pasting on a two-dimensional image,
In any case, since the surface constituting the three-dimensional object is to be processed, when the user operates the “Copy” button or “Paste” button, the three-dimensional object to be subsequently subjected to copy processing or paste processing is processed. Specify (input) the shape information on the shape of the surface by operating the shape button 32
I do.

【0052】ステップS5では、形状ボタン32の操作
に基づいて、コピー処理またはペースト処理の対象とす
る3次元物体の面の形状(形状情報)が認識される。そ
して、特徴点が入力されるのを待って、ステップS6に
進む。即ち、コピー処理では、注目バッファに記憶され
た2次元画像に表示された3次元物体の面を構成する幾
つかの点を指定することによって、展開画像を生成する
部分(面)を特定する必要がある。また、ペースト処理
では、ペーストバッファに記憶された画像の投影画像
を、例えば、注目バッファに記憶された2次元画像に表
示された3次元物体を構成する面に貼り付けるのに、そ
の面を構成する幾つかの点を指定することによって、そ
の面を特定する必要がある。そこで、ユーザは、「Cop
y」ボタンまたは「Paste」ボタンを操作し、続けて、コ
ピー処理またはペースト処理の対象とする3次元物体の
面の形状を、形状ボタン32を操作することで指定して
後に、さらに、注目バッファに記憶された2次元画像中
の、処理の対象とする3次元物体の面を構成する幾つか
の点を、入力装置6を操作することにより、特徴点とし
て指定する。
In step S5, based on the operation of the shape button 32, the shape (shape information) of the surface of the three-dimensional object to be copied or pasted is recognized. Then, after waiting for the input of the feature point, the process proceeds to step S6. That is, in the copy processing, it is necessary to specify a part (surface) for generating a developed image by designating some points constituting the surface of the three-dimensional object displayed in the two-dimensional image stored in the buffer of interest. There is. In the paste processing, a projection image of the image stored in the paste buffer is attached to, for example, a surface constituting a three-dimensional object displayed in the two-dimensional image stored in the buffer of interest. It is necessary to identify the surface by specifying some points to do. So, the user says "Cop
By operating the "y" button or the "Paste" button, and subsequently by specifying the shape of the surface of the three-dimensional object to be subjected to the copy processing or the paste processing by operating the shape button 32, the buffer of interest is further added. By operating the input device 6, some points constituting the surface of the three-dimensional object to be processed in the two-dimensional image stored in are designated as feature points.

【0053】ステップS6では、このようにして指定さ
れた特徴点の、2次元画像中の座標が認識される。
In step S6, the coordinates of the thus specified feature point in the two-dimensional image are recognized.

【0054】なお、上述の場合には、3次元物体の形状
を指定してから、特徴点を指定するようにしたが、先
に、特徴点を指定してから、3次元物体の形状を指定す
るようにすることも可能である。また、ステップS5お
よびS6の処理は、コピー処理が指令されている場合に
は、コピー操作処理部12で、ペースト処理が指令され
ている場合には、ペースト操作処理部13で、それぞれ
行われる。
In the above case, the feature point is specified after the shape of the three-dimensional object is specified. However, the feature point is specified first, and then the shape of the three-dimensional object is specified. It is also possible to do so. The processing in steps S5 and S6 is performed by the copy operation processing unit 12 when the copy processing is instructed, and is performed by the paste operation processing unit 13 when the paste processing is instructed.

【0055】ステップS6において、ユーザによって指
定された特徴点を認識したコピー操作処理部12または
ペースト操作処理部13は、その特徴点を、変換指定処
理部19に供給する。変換指定処理部19は、特徴点を
受信すると、ステップS7において、その位置の補正を
行い、補正後の特徴点を、コピー操作処理部12または
ペースト操作処理部13のうちの、特徴点を供給してき
た方に供給する。
In step S 6, the copy operation processing section 12 or the paste operation processing section 13 that has recognized the feature point designated by the user supplies the feature point to the conversion designation processing section 19. Upon receiving the characteristic point, the conversion designation processing unit 19 corrects the position in step S7, and supplies the corrected characteristic point to the characteristic point of the copy operation processing unit 12 or the paste operation processing unit 13. Supply those who have been.

【0056】その後、ステップS8において、入力イベ
ント処理部11は、「Copy」ボタンまたは「Paste」ボ
タンのうちのいずれが操作されたのかを判定する。ステ
ップS8において、「Copy」ボタンが操作されたと判定
された場合、コピー操作処理部12において、コピー処
理が行われる。即ち、この場合、ステップS8からS9
に進み、コピー操作処理部12において、形状情報およ
び特徴点に基づいて、注目バッファに記憶された2次元
画像の中の3次元物体を構成する面を、展開画像に変換
するための変換式(以下、適宜、逆変換式という)が算
出され、画像変換処理部20に供給される。画像変換部
20では、ステップS10において、逆変換式に基づい
て、注目バッファに記憶された2次元画像の中の3次元
物体を構成する面(特徴点によって特定される面)が、
展開画像に変換される。さらに、画像変換部20は、ス
テップS11において、その展開画像を、バッファID
記憶部21にバッファIDが記憶されている画像バッフ
ァ、即ち、ペーストバッファにコピー(上書き)し、ス
テップS1に戻る。
Thereafter, in step S8, the input event processing section 11 determines which of the "Copy" button and the "Paste" button has been operated. If it is determined in step S8 that the “Copy” button has been operated, the copy operation processing unit 12 performs a copy process. That is, in this case, steps S8 to S9
In the copy operation processing unit 12, based on the shape information and the feature points, a conversion formula () for converting a surface constituting the three-dimensional object in the two-dimensional image stored in the buffer of interest into a developed image ( Hereinafter, an inverse conversion formula is calculated as appropriate) and supplied to the image conversion processing unit 20. In step S10, the image conversion unit 20 determines a surface (a surface specified by a feature point) that forms a three-dimensional object in the two-dimensional image stored in the buffer of interest based on the inverse conversion formula.
It is converted to a developed image. Further, in step S11, the image conversion unit 20 converts the developed image into a buffer ID
The image is copied (overwritten) to the image buffer in which the buffer ID is stored in the storage unit 21, that is, the paste buffer, and the process returns to step S1.

【0057】以上のようなコピー処理によれば、例え
ば、図9(A)に示すような、家屋を模した3次元物体
Vが表示された2次元画像が、注目バッファに記憶され
ている場合において、形状情報として、縦線のある壁面
Sの形状である長方形が指定されるとともに、特徴点と
して、その壁面Sの4頂点P1,P2,P3,P4が指定さ
れたときには、図9(B)に示すように、3次元物体V
を、2次元平面上に展開して得られる、縦線のある壁面
Sの2次元画像(展開画像)が生成され、ペーストバッ
ファに記憶される。
According to the above-described copy processing, for example, when a two-dimensional image displaying a three-dimensional object V imitating a house as shown in FIG. 9A is stored in the buffer of interest. In, when a rectangle that is the shape of a wall surface S with a vertical line is specified as shape information, and four vertices P 1 , P 2 , P 3 , and P 4 of the wall surface S are specified as feature points, As shown in FIG. 9B, the three-dimensional object V
Is developed on a two-dimensional plane, and a two-dimensional image (developed image) of the wall surface S having a vertical line is generated and stored in the paste buffer.

【0058】従って、図9(A)に示すような3次元物
体Vが表示された2次元画像が、画像バッファに記憶さ
れている場合に、その縦線のある壁面Sの展開画像を得
たいときには、ユーザは、第1に、その3次元物体Vが
表示された2次元画像の記憶されている画像バッファを
注目バッファとし、第2に、コピー処理を指令する「Co
py」ボタンを操作し、第3に、壁面Sの形状を指定する
「Rectangle」ボタンを操作し、第4に、図9(A)に
示したように、2次元画像中の、縦線のある壁面Sを構
成する四角形の4頂点P1,P2,P3,P4を、特徴点と
して指定すれば良い。
Therefore, when a two-dimensional image on which a three-dimensional object V is displayed as shown in FIG. 9A is stored in an image buffer, it is desired to obtain a developed image of the wall S having the vertical line. Sometimes, the user first sets the image buffer in which the two-dimensional image in which the three-dimensional object V is displayed is stored as the target buffer, and secondly, instructs the copy process to “Co
py ”button, and thirdly, a“ Rectangle ”button for specifying the shape of the wall surface S. Fourth, as shown in FIG. The four vertices P 1 , P 2 , P 3 , and P 4 of the quadrangle constituting the wall S may be designated as feature points.

【0059】一方、ステップS8において、「Paste」
ボタンが操作されたと判定された場合、ペースト操作処
理部13において、ペースト処理が行われる。即ち、こ
の場合、ステップS8からS12に進み、ペースト操作
処理部13において、形状情報および特徴点に基づい
て、ペーストバッファに記憶された2次元平面上の画像
(展開画像)を、投影画像に変換するための変換式(以
下、適宜、順変換式という)が算出され、画像変換処理
部20に供給される。画像変換処理部20では、ステッ
プS13において、順変換式に基づいて、ペーストバッ
ファに記憶された画像が、投影画像に変換される。さら
に、画像変換部20は、ステップS14において、その
投影画像を、注目バッファに記憶された2次元画像に表
示された3次元物体の面(特徴点によって特定される
面)に貼り付け、ステップS1に戻る。
On the other hand, in step S8, "Paste"
When it is determined that the button has been operated, the paste operation processing unit 13 performs a paste process. That is, in this case, the process proceeds from step S8 to S12, where the paste operation processing unit 13 converts the image on the two-dimensional plane (developed image) stored in the paste buffer into a projected image based on the shape information and the feature points. A conversion formula (hereinafter, appropriately referred to as a forward conversion formula) is calculated and supplied to the image conversion processing unit 20. In step S13, the image conversion processing unit 20 converts the image stored in the paste buffer into a projection image based on the forward conversion formula. Further, in step S14, the image conversion unit 20 pastes the projection image on the surface of the three-dimensional object displayed on the two-dimensional image stored in the buffer of interest (the surface specified by the feature point), and in step S1. Return to

【0060】以上のようなペースト処理によれば、例え
ば、図9で説明したコピー処理によって、図10(A)
に示すような2次元平面上の画像が、ペーストバッファ
に記憶されており、さらに、図10(B)に示すよう
な、家屋を模した3次元物体Vが表示された2次元画像
が、注目バッファに記憶されている場合において、形状
情報として、無模様の壁面S’の形状である長方形が指
定されるとともに、特徴点として、壁面S’の4頂点P
1’,P2’,P3’,P4’が指定されたときには、図1
0(C)に示すように、ペーストバッファに記憶された
画像が、3次元物体Vの壁面S’に貼り付けられた状態
で、その3次元物体Vをスクリーン上に投影した場合
の、その壁面S’の部分の投影画像が生成され、注目バ
ッファに記憶された2次元画像に表示された3次元物体
Vの、特徴点P1’乃至P4’で特定される壁面S’に貼
り付けられる。
According to the above paste processing, for example, the copy processing described with reference to FIG.
Is stored in the paste buffer, and a two-dimensional image in which a three-dimensional object V imitating a house is displayed as shown in FIG. When stored in the buffer, a rectangle that is the shape of a plain wall surface S ′ is specified as shape information, and the four vertices P of the wall surface S ′ are designated as feature points.
1 ', P 2', P 3 ', P 4' when is designated, Figure 1
0 (C), when the image stored in the paste buffer is pasted on the wall surface S ′ of the three-dimensional object V and the three-dimensional object V is projected on the screen, A projection image of the portion S ′ is generated and attached to the wall surface S ′ specified by the feature points P 1 ′ to P 4 ′ of the three-dimensional object V displayed in the two-dimensional image stored in the buffer of interest. .

【0061】従って、図10(A)に示すような画像
が、ペーストバッファに記憶されているとともに、図1
0(B)に示すような、家屋を模した3次元物体Vが表
示された2次元画像が、画像バッファに記憶されている
場合に、ペーストバッファに記憶された画像を、3次元
物体Vの壁面S’に貼り付けた2次元画像を得たいとき
には、ユーザは、第1に、その3次元物体Vが表示され
た2次元画像の記憶されている画像バッファを注目バッ
ファとし、第2に、ペースト処理を指令する「Paste」
ボタンを操作し、第3に、壁面S’の形状を指定する
「Rectangle」ボタンを操作し、第4に、図10(B)
に示したように、2次元画像中の、壁面S’を構成する
四角形の4頂点P1’,P2’,P3’,P4’を、特徴点
として指定すれば良い。
Therefore, the image as shown in FIG. 10A is stored in the paste buffer and the image shown in FIG.
When a two-dimensional image displaying a three-dimensional object V imitating a house as shown in FIG. 0 (B) is stored in the image buffer, the image stored in the paste buffer is replaced with the three-dimensional object V. When a user wants to obtain a two-dimensional image pasted on the wall surface S ′, the user first sets the image buffer storing the two-dimensional image in which the three-dimensional object V is displayed as a target buffer, and secondly, "Paste" for paste processing
Third, the “Rectangle” button for designating the shape of the wall surface S ′ is operated. Fourth, FIG.
As shown in (4), the four vertices P 1 ′, P 2 ′, P 3 ′, and P 4 ′ of the square constituting the wall surface S ′ in the two-dimensional image may be designated as feature points.

【0062】以上から明らかなように、3次元物体Vが
表示された2次元画像が記憶された画像バッファを注目
バッファとして、図9で説明したようなコピー処理を行
い、さらに、図10で説明したようなペースト処理を行
うことで、壁面Sのテクスチャを、別の壁面S’にコピ
ーすることができる。即ち、ユーザは、壁面Sおよび
S’の向きを特に意識しなくても、上述のようなコピー
処理とペースト処理を行うための操作を行うだけで、2
次元画像中の壁面Sのテクスチャを、別の壁面S’にコ
ピーすることができる。
As is clear from the above, the copy processing described in FIG. 9 is performed using the image buffer storing the two-dimensional image in which the three-dimensional object V is displayed as the target buffer, and further described in FIG. By performing such a paste process, the texture of the wall surface S can be copied to another wall surface S ′. That is, the user does not need to be particularly aware of the directions of the wall surfaces S and S ′, and only needs to perform the operation for performing the copy processing and the paste processing as described above.
The texture of the wall S in the dimensional image can be copied to another wall S ′.

【0063】さらに、例えば、ペーストバッファに、
「ABC」の文字や、「DEF」の文字を、従来の2D
ペイント等を利用して、平面に文字を描くのと同様にし
て描き、それを、ペースト処理によって、上述の図5
(A)に示した家屋の壁面に貼り付けることで、図5
(B)に示したような自然な2次元画像を得ることがで
きる。即ち、壁面に沿って、文字を描く必要がない。
Further, for example, in the paste buffer,
The characters “ABC” and “DEF” can be converted to the conventional 2D
Using paint or the like, draw in the same manner as drawing a character on a plane, and paste it by the paste processing described above in FIG.
By pasting on the wall of the house shown in FIG.
A natural two-dimensional image as shown in (B) can be obtained. That is, there is no need to draw characters along the wall surface.

【0064】また、コピー処理を行い、何らかの展開画
像をペーストバッファに記憶させておき、あるいは、何
らかのテクスチャが記憶された画像バッファをペースト
バッファとして選択し、図5(C)に示す面S1を構成
する頂点p1,p2,p3,p4、面S2を構成する頂点
3,p4,p5,p6、面S3を構成する頂点p2,p3
6,p7を、それぞれ特徴点として指定して、ペースト
処理を3回行うことで、図5(C)に示したように、家
屋の壁に、直方体形状の部屋が追加された2次元画像
を、容易に作成することができる(この場合、面S1
至S3の形状情報としては、いずれも長方形を指定す
る)。
Further, copy processing is performed, and some
Save the image in the paste buffer, or whatever
Paste the image buffer with the textures
The surface S selected as a buffer and shown in FIG.1Configure
Vertex p1, PTwo, PThree, PFour, Surface STwoVertices that make up
pThree, PFour, PFive, P6, Surface SThreeVertex p that constitutesTwo, PThree,
p 6, P7And paste as
By performing the processing three times, as shown in FIG.
A two-dimensional image with a rectangular parallelepiped room added to the house wall
Can be easily created (in this case, the surface S1No
To SThreeSpecify a rectangle as the shape information for
).

【0065】ここで、図5に示したことから分かるよう
に、ペースト処理を行う対象とする3次元物体は、注目
バッファに記憶された2次元画像中に表示されていても
良いし、表示されていなくても良い。即ち、図5(B)
は、ペースト処理を行う対象とする3次元物体(文字が
貼り付けられる3次元物体)が、元の2次元画像(図5
(A)に示した2次元画像)に表示されている場合を表
しており、図5(C)は、ペースト処理を行う対象とす
る3次元物体(図5(C)における面S1,S2,S3
よって規定される直方体)が、元の2次元画像に表示さ
れていない場合を表している。なお、ペースト処理を行
う対象とする3次元物体が、元の2次元画像に表示され
ていない場合には、その3次元物体上の点として、ユー
ザが指定した特徴点の補正、即ち、図7のステップS7
の処理はスキップされる。これは、ステップS7では、
後述するように、ユーザが指定した特徴点が、3次元物
体の輪郭線上に位置するように補正されるが、3次元物
体が、元の2次元画像に表示されていない場合には、そ
の輪郭線が存在しないためである。
Here, as can be seen from FIG. 5, the three-dimensional object to be subjected to the paste processing may be displayed in the two-dimensional image stored in the buffer of interest, or may be displayed. You don't have to. That is, FIG.
Indicates that a three-dimensional object (a three-dimensional object to which a character is to be pasted) to be subjected to paste processing is an original two-dimensional image (FIG. 5).
FIG. 5C shows a case where the image is displayed on the two-dimensional image shown in FIG. 5A, and FIG. 5C shows a three-dimensional object (surfaces S 1 and S in FIG. 2 and S 3 ) are not displayed in the original two-dimensional image. When the three-dimensional object to be subjected to the paste processing is not displayed in the original two-dimensional image, the feature point designated by the user is corrected as a point on the three-dimensional object, that is, as shown in FIG. Step S7
Is skipped. This means that in step S7,
As will be described later, the feature point specified by the user is corrected so as to be located on the contour line of the three-dimensional object, but if the three-dimensional object is not displayed in the original two-dimensional image, the contour is corrected. This is because there is no line.

【0066】また、2次元画像から、コピー処理によっ
て得られた展開画像は、元の2次元画像以外の2次元画
像に貼り付けることができるし、さらに、展開画像を貼
り付ける3次元物体の面は、その展開画像を生成する元
になった3次元物体の面と同一の形状でなくても良い。
即ち、例えば、図11(A)に示すような2次元画像に
表示された3次元物体(家屋の形状をした3次元物体)
における格子模様の壁面を対象にコピー処理を行い、図
11(B)に示すように、その展開画像を、ペーストバ
ッファに記憶させた後、図11(C)に示すような2次
元画像に表示された円柱の側面を対象にペースト処理を
行い、図11(D)に示すように、格子模様の展開画像
を、円柱の側面に沿って貼り付けることが可能である。
即ち、ある3次元物体のテクスチャを、他の3次元物体
のテクスチャとして貼り付けることができる。
A developed image obtained by copying from a two-dimensional image can be pasted on a two-dimensional image other than the original two-dimensional image. Need not have the same shape as the surface of the three-dimensional object from which the developed image is generated.
That is, for example, a three-dimensional object (a three-dimensional object in the shape of a house) displayed in a two-dimensional image as shown in FIG.
11B, a copy process is performed on the lattice pattern wall surface, and the developed image is stored in a paste buffer as shown in FIG. 11B, and then displayed on a two-dimensional image as shown in FIG. 11C. It is possible to perform a paste process on the side surface of the formed cylinder, and to paste a developed image of the lattice pattern along the side surface of the cylinder as shown in FIG.
That is, the texture of a certain three-dimensional object can be pasted as the texture of another three-dimensional object.

【0067】さらに、ペーストバッファには、コピー処
理によって得られる画像の他、任意の画像を記憶させる
ことができ、従って、ペースト処理によれば、任意の画
像を、2次元画像に表示された3次元物体(但し、上述
したように、3次元物体は、2次元画像に表示されてい
なくてもかまわない)に貼り付けることができる。
Further, in the paste buffer, any image other than the image obtained by the copy process can be stored. Therefore, according to the paste process, any image can be displayed as a two-dimensional image. It can be attached to a three-dimensional object (however, the three-dimensional object does not have to be displayed in the two-dimensional image as described above).

【0068】また、コピー処理やペースト処理によれ
ば、2次元画像に対して、上述した操作の他にも、各種
の3次元的な操作を施すことができる。即ち、例えば、
2次元画像に表示された3次元物体の面に凹凸がある場
合には、コピー処理によって、その面の展開画像を、ペ
ーストバッファに記憶させ、ペーストバッファ上で、凹
凸の部分を削除し、その削除後の画像を、ペースト処理
によって、元の3次元物体の面に貼り付ければ、凹凸が
取り除かれた3次元物体が表示された2次元画像を得る
ことができる。また、例えば、同一の3次元物体を対象
にコピー処理およびペースト処理を行う場合において、
ペースト処理を行うときに指定する特徴点を、コピー処
理を行うときに指定する特徴点と変えることで、3次元
物体の移動や、拡大、縮小、その他非線形な変形(例え
ば、いわゆる魚眼レンズなどの特殊な光学的特性を有す
るレンズを用いて撮影を行ったかのような変形など)を
行うことができる。
According to the copy processing and the paste processing, various three-dimensional operations can be performed on a two-dimensional image in addition to the above-described operations. That is, for example,
If the surface of the three-dimensional object displayed in the two-dimensional image has irregularities, the developed image of the surface is stored in the paste buffer by copy processing, and the irregularities are deleted from the paste buffer. If the image after deletion is pasted on the surface of the original three-dimensional object by the paste processing, a two-dimensional image in which the three-dimensional object with the unevenness removed is displayed. Also, for example, when performing a copy process and a paste process on the same three-dimensional object,
By changing the feature points specified when performing the paste processing to the feature points specified when performing the copy processing, movement, enlargement, reduction, and other non-linear deformation of a three-dimensional object (for example, special Deformation as if shooting with a lens having excellent optical characteristics).

【0069】図7に戻り、ステップS3において、マッ
ト処理を行うことが指示されたと判定された場合、即
ち、コマンドボタン31の中の「Matte」ボタンが操作
された場合、ステップS15に進み、入力イベント処理
部11は、マット操作処理部16を起動し、マット処理
を行わせる。即ち、この場合、マット操作処理部16
は、注目バッファに記憶された2次元画像に表示された
3次元物体のマットを生成し、注目バッファに記憶させ
て、ステップS1に戻る。なお、マット処理の詳細につ
いては、後述する。
Returning to FIG. 7, if it is determined in step S3 that an instruction to perform mat processing has been given, that is, if the "Matte" button of the command buttons 31 has been operated, the flow advances to step S15 to enter The event processing unit 11 activates the mat operation processing unit 16 to perform the mat processing. That is, in this case, the mat operation processing unit 16
Generates a mat of the three-dimensional object displayed on the two-dimensional image stored in the buffer of interest, stores the mat in the buffer of interest, and returns to step S1. The details of the mat processing will be described later.

【0070】また、ステップS3において、物体属性処
理または光源変更処理を行うことが指示されたと判定さ
れた場合、即ち、コマンドボタン31の中の「Materia
l」ボタンまたは「Light」ボタンが操作された場合、ス
テップS16に進み、入力イベント処理部11は、物体
属性操作処理部17を起動し、物体属性処理または光源
変更処理(物体属性/光源変更処理)を行わせ、ステッ
プS1に戻る。なお、物体属性/光源変更処理の詳細に
ついては、後述する。
If it is determined in step S3 that an instruction to perform the object attribute processing or the light source change processing has been issued, that is, if the “Materia
If the “l” button or the “Light” button has been operated, the process proceeds to step S16, where the input event processing unit 11 activates the object attribute operation processing unit 17, and executes the object attribute process or the light source change process (object attribute / light source change process). ), And returns to step S1. The details of the object attribute / light source change processing will be described later.

【0071】一方、ステップS3において、イレース処
理を行うことが指示されたと判定された場合、即ち、コ
マンドボタン31の中の「Erase」ボタンが操作された
場合、ステップS17に進み、入力イベント処理部11
は、イレース操作処理部15を起動し、イレース処理を
行わせ、ステップS1に戻る。なお、イレース処理の詳
細については、後述する。
On the other hand, if it is determined in step S3 that the erasing process has been instructed, that is, if the "Erase" button of the command buttons 31 has been operated, the process proceeds to step S17, where the input event processing unit 11
Starts the erasing operation processing section 15, causes the erasing process to be performed, and returns to step S1. The details of the erasing process will be described later.

【0072】また、ステップS3において、ペイント処
理を行うことが指示されたと判定された場合、即ち、コ
マンドボタン31の中の「Paint」ボタンが操作された
場合、ステップS18に進み、入力イベント処理部11
は、ペイント処理部18を起動し、ペイント処理を行わ
せ、ステップS1に戻る。即ち、ペイント処理では、例
えば、従来と同様の2Dペイントを行うペイントツール
によって、ユーザによる入力装置6の操作にしたがい、
ペーストバッファに記憶された画像の一部が消去され、
あるいは、他の画像(文字、図形を含む)が付加され
る。
If it is determined in step S3 that the user has instructed to perform the paint process, that is, if the "Paint" button of the command buttons 31 has been operated, the flow advances to step S18 to execute the input event processing unit. 11
Starts the paint processing unit 18 to perform the paint processing, and returns to step S1. That is, in the paint processing, for example, the user operates the input device 6 using a paint tool that performs the same 2D paint as in the related art.
Part of the image stored in the paste buffer is deleted,
Alternatively, another image (including characters and graphics) is added.

【0073】例えば、上述したように、2次元画像に表
示された3次元物体の面に凹凸がある場合において、コ
ピー処理によって、その面の展開画像を、ペーストバッ
ファに記憶させ、そのペーストバッファ上で、ペイント
処理によって、凹凸の部分を削除し、その削除後の画像
を、ペースト処理によって、元の3次元物体の面に貼り
付けることにより、凹凸が取り除かれた3次元物体が表
示された2次元画像を得ることができる。また、例え
ば、図5(A)に示したような3次元物体が表示された
2次元画像を対象に、コピー処理を行い、その壁面の展
開画像を、ペーストバッファに記憶させ、そのペースト
バッファに記憶された画像に、ペイント処理によって、
「ABC」の文字や、「DEF」の文字を描き、それ
を、ペースト処理によって、元の壁面に貼り付けること
で、図5(B)に示したような自然な2次元画像を得る
ことができる。即ち、2Dペイントによって、3次元的
な描画を、容易に行うことができる。
For example, as described above, when the surface of the three-dimensional object displayed in the two-dimensional image has irregularities, the developed image of the surface is stored in the paste buffer by the copy process, and is stored in the paste buffer. Then, the three-dimensional object from which the unevenness has been removed is displayed by removing the uneven portion by the paint process and pasting the image after the deletion on the surface of the original three-dimensional object by the paste process. A two-dimensional image can be obtained. In addition, for example, a copy process is performed on a two-dimensional image in which a three-dimensional object as shown in FIG. 5A is displayed, and a developed image of the wall surface is stored in a paste buffer, and the paste buffer stores the developed image. By painting the stored image,
By drawing the letters "ABC" and "DEF" and pasting them on the original wall by paste processing, a natural two-dimensional image as shown in FIG. 5B can be obtained. it can. That is, three-dimensional drawing can be easily performed by 2D paint.

【0074】次に、例えば、図9または図10で説明し
たコピー処理またはペースト処理を行う場合に、図9
(A)または図10(B)に示したように、頂点P1
至P4または頂点P1’乃至P4’の位置を、正確に、特
徴点として指定することは、操作に熟練したユーザであ
っても困難である。即ち、例えば、図9に示したような
コピー処理を行う場合において、ユーザが指定する特徴
点P1乃至P4は、例えば、図12に示すように、本来指
定すべき頂点の位置からずれるのが一般的である。さら
に、かなり操作に熟練したユーザであっても、2次元画
像がぼけていたり、また、2次元画像にぶれがある場合
には、本来指定すべき頂点の位置を、正確に、特徴点と
して指定するのは困難である。
Next, for example, when performing the copy processing or the paste processing described in FIG. 9 or FIG.
(A) or as shown in FIG. 10 (B), the user positions the vertex P 1 to P 4 or vertices P 1 'to P 4', precisely, be designated as a feature point is skilled in the operation Even difficult. That is, for example, when performing the copy processing as shown in FIG. 9, the feature points P 1 to P 4 designated by the user are shifted from the positions of the vertices to be designated as shown in FIG. Is common. Furthermore, even if the user is quite skilled in operation, if the two-dimensional image is blurred or the two-dimensional image is blurred, the position of the vertex to be originally specified is accurately specified as a feature point. It is difficult to do.

【0075】そこで、図7のステップS7では、ユーザ
が指定した特徴点を、本来指定すべき位置に補正する自
動補正処理が行われるようになされている。
Therefore, in step S7 in FIG. 7, an automatic correction process for correcting a feature point specified by the user to a position to be originally specified is performed.

【0076】即ち、コピー操作処理部12またはペース
ト操作処理部13は、ステップS7において、変換指定
処理部19を起動し、ユーザが入力装置6を操作するこ
とによって指定した形状情報と特徴点を供給する。
That is, the copy operation processing section 12 or the paste operation processing section 13 activates the conversion specification processing section 19 in step S7 and supplies the shape information and the feature points specified by the user operating the input device 6. I do.

【0077】変換指定処理部19は、形状情報および特
徴点を受信すると、その特徴点を補正する自動補正処理
を行う。
Upon receiving the shape information and the feature points, the conversion designation processing unit 19 performs an automatic correction process for correcting the feature points.

【0078】ここで、特徴点として指定すべき点は、後
述するように、基本的に、コピー処理またはペースト処
理の対象とする3次元形状の面の輪郭線(境界線)上の
点になっている。そこで、変換指定処理部19では、コ
ピー処理またはペースト処理の対象とする3次元形状
(の面)の輪郭線を抽出し、その輪郭線上に位置するよ
うに、特徴点を補正するようになっている。
Here, the points to be designated as the feature points are basically points on the contour line (boundary line) of the three-dimensional surface to be copied or pasted as described later. ing. Therefore, the conversion designation processing unit 19 extracts the contour of (the surface of) the three-dimensional shape to be subjected to the copy processing or the paste processing, and corrects the feature points so as to be positioned on the contour. I have.

【0079】図13は、変換指定処理部19が行う自動
補正処理を説明するフローチャートを示している。な
お、ここでは、説明を簡単にするために、例えば、図1
2に示したように、コピー処理またはペースト処理の対
象となる、2次元画像に表示された3次元物体の面が、
四角形であり、従って、同図に示したように、特徴点と
して、その四角形の4つの頂点を指定すべき場合を例に
説明を行う。
FIG. 13 is a flowchart for explaining the automatic correction process performed by the conversion designation processing unit 19. Here, for simplicity of explanation, for example, FIG.
As shown in FIG. 2, the surface of the three-dimensional object displayed in the two-dimensional image to be copied or pasted is
It is a rectangle, and therefore, as shown in the figure, a case where four vertices of the rectangle should be designated as the feature points will be described as an example.

【0080】変換指定処理部19では、まず最初に、ス
テップS21において、ユーザが入力(指定)した特徴
点のうちの、隣接する2点の組が選択される。即ち、特
徴点として指定すべき点は、上述したように、基本的
に、コピー処理またはペースト処理の対象とする、2次
元画像に表示された3次元物体の面の輪郭線上の点であ
り、さらに、後述するように、その輪郭線上のどの位置
を指定すべきかは、3次元物体の形状によって、あらか
じめ定められている。従って、ユーザが入力した特徴点
のうち、輪郭線上において隣接する2つの特徴点は、形
状情報に基づいて認識することができるので、変換指定
処理部19は、そのようにして認識した2つの特徴点の
組のうちの1つを、ステップS21において選択する。
First, in step S21, the conversion designation processing section 19 selects a pair of two adjacent points from among the feature points input (designated) by the user. That is, as described above, the points to be designated as the feature points are basically points on the contour line of the surface of the three-dimensional object displayed in the two-dimensional image to be subjected to the copy processing or the paste processing, Further, as described later, which position on the contour is to be designated is determined in advance by the shape of the three-dimensional object. Therefore, among the feature points input by the user, two feature points adjacent on the contour line can be recognized based on the shape information. One of the set of points is selected in step S21.

【0081】その後、ステップ22に進み、後述するス
テップS23でエッジ検出の対象とする領域(以下、適
宜、エッジ候補領域という)が検出される。即ち、ステ
ップS22では、例えば、ステップS21で選択した2
つの特徴点(以下、適宜、選択特徴点という)を結ぶ線
分が求められ、その線分上の画素から所定の距離(例え
ば、5画素分の距離)の範囲内にある画素が検出され
る。そして、そのような画素で構成される領域が、エッ
ジ候補領域とされる。
Thereafter, the process proceeds to step 22, where a region to be subjected to edge detection (hereinafter, appropriately referred to as an edge candidate region) is detected in step S23 described later. That is, in step S22, for example, the 2 selected in step S21
A line segment connecting two feature points (hereinafter, appropriately referred to as a selected feature point) is obtained, and pixels within a predetermined distance (for example, a distance of 5 pixels) from pixels on the line segment are detected. . Then, an area composed of such pixels is set as an edge candidate area.

【0082】即ち、例えば、図12に示したように、特
徴点P1乃至P4が指定された場合において、そのうちの
特徴点P1とP2が、選択特徴点として選択されたときに
は、図14に斜線を付して示すような領域が、エッジ候
補領域として検出される。
That is, for example, as shown in FIG. 12, when feature points P 1 to P 4 are designated, when feature points P 1 and P 2 are selected as selected feature points, A region indicated by hatching in FIG. 14 is detected as an edge candidate region.

【0083】なお、ステップS22において、2つの選
択特徴点を結ぶ線分上の画素から、どの程度の距離の範
囲内にある画素を検出するかは、あらかじめ設定してお
くこともできるし、ユーザに、入力装置6を操作するこ
とにより入力してもらうようにすることも可能である。
In step S22, it is possible to set in advance how far a pixel within a range from the pixels on the line segment connecting the two selected feature points is to be detected. Alternatively, it is also possible to have the user input by operating the input device 6.

【0084】エッジ候補領域の検出後は、ステップS2
3に進み、そのエッジ候補領域を対象として、エッジの
検出が行われる。
After the edge candidate area is detected, step S2
Proceeding to 3, the edge is detected for the edge candidate area.

【0085】ここで、エッジの検出方法としては、従来
より各種の方法が提案されており、そのうちのいずれか
によって行うことも可能であるが、ここでは、例えば、
以下の手法により行う。
Here, various methods have been conventionally proposed as a method for detecting an edge, and it is possible to use any one of them.
This is performed by the following method.

【0086】即ち、ここでは、エッジ候補領域内の画素
が、ソーベルオペレータ(Sobel operator)と呼ばれる
エッジ検出用のフィルタによってフィルタリングされ、
各画素におけるグラディエント(gradient)(グラディ
エントベクトル)が求められる。このグラディエントが
大きい画素をエッジとして検出する手法は、従来より知
られているが、ここでは、さらに、2つの選択特徴点を
結ぶ線分に直交する方向の単位ベクトル、即ち、法線ベ
クトルと、エッジ候補領域内の各画素のグラディエント
それぞれとの内積が演算され、その内積が所定の閾値以
上の画素が、エッジを構成する画素(以下、適宜、エッ
ジ画素という)として検出される。
That is, in this case, pixels in the edge candidate area are filtered by an edge detection filter called a Sobel operator,
A gradient (gradient vector) at each pixel is determined. A method of detecting a pixel having a large gradient as an edge is conventionally known, but here, further, a unit vector in a direction orthogonal to a line connecting two selected feature points, that is, a normal vector, An inner product of each pixel in the edge candidate area with each gradient is calculated, and a pixel whose inner product is equal to or larger than a predetermined threshold is detected as a pixel forming an edge (hereinafter, appropriately referred to as an edge pixel).

【0087】ここで、特徴点としては、図12に示した
ように、コピー処理またはペースト処理の対象とする3
次元物体を構成する面である四角形の頂点には一致しな
いまでも、それに近い点が指定される。従って、2つの
選択特徴点を結ぶ線分は、コピー処理またはペースト処
理の対象とする3次元物体を構成する面である四角形の
輪郭線にほぼ一致している。その結果、法線ベクトルと
グラディエントとの内積は、グラディエントの、法線ベ
クトル方向の成分、即ち、グラディエントの、輪郭線に
ほぼ直交する方向の成分を表すから、この内積の大小に
よってエッジを検出することにより、グラディエントそ
のものの大小によってエッジを検出する場合に比較し
て、ノイズ等の影響を低減したエッジ検出を行うことが
できる。即ち、2次元画像上のノイズや、縞模様等のテ
クスチャの影響を受けにくいエッジ検出を行うことがで
きる。
Here, as shown in FIG. 12, the feature points to be subjected to copy processing or paste processing are as follows.
A point near, if not coincident with, a vertex of a quadrangle which is a surface forming a three-dimensional object is specified. Therefore, the line segment connecting the two selected feature points almost coincides with the rectangular outline, which is a surface constituting the three-dimensional object to be subjected to the copy processing or the paste processing. As a result, the inner product of the normal vector and the gradient represents a component of the gradient in the direction of the normal vector, that is, a component of the gradient in a direction substantially orthogonal to the contour. Therefore, the edge is detected based on the magnitude of the inner product. This makes it possible to perform edge detection in which the influence of noise and the like is reduced as compared with the case where edges are detected based on the magnitude of the gradient itself. That is, it is possible to perform edge detection that is not easily affected by noise on a two-dimensional image or texture such as a stripe pattern.

【0088】エッジ画素の検出後は、ステップS24に
進み、そのエッジ画素を通る直線が、例えば、最小自乗
法によって求められる。即ち、ステップS24では、ス
テップS23で検出されたエッジ画素からの距離の自乗
の総和を最小にする直線(以下、適宜、エッジ直線とい
う)が求められる。
After detecting the edge pixel, the process proceeds to step S24, and a straight line passing through the edge pixel is obtained by, for example, the least square method. That is, in step S24, a straight line that minimizes the sum of the squares of the distances from the edge pixels detected in step S23 (hereinafter, appropriately referred to as an edge straight line) is obtained.

【0089】そして、ステップS25に進み、ユーザが
入力した特徴点のうちの、隣接する2点の組すべてにつ
いて、エッジ直線が求められたかどうかが判定され、ま
だ、隣接する2つの特徴点の組すべてについて、エッジ
直線が求められていないと判定された場合、ステップS
21に戻り、また、エッジ直線が求められていない、隣
接する2つの特徴点が、選択特徴点として選択され、以
下、同様の処理が繰り返される。
Then, the process proceeds to a step S25, where it is determined whether or not an edge straight line has been obtained for all pairs of two adjacent feature points among the feature points input by the user. If it is determined that the edge straight line has not been obtained for all the cases, the process proceeds to step S
21, two adjacent feature points for which no edge straight line has been determined are selected as selected feature points, and the same processing is repeated thereafter.

【0090】また、ステップS25において、隣接する
2つの特徴点の組すべてについて、エッジ直線が求めら
れたと判定された場合、即ち、図12において、特徴点
1とP2の組、P2とP3の組、P3とP4の組、P4とP1
の組それぞれについて、エッジ直線が求められた場合、
ステップS26に進み、その4つの組について求められ
た4つのエッジ直線の交点が求められる。即ち、特徴点
4およびP1の組について求められたエッジ直線と特徴
点P1およびP2の組について求められたエッジ直線との
交点(以下、適宜、第1の交点という)、特徴点P1
よびP2の組について求められたエッジ直線と特徴点P2
およびP3の組について求められたエッジ直線との交点
(以下、適宜、第2の交点という)、特徴点P2および
3の組について求められたエッジ直線と特徴点P3およ
びP4の組について求められたエッジ直線との交点(以
下、適宜、第3の交点という)、特徴点P3およびP4
組について求められたエッジ直線と特徴点P4およびP1
の組について求められたエッジ直線との交点(以下、適
宜、第4の交点という)が求められる。さらに、ステッ
プS26では、各交点に最も近い特徴点が、その交点の
位置に補正され、即ち、特徴点P1乃至P4が、第1乃至
第4の交点の位置にそれぞれ補正され、リターンする。
If it is determined in step S25 that an edge straight line has been obtained for all two sets of adjacent feature points, that is, in FIG. 12, the set of feature points P 1 and P 2 , P 2 P 3 set, the set of P 3 and P 4, P 4 and P 1
For each set of, if the edge straight line is found,
Proceeding to step S26, the intersections of the four edge straight lines determined for the four sets are determined. That is, an intersection (hereinafter, appropriately referred to as a first intersection) between an edge straight line obtained for the set of feature points P 4 and P 1 and an edge straight line obtained for the set of feature points P 1 and P 2 , a feature point P 1 and set edge obtained for the P 2 straight and the feature point P 2
And the intersection between the obtained edge straight for the set of P 3 (hereinafter referred to as a second intersection point), the edge line and the feature point obtained for the set of feature points P 2 and P 3 of P 3 and P 4 Intersecting points (hereinafter appropriately referred to as third intersecting points) with the edge straight line obtained for the set, and the edge straight lines and the feature points P 4 and P 1 obtained for the set of feature points P 3 and P 4
(Hereinafter, appropriately referred to as a fourth intersection) with the edge straight line determined for the set of. Further, in step S26, the nearest feature point at each intersection, is corrected to the position of the intersection, i.e., the feature point P 1 to P 4 are respectively corrected to a position of the first to fourth intersection, returns .

【0091】以上のような自動補正処理によれば、ユー
ザが指定した特徴点P1乃至P4が、本来、特徴点として
指定すべき四角形の頂点の位置に移動されるので、ユー
ザは、本来、特徴点として指定すべき位置を、正確に指
定せずに済むようになる。即ち、ユーザは、本来、特徴
点として指定すべき位置に近い点を指定するだけで済
む。
According to the automatic correction process described above, the feature points P 1 to P 4 designated by the user are moved to the positions of the vertices of the quadrangle that should be designated as feature points. Thus, the position to be specified as a feature point does not have to be specified accurately. That is, the user only needs to specify a point close to the position to be originally specified as the feature point.

【0092】なお、図7の実施の形態では、特徴点の自
動補正処理を必ず行うようにしたが、自動補正処理は、
ユーザからの指示があった場合にのみ行うようにするこ
とが可能である。また、自動補正処理による補正後の特
徴点を、さらに、ユーザによって補正させるようにする
ことも可能である。
In the embodiment of FIG. 7, the automatic correction processing of the feature points is always performed.
It is possible to perform it only when there is an instruction from the user. Further, the feature points after the correction by the automatic correction process can be further corrected by the user.

【0093】次に、特徴点の自動補正処理は、図13で
説明したエッジ画素の検出方法を利用して、例えば、以
下のように行うことも可能である。
Next, the feature point automatic correction processing can be performed, for example, as follows, using the edge pixel detection method described with reference to FIG.

【0094】即ち、いま、注目バッファに、例えば、図
15に示すような、2次元画像が記憶されているとす
る。なお、図15において、斜線を付してある部分が、
2次元画像に表示された3次元物体(これは、3次元空
間における3次元物体を、スクリーンに投影したもので
あるから、以下、適宜、投影画像という)を表してい
る。
That is, it is assumed that a two-dimensional image as shown in FIG. 15 is stored in the buffer of interest. In FIG. 15, the hatched portions are
It represents a three-dimensional object displayed on a two-dimensional image (since this is a three-dimensional object in a three-dimensional space projected onto a screen, hereinafter, appropriately referred to as a projected image).

【0095】図15では、2次元画像について、点PA
およびPBが、3次元物体の投影画像の特徴点として指
定されている。なお、特徴点PAおよびPBは、3次元物
体の投影画像の輪郭線上において、隣接したものとなっ
ている。
In FIG. 15, for the two-dimensional image, the point P A
And P B are designated as feature points of the projected image of the three-dimensional object. Note that the feature points P A and P B are adjacent on the contour line of the projected image of the three-dimensional object.

【0096】いま、注目バッファに記憶された2次元画
像について、図15に示すように、xp軸またはyp
を、それぞれ横軸または縦軸とする2次元座標系(以
下、適宜、スクリーン座標系という)を定義すると、2
次元画像に表示された3次元物体の形状は、形状情報か
ら認識することができ、さらに、3次元物体の形状が分
かれば、その投影画像の、特徴点PAとPBとの間の輪郭
線(投影画像の輪郭線は、基本的に、閉ループを構成す
るから、特徴点PAとPBとの間の輪郭線は2つ存在する
が、ここでは、その2つの輪郭線(図15において、細
線と太線で示す)のうち、その線上に、他の特徴点が存
在しない方(図15において、太線で示す))は、一般
に、1以上のパラメータを用いて表される、xpおよび
pを変数とする関数fによる式f=0で定義すること
ができる(関数fは、3次元物体の形状ごとに、異なる
型(プログラミングでいうところの実装)を有する)。
[0096] Now, the two-dimensional image stored in the target buffer, as shown in FIG. 15, x p axis or y p axis, two-dimensional coordinate system with the horizontal axis or the vertical axis, respectively (hereinafter, the screen Define a coordinate system)
The shape of the three-dimensional object displayed in the dimension image can be recognized from the shape information, further, knowing the shape of the three-dimensional object, of the projection image, the outline between the characteristic points P A and P B contour line (the projected image is basically because constitutes a closed loop is present contour two between the characteristic points P a and P B, wherein, the two contour (FIG. 15 In FIG. 15, a thin line and a thick line indicate that no other feature point exists on the line (shown by a thick line in FIG. 15). In general, x p is expressed using one or more parameters. and y p can be defined by the equation f = 0 by the function as a variable f (function f has every shape of the three-dimensional object, different types of (implementation as referred by programming)).

【0097】即ち、いま、パラメータを、C1,C2,・
・・,CN(Nは1以上の整数)と表すと、特徴点PA
Bとの間の輪郭線は、次式により定義することができ
る。
That is, the parameters are now represented by C 1 , C 2 ,.
..., expressed as C N (N is an integer of 1 or more), the contour line between the characteristic points P A and P B can be defined by the following equation.

【0098】 f(xp,yp,C1,C2,・・・,CN)=0 ・・・(1) 一方、真の輪郭線を構成する画素においては、一般に、
その画素値の、輪郭線と直交する方向の成分が急激に変
化している。従って、式(1)で表されるスクリーン座
標系上の画素の画素値の微分値のうちの、その画素にお
ける法線ベクトル方向(輪郭線と直交する方向)の成分
を最大にするパラメータC1,C2,・・・,CNを求め
れば、そのパラメータを用いて表される式(1)によっ
て定義される線が、真の輪郭線を表しているということ
ができる。
F (x p , y p , C 1 , C 2 ,..., C N ) = 0 (1) On the other hand, in a pixel forming a true contour,
The component of the pixel value in the direction orthogonal to the contour line changes rapidly. Therefore, of the differential value of the pixel value of the pixel on the screen coordinate system represented by the equation (1), the parameter C 1 that maximizes the component of the pixel in the direction of the normal vector (the direction orthogonal to the contour) at that pixel. , C 2 ,..., C N , it can be said that the line defined by equation (1) expressed using the parameters represents the true contour.

【0099】そこで、式(1)によって定義される特徴
点PAとPBとの間の輪郭線に相当する線(上述したよう
に、投影画像の輪郭線に相当する、特徴点PAとPBとの
間の線は2つ存在するが、その2つの線のうち、他の特
徴点が存在しない方)について、エネルギEfを、例え
ば、次式で定義する。
Therefore, a line corresponding to the contour between the feature points P A and P B defined by the equation (1) (as described above, the feature point PA and the feature point P A corresponding to the contour of the projection image). there two lines between the P B, but of its two lines, for one) other feature points are not present, the energy E f, for example, is defined by the following equation.

【0100】[0100]

【数1】 ・・・(2) ここで、式(2)において、Σは、式(1)で表される
線上の画素すべてについてのサメーションをとることを
表す。また、▽はナブラ演算子を表し、B(x p,yp
は、スクリーン座標系の位置(xp,yp)にある画素の
画素値を表す。さらに、ベクトルnf(xp,yp)は、
位置(xp,yp)にある画素における法線ベクトル(図
15)(式(1)で表される線に直交する方向のベクト
ル(ここでは、輪郭線に囲まれる領域の、外側または内
側のうちの、例えば、外側方向のベクトルとする)の、
位置(xp,yp)における単位ベクトル)を表す。ま
た、|x|は、ベクトルxのノルムを表し、・は、内積
を表す。さらに、Kは、式(1)で表される線上の画素
の総数を表す。
(Equation 1)(2) Here, in Expression (2), Σ is represented by Expression (1).
Take summaries for all the pixels on the line
Represent. ▽ represents a nabula operator, and B (x p, Yp)
Is the position of the screen coordinate system (xp, Yp)
Represents a pixel value. Further, the vector nf(Xp, Yp)
Position (xp, YpThe normal vector (Fig.
15) (Vector in the direction orthogonal to the line represented by equation (1)
(In this case, outside or inside the area surrounded by the outline)
Of the sides, for example, the vector in the outward direction)
Position (xp, Yp) Represents a unit vector). Ma
| X | represents the norm of the vector x.
Represents Further, K is a pixel on the line represented by equation (1).
Represents the total number of

【0101】式(2)における▽B(xp,yp)は、式
(1)で表される線上の画素の画素値の微分値、つまり
グラディエントを表すが、これは、ソーベルオペレータ
を用いることで求めることができる。即ち、▽B
(xp,yp)は、次式にしたがって求めることができ
る。
▽ B (x p , y p ) in the equation (2) represents the differential value of the pixel value of the pixel on the line represented by the equation (1), that is, the gradient. It can be obtained by using That is, ▽ B
(X p , y p ) can be obtained according to the following equation.

【0102】 ▽B(xp,yp)=(△xB(xp,yp),△yB(xp,yp)) △xB(xp,yp)=B(xp+1,yp−1)+2B(xp+1,yp) +B(xp+1,yp+1)−(B(xp−1,yp−1) +2B(xp−1,yp)+B(xp−1,yp+1)) △yB(xp,yp)=B(xp−1,yp+1)+2B(xp,yp+1) +B(xp+1,yp+1)−(B(xp−1,yp−1) +2B(xp,yp−1)+B(xp+1,yp−1)) ・・・(3) また、エネルギEfを最大にするパラメータCn(n=
1,2,・・・,N)は、例えば、次のようにして求め
ることができる。即ち、例えば、パラメータCnの初期
値を、Cn’と表すとすると、パラメータCnを、Cn
−εn乃至Cn’+εnの範囲で変えて、式(2)を計算
し、その値が最大になるときのパラメータCnを求めれ
ば良い(εnは、所定の微小値とする)。
[0102] ▽ B (x p, y p ) = (△ x B (x p, y p), △ y B (x p, y p)) △ x B (x p, y p) = B (x p + 1, y p -1) + 2B (x p + 1, y p) + B (x p + 1, y p +1) - (B (x p -1, y p -1) + 2B (x p -1, y p ) + B (x p -1, y p +1)) △ y B (x p, y p) = B (x p -1, y p +1) + 2B (x p, y p +1) + B (x p +1, y p +1) - (B ( x p -1, y p -1) + 2B (x p, y p -1) + B (x p + 1, y p -1)) ··· (3) In addition, the energy E parameters to maximize f C n (n =
, N) can be obtained, for example, as follows. That is, for example, assuming that the initial value of the parameter C n is represented by C n ′, the parameter C n is represented by C n ′.
Equation (2) may be calculated by changing the range from −ε n to C n ′ + ε n , and the parameter C n at which the value is maximized may be obtained (ε n is a predetermined minute value). .

【0103】具体的には、特徴点PAとPBとの間の輪郭
線が、例えば、線分Lであるとすると、式(2)は、次
のように表すことができる。
Specifically, assuming that the contour between the feature points P A and P B is, for example, a line segment L, the equation (2) can be expressed as follows.

【0104】[0104]

【数2】 ・・・(4) ここで、Σは、上述したように、式(1)で表される
線、即ち、ここでは、線分L上の画素すべてについての
サメーションをとることを表す。また、ベクトルn
Lは、式(2)におけるベクトルnf(xp,yp)に相当
し、線分Lの法線ベクトルを表す。さらに、式(4)に
おいて、Kは、線分L上の画素の総数を表す。
(Equation 2) (4) Here, as described above, Σ indicates that the summation is performed on the line represented by the expression (1), that is, here, all the pixels on the line segment L are taken. Also, the vector n
L corresponds to the vector n f (x p , y p ) in equation (2) and represents a normal vector of the line segment L. Further, in equation (4), K represents the total number of pixels on the line segment L.

【0105】一方、特徴点PAとPBとの間の輪郭線が線
分の場合、式(1)は、例えば、3つのパラメータ
1,C2,C3を用いて、次のように表すことができ
る。
On the other hand, when the contour between the feature points P A and P B is a line segment, the equation (1) can be expressed as follows using, for example, three parameters C 1 , C 2 and C 3. Can be expressed as

【0106】 f(xp,yp,C1,C2,C3)=C1p+C2p+C3=0 ・・・(5) そして、いま、特徴点PAまたはPBの座標を、(x1
1)または(x2,y2)とそれぞれすると、式(5)
におけるパラメータC1,C2,C3は、次のように表す
ことができる。
[0106] f (x p, y p, C 1, C 2, C 3) = C 1 x p + C 2 y p + C 3 = 0 ··· (5) Then, Now, the feature point P A or P B By the coordinates of (x 1 ,
y 1 ) or (x 2 , y 2 ), the expression (5)
The parameters C 1 , C 2 , and C 3 in can be expressed as follows.

【0107】 C1=y1−y2,C2=−x1+x2,C3=x12−x21 ・・・(6) 従って、この場合、式(6)で表される値を、パラメー
タC1,C2,C3の初期値C1’,C2’,C3’として、
それぞれの値を変えながら、式(4)で表されるエネル
ギEfを計算し、そのエネルギEfが最大になるときのパ
ラメータC1,C2,C3を求める。このときのパラメー
タC1,C2,C3を用いて表される式(5)は、特徴点
AとPBとの間の真の輪郭線を表しており、従って、式
(5)で表される線上に、特徴点PAとPBを移動すれ
ば、特徴点PAとPBは、真の輪郭線上に移動されること
になる。
C 1 = y 1 −y 2 , C 2 = −x 1 + x 2 , C 3 = x 1 y 2 −x 2 y 1 (6) Accordingly, in this case, As the initial values C 1 ′, C 2 ′, C 3 ′ of the parameters C 1 , C 2 , C 3
The energy E f represented by the equation (4) is calculated while changing each value, and the parameters C 1 , C 2 , and C 3 when the energy E f is maximum are obtained. Parameter C 1, C 2, C 3 with formula represented in this case (5) represents the true contour line between the characteristic points P A and P B, therefore, the formula (5) in the line represented, if moving the feature points P a and P B, the feature point P a and P B, is to be moved on the true contour line.

【0108】なお、特徴点PAとPBとの間の輪郭線が線
分の場合、式(6)から明らかなように、パラメータC
1,C2,C3を変えるということは、特徴点PAまたはP
Bのそれぞれの座標(x1,y1)または(x2,y2)を
変えることに相当し、従って、座標x1,y1,x2,y2
が、関数fのパラメータであるということができる。
When the contour between the feature points P A and P B is a line segment, as is apparent from the equation (6), the parameter C
Changing 1 , C 2 and C 3 means that the characteristic point P A or P
Each coordinates B (x 1, y 1) or (x 2, y 2) corresponds to changing, therefore, the coordinates x 1, y 1, x 2 , y 2
Is a parameter of the function f.

【0109】また、特徴点PAとPBとの間の輪郭線が線
分の場合には、式(5)における関数fの3つのパラメ
ータC1,C2,C3すべてについて、特徴点PAおよびP
Bによって初期値が与えられるが、特徴点PAとPBとの
間の輪郭線が曲線の場合には、関数fのパラメータすべ
てについて初期値が与えられるとは限らない。この場
合、初期値が与えられないパラメータについては、あら
かじめ設定しておいた値を、初期値として与えても良い
し、あるいは、初期値とする値を、ユーザに入力させて
も良い。
When the contour line between the feature points P A and P B is a line segment, the feature points for all three parameters C 1 , C 2 and C 3 of the function f in the equation (5) are obtained. P A and P
An initial value is given by B , but if the contour between the feature points P A and P B is a curve, the initial value is not always given for all parameters of the function f. In this case, for a parameter for which an initial value is not provided, a preset value may be provided as an initial value, or a value to be used as an initial value may be input by a user.

【0110】さらに、上述の場合においては、説明を簡
単にするために、隣接する2つの特徴点だけに注目して
説明を行ったが、この場合、実際の処理では、以下のよ
うな問題が生じることがある。即ち、いま、輪郭線上
に、特徴点#1、それに隣接する特徴点#2、さらにそ
れに隣接する特徴点#3の3つの特徴点が指定されたと
して、特徴点#1および#2に注目して、上述の自動補
正処理を行い、さらに、特徴点#2および#3に注目し
て自動補正処理を行った場合、特徴点#1および#2に
注目して自動補正処理を行って得られる補正後の特徴点
#2の位置と、特徴点#2および#3に注目して自動補
正処理を行って得られる補正後の特徴点#2の位置とが
ずれることがある。
Further, in the above case, for simplicity of description, the description has been made focusing on only two adjacent feature points. In this case, however, the following problems occur in actual processing. May occur. That is, assuming that three feature points, a feature point # 1, a feature point # 2 adjacent to the feature point # 1, and a feature point # 3 adjacent to the feature point # 1, have been designated on the contour, attention is paid to feature points # 1 and # 2. When the above-described automatic correction processing is performed, and the automatic correction processing is performed by focusing on the feature points # 2 and # 3, the automatic correction processing is performed by focusing on the feature points # 1 and # 2. In some cases, the position of the corrected feature point # 2 and the position of the corrected feature point # 2 obtained by performing the automatic correction process while paying attention to the feature points # 2 and # 3 may be shifted.

【0111】そこで、実際の処理では、特徴点#1およ
び#2の間の輪郭線を定義する式(1)のパラメータ
(以下、適宜、第1のパラメータという)、並びに特徴
点#2および#3の間の輪郭線を定義する式(1)のパ
ラメータ(以下、適宜、第2のパラメータという)は、
補正後の特徴点#2の上述したような位置ずれが生じな
いように変えるのが望ましい。この場合、第1と第2の
パラメータは独立ではなくなり、それらの間の関係は、
補正後の特徴点#2の位置ずれが生じないという条件に
拘束されるため、例えば、特徴点#1および#2に注目
して得られる式(2)のエネルギEfを最大にする第1
のパラメータと、特徴点#2および#3に注目して得ら
れる式(2)のエネルギEfを最大にする第2のパラメ
ータとが、特徴点#2の位置ずれが生じないという条件
を満足する関係にならないことがある。そこで、この場
合には、例えば、特徴点#1および#2に注目して得ら
れる式(2)のエネルギEfと、特徴点#2および#3
に注目して得られる式(2)のエネルギEfとの和を最
大にする第1および第2のパラメータを求めるようにす
れば良い。
Therefore, in the actual processing, the parameters of equation (1) defining the contour between feature points # 1 and # 2 (hereinafter referred to as first parameters as appropriate), and feature points # 2 and # 2 The parameters of equation (1) that define the contour between 3 (hereinafter referred to as second parameters, as appropriate) are:
It is desirable to change the corrected feature point # 2 so that the above-described positional displacement does not occur. In this case, the first and second parameters are no longer independent and the relationship between them is
Since the positional deviation of the feature point # 2 after correction is restricted to the condition that no, for example, first to maximize the energy E f characteristic points # 1 and # are expressions obtained by paying attention to 2 (2) 1
And the second parameter that maximizes the energy E f in equation (2) obtained by focusing on feature points # 2 and # 3 satisfy the condition that no displacement of feature point # 2 occurs. May not be in a relationship. Therefore, in this case, for example, the energy E f characteristic points # 1 and # are expressions obtained by paying attention to 2 (2), feature points # 2 and # 3
, The first and second parameters that maximize the sum with the energy E f of Equation (2) obtained by paying attention to

【0112】なお、ここでは、説明を簡単にするため
に、1の特徴点#2の位置がずれる場合を例にしたが、
このずれが生じることは、同一の輪郭線上にある特徴点
すべてについていえるので、同一の輪郭線上にある、隣
接する特徴点の組の間の輪郭線を定義する式(1)のパ
ラメータは、すべての組について、上述の手法を適用し
て求めるのが望ましい。即ち、同一の輪郭線上にある、
隣接する特徴点の組についてのエネルギEfの総和を求
め、その総和を最大にするパラメータを求めるのが望ま
しい。
Here, for the sake of simplicity, the case where the position of one feature point # 2 is shifted has been described as an example.
Since the occurrence of this shift can be said for all the feature points on the same contour, the parameters of the equation (1) that define the contour between adjacent pairs of feature points on the same contour are all Is desirably determined by applying the above method. That is, they are on the same contour,
It is desirable to find the sum of the energies E f for the pair of adjacent feature points and find the parameter that maximizes the sum.

【0113】次に、図16のフローチャートを参照し
て、上述の自動補正処理が図7のステップS7で行われ
る場合の処理について、さらに説明する。
Next, the processing when the above-described automatic correction processing is performed in step S7 in FIG. 7 will be further described with reference to the flowchart in FIG.

【0114】なお、ここでは、説明を簡単にするため、
投影画像を四角形とし、その四角形の4つの頂点が、特
徴点P1乃至P4として指定されているものとする。
Here, for simplicity of explanation,
The projected image is a square, the four vertices of the rectangle, and what is designated as a feature point P 1 to P 4.

【0115】また、この場合、式(5)における3つの
パラメータC1,C2,C3、つまり、式(6)における
2つの特徴点のx座標x1,x2とy座標y1,y2を変え
ながら、式(4)で表されるエネルギEfを計算し、そ
の値を最大にするx1,x2,y1,y2を求めることとな
るが、この計算量は比較的多いものとなる。そこで、こ
こでは、計算量を少なくするために、簡略化した手法を
用いることとする。
In this case, the three parameters C 1 , C 2 and C 3 in the equation (5), that is, the x-coordinates x 1 and x 2 and the y-coordinates y 1 and y 1 , of the two feature points in the equation (6) While changing y 2 , the energy E f expressed by the equation (4) is calculated, and x 1 , x 2 , y 1 and y 2 that maximize the value are obtained. It will be more appropriate. Therefore, here, a simplified method is used to reduce the amount of calculation.

【0116】即ち、ここでは、まず最初に、ステップS
31において、4つの特徴点P1乃至P4のうちのいずれ
か1つが、注目特徴点として選択され、ステップS32
に進み、その注目特徴点を通る(その注目特徴点と他の
特徴点とを結んでつくられる)四角形の2つの辺のエネ
ルギEfがそれぞれ求められる。即ち、例えば、いま、
図17において、斜線で示す投影画像について、点P1
乃至P4が特徴点として指定され、そのうちの特徴点P4
が注目特徴点として選択されたとする。この場合、ステ
ップS32では、四角形P1234の4辺のうちの、
注目特徴点P 4を通る辺P41およびP34のエネルギ
fが求められる。
That is, here, first, step S
At 31, four feature points P1Or PFourAny of
One is selected as the feature point of interest, and step S32
To pass through the feature point of interest (the feature point of interest and other
(Made by connecting feature points) Energy of two sides of a square
Lugi EfAre required respectively. That is, for example,
In FIG. 17, the point P1
Or PFourAre designated as feature points, and the feature points PFour
Is selected as a feature point of interest. In this case,
In step S32, the square P1PTwoPThreePFourOf the four sides of
Attention feature point P FourSide P passing throughFourP1And PThreePFourEnergy
EfIs required.

【0117】そして、ステップS33に進み、ステップ
S32でエネルギEfが求められた2つの辺のうち、そ
のエネルギEfの大きい方が、より投影画像の輪郭に沿
ったものとして選択され、その辺を延長した直線(この
直線も、以下、適宜、エッジ直線という)に沿って、注
目特徴点が移動される。そして、その移動後の位置にお
ける注目特徴点と、それに隣接する2つの特徴点それぞ
れとがつくる2つの辺のエネルギEfが算出される。即
ち、例えば、図17において、特徴点P4が注目特徴点
とされている場合に、辺P41またはP34のエネルギ
fのうちの、例えば、辺P34のエネルギの方が、辺
41のエネルギに比較して大のときには、注目特徴点
4が、図中、矢印Dで示すように、直線P34に沿っ
て移動される。そして、その移動後の注目特徴点P4
それに隣接する1の特徴点P3とがつくる辺P34のエ
ネルギEf、および移動後の注目特徴点P4とそれに隣接
する他の1の特徴点P1とがつくる辺P41のエネルギ
fが求められる。
[0117] Then, the process proceeds to step S33, among the two sides energy E f is determined in step S32, the larger its energy E f is selected as that along the contour of the more projected image, the sides The feature point of interest is moved along a straight line (hereinafter, this straight line is also referred to as an edge straight line) as appropriate. Then, the feature point at the position after the movement, it the energy E f of the two sides each of the two feature points and the adjacent building is calculated. That is, for example, in FIG. 17, when the feature point P 4 is set as the feature point of interest, for example, the energy of the side P 3 P 4 of the energy E f of the side P 4 P 1 or P 3 P 4 Is larger than the energy of the side P 4 P 1 , the target feature point P 4 is moved along the straight line P 3 P 4 as shown by the arrow D in the figure. Then, the side P 3 P 4 of the energy E f, and after moving feature point P 4 with other 1 adjacent thereto to the feature point P 3 of 1 adjacent thereto as the target feature point P 4 after the movement is made side P 4 P 1 of the energy E f to make the feature point P 1 of is determined.

【0118】その後、ステップS34に進み、ステップ
S33で求められた2つの辺のエネルギEfの和が最大
値となっているかどうかが判定され、最大値になってい
ないと判定された場合、ステップS33に戻り、注目特
徴点が、再度、エッジ直線に沿って移動され、以下、同
様の処理が繰り返される。
[0118] Then, the process proceeds to step S34, when the sum of the energy E f of the two sides determined at step S33 it is determined whether the maximum value, is determined not to have reached the maximum value, step Returning to S33, the feature point of interest is moved again along the edge straight line, and the same processing is repeated thereafter.

【0119】一方、ステップS34において、ステップ
S33で求められた2つの辺のエネルギEfの和が最大
値となっていると判定された場合、即ち、例えば、上述
したように、注目特徴点P4を、直線P34に沿って移
動することにより、辺P41の法線ベクトルn14が、本
来、特徴点P1およびP4によって指定されるべき2つの
頂点を結ぶ辺に、ほぼ直交するようになった場合、ステ
ップS35に進み、ユーザによって指定された特徴点P
1乃至P4すべてを、注目特徴点として処理を行ったかど
うかが判定され、まだ、ユーザによって指定された特徴
点P1乃至P4すべてを、注目特徴点として処理を行って
いないと判定された場合、ステップS31に戻り、ま
だ、注目特徴点とされていない特徴点が、新たに注目特
徴点として選択され、ステップS32以下の処理を繰り
返す。
[0119] On the other hand, in step S34, when the sum of the energy E f of the two sides obtained in step S33 is determined to be the maximum value, i.e., for example, as described above, feature point P 4, by moving along a straight line P 3 P 4, the normal vector n 14 sides P 4 P 1 is originally the side connecting the two vertices to be designated by the feature point P 1 and P 4 , If they become substantially orthogonal, the process proceeds to step S35, and the feature point P designated by the user
All 1 to P 4, is determined whether or have been processed as the target feature points, still, all feature points P 1 to P 4 specified by the user, is determined not processed as feature point In this case, the process returns to step S31, and a feature point that has not yet been set as a feature point of interest is newly selected as a feature point of interest, and the processing of step S32 and subsequent steps is repeated.

【0120】また、ステップS35において、ユーザに
よって指定された特徴点P1乃至P4すべてを、注目特徴
点として処理を行ったと判定された場合、ステップS3
6に進み、特徴点P1乃至P4の中で、前回のステップS
33の処理で移動した移動量(移動前の特徴点と、移動
後の特徴点との間の距離)が、所定の閾値εより大きい
ものがあるかどうかが判定される。ステップS36にお
いて、特徴点P1乃至P4の中で、前回のステップS33
の処理で移動した移動量が、所定の閾値εより大きいも
のがあると判定された場合、ステップS31に戻り、以
下、同様の処理を繰り返す。即ち、再び、特徴点P1
至P4を、順次、注目特徴点として、各注目特徴点がつ
くる2つの辺のエネルギの和が最大となるように、その
位置が移動される。
If it is determined in step S35 that all the feature points P 1 to P 4 specified by the user have been processed as feature points of interest, the process proceeds to step S3.
6 and among the feature points P 1 to P 4 , the previous step S
It is determined whether or not the movement amount (distance between the feature point before movement and the feature point after movement) moved in the process of 33 is larger than a predetermined threshold value ε. In step S36, among the characteristic points P 1 to P 4, the last step S33
If it is determined that there is a movement amount that is larger than the predetermined threshold value ε in the processing of step, the process returns to step S31, and thereafter, the same processing is repeated. That is, the feature points P 1 to P 4 are sequentially set as the feature points of interest, and their positions are moved so that the sum of the energies of the two sides created by each feature point of interest becomes maximum.

【0121】一方、ステップS36において、特徴点P
1乃至P4の中で、前回のステップS33の処理で移動し
た移動量が、所定の閾値εより大きいものがないと判定
された場合、即ち、前回のステップS33の処理におい
て、特徴点P1乃至P4のうちのいずれも、ほとんど移動
されなかった場合、リターンする。
On the other hand, in step S36, the characteristic point P
Among 1 to P 4, when the amount of movement that has moved in the process of the previous step S33 has been determined that there is no greater than a predetermined threshold epsilon, i.e., the processing of the previous step S33, the feature point P 1 or none of the P 4, when hardly moved, and returns.

【0122】次に、図4のコピー操作処理部12または
ペースト操作処理部13では、上述したようして補正さ
れた特徴点と、形状情報とを用いて、逆変換式または順
変換式がそれぞれ算出されるが、この逆変換式および順
変換式の算出方法について説明する。
Next, the copy operation processing unit 12 or the paste operation processing unit 13 shown in FIG. 4 uses the characteristic points corrected as described above and the shape information to form an inverse conversion formula or a forward conversion formula, respectively. The calculation method of the inverse conversion formula and the forward conversion formula will be described.

【0123】例えば、カメラ9(図3)によって、図1
8(A)に示すような3次元空間にある3次元物体を撮
影した場合、カメラ9が出力する2次元画像には、図1
8(B)に示すように、その3次元物体をスクリーンに
投影した投影像(投影画像)が表示される。従って、画
像バッファ(ペーストバッファを除く)には、このよう
な投影画像が表示された2次元画像が記憶される。
For example, the camera 9 (FIG. 3)
When a three-dimensional object in a three-dimensional space as shown in FIG. 8A is photographed, the two-dimensional image output by the camera 9 includes FIG.
As shown in FIG. 8B, a projection image (projection image) obtained by projecting the three-dimensional object on a screen is displayed. Therefore, a two-dimensional image displaying such a projected image is stored in the image buffer (excluding the paste buffer).

【0124】一方、ペーストバッファには、図18
(C)に示すように、3次元空間にある3次元物体の表
面(図18(A))を2次元平面に展開した展開画像が
記憶される。即ち、3次元物体の面が平面であれば、例
えば、その平面を正面から見た2次元画像が、ペースト
バッファに記憶される。また、3次元物体の面が円柱の
側面であれば、例えば、その側面を、2次元平面上に展
開して長方形状にした2次元画像が、ペーストバッファ
に記憶される。さらに、3次元物体の面が球面であれ
ば、例えば、地図の作成で用いられる正距円筒図法その
他の手法で、その球面を、2次元平面上に展開した2次
元画像が記憶される。また、例えば、3次元物体の面が
ベジェ(Bezier)曲面などの2つの助変数s,tで表さ
れる3次の曲面であれば、助変数sまたはtをそれぞれ
横軸または縦軸にして、その曲面を2次元平面に展開し
た2次元画像が、ペーストバッファに記憶される。さら
に、例えば、3次元物体が回転体であれば、その円周の
方向または回転軸の方向をそれぞれ横軸または縦軸にし
て、その回転体を2次元平面に展開して2次元画像が、
ペーストバッファに記憶される。
On the other hand, in the paste buffer, FIG.
As shown in (C), a developed image obtained by developing the surface of a three-dimensional object (FIG. 18A) in a three-dimensional space on a two-dimensional plane is stored. That is, if the plane of the three-dimensional object is a plane, for example, a two-dimensional image of the plane viewed from the front is stored in the paste buffer. If the surface of the three-dimensional object is a side surface of a cylinder, for example, a two-dimensional image obtained by developing the side surface on a two-dimensional plane and making it rectangular is stored in the paste buffer. Further, if the surface of the three-dimensional object is a spherical surface, a two-dimensional image in which the spherical surface is developed on a two-dimensional plane by, for example, an equirectangular projection method or the like used for creating a map is stored. For example, if the surface of the three-dimensional object is a cubic surface represented by two auxiliary variables s and t, such as a Bezier surface, the auxiliary variable s or t is set to the horizontal axis or the vertical axis, respectively. The two-dimensional image obtained by developing the curved surface into a two-dimensional plane is stored in the paste buffer. Furthermore, for example, if the three-dimensional object is a rotating body, the direction of the circumference or the direction of the rotating axis is set to the horizontal axis or the vertical axis, respectively, and the rotating body is developed on a two-dimensional plane to form a two-dimensional image.
Stored in paste buffer.

【0125】コピー処理では、図18(B)に示したよ
うに、注目バッファに記憶された2次元画像に表示され
た3次元物体の(面の)投影画像上の幾つかの特徴点
(図18(B)において、■印で示す部分)と、その3
次元物体の(面の)形状情報を指定すると、逆変換式が
算出され、その逆変換式にしたがい、図18(B)に示
したような投影画像から、図18(C)に示したような
展開画像が生成され、ペーストバッファに記憶される。
また、ペースト処理では、図18(B)に示したよう
に、注目バッファにおいて、3次元物体の(面の)投影
画像を貼り付ける領域上の幾つかの特徴点(図18
(B)において、■印で示す部分)と、その3次元物体
の(面の)形状情報を指定すると、順変換式が算出さ
れ、その順変換式にしたがい、ペーストバッファに記憶
された、図18(C)に示したような画像(展開画像)
から、図18(B)に示したような投影画像が生成さ
れ、画像バッファに貼り付けられる。
In the copy process, as shown in FIG. 18 (B), several characteristic points on the (plane) projection image of the three-dimensional object displayed on the two-dimensional image stored in the buffer of interest. 18 (B), a portion indicated by a triangle) and 3
When the shape information of the (dimensional) surface of the three-dimensional object is designated, an inverse transformation equation is calculated. According to the inverse transformation equation, a projection image as shown in FIG. A developed image is generated and stored in the paste buffer.
Also, in the paste processing, as shown in FIG. 18B, in the buffer of interest, some feature points (FIG. 18) on the region where the (plane) projection image of the three-dimensional object is to be pasted
In (B), when a part indicated by a triangle) and shape information (of a surface) of the three-dimensional object are designated, a forward conversion formula is calculated, and the forward conversion formula is calculated according to the forward conversion formula. Image (expanded image) as shown in 18 (C)
Thus, a projection image as shown in FIG. 18B is generated and pasted to the image buffer.

【0126】従って、逆変換式および順変換式の算出に
あたっては、3次元空間上にある3次元物体、その投影
画像、およびその展開画像の相互の関係が問題となる。
Therefore, when calculating the inverse transform formula and the forward transform formula, the mutual relationship between the three-dimensional object in the three-dimensional space, its projected image, and its developed image becomes a problem.

【0127】そこで、いま、例えば、図19に示すよう
に、展開画像についての2次元座標系、3次元物体につ
いての3次元座標系、および投影画像についての2次元
座標系を考える。なお、展開画像についての2次元座標
系におけるx,y座標はxe,yeと、3次元物体につい
ての3次元座標系におけるx,y,z座標はxo,y o
oと、投影画像についての2次元座標系におけるx,
y座標はxp,ypと、それぞれ表す。また、点(xp
p)における投影画像の画素値(注目バッファの記憶
値)をB(xp,yp)と、点(xe,ye)における展開
画像の画素値(ペーストバッファの記憶値)をC
(xe,ye)と、それぞれ表す。また、展開画像を、3
次元物体の表面に貼り付ける写像をψと、3次元物体を
投影画像に変換する写像をMと、それぞれ表す。
Therefore, for example, as shown in FIG.
The two-dimensional coordinate system for the developed image and the three-dimensional
3D coordinate system and 2D for projected image
Consider a coordinate system. Note that the two-dimensional coordinates of the developed image
The x, y coordinates in the system are xe, YeAnd about three-dimensional objects
X, y, z coordinates in all three-dimensional coordinate systems are xo, Y o,
zoAnd x, in the two-dimensional coordinate system for the projected image
y coordinate is xp, YpRespectively. Also, the point (xp,
ypPixel value of the projected image in ()
Value) to B (xp, Yp) And a point (xe, YeDeployment in)
The pixel value of the image (the stored value of the paste buffer) is C
(Xe, Ye), Respectively. In addition, the developed image
A map to be attached to the surface of a three-dimensional object
A mapping to be converted into a projection image is represented by M.

【0128】ここで、展開画像についての2次元座標
系、3次元物体についての3次元座標系、および投影画
像についての2次元座標系は、任意にとることができ
る。即ち、例えば、3次元物体についての3次元座標系
は、その3次元物体の表現に都合の良い形でとることが
可能である。具体的には、例えば、3次元物体が円柱で
ある場合には、2つの底面である円のうちのいずれか一
方の中心を原点(0,0,0)とし、その回転軸(2つ
の底面である円の中心どうしを結ぶ直線)をyo軸に一
致させるようにすることができる。また、例えば、3次
元物体の面が長方形である場合には、例えば、その長方
形の4つの頂点のうちの最も左下のものを原点(0,
0,0)とし、その長方形の横軸または縦軸を、それぞ
れxo軸またはyo軸に一致させるようにすることができ
る。
Here, the two-dimensional coordinate system for the developed image, the three-dimensional coordinate system for the three-dimensional object, and the two-dimensional coordinate system for the projected image can be arbitrarily set. That is, for example, a three-dimensional coordinate system for a three-dimensional object can be formed in a form convenient for expressing the three-dimensional object. Specifically, for example, when the three-dimensional object is a cylinder, the center of one of the two bottom circles is defined as the origin (0, 0, 0), and its rotation axis (two bottom surfaces) (A straight line connecting the centers of the circles) can be made to coincide with the yo axis. Further, for example, when the surface of the three-dimensional object is a rectangle, for example, the lower left one of the four vertices of the rectangle is defined as the origin (0,
And 0,0), the horizontal axis or the vertical axis of the rectangle, it is possible to so as to coincide with the x o axis or y o axis.

【0129】3次元物体上の点(xo,yo,zo)と、
展開画像上の点(xe,ye)とは、1対1に対応し、そ
れらの間の関係、即ち、写像ψ(またはψ-1)は、幾何
学的計算により求めることができる。従って、3次元物
体上の点(xo,yo,zo)と、投影画像上の点(xp
p)との関係、即ち、写像M(またはM-1)が分かれ
ば、展開画像上の点(xe,ye)を、投影画像上の点
(xp,yp)に変換する写像Mψを求めることができ
る。
The points (x o , y o , z o ) on the three-dimensional object are:
The points (x e , y e ) on the developed image correspond one-to-one, and the relationship between them, that is, the mapping ψ (or ψ −1 ) can be obtained by geometric calculation. Therefore, a point (x o , y o , z o ) on the three-dimensional object and a point (x p ,
If the relationship with y p ), that is, the mapping M (or M −1 ) is known, the point (x e , y e ) on the developed image is converted into a point (x p , y p ) on the projection image. The mapping Mψ can be determined.

【0130】しかしながら、3次元物体と投影画像とだ
けに注目した場合、写像Mは、3次元物体上の点
(xo,yo,zo)が、投影画像上の点(xp,yp)の
いずれに投影されているのかが分からなければ求めるこ
とができない。そして、3次元物体上の点(xo,yo
o)が、投影画像上の点(xp,yp)のいずれに投影
されているのかを、投影画像から求めるためには、基本
的に、前述したような、複数の2次元画像を用意して三
角測量の原理を用いる必要がある。さらに、3次元物体
の3次元モデルを表すために、3次元空間における3次
元物体上の点(xo,yo,zo)を、視点(後述するカ
メラ座標の原点)から見たときの3次元のデータを、テ
ンポラリとして保持しておくためのメモリが必要とな
り、また、そのような3次元のデータを取り扱う計算も
必要となる。
However, when attention is paid only to the three-dimensional object and the projection image, the mapping M is such that the point (x o , y o , z o ) on the three-dimensional object is the point (x p , y If it is not known which of p ) is projected, it cannot be determined. Then, a point (x o , y o ,
z o) is the point (x p on the projection image, whether being projected in any y p), in order to obtain the projected image is basically as described above, a plurality of two-dimensional images It is necessary to prepare and use the principle of triangulation. Furthermore, in order to represent a three-dimensional model of the three-dimensional object, a point (x o , y o , z o ) on the three-dimensional object in the three-dimensional space when viewed from a viewpoint (the origin of camera coordinates described later) A memory for temporarily storing the three-dimensional data is required, and a calculation for handling such three-dimensional data is also required.

【0131】そこで、ここでは、ユーザによって与えら
れる形状情報に基づいて、写像ψを求めるとともに、ユ
ーザによって与えられる特徴点に基づいて、写像Mを求
め、さらに、展開画像と投影画像との関係、即ち、展開
画像を投影画像に変換する写像Mψを求めることとす
る。なお、この写像Mψが順変換式であり、この写像M
ψに相当する変換の逆変換を行う写像(Mψ)-1が逆変
換式である。従って、逆変換式は、写像Mψの逆行列
を、例えば、ガウスの消去法などを用いて計算すること
で求めることができる。
Therefore, here, the mapping ψ is obtained based on the shape information given by the user, the mapping M is found based on the feature points given by the user, and the relationship between the developed image and the projected image is calculated. That is, a mapping Mψ that converts a developed image into a projected image is determined. Note that this mapping Mψ is a forward conversion formula, and this mapping Mψ
The mapping (Mψ) −1 that performs the inverse transformation of the transformation corresponding to ψ is the inverse transformation equation. Therefore, the inverse transformation equation can be obtained by calculating the inverse matrix of the mapping Mψ using, for example, Gaussian elimination.

【0132】このように、逆変換式(Mψ)-1は、順変
換式Mψを求めれば、容易に求めることができるので、
ここでは、順変換式Mψの算出方法について説明する。
As described above, the inverse transform equation (Mψ) −1 can be easily obtained by calculating the forward transform equation Mψ.
Here, a method of calculating the forward conversion formula M # will be described.

【0133】上述したように、3次元物体上の点
(xo,yo,zo)と、展開画像上の点(xe,ye)と
は、1対1に対応するため、点(xo,yo,zo)は、
写像ψと、点(xe,ye)を用いて、式(7)のように
表すことができる。
As described above, since the point (x o , y o , z o ) on the three-dimensional object and the point (x e , y e ) on the developed image correspond one-to-one, the point (X o , y o , z o )
Using the mapping ψ and the point (x e , y e ), it can be expressed as in equation (7).

【0134】[0134]

【数3】 ・・・(7) いま、3次元空間において、3次元物体をカメラ9で撮
影して、その投影画像を得た場合、カメラ9の位置(x
c,yc,zc)を表す3次元座標(以下、適宜、カメラ
座標という)を考えることができ、点(xo,yo
o)のカメラ座標(xc,yc,zc)は、3次元空間に
おける回転移動を表す9の要素をr11,r1 2,r13,r
21,r22,r23,r31,r32,r33とするとともに、3
次元空間における平行移動を表す3つの要素をt1
2,t3として、次式で表すことができる。
(Equation 3) (7) Now, in a three-dimensional space, when a three-dimensional object is photographed by the camera 9 and its projection image is obtained, the position of the camera 9 (x
c , y c , z c ) can be considered, and the points (x o , y o ,
z o) the camera coordinate (x c of, y c, z c) is a 9 elements representing a rotating movement in three-dimensional space r 11, r 1 2, r 13, r
21 , r 22 , r 23 , r 31 , r 32 , r 33 and 3
The three elements representing the translation in the three-dimensional space are t 1 ,
t 2 and t 3 can be represented by the following equations.

【0135】[0135]

【数4】 ・・・(8) 投影画像上の点(xp,yp)は、カメラ座標における3
次元物体上の点(xc,yc,zc)をスクリーン上に投
影したものであり、この変換は、前述の文献1などに記
載されているように、透視変換(射影変換)であるか
ら、分母と分子のいずれもが、x座標、y座標、z座標
のうちのいずれかの一次式(x,y,zのうちのいずれ
かの1次の項と定数項)であるような有理式で表すこと
ができる。即ち、wを、同次座標を表す任意の数とする
と、スクリーン上の投影画像の点(xp,yp)は、同次
座標により、例えば、式(9)のように表すことができ
る。
(Equation 4) (8) points on the projected image (x p, y p) is 3 in the camera coordinate
A point (x c , y c , z c ) on a three-dimensional object is projected on a screen, and this transformation is a perspective transformation (projection transformation) as described in the above-mentioned document 1. From the above, it is assumed that both the denominator and the numerator are linear expressions of any of the x-coordinate, y-coordinate, and z-coordinate (primary and constant terms of x, y, and z). It can be represented by a rational expression. That is, assuming that w is an arbitrary number representing homogeneous coordinates, the point (x p , y p ) of the projected image on the screen can be represented by the homogeneous coordinates, for example, as in equation (9). .

【0136】[0136]

【数5】 ・・・(9) ここで、カメラ9の焦点距離をfとするとともに、カメ
ラ座標系におけるスクリーンの1画素の横または縦の長
さを、それぞれhまたはvとした場合において、式
(9)におけるfhまたはfvは、f×hまたはf×vを
それぞれ表す。
(Equation 5) (9) Here, assuming that the focal length of the camera 9 is f and the horizontal or vertical length of one pixel of the screen in the camera coordinate system is h or v, equation (9) f h or f v in represent respectively the f × h or f × v.

【0137】式(9)から明らかなように、同次座標の
x座標wxpまたはy座標wypを、そのz座標wで除算
した値が、投影画像のx座標xpまたはy座標ypとな
る。
As is apparent from equation (9), the value obtained by dividing the x coordinate wx p or y coordinate wy p of homogeneous coordinates by the z coordinate w is the x coordinate x p or y coordinate y p of the projected image. Becomes

【0138】式(7)乃至(9)から、式(10)を導
くことができる。
From equations (7) to (9), equation (10) can be derived.

【0139】[0139]

【数6】 ・・・(10) 式(10)において、Mは、図19からも明らかなよう
に、ψ(xe,ye)、つまり(xo,yo,zo)を、
(xp,yp)に変換する行列であり、次式のように表さ
れる。
(Equation 6) (10) In equation (10), M is ψ (x e , y e ), that is, (x o , y o , z o ), as is clear from FIG.
This is a matrix to be converted into (x p , y p ), and is represented by the following equation.

【0140】[0140]

【数7】 ・・・(11) 式(10)におけるψ(ψ1,ψ2,ψ3)は、ユーザに
よって与えられる形状情報に基づき、幾何学的計算によ
って求めることができる。また、式(10)における行
列Mは、ユーザによって与えられる特徴点に基づいて求
めることができる。即ち、行列Mは、式(11)に示す
ように、一般には、11の要素m11,m 12,m13
14,m21,m22,m23,m24,m31,m32,m33を未
知数として有するから、例えば、投影画像上の、自由度
が2の5点と、自由度が1の1点との合計6点が特徴点
として指定されれば、m11乃至m14,m21乃至m24,m
31乃至m33を求めることができる。なお、投影画像上
の、上述の6点を超える数の点が指定された場合には、
例えば、最小自乗法などを用いることで、11の要素m
11乃至m14,m21乃至m24,m31乃至m33を求める。
(Equation 7)... (11) ψ (ψ in equation (10)1, ΨTwo, ΨThree) Gives the user
Based on the shape information given by
Can be asked. Also, the line in equation (10)
Column M is calculated based on feature points given by the user.
Can be That is, the matrix M is represented by Expression (11).
Thus, in general, the eleven elements m11, M 12, M13,
m14, Mtwenty one, Mtwenty two, Mtwenty three, Mtwenty four, M31, M32, M33Not
Because it has as a known number, for example, the degree of freedom on the projected image
Are 5 points with 2 points and 1 point with 1 degree of freedom.
If specified as11To m14, Mtwenty oneTo mtwenty four, M
31To m33Can be requested. Note that on the projected image
If more than the above 6 points are specified,
For example, by using the least square method or the like, 11 elements m
11To m14, Mtwenty oneTo mtwenty four, M31To m33Ask for.

【0141】以上のように、ここでは、行列Mは、ユー
ザによって与えられる特徴点に基づいて求めることとし
ているため、カメラ座標における3次元物体の3次元の
データを取り扱う必要がなく、従って、その3次元のデ
ータを用いた計算も行う必要がない。さらに、同一の3
次元物体を複数の位置から撮影した複数の2次元画像を
用いる必要もない。即ち、ある位置から3次元物体を撮
影した1つの2次元画像から、行列Mを求めることがで
きる。その結果、写像Mψ(および(Mψ)-1)も、カ
メラ座標における3次元のデータを用いた計算を行った
り、また、複数の2次元画像を用いたりすることなく求
めることができる。
As described above, here, since the matrix M is determined based on the feature points given by the user, there is no need to handle the three-dimensional data of the three-dimensional object in the camera coordinates. There is no need to perform calculations using three-dimensional data. Furthermore, the same 3
It is not necessary to use a plurality of two-dimensional images obtained by photographing a three-dimensional object from a plurality of positions. That is, the matrix M can be obtained from one two-dimensional image obtained by photographing a three-dimensional object from a certain position. As a result, the mapping Mψ (and (Mψ) −1 ) can also be obtained without performing calculations using three-dimensional data in camera coordinates or using a plurality of two-dimensional images.

【0142】次に、3次元物体として、幾つかのプリミ
ティブな形状のものを用いた場合のψおよびMの算出方
法について説明する。
Next, a description will be given of a method of calculating ψ and M when several primitive shapes are used as a three-dimensional object.

【0143】3次元物体が、例えば、直方体である場合
においては、式(7)のψ、即ち、直方体のある面(長
方形)の、3次元空間上の点(xo,yo,zo)と、展
開画像上の点(xe,ye)との関係は、例えば、次のよ
うに表すことができる。
In the case where the three-dimensional object is, for example, a rectangular parallelepiped, ψ in equation (7), that is, a point (x o , y o , z o ) in a three-dimensional space on a plane (rectangle) of the rectangular parallelepiped. ) And the point (x e , y e ) on the developed image can be expressed, for example, as follows.

【0144】[0144]

【数8】 ・・・(12) 但し、ここでは、投影画像についての2次元座標(以
下、適宜、スクリーン座標という)として、3次元物体
についての3次元座標(以下、適宜、単に、3次元座標
という)におけるzo=0の平面上の座標であって、
x,y座標が等しいもの(xe=xo,ye=yo)、つま
り、3次元物体についての3次元座標系のxy平面を使
用することとしている。また、3次元座標系としては、
直方体のある面のうちの1の頂点が、原点に一致し、か
つその面が、xy平面に含まれるようなものを用いるこ
ととしている。
(Equation 8) (12) Here, as the two-dimensional coordinates (hereinafter, appropriately referred to as screen coordinates) of the projected image, the three-dimensional coordinates (hereinafter, simply referred to as three-dimensional coordinates) of the three-dimensional object are used. coordinates on a plane of z o = 0,
The one having the same x and y coordinates (x e = x o , y e = y o ), that is, the xy plane of the three-dimensional coordinate system for the three-dimensional object is used. Also, as a three-dimensional coordinate system,
One in which one vertex of a certain surface of the rectangular parallelepiped coincides with the origin and the surface is included in the xy plane is used.

【0145】式(12)では、zo=0であるから、式
(11)における行列Mの第3列m1 3,m23,m33は不
要となる。即ち、この場合、式(10)は、次のように
表すことができる。
[0145] In formula (12), since it is z o = 0, the third column m 1 3, m 23, m 33 of the matrix M in equation (11) it becomes unnecessary. That is, in this case, equation (10) can be expressed as follows.

【0146】[0146]

【数9】 ・・・(13) 従って、この場合、求めるべき行列Mの要素は、m11
12,m14,m21,m 22,m24,m31,m32の8個であ
るから、展開画像上の4点に対応する投影画像上の4点
を特徴点として指定すれば(4つの特徴点のtp,yp
標の合計で8個の情報を与えれば)、これらの8個の要
素m11,m12,m14,m21,m22,m24,m31,m32
求めることができる。
(Equation 9)(13) Therefore, in this case, the element of the matrix M to be obtained is m11,
m12, M14, Mtwenty one, M twenty two, Mtwenty four, M31, M32Of eight
Therefore, four points on the projected image corresponding to four points on the developed image
Is specified as a feature point (t of four feature points)p, Ypseat
(Providing a total of eight pieces of information for the target))
Element m11, M12, M14, Mtwenty one, Mtwenty two, Mtwenty four, M31, M32To
You can ask.

【0147】3次元物体が直方体である場合において
は、その面(長方形)の投影画像は、例えば、図20
(A)に示すような四角形となる。そこで、ここでは、
ユーザに、例えば、四角形の投影画像の4つの頂点を、
特徴点として指定してもらうこととする。また、ここで
は、例えば、図20(A)に示したように、四角形の投
影画像の頂点を、左上の頂点から時計回りに、点P1
2,P3,P4とそれぞれするとともに、図20(B)
に示すように、ペーストバッファに長方形状に記憶され
る展開画像の頂点を、左上の頂点から時計回りに、点E
1,E2,E3,E4とそれぞれして、点P1とE1、点P2
とE2、点P3とE3、点P4とE4を、それぞれ対応させ
ることとする。
When the three-dimensional object is a rectangular parallelepiped, the projected image of the plane (rectangle) is, for example, as shown in FIG.
It becomes a square as shown in FIG. So, here,
For the user, for example, the four vertices of the square projection image,
It will be designated as a feature point. Also, here, for example, as shown in FIG. 20A, the vertices of the rectangular projection image are set to the points P 1 ,
Thereby respectively P 2, P 3, P 4 , FIG. 20 (B)
As shown in the figure, the vertex of the developed image stored in the paste buffer in a rectangular shape is shifted clockwise from the upper left vertex to the point E.
The points P 1 and E 1 and the point P 2 are denoted as 1 , E 2 , E 3 and E 4 respectively.
And E 2 , points P 3 and E 3 , and points P 4 and E 4 , respectively.

【0148】さらに、展開画像についての2次元座標
(以下、適宜、ペーストバッファ座標という)系におけ
る点E1,E2,E3,E4の座標を、それぞれ(0,
0),(L W,0),(LW,LH),(0,LH)とす
る。ここで、LWまたはLHは、それぞれ、長方形状の展
開画像の横または縦の長さを表し、ペーストバッファの
容量の許す範囲で、ユーザが任意に設定することが可能
である。また、LWおよびLHは、このようにユーザに設
定させる他、展開画像が、ペーストバッファの、例えば
80%などの所定の割合の大きさ(面積)となるような
ものに定めておくことも可能である。
Further, two-dimensional coordinates for the developed image
(Hereinafter referred to as paste buffer coordinates as appropriate)
Point E1, ETwo, EThree, EFourOf the coordinates (0,
0), (L W, 0), (LW, LH), (0, LH)
You. Where LWOr LHIs a rectangular exhibition
Indicates the horizontal or vertical length of the open image.
User can set it as much as capacity allows
It is. Also, LWAnd LHIs set up for the user in this way.
In addition, the expanded image is the paste buffer, for example,
A size (area) of a predetermined ratio such as 80%
It is also possible to set things.

【0149】この場合、ユーザによって指定された特徴
点としての点P1,P2,P3,P4のスクリーン座標を、
それぞれ(xp1,yp1),(xp2,yp2),(xp3
p3),(xp4,yp4)とすると、式(10)から、次
式が成り立つ。
In this case, screen coordinates of points P 1 , P 2 , P 3 , and P 4 as feature points designated by the user are
(X p1 , y p1 ), (x p2 , y p2 ), (x p3 ,
If y p3 ) and (x p4 , y p4 ), the following equation holds from equation (10).

【0150】[0150]

【数10】 ・・・(14) 但し、式(14)において、w1,w2,w3,w4は、同
次座標を表す任意の数である。
(Equation 10) (14) In Expression (14), w 1 , w 2 , w 3 , and w 4 are arbitrary numbers representing homogeneous coordinates.

【0151】式(14)における行列Mは、式(13)
における8個の要素m11,m12,m 14,m21,m22,m
24,m31,m32を未知数とするものであり、また、式
(14)からは、8つの方程式をたてることができるか
ら、8個の未知数m11,m12,m14,m21,m22
24,m31,m32、即ち、行列Mを求めることができ
る。なお、行列Mを求めるための特徴点としては、基本
的に、ユーザによって指定された特徴点を、上述の自動
補正処理により補正したものが用いられる。
The matrix M in the expression (14) is obtained by the expression (13)
8 elements m in11, M12, M 14, Mtwenty one, Mtwenty two, M
twenty four, M31, M32Is an unknown.
From (14), can we make eight equations?
Eight unknowns m11, M12, M14, Mtwenty one, Mtwenty two,
mtwenty four, M31, M32That is, the matrix M can be obtained.
You. Note that the feature points for obtaining the matrix M are basically
The feature points specified by the user are automatically
What is corrected by the correction processing is used.

【0152】3次元物体が、直方体である場合におい
て、その面(長方形)を対象にコピー処理またはペース
ト処理を行うときには、式(12)によりψを求めると
ともに、式(14)からMを求める。そして、ペースト
処理の場合は、写像Mψがそのまま順変換式とされ、コ
ピー処理の場合は、写像Mψの逆行列が求められ、逆変
換式とされる。ここで、3次元物体が直方体である場合
に限らず、ペースト処理において用いられる変換式は、
写像Mψがそのまま使用されるため順変換式と呼び、コ
ピー処理において用いられる変換式は、写像Mψの逆写
像が使用されるため逆変換式と呼んでいる。
When the three-dimensional object is a rectangular parallelepiped and a copy process or a paste process is performed on the surface (rectangle), ψ is obtained from Expression (12) and M is obtained from Expression (14). Then, in the case of paste processing, the mapping Mψ is directly used as a forward conversion formula, and in the case of copy processing, the inverse matrix of the mapping Mψ is obtained and used as an inverse transformation formula. Here, not only in the case where the three-dimensional object is a rectangular parallelepiped, the conversion formula used in the paste processing is:
Since the mapping M # is used as it is, it is called a forward conversion formula, and the conversion formula used in the copy processing is called an inverse conversion formula since an inverse mapping of the mapping M # is used.

【0153】コピー処理を行う場合においては、画像変
換処理部20において、注目バッファの、図20(A)
に示した投影画像である四角形P1234内の画素そ
れぞれが、逆変換式(Mψ)-1にしたがい、ペーストバ
ッファの、図20(B)に示した長方形E1234
の対応する位置に書き込まれる。
In the case where the copy processing is performed, the image conversion processing unit 20 stores the buffer of interest in FIG.
Each of the pixels in the quadrangle P 1 P 2 P 3 P 4 which is the projected image shown in FIG. 20 is in accordance with the inverse transformation formula (Mψ) −1 , and the rectangle E 1 E 2 in the paste buffer shown in FIG. E 3 are written into the corresponding location in E 4.

【0154】なお、注目バッファの1画素が、ペースト
バッファの複数の画素に対応する場合には、その複数の
画素すべてについて、注目バッファの1画素の画素値を
書き込むようにしても良いし、また、注目バッファの複
数の画素を用いて補間を行うことにより補間値を求め、
その補間値を、ペーストバッファに書き込むようにして
も良い。即ち、例えば、注目バッファのある画素Aが、
ペーストバッファの隣接する2つの画素a1,a2に対応
する場合には、画素a1には、画素Aの画素値を書き込
み、画素a2には、画素Aと、それに隣接する注目バッ
ファの画素との画素値の平均値等を書き込みようにする
ことができる。
If one pixel of the buffer of interest corresponds to a plurality of pixels of the paste buffer, the pixel value of one pixel of the buffer of interest may be written for all of the plurality of pixels. The interpolation value is obtained by performing interpolation using a plurality of pixels of the buffer of interest,
The interpolation value may be written in the paste buffer. That is, for example, the pixel A having the buffer of interest is
In a case where two pixels a 1 and a 2 adjacent to each other in the paste buffer correspond to each other, the pixel value of the pixel A is written to the pixel a 1 , and the pixel A and the adjacent buffer of the target buffer are written to the pixel a 2 . The average value of the pixel values with the pixels can be written.

【0155】逆に、注目バッファの複数の画素が、ペー
ストバッファの1画素に対応する場合には、例えば、そ
の複数の画素のうちのいずれか1の画素値を、ペースト
バッファに書き込んでも良いし、その複数の画素に対し
てフィルタをかけることにより重み付け加算値などを求
め、その重み付け加算値を、ペーストバッファに書き込
んでも良い。
Conversely, when a plurality of pixels in the buffer of interest correspond to one pixel in the paste buffer, for example, any one pixel value of the plurality of pixels may be written in the paste buffer. Alternatively, a weighted addition value or the like may be obtained by applying a filter to the plurality of pixels, and the weighted addition value may be written in the paste buffer.

【0156】ここで、ペーストバッファへの画素値の書
き込みは、逆変換式(Mψ)-1にしたがっていれば、上
述のように、注目バッファの投影画像の各画素が、ペー
ストバッファの展開画像のどの画素に変換されるのかを
計算して行っても良いし、逆に、展開画像の各画素に変
換されるのが、投影画像のどの画素なのかを計算して行
っても良い。
Here, if the pixel value is written into the paste buffer according to the inverse transformation formula (Mψ) −1 , as described above, each pixel of the projected image of the buffer of interest becomes It may be performed by calculating which pixel is converted, or conversely, by calculating which pixel of the projected image is converted into each pixel of the developed image.

【0157】一方、ペースト処理を行う場合において
は、画像変換処理部20において、ペーストバッファ
の、図20(B)に示した展開画像である長方形E12
34内の画素それぞれが、順変換式Mψにしたがい、
注目バッファの、図20(A)に示した四角形P12
34内の対応する位置に書き込まれ、これにより、注目
バッファに記憶された2次元画像上に、投影画像が貼り
付けられる。
On the other hand, in the case of performing the paste processing, the image conversion processing section 20 prepares a rectangle E 1 E 2 in the paste buffer, which is a developed image shown in FIG.
Each pixel in E 3 E 4 is in accordance with the forward conversion formula M 式,
The square P 1 P 2 P shown in FIG.
It is written to the corresponding location in 3 P 4, thereby, on a two-dimensional image stored in the target buffer, the projected image is pasted.

【0158】なお、ペーストバッファの1画素が、注目
バッファの複数の画素に対応する場合には、コピー処理
における場合と同様に、その複数の画素すべてについ
て、ペーストバッファの1画素の画素値を書き込むよう
にしても良いし、また、ペーストバッファの複数画素を
用いて補間を行うことにより補間値を求め、その補間値
を書き込むようにしても良い。
When one pixel in the paste buffer corresponds to a plurality of pixels in the buffer of interest, the pixel value of one pixel in the paste buffer is written for all of the plurality of pixels, as in the copy process. Alternatively, an interpolation value may be obtained by performing interpolation using a plurality of pixels of the paste buffer, and the interpolation value may be written.

【0159】逆に、ペーストバッファの複数の画素が、
注目バッファの1画素に対応する場合には、例えば、そ
の複数の画素のうちのいずれか1の画素値を、注目バッ
ファに書き込んでも良いし、その複数の画素に対してフ
ィルタをかけることにより重み付け加算値などを求め、
その重み付け加算値を、注目バッファに書き込んでも良
い。
Conversely, a plurality of pixels in the paste buffer
In the case of corresponding to one pixel of the buffer of interest, for example, the pixel value of any one of the plurality of pixels may be written to the buffer of interest or weighted by applying a filter to the plurality of pixels. Find the added value, etc.
The weighted addition value may be written in the buffer of interest.

【0160】ここで、注目バッファへの画素値の書き込
みも、順変換式Mψにしたがっていれば、上述のよう
に、ペーストバッファの展開画像の各画素が、注目バッ
ファの投影画像のどの画素に変換されるのかを計算して
行っても良いし、逆に、投影画像の各画素に変換される
のが、展開画像のどの画素なのかを計算して行っても良
い。
Here, if the writing of pixel values to the buffer of interest also follows the forward conversion formula Mψ, as described above, each pixel of the developed image of the paste buffer is converted to any pixel of the projection image of the buffer of interest. Alternatively, it may be calculated by calculating which pixel is to be converted into each pixel of the projected image, or conversely, which pixel of the developed image is converted.

【0161】次に、3次元物体が、例えば、円柱である
場合において、その側面の展開画像を生成してペースト
バッファに記憶させるコピー処理、またはペーストバッ
ファに記憶された画像を円柱の側面に貼り付けるペース
ト処理を行うときには、次のようにして、逆変換式また
は順変換式がそれぞれ算出される。
Next, in the case where the three-dimensional object is, for example, a cylinder, copy processing for generating a developed image of the side surface and storing the image in the paste buffer, or pasting the image stored in the paste buffer to the side surface of the cylinder When the paste processing is performed, the reverse conversion formula or the forward conversion formula is calculated as follows.

【0162】即ち、この場合、図21(A)に示すよう
に、3次元空間における円柱の位置を表す3次元座標と
して、その上方または下方の底面(円)のうちの、例え
ば、上方の底面の中心を原点(0,0,0)とし、上方
の底面から下方の底面の方向にyo軸をとり、さらに、
後述する点O5の方向から上方の底面の中心の方向にz o
軸をとったものを考える(xo軸は、yo軸からzo軸の
方向に右ねじを回した場合に、その右ねじが進行する方
向にとる)。
That is, in this case, as shown in FIG.
And three-dimensional coordinates representing the position of the cylinder in three-dimensional space
Then, of the upper or lower bottom (circle),
If the center of the upper bottom is the origin (0,0,0)
Y from the bottom ofoTake the axis,
Point O described laterFiveFrom the direction of o
Consider the axis (xoThe axis is yoZ from axisoAxial
When turning the right hand screw in the direction, the right hand screw advances
Take in the direction).

【0163】そして、例えば、いま、注目バッファの2
次元画像に、図21(A)の円柱を、点O5の手前の上
方から撮影して得られる投影画像が表示されているとす
る。この場合、円柱の投影画像は、例えば、図21
(B)に影を付して示すようなものとなる。
Then, for example, the buffer 2 of interest
Dimension image, the cylinder of FIG. 21 (A), the a projection image obtained by photographing from above the front of the point O 5 is displayed. In this case, the projected image of the cylinder is, for example, as shown in FIG.
(B) is shown with a shadow.

【0164】図21(B)において、点P1およびP2
または点P3およびP4は、投影画像における円柱の側面
と、その上方または下方の底面との交線(図21(B)
において太線で示す部分)の端点をそれぞれ表してい
る。即ち、点P1は、投影画像における円柱の側面の左
側の輪郭線と円柱の上方の底面との交点を、点P2は、
投影画像における円柱の側面の右側の輪郭線と円柱の上
方の底面との交点を、点P3は、投影画像における円柱
の側面の右側の輪郭線と円柱の下方の底面との交点を、
点P4は、投影画像における円柱の側面の左側の輪郭線
と円柱の下方の底面との交点を、それぞれ表している。
In FIG. 21B, points P 1 and P 2 ,
Alternatively, points P 3 and P 4 are the intersections between the side surface of the cylinder in the projected image and the bottom surface above or below it (FIG. 21B).
, The end points of the portions indicated by thick lines). That is, the point P 1 is the intersection of the left side contour line of the side surface of the cylinder in the projection image and the bottom surface above the cylinder, and the point P 2 is
The intersection point between the right side contour line of the cylinder side in the projected image and the bottom surface above the cylinder, the point P 3 is the intersection point between the right side contour line of the cylinder side surface in the projection image and the bottom surface below the cylinder,
Point P 4 is the intersection of the bottom surface of the lower contour and cylinder of the left side surface of the cylinder in the projected image, and represents respectively.

【0165】そして、図21(A)における点O1
2,O3,O4は、図21(B)における点P1,P2
3,P4にそれぞれ対応している。
Then, the points O 1 ,
O 2 , O 3 , and O 4 correspond to points P 1 , P 2 ,
P 3 and P 4 respectively.

【0166】また、図21(A)における点O5は、弧
12(投影画像として見える弧)を2等分する点であ
り、図21(B)における点P5は、この点O5に対応し
ている。さらに、図21(A)における点O6も、弧O3
4(投影画像として見える弧)を2等分する点であ
り、図21(B)における点P6は、この点O6に対応し
ている。
A point O 5 in FIG. 21A is a point that bisects the arc O 1 O 2 (an arc seen as a projected image), and a point P 5 in FIG. corresponds to the O 5. Further, a point in FIG. 21 (A) O 6 also, the arc O 3
This is a point at which O 4 (an arc seen as a projected image) is bisected, and a point P 6 in FIG. 21B corresponds to this point O 6 .

【0167】ここで、上述したように、zo軸は、点O5
の方向から上方の底面の中心の方向を向いており、また
原点である上方の底面の中心を通るから、点O5は、yo
o平面、即ち、xo=0の平面内にある。従って、点O
6も、xo=0の平面内にある。
Here, as described above, the zo axis is the point O 5
Directions are oriented in the direction of the center of the upper bottom surface from, and because through the center of the upper bottom surface is the origin, the point O 5 is, y o
lies in the zo plane, that is, in the plane of xo = 0. Therefore, point O
6 is also in the plane of x o = 0.

【0168】また、図21(B)において、点P7は、
円柱の消失点、即ち、直線P14とP23との交点を表
しており、従って、点P6は、点P5とP7とを結ぶ直線
上に位置する。即ち、点P6の自由度は、直線P57
方向の1つしかない。
In FIG. 21B, the point P 7 is
Vanishing point of the cylinder, i.e., it represents the intersection of the straight line P 1 P 4 and P 2 P 3, therefore, the point P 6 is positioned on a straight line connecting the point P 5 and P 7. That is, the degree of freedom of the point P 6 is only one of the directions of the straight line P 5 P 7.

【0169】図21(A)における角度θ(ラジアン)
は、点O1、上方の底面の中心(ここでは、3次元座標
の原点となっている)、および点O2がつくる角度であ
り(従って、点O3、下方の底面の中心、および点O4
つくる角度でもある)、円柱の底面の半径をrと表す
と、円柱の側面の投影画像の部分に対応する展開画像が
ペーストバッファに記憶されるとした場合には、半径r
と角度θとの関係は、次のように表すことができる(但
し、ここでは、例えば、円柱の底面の円周方向が、展開
画像の横方向に対応するものとする)。
Angle θ (radian) in FIG. 21 (A)
Is the point O 1 , the center of the upper bottom surface (here the origin of the three-dimensional coordinates), and the angle formed by the point O 2 (hence the point O 3 , the center of the lower bottom surface, and the point O 4 ), and when the radius of the bottom surface of the cylinder is represented by r, if the developed image corresponding to the projected image portion on the side surface of the cylinder is stored in the paste buffer, the radius r
And the angle θ can be expressed as follows (here, for example, the circumferential direction of the bottom surface of the cylinder corresponds to the horizontal direction of the developed image).

【0170】 r=LW/θ ・・・(15) 但し、LWは、上述したように、展開画像の横幅(横の
長さ)を表す。
R = L W / θ (15) Here, L W represents the horizontal width (horizontal length) of the developed image, as described above.

【0171】また、角度φを、次のようにおく。The angle φ is set as follows.

【0172】 φ=θ(xe−LW/2)/LW ・・・(16) なお、xeは、ペーストバッファ座標系のx座標(水平
方向の座標)を表すが、以下、ペーストバッファ座標系
は、例えば、長方形状の展開画像の左上の頂点を原点と
し、左から右方向または上から下方向に、xe軸または
e軸をとるものとする。
Φ = θ (x e −L W / 2) / L W (16) Note that x e represents the x coordinate (horizontal direction coordinate) of the paste buffer coordinate system. buffer coordinate system, for example, the upper left corner of the rectangular expanded image as the origin, the downward direction from the right or top left, we shall take x e axis or y e axis.

【0173】円柱について、角度φを式(16)のよう
においた場合、式(7)のψ、即ち、円柱の側面の、3
次元空間上の点(xo,yo,zo)と、展開画像上の点
(xe,ye)との関係は、図21(A)の円柱の展開図
を考えることにより、次のように表すことができる。
When the angle φ of the cylinder is represented by the equation (16), ψ of the equation (7), ie, 3
The relationship between the point (x o , y o , z o ) on the dimensional space and the point (x e , y e ) on the developed image is given by considering the developed view of the cylinder in FIG. Can be expressed as

【0174】[0174]

【数11】 ・・・(17) この場合は、図20で説明した場合と異なり、行列Mに
おいて不要となる要素はなく、従って、式(11)で説
明した11の要素m11乃至m14,m21乃至m24,m31
至m33を求める必要がある。この11の要素m11乃至m
14,m21乃至m 24,m31乃至m33は、上述したように、
投影画像上の、所定の5点と、自由度が1の1点との合
計6点が、特徴点として指定されれば求めることができ
る。
[Equation 11](17) In this case, unlike the case described with reference to FIG.
There are no unnecessary elements, and therefore,
11 elements m11To m14, Mtwenty oneTo mtwenty four, M31No
To m33Need to ask. This eleven element m11To m
14, Mtwenty oneTo m twenty four, M31To m33Is, as mentioned above,
The combination of predetermined five points and one point with one degree of freedom on the projected image
A total of 6 points can be obtained if they are specified as feature points.
You.

【0175】そこで、ここでは、ユーザに、例えば、図
21(B)に示した6点P1乃至P6を特徴点として指定
してもらう。また、ここでは、図21(C)に示すよう
に、ペーストバッファに長方形状に記憶される展開画像
の頂点を、左上の頂点から時計回りに、点E1,E2,E
3,E4とそれぞれするとともに、線分E12またはE 3
4を2等分する点を、それぞれ点E5またはE6とし
て、点P1とE1、点P2とE2、点P3とE3、点P4
4、点P5とE5、点P6とE6を、それぞれ対応させる
こととする。
Therefore, here, the user is asked, for example,
6 points P shown in 21 (B)1Or P6Specify as feature points
do that for me. Here, as shown in FIG.
And the expanded image stored in the paste buffer in a rectangular shape
From the upper left corner clockwise to the point E1, ETwo, E
Three, EFourAnd the line segment E1ETwoOr E Three
EFourAre divided into two equal points, respectively, as points EFiveOr E6age
And point P1And E1, Point PTwoAnd ETwo, Point PThreeAnd EThree, Point PFourWhen
EFour, Point PFiveAnd EFive, Point P6And E6Correspond to each
It shall be.

【0176】さらに、ペーストバッファ座標系における
点E1,E2,E3,E4,E5,E6の座標を、それぞれ
(0,0),(LW,0),(LW,LH),(0,
H),(L W/2,0),(LW/2,LH)とする。
Further, in the paste buffer coordinate system,
Point E1, ETwo, EThree, EFour, EFive, E6Coordinates of
(0,0), (LW, 0), (LW, LH), (0,
LH), (L W/ 2, 0), (LW/ 2, LH).

【0177】以上の関係を用いて、式(10)にしたが
い、11の要素m11乃至m14,m21乃至m24,m31乃至
33について方程式をたてて解くことで、これらの11
の要素m11乃至m14,m21乃至m24,m31乃至m33、即
ち、行列Mを求めることができる。
By using the above relationship and formulating and solving equations for eleven elements m 11 to m 14 , m 21 to m 24 , and m 31 to m 33 in accordance with equation (10), these 11
Elements m 11 to m 14, m 21 to m 24, m 31 to m 33, i.e., can be calculated matrix M.

【0178】ここで、この場合、行列Mを求めるのに用
いる特徴点P1乃至P6は、自動補正処理により補正され
るが、特徴点P5またはP6のうちのいずれか一方は、さ
らに、他方の特徴点を自動補正処理により補正したもの
と、消失点P7とを結ぶ直線上に位置するように補正さ
れる。即ち、例えば、特徴点P5またはP6のうちの一方
の特徴点である、例えば、特徴点P6は、自動補正処理
により補正され、さらに、他方の特徴点P5を自動補正
処理により補正したものと、消失点P7とを結ぶ直線上
に位置するように補正される。これは、特徴点P6は、
上述したように自由度が1の点であるからである。
Here, in this case, the feature points P 1 to P 6 used for obtaining the matrix M are corrected by the automatic correction process, but one of the feature points P 5 and P 6 is further corrected. , as corrected by the automatic correction of the other feature point is corrected so as to be located on the straight line connecting the vanishing point P 7. That is, for example, which is one of the feature points of the feature point P 5 or P 6, for example, the feature point P 6 is corrected by the automatic correction processing, further corrected by the automatic correction processing other feature points P 5 and those are corrected so as to be located on the straight line connecting the vanishing point P 7. This is the feature point P 6
This is because the degree of freedom is one as described above.

【0179】なお、図21(A)の円柱の高さが、図2
1(C)の展開画像の縦の長さLHに等しいとすると、
点O1,O2,O3,O4,O5,O6の座標は、それぞれ、
(−rsin(θ/2),0,−rcos(θ/
2)),(rsin(θ/2),0,−rcos(θ/
2)),(rsin(θ/2),LH,−rcos(θ
/2)),(−rsin(θ/2),LH,−rcos
(θ/2)),(0,0,−r),(0,LH,−r)
となる。
It should be noted that the height of the cylinder in FIG.
If it is equal to the vertical length L H of the developed image of 1 (C),
The coordinates of points O 1 , O 2 , O 3 , O 4 , O 5 , and O 6 are
(-Rsin (θ / 2), 0, -rcos (θ /
2)), (rsin (θ / 2), 0, −rcos (θ /
2)), (rsin (θ / 2), L H , −rcos (θ
/ 2)), (-rsin (θ / 2), L H , -rcos
(Θ / 2)), ( 0,0, -r), (0, L H, -r)
Becomes

【0180】上述したようにして円柱について求められ
る行列Mは、図21(A)における角度θの関数になっ
ており、従って、この角度θを求める必要がある。さら
に、図21(B)においては、2次元画像に、特徴点P
5と消失点P7とを結ぶ直線が、yp軸と平行になるよう
な円柱の投影画像が表示されているが、一般には、円柱
の投影画像は、例えば、図22に示すように、特徴点P
5と消失点P7とを結ぶ直線が、yp軸に対して傾いてい
るようなものとなっていることが多い。
The matrix M obtained for the cylinder as described above is a function of the angle θ in FIG. 21A, and it is necessary to obtain this angle θ. Furthermore, in FIG. 21B, the feature points P
5 and connecting the vanishing point P 7 straight line, although the projected image of the cylinder, such as to be parallel to the y p axis is displayed, generally, cylindrical projection image, for example, as shown in FIG. 22, Feature point P
5 and the straight line connecting the vanishing point P 7 is often has a like inclined with respect to the y p axis.

【0181】そこで、特徴点P5と消失点P7とを結ぶ直
線が、xp軸となす角度をαとして、θを求める方法に
ついて説明する。
Therefore, a method for obtaining θ by setting an angle between a straight line connecting the characteristic point P 5 and the vanishing point P 7 to the xp axis as α will be described.

【0182】この場合、スクリーン座標系の座標軸であ
るxp軸およびyp軸を、反時計回りにαだけ回転した座
標軸であるxp’軸およびyp’軸を考えれば、その座標
軸と、円柱の投影像との関係は、図21(B)に示した
場合に一致する。そこで、そのように、xp軸およびyp
軸を、反時計回りにαだけ回転したxp’軸およびyp
軸によって規定される座標系を考えて、θを求めること
とする。
In this case, considering the x p axis and the y p axis which are the coordinate axes of the screen coordinate system and the x p 'axis and the y p ' axis which are the coordinate axes rotated by α counterclockwise, The relationship with the projected image of the cylinder coincides with the case shown in FIG. Therefore, so, x p axis and y p
X p 'axis and y p ' with the axis rotated counterclockwise by α
Considering a coordinate system defined by axes, θ is determined.

【0183】この場合、点(xp,yp)と点(xp’,
p’)との関係は、同次座標を用いて、次式のように
表すことができる。
In this case, the point (x p , y p ) and the point (x p ′,
y p ′) can be expressed by the following equation using homogeneous coordinates.

【0184】[0184]

【数12】 ・・・(18) そして、行列M’を、例えば、次のように定義する。(Equation 12) (18) The matrix M 'is defined as follows, for example.

【0185】[0185]

【数13】 ・・・(19) 但し、式(19)におけるMは、式(11)で表され
る。
(Equation 13) (19) However, M in Expression (19) is represented by Expression (11).

【0186】この場合、式(10)および(15)乃至
(19)により、次式が導かれる。
In this case, the following equation is derived from equations (10) and (15) to (19).

【0187】 xp’=(m11’rsinφ+m12’ye−m13’rcosφ+m14’) /(m31’rsinφ+m32’ye−m33’rcosφ+1) yp’=(m21’rsinφ+m22’ye−m23’rcosφ+m24’) /(m31’rsinφ+m32’ye−m33’rcosφ+1) ・・・(20) 即ち、図21(A)に示した3次元物体としての円柱に
おいて、投影画像として表示される弧O152上に、
点Oをとると、その点Oは、図21(B)の投影画像上
の弧P152上の点Pとして投影される。そして、こ
の点Pが、図21(C)に示すように、ペーストバッフ
ァ座標系において、点Eに対応するとすると、この点E
の、点E5を基準とする、xe座標は、xe−Lw/2で表
すことができる。
[0187] x p '= (m 11' rsinφ + m 12 'y e -m 13' rcosφ + m 14 ') / (m 31' rsinφ + m 32 'ye-m 33' rcosφ + 1) y p '= (m 21' rsinφ + m 22 ' y e -m 23 'rcosφ + m 24') / (m 31 'rsinφ + m 32' y e -m 33 'rcosφ + 1) ··· (20) that is, in the cylinder as a three-dimensional object as shown in FIG. 21 (a), On the arc O 1 O 5 O 2 displayed as a projection image,
Taking the point O, the point O is projected as a point P on the arc P 1 P 5 P 2 on the projection image in FIG. 21 (B). Then, assuming that this point P corresponds to point E in the paste buffer coordinate system as shown in FIG.
Of a reference point E 5, x e coordinates may be represented by x e -L w / 2.

【0188】また、図21(C)のペーストバッファ座
標系において、点E5または点Eは、図21(A)の3
次元空間にある円柱上の点O5またはOにそれぞれ対応
するから、点Eの、点E5を基準とした、xe座標である
e−Lw/2は、図21(A)の円柱において、点O5
を基準とする、円柱の上面(上方の底面)の円周に沿っ
た点Oの位置に対応する。
[0188] Furthermore, in the paste buffer coordinate system of FIG. 21 (C), the point E 5 or point E, 3 of FIG. 21 (A)
Since corresponding to the point O 5 or O on a cylinder in a dimensional space, of the point E, relative to the point E 5, x e -L w / 2 is a x e coordinate, FIG. 21 (A) In the cylinder, the point O 5
Corresponds to the position of a point O along the circumference of the upper surface (upper bottom surface) of the cylinder.

【0189】即ち、上述の式(16)で定義されるφ
は、点O5、原点、および点Oがつくる角度を表し、式
(20)で表されるxp’およびyp’は、点Oに対応す
る投影画像上の点Pの座標を表す。
That is, φ defined by the above equation (16)
Represents the point O 5 , the origin, and the angle formed by the point O, and x p ′ and y p ′ represented by the equation (20) represent the coordinates of the point P on the projection image corresponding to the point O.

【0190】いま、点Oを、点O5を基準として、円柱
の上面の円周に沿って移動していった場合、即ち、角度
φを、0ラジアンから変えていった場合、点Oに対応す
る、投影画像上の点Pも、点P5を基準として、弧P5
2上や、弧P51上を移動していくが、その点P、消失
点P7、および点P5がつくる角度を、図23に示すよう
に、νとする。
Now, when the point O moves along the circumference of the upper surface of the cylinder with reference to the point O 5, that is, when the angle φ is changed from 0 radian, the point O The corresponding point P on the projected image is also an arc P 5 P with respect to the point P 5.
2 above and, although moves on the arc P 5 P 1, the point P, the vanishing point P 7, and the angle of the point P 5 is made, as shown in FIG. 23, and [nu.

【0191】ここで、点Pの座標は、式(20)で求め
られる(xp’、yp’)で表される。従って、点P7
座標を(xp7’、yp7’)と表すと、角度νは、次式で
求めることができる(図23)。
Here, the coordinates of the point P are represented by (x p ′, y p ′) obtained by the equation (20). Thus, the coordinates of the point P 7 (x p7 ', y p7') is expressed as the angle ν can be determined by the following equation (Fig. 23).

【0192】 ν=tan-1(|yp’−yp7’|/|xp’−xp7’|) ・・・(21) 角度νは、点Pが移動すること、即ち、角度φが変化す
ることによって変化するから、角度φの関数となってい
る。
[0192] ν = tan -1 (| y p '-y p7' | / | x p '-x p7' |) ··· (21) angle [nu is the point P moves, i.e., the angle φ Is a function of the angle φ because of the change.

【0193】図23において、線分P57を基準とし
て、右回りの方向を、角度νの正の方向とすると、角度
νは、点Pが、点P2に一致したときに最大となり、点
1に一致したときに最小となる。
In FIG. 23, when the clockwise direction is the positive direction of the angle ν with respect to the line segment P 5 P 7 , the angle ν becomes maximum when the point P coincides with the point P 2. , the minimum when the position of control point P 1.

【0194】そして、点Pが、点P1または点P2に一致
するのは、式|φ|=θ/2が成り立つ場合であり(点
Pが、点P1に一致するのは、式φ=−θ/2が成り立
つ場合であり、点P2に一致するのは、式φ=θ/2が
成り立つ場合)、従って、角度νは、式|φ|=θ/2
が成り立つ場合に極値をとる。
The point P coincides with the point P 1 or the point P 2 when the equation | φ | = θ / 2 holds (the point P coincides with the point P 1 is represented by the equation φ = −θ / 2 holds, and the point P 2 coincides with the case where the equation φ = θ / 2 holds). Therefore, the angle ν is calculated by the equation | φ | = θ / 2
Takes an extreme value if

【0195】そこで、式(21)の角度νを、φで偏微
分したものを、次のように0とおく。
Therefore, the value obtained by partially differentiating the angle ν in equation (21) with φ is set to 0 as follows.

【0196】[0196]

【数14】 ・・・(22) 上述したように、式(22)は、|φ|がθ/2に等し
いときに成立し、このときのθ(=2φ)が、求めるべ
きθ(図21において、点P1またはP2が、点O1また
はO2にそれぞれ対応しているときに、点O1、円柱の上
方の底面の中心、および点O2がつくる角度)である。
[Equation 14] (22) As described above, equation (22) is satisfied when | φ | is equal to θ / 2, and θ (= 2φ) at this time is θ to be obtained (in FIG. 21, When P 1 or P 2 corresponds to the point O 1 or O 2 , respectively, the point O 1 , the center of the bottom surface above the cylinder, and the angle formed by the point O 2 ).

【0197】ところで、式(22)のνをφで偏微分し
たもの(式(22)の左辺)は、θとφの2変数を有す
る関数となるから、式(22)を満たすφおよびθを求
める計算は複雑になる。そこで、ここでは、式(22)
を満たすθを、近似計算によって求めることとする。
The partial derivative of ν in equation (22) with φ (the left side of equation (22)) is a function having two variables θ and φ. The calculation for is complicated. Therefore, here, equation (22)
Is determined by approximation calculation.

【0198】即ち、図24は、式(22)を満たすθを
近似計算より求める処理(以下、適宜、θ算出処理とい
う)を説明するためフローチャートを示している。な
お、このθ算出処理は、例えば、コピー処理を行う場合
にはコピー操作処理部12で、ペースト処理を行う場合
にはペースト操作処理部13でそれぞれ行われる。
That is, FIG. 24 is a flow chart for explaining a process for obtaining θ satisfying the equation (22) by approximation calculation (hereinafter, appropriately referred to as θ calculation process). The θ calculation processing is performed by the copy operation processing unit 12 when performing the copy processing, and is performed by the paste operation processing unit 13 when performing the paste processing, for example.

【0199】θ算出処理では、まず最初に、ステップS
41において、θに、初期値としてのπ(ラジアン)が
セットされ、ステップS42に進み、そのθと特徴点を
用いて、式(22)を満たす行列M’が求められる。さ
らに、ステップS43において、ステップS42で求め
られた行列M’を用いて、式(21)で表されるνが求
められ、ステップS44に進み、そのνが極値をとると
きのφ、即ち、式(22)を満たすφが求められ、ステ
ップS45に進む。
In the θ calculation processing, first, at step S
At 41, π (radian) is set to θ as an initial value, and the process proceeds to step S42, where a matrix M ′ that satisfies Expression (22) is obtained using the θ and the feature points. Further, in step S43, using the matrix M ′ obtained in step S42, ν represented by Expression (21) is obtained, and the process proceeds to step S44, where φ when ν takes an extreme value, that is, Φ that satisfies Expression (22) is obtained, and the process proceeds to Step S45.

【0200】式(21)を満たすφは、2つ求められる
が、いま、これを、φ1およびφ2とすると、ステップS
45では、|φ1|+|φ2|が、θに、新たにセットさ
れ、ステップS46に進み、θが収束したかどうか、即
ち、新たなθと、前回のθとの差分の絶対値が所定の閾
値以下であるかどうかが判定される。ステップS46に
おいて、θが収束していないと判定された場合、即ち、
新たなθと、前回のθとの差分の絶対値が所定の閾値以
下でない場合、ステップS42に戻り、新たなθを用い
て、ステップS42以下の処理が繰り返される。
Two φs satisfying the expression (21) can be obtained. Now, if these are φ 1 and φ 2 , step S
At 45, | φ 1 | + | φ 2 | is newly set to θ, and the flow advances to step S46 to determine whether θ has converged, that is, the absolute value of the difference between the new θ and the previous θ. Is determined to be equal to or less than a predetermined threshold. If it is determined in step S46 that θ has not converged, that is,
If the absolute value of the difference between the new θ and the previous θ is not equal to or smaller than the predetermined threshold, the process returns to step S42, and the processing from step S42 is repeated using the new θ.

【0201】また、ステップS46において、θが収束
したと判定された場合、即ち、新たなθと、前回のθと
の差分の絶対値が所定の閾値以下である場合、新たなθ
が、求めるべきθとして確定され、θ算出処理を終了す
る。
When it is determined in step S46 that θ has converged, that is, when the absolute value of the difference between the new θ and the previous θ is equal to or smaller than a predetermined threshold, the new θ
Is determined as θ to be obtained, and the θ calculation processing ends.

【0202】なお、以上においては、円柱の投影画像
(図21(B)、図23)に、消失点P7が存在する場
合を例に説明を行ったが、消失点が存在しない場合には
(投影画像において、線分P14と線分P23とが平行
になる場合には)、式(20)のyp’が、式|φ|=
θ/2が成り立つときに極値をとるから、式(20)の
p’を、φで偏微分したものを、式(23)のように
0とおき、上述の式(21)または(22)にそれぞれ
替えて、式(20)または(23)を用いて、図24の
θ算出処理を行うことにより、yp’が極値をとるとき
のθを求めることができる。
[0202] In the above, the columnar projection image (FIG. 21 (B), the Fig. 23), the case where the vanishing point P 7 is present has been described as an example, if the vanishing point does not exist (In the case where the line segment P 1 P 4 and the line segment P 2 P 3 are parallel in the projected image), y p ′ of the equation (20) is calculated by the equation | φ | =
Since the extreme value is obtained when θ / 2 is satisfied, the value obtained by partially differentiating y p ′ in Expression (20) with φ is set to 0 as in Expression (23), and the above Expression (21) or ( By using the equation (20) or (23) instead of 22) and performing the θ calculation processing of FIG. 24, θ when y p ′ takes an extreme value can be obtained.

【0203】[0203]

【数15】 ・・・(23) 次に、3次元物体が、例えば、球である場合において、
その球面の展開画像を生成してペーストバッファに記憶
させるコピー処理、またはペーストバッファに記憶され
た画像を球面に貼り付けるペースト処理を行うときに
は、次のようにして、逆変換式または順変換式がそれぞ
れ算出される。なお、ここでは、球面の展開画像は、例
えば、正距円筒図法により生成されるものとする。
(Equation 15) (23) Next, when the three-dimensional object is, for example, a sphere,
When performing a copy process of generating an expanded image of the spherical surface and storing the image in the paste buffer, or performing a paste process of pasting the image stored in the paste buffer onto the spherical surface, the inverse conversion formula or the forward conversion formula is performed as follows. Each is calculated. Here, it is assumed that the developed image of the spherical surface is generated by, for example, the equirectangular projection.

【0204】この場合、図25(A)に示すように、3
次元空間における球の位置を表す3次元座標として、球
の中心を原点(0,0,0)とし、互いに直交するよう
に、xo,yo,zo軸をとったものを考える(但し、xo
軸は、yo軸からzo軸の方向に右ねじを回した場合に、
その右ねじが進行する方向にとる)。
In this case, as shown in FIG.
As the three-dimensional coordinates representing the position of the sphere in dimensional space, the center of the sphere as the origin (0, 0, 0), so as to be perpendicular to each other, consider what took x o, y o, a z o axis (although , X o
When turning a right-handed screw in the direction of the zo axis from the yo axis,
Take the direction in which the right-hand screw advances).

【0205】ここで、以下、適宜、球とyo軸との、yo
座標が正の交点を、北極といい、球とxoo平面(yo
=0の平面)との交線(円)を、赤道という。
[0205] Here, hereinafter, the appropriate sphere and y o axis, y o
Coordinates positive intersection, called the Arctic, sphere and x o z o plane (y o
The line of intersection (circle) with the = 0 plane is called the equator.

【0206】そして、例えば、いま、注目バッファの2
次元画像に、図25(A)の球を、所定の位置から撮影
して得られる投影画像が、例えば、図25(B)に示す
ように表示されているとする。なお、図25(B)にお
いては、後述する点P5とP6とを結ぶ直線P56が、x
p軸に対して、角度αだけ傾いている。
Then, for example, the buffer 2 of interest
It is assumed that a projected image obtained by photographing the sphere of FIG. 25A from a predetermined position is displayed on the two-dimensional image, for example, as shown in FIG. 25B. In FIG. 25B, a straight line P 5 P 6 connecting points P 5 and P 6, which will be described later, is x
It is inclined by an angle α with respect to the p- axis.

【0207】図25(B)において、点P1およびP
3は、球とyoo平面(xo=0の平面)との交線(円)
のうち、投影画像に表示された部分の2つの端点であ
り、点P 1は、北極側の端点で、点P3は、xoo平面を
基準としたときに、北極と反対側にある端点である。ま
た、点P2およびP4は、球とxoo平面との交線である
赤道のうち、投影画像に表示された部分の2つの端点
で、点P2は、xo座標が正の側の端点で、点P4は、xo
座標が負の側の端点である。そして、図25(A)にお
ける点O1,O2,O3,O4は、図25(B)における点
1,P2,P3,P4にそれぞれ対応している。
In FIG. 25B, the point P1And P
ThreeIs the sphere and yozoPlane (xo= 0 (plane)
Are the two end points of the portion displayed in the projection image.
Point P 1Is the end point on the North Pole side and point PThreeIs xozoPlane
This is the end point on the opposite side of the North Pole when used as a reference. Ma
Point PTwoAnd PFourIs the sphere and xozoIs the line of intersection with the plane
The two end points of the portion of the equator displayed in the projected image
And point PTwoIs xoIf the coordinates are positive end points, point PFourIs xo
The coordinates are the end points on the negative side. Then, in FIG.
Point O1, OTwo, OThree, OFourIs the point in FIG.
P1, PTwo, PThree, PFourRespectively.

【0208】また、図25(A)における点O5は、球
の中心を、点O6は、北極を、点O7は、赤道に沿った弧
24(投影画像として見える弧)を2等分する点を、
それぞれ表しており、図25(B)における点P5
6,P7は、これらの点O5,O 6,O7にそれぞれ対応
している。
Also, the point O in FIG.FiveIs a sphere
The center of the point O6Goes to the North Pole, point O7Is an arc along the equator
OTwoOFour(Arc visible as projected image)
Each point is represented by a point P in FIG.Five,
P6, P7Means that these points OFive, O 6, O7Corresponding to each
are doing.

【0209】いま、例えば、図25(A)における球面
全体の、正距円筒図法による展開画像がペーストバッフ
ァに記憶されるとすると、球の半径Rは、次のように表
すことができる(但し、ここでは、赤道が、展開画像の
横方向に対応するものとする)。
Now, for example, assuming that a developed image of the entire sphere in FIG. 25A by the equirectangular projection is stored in the paste buffer, the radius R of the sphere can be expressed as follows (however, Here, the equator corresponds to the horizontal direction of the developed image).

【0210】 R=LW/(2π) ・・・(24) また、球面については、式(7)のψ、即ち、球面の、
3次元空間上の点(x o,yo,zo)と、その正距円筒
図法による展開画像上の点(xe,ye)との関係は、図
25(A)の球面の正距円筒図法による展開図を考える
ことにより、次のように表すことができる。
R = LW/ (2π) (24) Further, regarding the spherical surface, ψ in Expression (7), that is,
A point (x o, Yo, Zo) And its equirectangular
Point (xe, Ye) And figure
Consider the development of the 25 (A) spherical surface by equirectangular projection
Thus, it can be expressed as follows.

【0211】[0211]

【数16】 ・・・(25) この場合も、行列Mにおいて不要となる要素はなく、従
って、式(11)で説明した11の要素m11乃至m14
21乃至m24,m31乃至m33を求める必要がある。
(Equation 16) (25) Also in this case, there are no unnecessary elements in the matrix M, and therefore, the eleven elements m 11 to m 14 ,
it is necessary to obtain the m 21 or m 24, m 31 to m 33.

【0212】そこで、ここでは、ユーザに、例えば、図
25(B)に示した7点P1乃至P7を特徴点として指定
してもらう。即ち、例えば、まず、点P2,P4,P5
6を、特徴点として指定してもらう。なお、点P2,P
4,P5,P6は、いずれも自由度が2の点である。その
後、点P5とP6を結ぶ直線P56上に位置するように、
点P1,P3,P7を、特徴点として指定してもらう。従
って、点P1,P3,P7は、いずれも直線P56上の点
であるから、自由度が1の点である。
Therefore, here, the user is asked to designate, for example, the seven points P 1 to P 7 shown in FIG. 25B as feature points. That is, for example, first, the points P 2 , P 4 , P 5 ,
The P 6, have them designated as the feature point. Note that points P 2 , P
4, P 5, P 6 are all degrees of freedom in terms of 2. Then, so as to be located on a straight line P 5 P 6 connecting the points P 5 and P 6 ,
Points P 1 , P 3 , and P 7 are designated as feature points. Therefore, the points P 1 , P 3 , and P 7 are points on the straight line P 5 P 6 , and thus have one degree of freedom.

【0213】以上のように、点P2,P4,P5,P6は、
いずれも自由度が2の点であり、点P1,P3,P7は、
いずれも自由度が1の点であるから、これらの7点P1
乃至P 7が分かれば、11の要素m11乃至m14,m21
至m24,m31乃至m33を求めることができる。
As described above, the point PTwo, PFour, PFive, P6Is
Both have two degrees of freedom, and point P1, PThree, P7Is
Since each of them has one degree of freedom, these seven points P1
Or P 7If you know, 11 elements m11To m14, Mtwenty oneNo
To mtwenty four, M31To m33Can be requested.

【0214】なお、ここでは、図25(A)の球面全体
を、正距円筒図法により展開した展開画像をペーストバ
ッファに記憶させるが、その展開画像は、例えば、図2
5(C)に示すようになる。
In this case, a developed image obtained by developing the entire spherical surface of FIG. 25A by the equirectangular projection method is stored in a paste buffer. The developed image is, for example, shown in FIG.
5 (C).

【0215】図25(C)において、斜線を付してある
部分が、図25(B)に示した投影画像の部分の展開画
像を示しており、斜線を付していない部分は、図25
(B)に示した投影画像には表示されていない球面の部
分の展開画像を示している。従って、曲線L1は、図2
5(A)に示した球のうちの、図25(B)に示した投
影画像として見える球面と見えない球面との境界線に対
応している。また、長方形状の展開画像の縦方向を2等
分する線分L2が赤道に対応している。
In FIG. 25 (C), the hatched portion shows the developed image of the projected image portion shown in FIG. 25 (B), and the portion without the hatched portion shows the developed image of FIG.
FIG. 3B shows a developed image of a spherical portion that is not displayed in the projection image shown in FIG. Accordingly, the curve L 1 is 2
It corresponds to the boundary between the spherical surface visible as the projected image shown in FIG. 25B and the invisible spherical surface of the sphere shown in FIG. Further, the line L 2 which bisects the longitudinal direction of the rectangular expanded image corresponds to the equator.

【0216】曲線L1上にある点E1,E2,E3,E
4は、図25(B)の投影画像上の特徴点P1,P2
3,P4にそれぞれ対応している。なお、点E1または
点E3は、曲線L1上の、ye座標が最小または最大の点
であり、点E2またはE4は、それぞれ、曲線L1と赤道
に対応する線分L2との2つの交点のうちの、xe座標の
大きい方または小さい方の点である。
Points E 1 , E 2 , E 3 , E on the curve L 1
4 are the feature points P 1 , P 2 ,
P 3 and P 4 respectively. Incidentally, the point E 1 or point E 3 is on the curve L 1, y e-coordinate is the minimum or maximum point, the line segment point E 2 or E 4, respectively, corresponding to the curve L 1 and the equator L of the two intersections of the 2, a point towards larger or smaller of x e coordinate.

【0217】図25(C)において、線分E6は、ペー
ストバッファ座標系において、原点(0,0)と点(L
W,0)とを結ぶ線分で、図25(B)の点P6に対応し
ている。また、図25(C)において、点E7は、線分
24を2等分する点で、図25(B)の点P7に対応
している。
In FIG. 25C, the line segment E 6 is defined by the origin (0, 0) and the point (L) in the paste buffer coordinate system.
W, 0) and a line segment connecting the corresponds to the point P 6 in FIG. 25 (B). In FIG. 25C, a point E 7 bisects the line segment E 2 E 4 and corresponds to the point P 7 in FIG. 25B.

【0218】次に、図25(A)の球における所定の部
分の角度を、図26に示すように、μ並びにλ1および
λ2と表すこととする。即ち、球をxoo平面との交線
である円の円周(赤道)のうち、投影画像に表示された
部分の2つの端点P1およびP3と、球の中心O5がつく
る角度∠O254を、図26(A)に示すようにμと
表す。また、図26(B)に示すように、球とyoo
面との交線である円の円周のうち、投影画像に表示され
た部分の、北極と反対側の端点O3と、点O7およびO5
がつくる角度∠O357を、λ1と表すとともに、その
北極側の端点O1と、点O7およびO5がつくる角度∠O1
57を、λ2と表す。ここで、λ1+λ2が、球とyo
o平面との交線(円)の円周のうち、投影画像に表示さ
れた部分の2つの端点O1およびO3と、球の中心O5
つくる角度∠O153を表す。
Next, as shown in FIG. 26, the angles of the predetermined portions of the sphere in FIG. 25A are represented by μ and λ 1 and λ 2 . That is, of the circumference of a circle is a line of intersection between the sphere x o z o plane (equator), and two end points P 1 and P 3 of the displayed portion in the projected image, the center O 5 of the sphere making The angle ∠O 2 O 5 O 4 is represented by μ as shown in FIG. Further, as shown in FIG. 26 (B), of the circumference of a circle is a line of intersection between the sphere and y o z o plane, the displayed portion in the projected image, the end point O 3 of the Arctic opposite , Points O 7 and O 5
Represents an angle ∠O 3 O 5 O 7 formed by λ 1, and an end point O 1 on the north pole side thereof and an angle ∠O 1 formed by points O 7 and O 5.
O 5 O 7 is represented as λ 2 . Here, λ 1 + λ 2 is, sphere and y o z
o Represents the angle ∠O 1 O 5 O 3 formed by the two end points O 1 and O 3 of the portion displayed in the projection image and the center O 5 of the sphere in the circumference of the line of intersection (circle) with the plane. .

【0219】この場合、図25(A)における点O1
2,O3,O4,O5,O6,O7の座標は、それぞれ、
(0,Rsinλ2,Rcosλ2),(Rsin(μ/
2),0,Rcos(μ/2)),(0,−Rsinλ
1,Rcosλ1),(−Rsin(μ/2),0,Rc
os(μ/2)),(0,0,0),(0,R,0)、
(0,0,R)となる。
In this case, the points O 1 ,
The coordinates of O 2 , O 3 , O 4 , O 5 , O 6 , and O 7 are
(0, Rsinλ 2 , Rcosλ 2 ), (Rsin (μ /
2), 0, Rcos (μ / 2)), (0, −Rsinλ)
1 , Rcosλ 1 ), (−Rsin (μ / 2), 0, Rc
os (μ / 2)), (0, 0, 0), (0, R, 0),
(0,0, R).

【0220】球面について求められる行列Mは、図26
における角度μ並びにλ1およびλ2の関数になってお
り、従って、これらの角度μ並びにλ1およびλ2を求め
る必要がある。さらに、図25(B)においては、球の
中心に相当する点P5と北極に相当する点P6とを結ぶ直
線P56とxp軸とが、角度αを形成しているから、こ
れを考慮して、角度μ並びにλ1およびλ2を求める必要
がある。
The matrix M obtained for the spherical surface is shown in FIG.
Is a function of the angles μ and λ 1 and λ 2 , so it is necessary to determine these angles μ and λ 1 and λ 2 . Further, in FIG. 25B, a straight line P 5 P 6 connecting the point P 5 corresponding to the center of the sphere and the point P 6 corresponding to the north pole and the xp axis form an angle α. In consideration of this, it is necessary to determine the angle μ and λ 1 and λ 2 .

【0221】そこで、ここでも、xp軸およびyp軸を、
反時計回りにαだけ回転した座標軸であるxp’軸およ
びyp’軸を考えて、角度μ並びにλ1およびλ2を求め
ることとする。
[0221] Therefore, even here, the x p axis and y p axis,
Considering the x p 'axis and the y p ' axis, which are coordinate axes rotated counterclockwise by α, the angle μ and λ 1 and λ 2 are determined.

【0222】この場合も、点(xp,yp)と点
(xp’,yp’)との関係は、同次座標を用いて、式
(18)で表すことができる。
[0222] In this case, the point (x p, y p) and the point (x p ', y p' ) the relationship between, using homogeneous coordinates can be represented by the formula (18).

【0223】そして、いま、図25(A)において、球
面と、xo=0の平面(yoo平面)との交点(円)を、
(0,Rsinβ,Rcosβ)と表すとともに、球面
とy o=0の平面(xoo平面)との交点(赤道上の点)
を、(Rsinγ,0,Rcosγ)と表す。また、点
(0,Rsinβ,Rcosβ)がスクリーンに投影さ
れたときのxp’座標またはyp’座標を、それぞれxp1
またはyp1とするとともに、点(Rsinγ,0,Rc
osγ)がスクリーンに投影されたときのxp’座標ま
たはyp’座標を、それぞれxp2またはyp2とする。こ
の場合、xp1またはyp2は、式(19)で定義される行
列M’の要素を用いて、それぞれ、式(26)または
(27)で表すことができる。
Now, in FIG. 25A, the sphere
Face and xo= 0 plane (yozoThe intersection (circle) with the plane
(0, R sin β, R cos β)
And y o= 0 plane (xozoIntersection with the plane (point on the equator)
Is represented as (Rsinγ, 0, Rcosγ). Also point
(0, Rsinβ, Rcosβ) projected on the screen
X whenp’Coordinates or yp’Coordinate is xp1
Or yp1And the point (Rsinγ, 0, Rc
x when osγ) is projected on the screenp’Coordinates
Or yp’Coordinate is xp2Or yp2And This
Xp1Or yp2Is the line defined by equation (19)
Using the elements of column M ', equation (26) or
(27).

【0224】 xp1=(m12’Rsinβ+m13’Rcosβ+m14’) /(m32’Rsinβ+m33’Rcosβ+1) ・・・(26) yp2=(m21’Rsinγ+m22’Rcosγ+m24’) /(m31’Rsinγ+m33’Rcosγ+1) ・・・(27) 図25(A)の球については、式(26)のxp1は、式
β=−λ1またはβ=λ2が成り立つときに、また、式
(27)のyp2は、式γ=μ/2またはγ=−μ/2が
成り立つときに、それぞれ極値をとる。そこで、式(2
6)のxp1についてはβで、式(27)のyp2について
はγで、それぞれ偏微分したものを、次のように0とお
く。
[0224] x p1 = (m 12 'Rsinβ + m 13' Rcosβ + m 14 ') / (m 32' Rsinβ + m 33 'Rcosβ + 1) ··· (26) y p2 = (m 21' Rsinγ + m 22 'Rcosγ + m 24') / (m 31 'Rsinγ + m 33 ' Rcosγ + 1) (27) For the sphere of FIG. 25 (A), x p1 in equation (26) can be obtained when the equation β = −λ 1 or β = λ 2 holds, Y p2 in the equation (27) takes an extreme value when the equation γ = μ / 2 or γ = −μ / 2 holds. Therefore, equation (2)
6) x p1 is β, and y p2 in equation (27) is γ, and the partial differentials are set to 0 as follows.

【0225】[0225]

【数17】 ・・・(28)[Equation 17] ... (28)

【0226】[0226]

【数18】 ・・・(29) 式(28)は、βが−λ1またはλ2に等しいときに成立
し、このときのλ1およびλ2が、求めるべきλ1および
λ2である。また、式(29)は、γがμ/2または−
μ/2に等しいときに成立し、このときのμが、求める
べきμである。
(Equation 18) ... (29) (28) is satisfied when β equals 1-? 1 or lambda 2, the lambda 1 and lambda 2 in this case, a lambda 1 and lambda 2 to be obtained. Equation (29) indicates that γ is μ / 2 or −
It is satisfied when it is equal to μ / 2, and μ at this time is μ to be obtained.

【0227】ところで、行列M’の要素は、μ,λ1
λ2の関数となるから、式(28)のxp1をβで偏微分
したものは、μ,λ1,λ2,βの4変数の関数となり、
また、式(29)のyp2をγで偏微分したものは、μ,
λ1,λ2,γの4変数の関数となる。従って、式(2
8)および(29)を満たすμ並びにλ1およびλ2を求
める計算は、複雑なものとなるが、上述のθ算出処理と
同様に、μ,λ1,λ2について、所定の初期値をセット
して、行列M’の要素を求め、その要素を用いてβ,γ
を求めて、μ,λ1,λ2を更新していくという近似計算
を用いることにより、μ,λ1,λ2を、比較的容易に求
めることが可能である。
The elements of the matrix M ′ are μ, λ 1 ,
Since it is a function of λ 2 , the partial differential of x p1 in equation (28) with β is a function of four variables μ, λ 1 , λ 2 , and β.
The partial differential of y p2 in equation (29) with γ is μ,
It is a function of four variables λ 1 , λ 2 and γ. Therefore, equation (2)
Although the calculation for obtaining μ and λ 1 and λ 2 that satisfy 8) and (29) is complicated, similar to the above θ calculation processing, predetermined initial values are set for μ, λ 1 and λ 2. Is set, the elements of the matrix M ′ are determined, and β, γ
, And μ, λ 1 , λ 2 can be updated relatively easily by using an approximate calculation of updating μ, λ 1 , λ 2 .

【0228】なお、ここでは、球面を、正距円筒図法に
よって展開した展開画像を生成するようにしたが、球面
の展開画像を生成する場合に用いる手法は、これに限定
されるものではない。即ち、球面は、その他、例えば、
メルカトル図法やランベルト等角円錐図法などを用い
て、展開画像に展開することが可能である。
Here, a developed image in which a spherical surface is developed by the equirectangular projection method is generated, but the method used to generate a developed image of a spherical surface is not limited to this. That is, the spherical surface is, for example,
The image can be developed into a developed image using the Mercator projection, the Lambert conformal conic projection, or the like.

【0229】また、球面については、図25(C)に示
したように、その全体についての展開画像がペーストバ
ッファに記憶されるが、投影画像に対応しているのは、
図25(C)において斜線を付した部分だけであるか
ら、この展開画像を投影画像に変換して、注目バッファ
に記憶された2次元画像に貼り付けたときに、その2次
元画像に表示されるのは、図25(C)において斜線を
付した部分だけである。即ち、ペーストバッファに記憶
された画像全体が、2次元画像上の投影画像として表示
されるわけではないため、球面に貼り付ける展開画像に
ついて、2Dペイントを行う場合には、その点を考慮し
て、文字等の描画を行う必要がある。即ち、図25
(B)の球の投影画像に、文字を貼り付けたい場合に
は、図25(C)の斜線部分の範囲内に、その文字を描
画して、ペースト処理を行う必要がある(斜線部分から
はみ出して、文字を描いた場合には、そのはみ出した部
分については、図25(B)の投影画像には貼り付けら
れない)。
As for the spherical surface, as shown in FIG. 25 (C), the developed image of the entire surface is stored in the paste buffer.
Since only the shaded portion in FIG. 25 (C) is converted to a projected image and pasted onto the two-dimensional image stored in the buffer of interest, it is displayed on the two-dimensional image. Only the shaded portions in FIG. 25 (C). That is, since the entire image stored in the paste buffer is not displayed as a projected image on a two-dimensional image, when performing 2D painting on a developed image to be pasted on a spherical surface, this point is taken into consideration. , Characters and the like must be drawn. That is, FIG.
If the character is to be pasted on the projected image of the sphere in (B), it is necessary to draw the character within the range of the hatched portion in FIG. 25C and perform paste processing (from the hatched portion). When a character is drawn out of the way, the protruding portion is not pasted on the projected image in FIG. 25B.)

【0230】次に、3次元物体が球である場合における
図26のμ,λ1,λ2については、上述したように、そ
れぞれに関して、図24で説明したθ算出処理と同様の
処理を行うことで求めることが可能であるが、μについ
ては、λ1およびλ2を求めた後に、次のような関係から
求めることも可能である。
Next, for μ, λ 1 , and λ 2 in FIG. 26 when the three-dimensional object is a sphere, as described above, the same processing as the θ calculation processing described with reference to FIG. 24 is performed. However, μ can be obtained from the following relationship after obtaining λ 1 and λ 2 .

【0231】即ち、図25(A)に示した点O1乃至O7
以外に、図27に示すように、点O 5’およびO7’を考
える。ここで、点O5’は、線分O13に対して、点O5
から垂らした垂線と、線分O13との交点であり、点O
7’は、線分O24と、線分O57との交点である。
That is, the point O shown in FIG.1Or O7
In addition, as shown in FIG. Five’And O7
I can. Where point OFive’Is a line segment O1OThreeFor point OFive
And a line segment O1OThreeAnd the point O
7’Is a line segment OTwoOFourAnd the line segment OFiveO7Is the intersection with

【0232】いま、∠O5’O57’を、λ3と表すと、
このλ3は、図26(B)に示した∠O357であるλ
1、および∠O157であるλ2とを用いて、次のよう
に表すことができる。
Now, if ∠O 5 'O 5 O 7 ' is represented as λ 3 ,
This λ 3 is ∠O 3 O 5 O 7 shown in FIG.
1 and λ 2 which is ∠O 1 O 5 O 7 , can be expressed as follows.

【0233】 λ3=(λ1+λ2)/2−λ1 =(λ2−λ1)/2 ・・・(30) また、図27の球と、点O1,O6,O7,O3を通る平面
(yoo平面)との交面は、図28に示すような、点O
5を中心とし、かつ図27の球と同一半径の円になる
が、この図28において、線分O35’の長さをD1
おくと、このD1は、次式で求めることができる。
Λ 3 = (λ 1 + λ 2 ) / 2−λ 1 = (λ 2 −λ 1 ) / 2 (30) Further, the sphere in FIG. 27 and points O 1 , O 6 , and O 7 ,交面the plane (y o z o plane) passing through O 3, such as shown in FIG. 28, the point O
A circle centered at 5 and having the same radius as the sphere in FIG. 27 is obtained. In FIG. 28, if the length of the line segment O 3 O 5 ′ is D 1 , this D 1 is obtained by the following equation. be able to.

【0234】 D1=Rsin((λ1+λ2)/2) ・・・(31) なお、Rは、式(24)に示したように、3次元空間上
における球の半径を表す。
D 1 = Rsin ((λ 1 + λ 2 ) / 2) (31) Note that R represents the radius of a sphere in a three-dimensional space as shown in Expression (24).

【0235】さらに、図28において、線分O5’O7
の長さをD2とおくと、このD2は、次式で求めることが
できる。
Furthermore, in FIG. 28, the line segment O 5 'O 7 '
Placing of a length of D 2, the D 2 can be determined by the following equation.

【0236】 D2=Rcos((λ1+λ2)/2)tanλ3 ・・・(32) 次に、図27の球と、点O1,O2,O3,O4を通る平面
との交面は、図29に示すような、点O5’を中心と
し、かつ線分O35’を半径とする円になるが、この図
29において、線分O5’O3と、線分O5’O2とは、い
ずれも、点O5’を中心とする円の半径であるから、互
いに等しく、従って、線分O5’O2の長さは、式(3
1)で求められる線分O5’O3の長さD1に等しい。そ
して、いま、図29において、線分O27’の長さをD
3とおくと、このD3は、三平方の定理により、次式で求
めることができる。
D 2 = Rcos ((λ 1 + λ 2 ) / 2) tan λ 3 (32) Next, the sphere in FIG. 27 and the plane passing through the points O 1 , O 2 , O 3 , and O 4 of交面, such as shown in FIG. 29, the point O 5 'around the, and the line segment O 3 O 5' becomes a circle radius, in FIG. 29, the line segment O 5 'O 3 , And the line segment O 5 ′ O 2 are all equal to each other because they are the radius of a circle centered at the point O 5 ′. Therefore, the length of the line segment O 5 ′ O 2
Equal to the length D 1 of the line segment O 5 'O 3 obtained in 1). 29, the length of the line segment O 2 O 7 ′ is D
If 3 is set, this D 3 can be obtained by the following equation by the theorem of three squares.

【0237】 D3=√(D1 2−D2 2) =R√(sin2((λ1+λ2)/2) −cos2((λ1+λ2)/2)tan2λ3) ・・・(33) さらに、図27の球と、点O5,O2,O7,O4を通る平
面(xoo平面)との交面は、図26(A)に示した場
合と同様の図30に示すような、点O5を中心とし、か
つ半径がRの円になるが、図30から、角度μ/2の正
弦は、D3/Rを計算することによって求めることがで
きる。従って、角度μと、λ1およびλ2との間には、次
式が成り立つ。
D 3 = {(D 1 2 −D 2 2 ) = R} (sin 2 ((λ 1 + λ 2 ) / 2) −cos 2 ((λ 1 + λ 2 ) / 2) tan 2 λ 3 ) ... (33) Moreover,交面of the sphere of FIG. 27, the point O 5, O 2, O 7 , O 4 and through the plane (x o z o plane) are shown in FIG. 26 (a) If a, as shown in the same Figure 30, centered on the point O 5, and although the radius is a circle of R, from FIG. 30, the sine angle mu / 2, obtained by calculating the D 3 / R be able to. Therefore, the following expression holds between the angle μ and λ 1 and λ 2 .

【0238】 sin(μ/2)=D3/R =√(sin2((λ1+λ2)/2) −cos2((λ1+λ2)/2)tan2λ3) =√(sin2((λ1+λ2)/2) −cos2((λ1+λ2)/2)tan2((λ2−λ1)/2)) ・・・(34) 以上から、λ1,λ2については、図24で説明したθ算
出処理と同様の処理を行うことで求め、μについては、
その求まったλ1およびλ2を、式(34)に代入するこ
とで求めることができる。
Sin (μ / 2) = D 3 / R = √ (sin 2 ((λ 1 + λ 2 ) / 2) −cos 2 ((λ 1 + λ 2 ) / 2) tan 2 λ 3 ) = √ ( sin 2 ((λ 1 + λ 2 ) / 2) −cos 2 ((λ 1 + λ 2 ) / 2) tan 2 ((λ 2 −λ 1 ) / 2)) (34) From the above, λ 1 , Λ 2 are obtained by performing the same processing as the θ calculation processing described with reference to FIG.
The obtained λ 1 and λ 2 can be obtained by substituting into the equation (34).

【0239】θ算出処理によれば、θが収束するまで、
ステップS42乃至S45の処理を繰り返し行う必要が
あるが、μを、式(34)の関係にしたがい、λ1およ
びλ2から求める場合には、そのような繰り返し処理を
行う必要がなく、従って、その分高速に、かつ少ない演
算量で、μを求めることができる。
According to the θ calculation processing, until θ converges,
Although it is necessary to repeat the processing of steps S42 to S45, when μ is determined from λ 1 and λ 2 according to the relationship of equation (34), it is not necessary to perform such repetitive processing. Μ can be obtained at a correspondingly high speed with a small amount of calculation.

【0240】次に、3次元物体が、例えば、円錐である
場合において、その側面の展開画像を生成してペースト
バッファに記憶させるコピー処理、またはペーストバッ
ファに記憶された画像を円錐の側面に貼り付けるペース
ト処理を行うときには、次のようにして、逆変換式また
は順変換式がそれぞれ算出される。
Next, in the case where the three-dimensional object is, for example, a cone, copy processing for generating a developed image of the side surface and storing it in the paste buffer, or pasting the image stored in the paste buffer to the side surface of the cone When the paste processing is performed, the reverse conversion formula or the forward conversion formula is calculated as follows.

【0241】即ち、この場合、例えば、図31(A)に
示すように、3次元空間における円錐の位置を表す3次
元座標として、その頂点(円錐の側面を展開して扇形に
したときに、その扇形の中心に対応する点)O1を原点
(0,0,0)とし、頂点O1から底面の中心O5の方向
にyo軸をとり、さらに、後述する点O4の方向から底面
の中心O5の方向にzo軸をとったものを考える(xo
は、yo軸からzo軸の方向に右ねじを回した場合に、そ
の右ねじが進行する方向にとる)。
That is, in this case, for example, as shown in FIG. 31A, the three-dimensional coordinates representing the position of the cone in the three-dimensional space are represented by the vertices (when the side surface of the cone is expanded into a fan shape, point) O 1 corresponding to the center of the sector as the origin (0,0,0), from the vertex O 1 in the direction of the center O 5 of the bottom take y o axis, further, in the direction of point O 4 to be described later Consider the case where the z o axis is taken in the direction of the center O 5 of the bottom surface (the x o axis is taken in the direction in which the right screw advances when the right hand screw is turned in the direction from the yo axis to the z o axis). ).

【0242】そして、例えば、いま、注目バッファの2
次元画像に、図31(A)の円錐を、やや上方から撮影
して得られる投影画像が表示されているとする。この場
合、円錐の投影画像は、例えば、図31(B)に影を付
して示すようになる。
Then, for example, the buffer 2 of interest
It is assumed that a projection image obtained by photographing the cone of FIG. 31A from slightly above is displayed on the two-dimensional image. In this case, the projected image of the cone is shown, for example, with a shadow in FIG.

【0243】図31(B)において、点P1または点P5
は、図31(A)の点O1または点O5にそれぞれ対応し
ている。また、点P2およびP3は、円錐の側面の投影画
像(側面だけを投影したとした場合の投影画像)と、円
錐の底面の投影画像(底面だけを投影したとした場合の
投影画像)との交線の端点(底面の円周の投影画像の端
点)であり、図31(B)では、交線の右側または左側
の端点が、それぞれ、点P2またはP3とされている。こ
の点P2または点P3は、図31(A)における点O2
たはO3に、それぞれ対応している。
In FIG. 31B, the point P 1 or the point P 5
Respectively correspond to the O 1 or point O 5 points in FIG. 31 (A). The points P 2 and P 3 are a projection image of the side surface of the cone (projection image when only the side surface is projected) and a projection image of the bottom surface of the cone (projection image when only the bottom surface is projected). and a line of intersection of the end points of the (end point of the circumference of the projected image of the bottom surface), FIG. 31 (B), the right or left end point of the intersection line, are respectively, a point P 2 or P 3. This point P 2 or point P 3 is a point O 2 or O 3 in FIG. 31 (A), respectively correspond.

【0244】そして、図31(A)において、点O4
たはO6は、点O2とO3との間を、底面の手前側または
奥側の円周それぞれに沿って2等分する点で、図31
(B)における点P4またはP6に、それぞれ対応してい
る。
In FIG. 31A, the point O 4 or O 6 is a point that divides the point O 2 and O 3 into two equal parts along the circumference of the bottom surface on the near side or the back side, respectively. And FIG.
Point P 4 or P 6 in (B), respectively correspond.

【0245】ここで、上述したように、zo軸は、点O4
から底面の中心O5の方向を向いており、また点O5は、
o軸上の点である。さらに、上述したことから、点
4,O5,O6は一直線上に存在し、従って、これらの
点O4乃至O6は、すべて、yoo平面(xo=0の平
面)内にある。これにより、図31(B)において、点
4,O5,O6にそれぞれ対応する点P4,P5,P6も一
直線上に位置し、点P4乃至P6のうちの2点である、例
えば、点P4およびP6が指定されれば、残りの1点であ
る点P5は、直線P46上に位置することとなるから、
その自由度は1になる。
Here, as described above, zoThe axis is point OFour
To the center O of the bottomFiveAnd point OFiveIs
yoA point on the axis. Furthermore, from the above,
OFour, OFive, O6Exist in a straight line, and therefore these
Point OFourOr O6Is all yozoPlane (xo= 0 flat
Plane). As a result, in FIG.
O Four, OFive, O6Point P corresponding toFour, PFive, P6Moichi
Located on a straight line, point PFourOr P6Example of two points of
For example, point PFourAnd P6Is specified, the remaining one point
Point PFiveIs a straight line PFourP6Because it will be located above,
The degree of freedom is 1.

【0246】図31(A)における角度θは、∠O25
3を表しており、円錐の底面の半径をrと表すと、円
錐の側面の投影画像の部分に対応する展開画像がペース
トバッファに記憶されるとした場合には、半径rと角度
θとの関係は、図21で説明した円柱における場合と同
様に、式(15)で表すことができる(但し、ここで
は、例えば、円錐の底面の円周方向が、展開画像の横方
向に対応するものとする)。
The angle θ in FIG. 31 (A) is ∠O 2 O 5
O 3, and the radius of the bottom surface of the cone is represented by r. If a developed image corresponding to the portion of the projected image on the side surface of the cone is stored in the paste buffer, the radius r and the angle θ Can be expressed by Expression (15), similarly to the case of the cylinder described with reference to FIG. 21 (however, here, for example, the circumferential direction of the bottom surface of the cone corresponds to the horizontal direction of the developed image) Shall be).

【0247】また、角度φを、図21で説明した円柱に
おける場合と同様に、式(16)で表すと、円錐の側面
についての式(7)のψ、即ち、円錐の側面の、3次元
空間上の点(xo,yo,zo)と、展開画像上の点
(xe,ye)との関係は、図31(A)の円錐の展開図
を考えることにより、次のように表すことができる。
When the angle φ is expressed by Expression (16), similarly to the case of the cylinder described with reference to FIG. 21, ψ in Expression (7) for the side surface of the cone, that is, the three-dimensional shape of the side surface of the cone The relationship between the point (x o , y o , z o ) on the space and the point (x e , y e ) on the developed image can be obtained by considering the developed view of the cone in FIG. It can be expressed as follows.

【0248】[0248]

【数19】 ・・・(35) この場合、式(11)で説明した行列Mの11の要素m
11乃至m14,m21乃至m24,m31乃至m33を求める必要
があり、この11の要素m11乃至m14,m21乃至m24
31乃至m33は、上述したように、投影画像上の、自由
度が2の5点と、自由度が1の1点との合計6点が特徴
点として指定されれば求めることができる。
[Equation 19] (35) In this case, the eleven elements m of the matrix M described in equation (11)
It is necessary to obtain 11 to m 14 , m 21 to m 24 , m 31 to m 33 , and these 11 elements m 11 to m 14 , m 21 to m 24 ,
As described above, m 31 to m 33 can be obtained if a total of six points, five points with two degrees of freedom and one point with one degree of freedom, on the projected image are designated as feature points. .

【0249】そこで、ここでは、ユーザに、例えば、図
31(B)に示した6点P1乃至P6を特徴点として指定
してもらう。即ち、自由度が2の5点として、例えば、
点P 1乃至P4およびP6を、特徴点として指定してもら
い、さらに、自由度が1の1点として、例えば、点P5
を指定してもらう。ここで、点P4およびP6が指定され
た場合には、点P5は、上述したように、直線P46
に位置するから、自由度が1の点となる。
Therefore, here, for example, the user
6 points P shown in 31 (B)1Or P6Specify as feature points
do that for me. That is, assuming that five degrees of freedom are two, for example,
Point P 1Or PFourAnd P6As a feature point
Further, as one point having one degree of freedom, for example, the point PFive
To be specified. Where point PFourAnd P6Is specified
The point PFiveIs, as described above, a straight line PFourP6Up
, The degree of freedom is one.

【0250】また、ここでは、図31(C)に示すよう
に、ペーストバッファに長方形状に記憶される展開画像
の、ペーストバッファ座標系において、原点(0,0)
と点(LW,0)とを結ぶ線分をE1と、座標(LW
H),(0,LH),(LW/2,LH)で表される点
を、それぞれ点E2,E3,E4として、点P1とE1、点
2とE2、点P3とE3、点P4とE4を、それぞれ対応さ
せることとする。
Here, as shown in FIG. 31 (C), the origin (0, 0) in the paste buffer coordinate system of the developed image stored in the paste buffer in a rectangular shape.
A segment connecting the point (L W , 0) to the point (L W , 0) is denoted by E 1, and the coordinates (L W , 0)
L H ), (0, L H ), and (L W / 2, L H ) are referred to as points E 2 , E 3 , and E 4 , respectively, as points P 1 and E 1 and point P 2 . E 2 , points P 3 and E 3 , and points P 4 and E 4 are associated with each other.

【0251】以上の関係を用いて、式(10)にしたが
い、11の要素m11乃至m14,m21乃至m24,m31乃至
33について方程式をたてて解くことで、これらの11
の要素m11乃至m14,m21乃至m24,m31乃至m33、即
ち、行列Mを求めることができる。
By using the above relationship and formulating and solving equations for eleven elements m 11 to m 14 , m 21 to m 24 , and m 31 to m 33 in accordance with equation (10), these eleven elements are obtained.
Elements m 11 to m 14, m 21 to m 24, m 31 to m 33, i.e., can be calculated matrix M.

【0252】ここで、図31(C)の実施の形態では、
円錐の側面の展開画像として、長方形状のものを用いる
ようにしたが、円錐の側面の展開画像としては、その
他、例えば、図31(A)の円錐の側面を、単に展開し
た扇形のものを用いることも可能である。但し、円錐の
側面の展開画像として、扇形のものを用いる場合におい
ては、円錐の側面の投影画像に、その底面と平行な方向
に文字などを貼り付けるときには、その文字を、扇形の
展開画像の円周に沿った形で描く必要がある。これに対
して、図31(C)に示したように、円錐の側面の展開
画像として、長方形状のものを用いる場合には、その展
開画像に対して、xe軸と平行に文字を描き、ペースト
処理を行うことで、円錐の側面の投影画像に、その底面
と平行な方向に文字を貼り付けることができる。
Here, in the embodiment of FIG.
As the developed image of the side surface of the cone, a rectangular image is used. As the developed image of the side surface of the cone, for example, a fan-shaped image obtained by simply expanding the side surface of the cone shown in FIG. It is also possible to use. However, when a fan-shaped image is used as the developed image of the side surface of the cone, when a character or the like is pasted on the projected image of the side surface of the cone in a direction parallel to the bottom surface, the character is converted to a fan-shaped expanded image. Must be drawn along the circumference. On the other hand, as shown in FIG. 31C, when a rectangular image is used as the developed image of the side surface of the cone, characters are drawn on the developed image in parallel with the xe axis. By performing the paste processing, characters can be pasted on the projected image of the side surface of the cone in a direction parallel to the bottom surface thereof.

【0253】なお、図31(A)の円錐の高さが、図3
1(C)の展開画像の縦の長さLHに等しいとすると、
点O1,O2,O3,O4,O5,O6の座標は、それぞれ、
(0,0,0),(rsin(θ/2),LH,−rc
os(θ/2)),(−rsin(θ/2),LH,−
rcos(θ/2)),(0,LH,−r),(0,
H,0),(0,LH,r)となる。
It should be noted that the height of the cone in FIG.
Vertical length L of the developed image of 1 (C)HIs equal to
Point O1, OTwo, OThree, OFour, OFive, O6The coordinates of
(0,0,0), (rsin (θ / 2), LH, -Rc
os (θ / 2)), (−rsin (θ / 2), LH, −
rcos (θ / 2)), (0, LH, -R), (0,
L H, 0), (0, LH, R).

【0254】上述したようにして円錐について求められ
る行列Mは、図21で説明した円柱における場合と同様
に、角度θの関数になっており、従って、この角度θを
求める必要がある。さらに、図31(B)においては、
2次元画像に、特徴点P4とP5とを結ぶ直線が、yp
と平行になるような円錐の投影画像が表示されている
が、一般には、円錐の投影画像は、例えば、図32に示
すように、特徴点P4とP5とを結ぶ直線が、yp軸に対
して傾いているようなものとなっていることが多い。
The matrix M obtained for the cone as described above is a function of the angle θ, as in the case of the cylinder described with reference to FIG. 21, and it is necessary to obtain this angle θ. Further, in FIG.
In the two-dimensional image, a projection image of a cone is displayed such that a straight line connecting the feature points P 4 and P 5 is parallel to the yp axis. as shown in 32, is a straight line connecting the feature point P 4 and P 5, often has a like inclined with respect to the y p axis.

【0255】そこで、特徴点P4とP5とを結ぶ直線が、
p軸となす角度をαとして、θを求める方法について
説明する。
Then, a straight line connecting the characteristic points P 4 and P 5 is
As the angle between x p axis alpha, a method for obtaining the θ will be described.

【0256】いま、上述の式(35)において、yo
e=LHとおくと、式(35)は、円柱についてのψを
表す式(17)に等しくなる。従って、この場合、円錐
についてのxp,ypは、円柱についてのxp,ypに等し
くなるから、特徴点P4とP5とを結ぶ直線とxp軸とが
なす角度がαである場合は、xp軸およびyp軸を、反時
計回りにαだけ回転した座標軸であるxp’軸および
p’軸によって規定される座標系においても、円錐の
底面である円の円周上の点Oの、投影画像における点P
(図31)は、円柱における場合と同様に表すことがで
きる。
Now, in the above equation (35), y o =
If y e = L H , equation (35) is equal to equation (17) representing ψ for a cylinder. Therefore, in this case, it is x p, y p of the conical, x p for cylindrical, because equals y p, the angle formed by the straight line and the x p axis connecting the and P 5 feature point P 4 with α If so, x the p-axis and y p axis, in the coordinate system defined by the x p 'axis and y p' axis is a coordinate axis that is rotated by α in the counterclockwise direction, the circle of the circle which is the base of the cone Point P in the projected image of point O on the circumference
(FIG. 31) can be represented as in the case of a cylinder.

【0257】即ち、円錐について、その底面の円周上の
点Oに対応する投影画像上の点Pのxp’座標および
p’座標は、式(20)で表される。さらに、点Oに
対応する投影画像上の点Pと、点P1およびP4がつくる
角度を、図33に示すように、νとおくとともに、点P
1の座標を(xp1’、yp1’)とおくと、角度νは、次
式で表される。
That is, with respect to the cone, the x p ′ coordinate and the y p ′ coordinate of the point P on the projected image corresponding to the point O on the circumference of the bottom surface are expressed by the following equation (20). Further, the angle formed by the point P on the projection image corresponding to the point O and the points P 1 and P 4 is denoted by ν as shown in FIG.
Assuming that the coordinates of 1 are (x p1 ′, y p1 ′), the angle ν is represented by the following equation.

【0258】 ν=tan-1(|yp’−yp1’|/|xp’−xp1’|) ・・・(36) 式(36)のνは、円柱における場合と同様に、点O
が、点O5および点O4とともにつくる角度φ(=∠O4
5O)(図31(A))の関数となっており、式|φ
|=θ/2が成り立つ場合に極値をとる。
[0258] ν = tan -1 (| y p '-y p1' | / | x p '-x p1' |) is ... (36) equation (36) [nu, as in a cylinder, Point O
Forms an angle φ with the points O 5 and O 4 (= ∠O 4
O 5 O) (FIG. 31A), and the equation | φ
It takes an extreme value when | = θ / 2 holds.

【0259】従って、図31(A)における円錐のθ
は、式(21)に替えて、式(36)を用いることによ
り、円柱における場合と同様にして求めることができ
る。
Therefore, the cone θ in FIG.
Can be obtained in the same manner as in the case of a cylinder by using equation (36) instead of equation (21).

【0260】なお、図31(B)や図33に示した円錐
の投影画像において、頂点P1が、その投影画像の内部
にある場合は、側面全体が見えていることとなるので、
その場合のθは2π(360度)ということになる。
In the projected image of the cone shown in FIG. 31B or FIG. 33, if the vertex P 1 is inside the projected image, the entire side is visible.
Θ in that case is 2π (360 degrees).

【0261】以上、3次元物体として、幾つかのプリミ
ティブな形状のものを用いた場合のψおよびMの算出方
法について説明したが、上述した形状以外の3次元物体
であっても、その形状を、関数で表現することができる
ものであれば、そのような3次元物体を対象に、ψおよ
びMを算出することが可能である。
In the above, the calculation method of 場合 and M in the case where some primitive shapes are used as the three-dimensional object has been described. , And M can be calculated for such a three-dimensional object as long as it can be represented by a function.

【0262】また、特徴点として指定すべき点は、上述
したものに限定されるものではない。即ち、例えば、図
20では、直方体の面である四角形の投影画像の特徴点
として、その四角形の頂点を指定するようにしたが、四
角形の投影画像の特徴点としては、その他、例えば、そ
の四角形の各辺の中点などを指定するようにすることも
可能である。また、球については、図25(A)に示す
点O1乃至O7に対応する点P1乃至P7を特徴点として指
定するようにしたが、図25(A)の点O5と点O7を通
る直線と球との交点のうち点O7ではない方を点O8とし
て、例えば、点O1乃至O6,O8のそれぞれの2次元画
像に投影される点を、球の特徴点として指定しても良
い。
The points to be designated as feature points are not limited to those described above. That is, for example, in FIG. 20, the vertices of the rectangle are designated as the feature points of the rectangular projection image which is the surface of the rectangular parallelepiped. It is also possible to specify the midpoint of each side of the above. As for the ball, but so as to specify a feature point P 1 to P 7 point corresponding to O 1 to O 7 points shown in FIG. 25 (A), the point O 5 and point in FIG. 25 (A) A point which is not the point O 7 among the intersections of the straight line passing through the O 7 and the sphere is defined as a point O 8. For example, the points projected on the respective two-dimensional images of the points O 1 to O 6 and O 8 are defined as It may be specified as a feature point.

【0263】さらに、円錐については、例えば、図34
に示すような点を、特徴点として指定することが可能で
ある。即ち、いま、図34(A)に示すように、3次元
空間において、円錐の頂点O1と、底面の中心とを結ぶ
線分の中点をO60とする。さらに、底面の円周と、xo
o平面との交点をO30およびO50とするとともに、底
面の円周と、yoo平面との交点をO20およびO40とす
る。ここで、点O20,O 30,O40,O50,O60の座標
は、それぞれ、(r,LH,0),(0,LH,−r),
(−r,LH,0),(0,LH,r),(0,LH
2,0)となる。この場合、点O1,O20,O30
40,O50,O60に対応する投影画像上の点を、図34
(B)に示すように、それぞれ点P1,P20,P30,P
40,P50,P60とすると、これらの点を特徴点として指
定することができる。
Further, regarding the cone, for example, FIG.
Points can be specified as feature points.
is there. That is, as shown in FIG.
In space, the vertex O of the cone1And the center of the bottom
O for midpoint of line segment60And Furthermore, the circumference of the bottom and xo
yoIntersection with plane is O30And O50And the bottom
The circumference of the surface and yozoIntersection with plane is O20And O40Toss
You. Where point O20, O 30, O40, O50, O60Coordinates
Are (r, LH, 0), (0, LH, -R),
(-R, LH, 0), (0, LH, R), (0, LH/
2,0). In this case, the point O1, O20, O30,
O40, O50, O60The point on the projection image corresponding to
As shown in FIG.1, P20, P30, P
40, P50, P60Then, these points are used as feature points
Can be specified.

【0264】また、上述したことから明らかであるが、
特徴点としては、投影画像として表示される点(見える
点)と、表示されない点(見えない点)のいずれをも指
定することも可能である。
As is clear from the above,
As the feature points, it is possible to specify both points displayed as projected images (visible points) and points not displayed (invisible points).

【0265】但し、投影画像の特徴点として指定される
点が、ペーストバッファに記憶される展開画像のどの位
置に対応するのかという対応関係は、あらかじめ設定し
ておく必要がある。
However, it is necessary to set in advance the correspondence between the point designated as the feature point of the projected image and the position of the developed image stored in the paste buffer.

【0266】次に、ペースト処理においては、基本的に
は、上述したように、ペーストバッファに記憶された画
像が、注目バッファに記憶された2次元画像の、ユーザ
によって指定された特徴点により特定される3次元物体
の面に貼り付けられる。即ち、ペーストバッファに記憶
された画像の画素値が、注目バッファに上書きされる。
しかしながら、例えば、ペースト処理によって、注目バ
ッファに記憶された2次元画像に、新たな3次元物体を
追加する場合に、ペーストバッファに記憶された画像の
画素値を、注目バッファに、単に上書きするのでは、注
目バッファに記憶された2次元画像に既に表示されてい
る3次元物体の手前側に、新たな3次元物体を追加する
ことはできるが、その奥側に、新たな3次元物体を追加
することはできない。
Next, in the paste processing, basically, as described above, the image stored in the paste buffer is specified by the feature point specified by the user in the two-dimensional image stored in the buffer of interest. Is attached to the surface of the three-dimensional object. That is, the pixel value of the image stored in the paste buffer is overwritten in the buffer of interest.
However, for example, when a new three-dimensional object is added to the two-dimensional image stored in the buffer of interest by the paste processing, the pixel value of the image stored in the paste buffer is simply overwritten on the buffer of interest. Then, a new three-dimensional object can be added in front of the three-dimensional object already displayed in the two-dimensional image stored in the buffer of interest, but a new three-dimensional object is added in the back side. I can't.

【0267】そこで、本実施の形態では、マットを利用
して、注目バッファに記憶された2次元画像に既に表示
されている3次元物体の奥側に、新たな3次元物体を追
加することができるようになされている。
Therefore, in this embodiment, it is possible to add a new three-dimensional object to the back side of the three-dimensional object already displayed in the two-dimensional image stored in the buffer of interest by using the mat. It has been made possible.

【0268】マットは、2次元画像に表示された物体の
形状を表す、いわゆるグレースケールの画像で、その値
は、2次元画像を構成する各画素における物体の寄与率
(αと呼ばれる)を表すことから、α画像とも呼ばれ
る。ここでは、マットは、図7のステップS15におけ
るマット処理が行われることによって、注目バッファに
記憶された2次元画像のマットが生成されるようになさ
れている。なお、2次元画像のマットは、上述したよう
に、その2次元画像が記憶されている画像バッファに記
憶されるようになされている。
The mat is a so-called gray scale image representing the shape of the object displayed on the two-dimensional image, and its value represents the contribution ratio (called α) of the object to each pixel constituting the two-dimensional image. Therefore, it is also called an α image. Here, the mat of the two-dimensional image stored in the buffer of interest is generated by performing the mat processing in step S15 of FIG. As described above, the mat of the two-dimensional image is stored in the image buffer in which the two-dimensional image is stored.

【0269】ここで、マットを構成する各画素の画素値
は、例えば、0乃至1の範囲の値をとり、いわゆる前景
を構成する画素の画素値は1に、いわゆる背景を構成す
る画素の画素値は0に、前景と背景との境界部分を構成
する画素の画素値は、その画素に含まれる前景と背景と
の割合に応じた値となる(前景の割合が多いほど1に近
い値となり、背景の割合が多いほど0に近い値とな
る)。
Here, the pixel value of each pixel constituting the mat takes, for example, a value in the range of 0 to 1, the pixel value of the pixel constituting the so-called foreground is 1, and the pixel value of the pixel constituting the so-called background is The value is 0, and the pixel value of the pixel forming the boundary between the foreground and the background is a value corresponding to the ratio of the foreground and the background included in the pixel (the value becomes closer to 1 as the ratio of the foreground increases). , The value becomes closer to 0 as the background ratio increases).

【0270】従って、例えば、いま、図35(A)に示
すような家屋の形状をした3次元物体が表示されている
2次元画像が、注目バッファに記憶されている場合にお
いて、家屋の部分を前景とし、それ以外の部分を背景と
して、マット処理が行われると、マット操作処理部16
では、図35(B)に示すようなマットが生成され、注
目バッファに記憶される。なお、図35(B)におい
て、影を付してある部分の画素値は1になっており、影
を付していない部分の画素値は0になっている。
Therefore, for example, when a two-dimensional image displaying a three-dimensional object shaped like a house as shown in FIG. 35A is stored in the buffer of interest, When mat processing is performed with the foreground as the foreground and the rest as the background, the mat operation processing unit 16
Then, a mat as shown in FIG. 35B is generated and stored in the buffer of interest. In FIG. 35 (B), the pixel value of the shaded portion is 1, and the pixel value of the unshaded portion is 0.

【0271】ここで、マットの生成方法としては、例え
ば、Eric N.Mortensen, William A.Barrett, "Intellig
ent Scissors for Image Composition", Proceedings o
f SIGGRAPH 95, pp.191-198や、本件出願人が先に提案
した特開平8−331455号公報、特開平10−14
3654号などに開示されているものを利用することが
できる。
Here, as a method of generating a mat, for example, Eric N. Mortensen, William A. Barrett, "Intellig
ent Scissors for Image Composition ", Proceedings o
f SIGGRAPH 95, pp. 191-198, and Japanese Patent Application Laid-Open Nos. 8-331455 and 10-14 previously proposed by the present applicant.
No. 3,654, for example.

【0272】注目バッファに、2次元画像とともに、そ
のマットが記憶されている場合において、そのマットを
有効または無効とするかは、入力装置6を操作すること
により設定することができるようになされている。
When the mat is stored in the buffer of interest together with the two-dimensional image, whether the mat is valid or invalid can be set by operating the input device 6. I have.

【0273】いま、例えば、注目バッファに、図35
(A)または図35(B)にそれぞれ示したような2次
元画像またはマットが記憶されており、新たな3次元物
体として、例えば、円柱を、注目バッファの2次元画像
に貼り付けるペースト処理が指令された場合には、マッ
トが無効とされているときには、円柱の投影画像は、2
次元画像に単に上書きされ、これにより、例えば、図3
5(C)に示すような、円柱が、家屋の手前にあるよう
な2次元画像が生成される。
For example, in the buffer of interest, FIG.
A two-dimensional image or mat as shown in FIG. 35A or FIG. 35B is stored, and paste processing for pasting, for example, a cylinder as a new three-dimensional object to the two-dimensional image in the buffer of interest is performed. When instructed, when the mat is invalid, the projected image of the cylinder is 2
The 3D image is simply overwritten, so that, for example, FIG.
As shown in FIG. 5 (C), a two-dimensional image in which the cylinder is in front of the house is generated.

【0274】一方、マットが有効とされているときに
は、注目バッファに記憶されている2次元画像を構成す
る画素の画素値をAと、円柱の投影画像を構成する画素
の画素値をBと、マットを構成する画素の画素値をα
と、ペースト処理により得られる2次元画像をCと、そ
れぞれ表すと、2次元画像Cは、式C=αA+(1−
α)Bに基づいて生成される。従って、この場合、例え
ば、図35(D)に示すような、円柱が、家屋の奥側に
あるような2次元画像が生成される。
On the other hand, when the mat is valid, the pixel values of the pixels constituting the two-dimensional image stored in the buffer of interest are A, the pixel values of the pixels constituting the projected image of the cylinder are B, The pixel value of the pixel constituting the mat is α
And the two-dimensional image obtained by the paste processing is represented by C, respectively.
α) Generated based on B. Therefore, in this case, for example, as shown in FIG. 35D, a two-dimensional image in which the cylinder is located on the back side of the house is generated.

【0275】以上のように、マットを有効にしてペース
ト処理を行うことで、2次元画像に既に表示されている
3次元物体の奥側に隠れている部分を見えなくする、い
わゆるオクルージョン(Occlusion)を実現することが
でき、従って、この場合、マットは、投影画像の書き込
みを許可するかどうかのフラグとして機能しているとい
うことができる。
As described above, by performing the paste processing with the mat enabled, the part hidden behind the three-dimensional object already displayed in the two-dimensional image is made invisible, that is, so-called occlusion. Therefore, in this case, it can be said that the mat functions as a flag as to whether to permit writing of the projection image.

【0276】なお、マットは、ユーザに作成してもらう
ようにすることも可能である。
[0276] The mat can be created by the user.

【0277】次に、図36のフローチャートを参照し
て、図7のステップS16における物体属性/光源変更
処理について説明する。なお、ここでは、注目バッファ
に記憶された2次元画像のマットが既に生成され、注目
バッファに記憶されているものとする。
Next, the object attribute / light source change processing in step S16 in FIG. 7 will be described with reference to the flowchart in FIG. Here, it is assumed that the mat of the two-dimensional image stored in the buffer of interest has already been generated and stored in the buffer of interest.

【0278】物体属性/光源変更処理では、まず最初
に、ステップS51において、注目バッファに記憶され
たマットにより表される、同じく注目バッファに記憶さ
れた2次元画像に表示された物体の領域における色分布
が検出される。即ち、ステップS51では、注目バッフ
ァに記憶された2次元画像に表示された物体の領域が、
注目バッファに記憶されたマットから認識され、その領
域を構成する画素のRGB値の、RGB空間における分
布(色分布)が検出される。
In the object attribute / light source change processing, first, in step S51, the color in the region of the object represented by the mat stored in the buffer of interest and displayed on the two-dimensional image also stored in the buffer of interest. A distribution is detected. That is, in step S51, the region of the object displayed in the two-dimensional image stored in the buffer of interest is
The distribution (color distribution) in the RGB space of the RGB values of the pixels constituting the area recognized from the mat stored in the buffer of interest is detected.

【0279】色分布の検出後は、ステップS52に進
み、物体の領域を構成する画素のうち、その色の彩度が
最も大きい画素(以下、適宜、最大彩度画素)が、ステ
ップS51で検出された色分布に基づいて検出される。
After the detection of the color distribution, the process proceeds to step S52, and among the pixels constituting the object area, the pixel having the highest color saturation (hereinafter, the maximum saturation pixel as appropriate) is detected in step S51. It is detected based on the obtained color distribution.

【0280】即ち、図37は、RGB空間における物体
の色分布(同図において実線で囲んで示す部分)の例を
示している。なお、図37は、R,G,Bの最大値を1
に正規化した色分布を示している。従って、図37のR
GB空間において、(R,G,B)が(0,0,0)の
点は黒を、(1,1,1)の点は白を、それぞれ表す。
That is, FIG. 37 shows an example of the color distribution of the object in the RGB space (portion surrounded by a solid line in FIG. 37). FIG. 37 shows that the maximum values of R, G, and B are 1
Shows the normalized color distribution. Therefore, R in FIG.
In the GB space, points where (R, G, B) are (0, 0, 0) represent black, and points (1, 1, 1) represent white.

【0281】RGB空間において、彩度は、黒の点と白
の点を結ぶ直線、即ち、図37では、点(0,0,0)
と(1,1,1)とを結ぶ直線から離れるほど大きくな
る。従って、ステップS52では、ステップS51で検
出された色分布において、点(0,0,0)と(1,
1,1)とを結ぶ直線から最も離れた点に位置する色を
有する画素が、最大彩度画素として検出される。図37
の実施の形態では、同図においてCで示す色の画素が、
最大彩度画素として検出される。
In the RGB space, the saturation is represented by a straight line connecting a black point and a white point, that is, a point (0, 0, 0) in FIG.
The distance increases from the line connecting (1, 1, 1) to (1, 1, 1). Therefore, in step S52, in the color distribution detected in step S51, points (0, 0, 0) and (1,
A pixel having a color located at a point farthest from the straight line connecting (1, 1) is detected as the maximum chroma pixel. FIG.
In the embodiment, the pixel of the color indicated by C in FIG.
It is detected as the maximum chroma pixel.

【0282】ここで、最大彩度画素の色(RGB値)C
が、注目バッファに記憶された2次元画像に表示された
物体の本来の色と考えられる。
Here, the color (RGB value) of the maximum saturation pixel C
Is considered to be the original color of the object displayed in the two-dimensional image stored in the buffer of interest.

【0283】その後、ステップS53に進み、ステップ
S51で検出された色分布が変換され、その変換後の色
分布に対応した画素値(RGB値)が、注目バッファに
記憶された2次元画像を構成する、対応する画素に書き
込まれて、リターンする。即ち、ステップ53では、最
大彩度画素の色Cが、所定の色Dに変換され、さらに、
所定のルールにしたがって、物体の領域を構成する他の
画素の色も変換される。
Thereafter, the process proceeds to step S53, in which the color distribution detected in step S51 is converted, and the pixel values (RGB values) corresponding to the converted color distribution form the two-dimensional image stored in the buffer of interest. Then, the data is written to the corresponding pixel and the process returns. That is, in step 53, the color C of the maximum chroma pixel is converted into a predetermined color D,
According to a predetermined rule, the colors of other pixels constituting the object area are also converted.

【0284】具体的には、物体の色や材質感などの材質
属性を変更する物体属性処理が指令された場合、ステッ
プS53では、最大彩度画素の色Cが、所定の色Dに変
換され、その変換と同様にして、物体の領域を構成する
他の画素の色も、線形的に変換される。
More specifically, when an object attribute process for changing a material attribute such as a color or a texture of the object is instructed, the color C of the maximum chroma pixel is converted into a predetermined color D in step S53. Similarly to the conversion, the colors of the other pixels constituting the object area are also converted linearly.

【0285】即ち、図37において、最大彩度画素の色
Cが、色Dに変更された場合、物体の色分布の中で、色
Cと、白色を表す点(1,1,1)との間にある色は、
色Dと、白色を表す点(1,1,1)との間にある色
に、線形に変換される。さらに、物体の色分布の中の、
色Cと、黒色を表す点(0,0,0)との間にある色
は、色Dと、黒色を表す点(0,0,0)との間にある
色に、線形に変換される。その結果、物体の色分布は、
図37において、実線で示すものから点線で示すものに
変更される。ここでは、色が線形に変換されるため、元
の色分布の中で、最も明るい色Qは、変換後の色分布の
中でも、最も明るい色Tに変換される。同様に、元の色
分布の中で、最も暗い色Pは、変換後の色分布の中で
も、最も暗い色Sに変換される。
That is, in FIG. 37, when the color C of the maximum chroma pixel is changed to the color D, the color C and the point (1,1,1) representing white in the color distribution of the object. The color between
It is linearly converted to a color between the color D and the point (1,1,1) representing white. Furthermore, in the color distribution of the object,
The color between the color C and the point (0,0,0) representing black is linearly converted to a color between the color D and the point (0,0,0) representing black. You. As a result, the color distribution of the object is
In FIG. 37, the one shown by a solid line is changed to the one shown by a dotted line. Here, since the color is linearly converted, the lightest color Q in the original color distribution is converted to the lightest color T in the converted color distribution. Similarly, the darkest color P in the original color distribution is converted to the darkest color S in the converted color distribution.

【0286】色Cと、白色を表す点(1,1,1)との
間にある色は、物体における、光源からの光の鏡面反射
による鏡面反射成分であり、また、色Cと、黒色を表す
点(0,0,0)との間にある色は、物体における、光
源からの光の拡散反射による拡散反射成分であり、上述
のように、物体の色分布を、拡散反射成分と鏡面反射成
分とに分けて、それぞれを線形に変換することにより、
注目バッファに記憶された2次元画像に表示されている
物体の投影画像の色を、元の陰影を保持したまま変更す
ることができる。即ち、上述の場合、2次元画像に表示
された物体の色を、色Cから色Dに変更することができ
る。
The color between the color C and the point (1,1,1) representing white is the specular reflection component of the object due to the specular reflection of the light from the light source. Is a diffuse reflection component of the object due to the diffuse reflection of light from the light source, and as described above, the color distribution of the object is represented by the diffuse reflection component and the diffuse reflection component. By dividing it into specular reflection components and converting each to linear,
The color of the projected image of the object displayed on the two-dimensional image stored in the buffer of interest can be changed while retaining the original shadow. That is, in the above case, the color of the object displayed in the two-dimensional image can be changed from color C to color D.

【0287】なお、このような色の変更は、ダイクロマ
ティックリフレクションモデル(dichromatic reflecti
on model)の理論に基づくものである。
It should be noted that such a color change can be performed by using a dichromatic reflection model.
on model).

【0288】また、上述の場合には、物体の色分布のう
ちの拡散反射成分または鏡面反射成分それぞれを線形に
変換するようにしたが、ステップS53では、拡散反射
成分や鏡面反射成分を非線形に変換するようにすること
も可能である。即ち、例えば、図37において、鏡面反
射成分である、色CとQとの間にある色のほとんどを、
色D付近に変換し、色Qおよびその付近の色を、色T付
近に変換した場合には、物体を、ごく一部において、強
い鏡面反射が生じているようなものとすることができ
る。この場合、例えば、図38(A)に示すように、拡
散反射が多く、全体的に明るい物体を、図38(B)に
示すように、一部で強い鏡面反射が生じている物体に変
更することができる。
In the above case, each of the diffuse reflection component and the specular reflection component of the color distribution of the object is linearly converted. However, in step S53, the diffuse reflection component and the specular reflection component are nonlinearly converted. It is also possible to convert. That is, for example, in FIG. 37, most of the colors between the colors C and Q, which are the specular reflection components,
When the color is converted to the vicinity of the color D and the color Q and the color in the vicinity thereof are converted to the vicinity of the color T, the object can be regarded as having a strong specular reflection in a very small part. In this case, for example, as shown in FIG. 38 (A), an object which has a large amount of diffuse reflection and is entirely bright is changed to an object which partially has strong specular reflection as shown in FIG. 38 (B). can do.

【0289】以上のように、拡散反射成分や鏡面反射成
分を非線形に変換することで、物体において、鏡面反射
している領域を狭くまたは広くしたり、鏡面反射の強度
を変えたりすることができ、これにより、物体の材質感
を変更することができる。
As described above, by non-linearly converting the diffuse reflection component and the specular reflection component, it is possible to narrow or widen the specular reflection area of the object and change the intensity of the specular reflection. Thereby, the material appearance of the object can be changed.

【0290】なお、上述のように、一部で強い鏡面反射
が生じるのは、表面粗度が小さい物体の性質であり、従
って、そのように色分布を変更した場合には、物体の表
面を滑らかな表面に変更することができる。
It is to be noted that strong specular reflection partially occurs as described above due to the property of an object having a small surface roughness. Therefore, when the color distribution is changed in such a manner, the surface of the object is changed. Can be changed to a smooth surface.

【0291】次に、光源を変更する光源変更処理が指令
された場合、図36のステップS53では、図37にお
いて、鏡面反射成分である色CとQとの間にある色が、
色Cから、新たな光源の色に沿って分布するように変換
される。即ち、物体の色分布において、最も明るい色
は、光源の色であると考えられるから、図37におい
て、色Cから、最も明るい色Qに沿って分布する色を、
色Cから、新たな光源の色に沿って分布するように変換
することで、光源が、新たな光源に変更されたかのよう
な効果を得ることができる。
Next, when a light source change process for changing the light source is instructed, in step S53 of FIG. 36, in FIG. 37, the color between the colors C and Q, which are the specular reflection components, is
The color C is converted so as to be distributed along the color of the new light source. That is, in the color distribution of the object, the brightest color is considered to be the color of the light source, and therefore, in FIG.
By converting the color C so as to be distributed along the color of the new light source, it is possible to obtain an effect as if the light source was changed to a new light source.

【0292】次に、図7のステップS17において行わ
れるイレース処理について説明する。
Next, the erasing process performed in step S17 of FIG. 7 will be described.

【0293】イレース処理は、上述したように、画像バ
ッファに記憶された2次元画像の一部を削除するもので
あるから、基本的には、そのイレース処理の対象とする
2次元画像が記憶された画像バッファを注目バッファと
して、コピー処理を行い、展開画像をペーストバッファ
に記憶させ、さらに、ペーストバッファに記憶された展
開画像の一部を消去し、ペースト処理を行い、展開画像
に対応する投影画像を、注目バッファの元の位置に貼り
付けることで行うことができる。
As described above, since the erase process deletes a part of the two-dimensional image stored in the image buffer, basically, the two-dimensional image to be erased is stored. Using the image buffer obtained as a target buffer, copy processing is performed, the developed image is stored in the paste buffer, a part of the developed image stored in the paste buffer is deleted, paste processing is performed, and the projection corresponding to the developed image is performed. This can be done by pasting the image at the original position of the buffer of interest.

【0294】しかしながら、例えば、図39(A)に示
すような2次元画像のうちの、格子状の模様が描かれた
壁に埋め込まれている円柱を削除する場合において、コ
ピー処理を行い、図39(B)に示すように、その壁の
展開画像をペーストバッファに記憶させた後、単に、円
柱の部分を削除して、ペースト処理を行ったのでは、円
柱のあった部分が無模様の、不自然な2次元画像が得ら
れることになる。
However, for example, in the case where a cylinder embedded in a wall on which a lattice pattern is drawn is deleted from a two-dimensional image as shown in FIG. As shown in FIG. 39 (B), if the developed image of the wall is stored in the paste buffer, and then the column portion is simply deleted and the paste process is performed, the portion where the column was present has no pattern. Thus, an unnatural two-dimensional image is obtained.

【0295】そこで、イレース処理では、ペーストバッ
ファに記憶された展開画像の一部を削除し、さらに、そ
の削除が行われた部分の背景を再現するようになされて
いる。
Therefore, in the erase process, a part of the developed image stored in the paste buffer is deleted, and the background of the deleted part is reproduced.

【0296】即ち、例えば、図39(A)に示すような
2次元画像のうちの、格子状の模様が描かれた壁に埋め
込まれている円柱を削除する場合において、コピー処理
を行い、図39(B)に示すように、その壁の展開画像
が、ペーストバッファに記憶されたときには、イレース
処理では、円柱の部分が削除され、さらに、その削除が
行われた部分の背景が描画される。これにより、ペース
トバッファの展開画像は、例えば、図39(C)に示す
ように、全体に、格子状の模様が描かれたものとされ
る。
That is, for example, in the case where a cylinder embedded in a wall on which a lattice pattern is drawn is deleted from a two-dimensional image as shown in FIG. As shown in FIG. 39 (B), when the developed image of the wall is stored in the paste buffer, in the erase process, the columnar portion is deleted, and the background of the deleted portion is drawn. . As a result, the developed image of the paste buffer has a grid-like pattern drawn as a whole, for example, as shown in FIG.

【0297】従って、そのような展開画像を用いて、ペ
ースト処理を行うことにより、図39(D)に示すよう
に、円柱が削除され、さらに、その円柱のあった部分に
格子状の模様が再現された、自然な2次元画像を得るこ
とができる。
Therefore, by performing paste processing using such a developed image, as shown in FIG. 39 (D), the cylinder is deleted, and a grid-like pattern is formed in the portion where the cylinder was located. A reproduced, natural two-dimensional image can be obtained.

【0298】なお、上述のように、画像の一部を削除
し、その削除が行われた部分に背景を再現する方法とし
ては、例えば、本件出願人が先に提案した特開平9−1
28529号公報(EP公開番号0772157に対
応)や特開平10−105700号(USP5,89
2,853に対応)などに記載されているものなどを採
用することができる。
As described above, as a method of deleting a part of an image and reproducing a background in the part where the image has been deleted, for example, Japanese Patent Application Laid-Open No.
No. 28529 (corresponding to EP Publication No. 0772157) and JP-A-10-105700 (US Pat.
2, 853) can be employed.

【0299】次に、上述の場合においては、コピー処理
において、注目バッファに記憶された2次元画像に表示
された3次元物体の1面だけの展開画像を生成し、ペー
ストバッファに記憶させるようにしたが、コピー処理で
は、注目バッファに記憶された2次元画像に表示された
3次元物体の隣接する2面以上の部分について、展開画
像を生成し、ペーストバッファに記憶させるようにする
ことも可能である。
Next, in the above-described case, in the copy processing, a developed image of only one surface of the three-dimensional object displayed on the two-dimensional image stored in the buffer of interest is generated and stored in the paste buffer. However, in the copy processing, it is also possible to generate a developed image for two or more adjacent surfaces of the three-dimensional object displayed in the two-dimensional image stored in the buffer of interest and store the developed image in the paste buffer. It is.

【0300】即ち、例えば、図40(A)に示すよう
に、家屋の形状をした3次元物体が表示されている2次
元画像が、注目バッファに記憶されている場合におい
て、格子状の模様が描かれた壁と、それに隣接する無模
様の壁に、連続した文字や図形を付加するときに、格子
状の模様が描かれた壁を対象に、コピー処理を行い、そ
の展開画像をペーストバッファに記憶させ、文字や図形
を描き、ペースト処理を行うことで、文字や図形が描か
れた格子状の模様の壁を貼り付け、さらに、無模様の壁
を対象に、コピー処理を行い、その展開画像をペースト
バッファに記憶させ、文字や図形を描き、ペースト処理
を行うことで、文字や図形が描かれた無模様の壁を貼り
付けるのでは、面倒であり、また、連続した文字や図形
を描きにくい。
For example, as shown in FIG. 40A, when a two-dimensional image displaying a three-dimensional object in the shape of a house is stored in the buffer of interest, a grid-like pattern When adding continuous characters and graphics to a drawn wall and a non-patterned wall adjacent to the drawn wall, copy processing is performed on the wall with the lattice pattern drawn, and the developed image is pasted into the paste buffer. , Draw characters and figures, paste it, paste the walls of the lattice pattern on which the characters and figures were drawn, and then perform the copy processing on the plain walls, By storing the developed image in the paste buffer, drawing characters and figures, and performing the paste process, pasting a blank wall with characters and figures drawn on it is troublesome, and continuous characters and figures Is difficult to draw.

【0301】そこで、コピー処理では、図40(B)に
示すように、格子状の模様が描かれた壁と、それに隣接
する無模様の壁の両方の展開画像を生成し、ペーストバ
ッファに記憶させることができる。この場合、格子状の
模様が描かれた壁と、それに隣接する無模様の壁に、連
続した文字や図形を、容易に描くことができる。
Therefore, in the copy processing, as shown in FIG. 40 (B), developed images of both the wall on which the lattice pattern is drawn and the non-patterned wall adjacent thereto are generated and stored in the paste buffer. Can be done. In this case, continuous characters and figures can be easily drawn on the wall on which the lattice-like pattern is drawn and on the non-patterned wall adjacent thereto.

【0302】なお、ペースト処理においても同様に、ペ
ーストバッファに記憶された展開画像を、3次元物体の
隣接する2面以上の部分に貼り付けるようにすることが
可能である。
[0302] Similarly, in the paste processing, the developed image stored in the paste buffer can be pasted on two or more adjacent surfaces of the three-dimensional object.

【0303】ところで、上述の自動補正処理では、2次
元画像に表示された物体の輪郭線を、画素値の微分値の
法線ベクトル方向成分に基づいて検出し、ユーザが指定
した特徴点を、その輪郭線上に位置するように補正する
ようにしたが、この画素値の微分値の法線ベクトル方向
成分に基づいて、物体の輪郭線を検出する手法は、自動
補正処理の他、広く、物体の輪郭線の検出を必要とする
処理に適用することができる。
In the above-described automatic correction processing, the contour of the object displayed in the two-dimensional image is detected based on the component of the differential value of the pixel value in the direction of the normal vector, and the feature point designated by the user is determined. Although the correction is made so that it is located on the outline, the method of detecting the outline of the object based on the normal vector direction component of the differential value of the pixel value is widely used in addition to the automatic correction process. Can be applied to the processing that requires the detection of the contour line.

【0304】そこで、画素値の微分値の法線ベクトル方
向成分に基づいて、物体の輪郭線を検出(抽出)する輪
郭抽出装置について説明する。
Therefore, a contour extracting device for detecting (extracting) the contour of an object based on the normal vector direction component of the differential value of the pixel value will be described.

【0305】図41は、そのような輪郭抽出装置の一実
施の形態の構成例を示している。
FIG. 41 shows a configuration example of an embodiment of such a contour extraction device.

【0306】パラメータ算出部41には、輪郭線を抽出
する物体が表示された画像と、その物体の形状を表す形
状情報が供給されるようになされており、そこでは、形
状情報に基づいて、1以上のパラメータを用いて表され
る関数が、関数記憶部42から読み出される。即ち、関
数記憶部42は、物体の形状ごとに、その輪郭線を定義
するための、1以上のパラメータを用いて表される関数
を記憶しており、パラメータ算出部41は、関数記憶部
42に記憶されている関数の中から、形状情報に対応し
た形状の物体の輪郭線を表すものを読み出す。
The parameter calculating section 41 is supplied with an image on which an object from which a contour line is to be extracted and shape information representing the shape of the object are supplied. A function represented using one or more parameters is read from the function storage unit 42. That is, the function storage unit 42 stores a function represented by using one or more parameters for defining an outline for each shape of the object, and the parameter calculation unit 41 stores the function storage unit 42 Is read out of the functions stored in the subroutine which represents the contour of the object having the shape corresponding to the shape information.

【0307】そして、関数記憶部42から読み出された
関数をfとすると、パラメータ算出部41は、その関数
fについて、式(2)で表されるエネルギEfを算出
し、そのエネルギEfを最大にするパラメータを求め
る。なお、パラメータ算出部41に供給される画像が、
例えば、2次元画像である場合には、式(2)における
△B(xp,yp)として、例えば、画素値などが用いら
れる。また、パラメータ算出部41に供給される画像
が、例えば、3次元画像(3次元のデータを用いて描画
される画像)である場合には、式(2)における△B
(xp,yp)として、ボリュームレンダリングで用いら
れるボリュームデータなどが用いられる。
Then, assuming that the function read from the function storage unit 42 is f, the parameter calculation unit 41 calculates the energy E f represented by the equation (2) for the function f, and calculates the energy E f Find the parameter that maximizes Note that the image supplied to the parameter calculation unit 41 is
For example, when the image is a two-dimensional image, for example, a pixel value or the like is used as △ B (x p , y p ) in Expression (2). When the image supplied to the parameter calculation unit 41 is, for example, a three-dimensional image (an image drawn using three-dimensional data), △ B in Expression (2)
As (x p , y p ), volume data or the like used in volume rendering is used.

【0308】パラメータ算出部41は、関数fのパラメ
ータを求めると、その関数fとともにパラメータを、輪
郭抽出部43に供給する。輪郭抽出部43では、パラメ
ータ算出部41からの関数fに、同じくパラメータ算出
部41からのパラメータをセットして計算を行うこと
で、式f=0を満たす点を求め、その点を、物体の輪郭
線を構成する点として出力する。
When the parameter calculation unit 41 obtains the parameter of the function f, it supplies the parameter to the contour extraction unit 43 together with the function f. The contour extraction unit 43 calculates the function f from the parameter calculation unit 41 by setting the parameter from the parameter calculation unit 41 in the same way, thereby obtaining a point satisfying the equation f = 0, and finding that point of the object. It is output as a point constituting the contour.

【0309】ここで、図41の輪郭抽出装置では、現実
的には考えにくいが、2次元や3次元以外の次元の画像
に表示された物体の輪郭であっても、その物体を表すた
めのスカラー量が定義されており、かつその輪郭が、1
以上のパラメータを用いて表される関数fによる式f=
0で定義することができるものであれば、検出すること
が可能である。なお、この場合、式(2)における△B
(xp,yp)としては、物体を表すためのスカラー量の
微分値が用いられる。
Here, the contour extraction device shown in FIG. 41 is practically inconceivable. However, even if it is a contour of an object displayed in an image other than two-dimensional or three-dimensional, it is possible to express the object. A scalar quantity is defined and its contour is 1
Expression f = by function f expressed using the above parameters
Anything that can be defined as 0 can be detected. In this case, △ B in equation (2)
As (x p , y p ), a differential value of a scalar quantity for representing an object is used.

【0310】以上のように、ユーザによって指定された
形状情報および特徴点に基づいて、2次元画像の中の3
次元物体を構成する面を、展開画像に変換するための逆
変換式を算出し、その逆変換式に基づいて、2次元画像
の中の3次元物体を構成する面を、展開画像に変換する
一方、ユーザによって指定された形状情報および特徴点
に基づいて、展開画像を、投影画像に変換するための順
変換式を算出し、その順変換式に基づいて、展開画像
を、投影画像に変換し、その投影画像を、2次元画像に
おける特徴点によって特定される部分に貼り付けるよう
にしたので、2次元画像に対して、容易に、3次元的な
編集や加工等を施すことができる。
As described above, based on the shape information and feature points specified by the user, 3
Calculate an inverse transformation formula for transforming the surface constituting the three-dimensional object into a developed image, and convert the surface constituting the three-dimensional object in the two-dimensional image into a developed image based on the inverse transformation formula. On the other hand, based on the shape information and the feature points specified by the user, a forward conversion formula for converting the developed image into a projected image is calculated, and based on the forward conversion formula, the developed image is converted into a projected image. Then, the projected image is pasted on the portion specified by the feature point in the two-dimensional image, so that the two-dimensional image can be easily subjected to three-dimensional editing and processing.

【0311】従って、図3の画像処理装置では、例え
ば、カメラ9で、あるオブジェクトを撮影した画像があ
る場合に、そのオブジェクトを、再度撮影することな
く、その画像中のオブジェクトの位置や、形状、テクス
チャなどを変更することが可能である。また、この画像
処理装置は、例えば、画像の撮影後に、デザイナが、そ
の画像に対して加工を加える場合などに利用することが
できる。さらに、この画像処理装置は、最近盛んに行わ
れている仮想現実空間のデータを作成する場合や、その
他の画像編集一般に利用することが可能である。また、
この画像処理装置では、現実の物体を撮影した画像の
他、絵画を撮影して得られる画像や、コンピュータグラ
フィクスの技術を使用して描画された画像なども、処理
の対象とすることが可能である。
Therefore, in the image processing apparatus shown in FIG. 3, for example, when there is an image of a certain object photographed by the camera 9, the position and shape of the object in the image can be obtained without photographing the object again. , Texture, etc. can be changed. Further, this image processing apparatus can be used, for example, when a designer performs processing on an image after capturing the image. Further, this image processing apparatus can be used for creating data of a virtual reality space, which has been actively performed recently, and for other image editing in general. Also,
In this image processing apparatus, in addition to an image of a real object, an image obtained by photographing a painting, an image drawn using computer graphics technology, and the like can be processed. is there.

【0312】なお、注目バッファに記憶された2次元画
像に表示された3次元物体の面を対象に、コピー処理を
行って、ペーストバッファに記憶させ、そのペーストバ
ッファの記憶内容に加工を加えた後に、それを、ペース
ト処理により、元の3次元物体の面に貼り付ける場合に
は、ペースト処理においては、コピー処理を行う際に用
いられた形状情報と特徴点が、そのまま用いられる。こ
れは、このような場合には、コピー処理とペースト処理
とで用いられる形状情報と特徴点は同一のものであるは
ずなので、コピー処理の際に入力された形状情報および
特徴点と同一の形状情報および特徴点を、ペースト処理
の際に、再度、ユーザに入力させるのは冗長であるから
である。また、ユーザに、コピー処理を行う際と、ペー
スト処理を行う際に、それぞれ特徴点を入力させた場
合、自動補正処理が行われても、コピー処理に用いる特
徴点と、ペースト処理に用いる特徴点とが正確に一致し
ないことが考えられ、この場合、コピー処理により、展
開画像が生成される2次元画像上の領域と、ペースト処
理により、投影画像が貼り付けられる2次元画像上の領
域とが一致しなくなり、ペースト処理後の2次元画像が
不自然なものとなることがあるからである。
[0312] Copy processing is performed on the surface of the three-dimensional object displayed on the two-dimensional image stored in the buffer of interest, and the resultant is stored in the paste buffer, and the stored contents of the paste buffer are processed. When the paste processing is later applied to the surface of the original three-dimensional object by the paste processing, in the paste processing, the shape information and the feature points used in performing the copy processing are used as they are. This is because, in such a case, the shape information and the feature point used in the copy process and the paste process should be the same, so that the shape information and the feature shape input in the copy process are the same. This is because it is redundant for the user to input information and feature points again during the paste processing. In addition, when the user inputs a feature point when performing the copy process and when performing the paste process, even if the automatic correction process is performed, the feature point used for the copy process and the feature used for the paste process are used. It is conceivable that the points do not match exactly. In this case, the area on the two-dimensional image where the developed image is generated by the copy processing and the area on the two-dimensional image where the projected image is pasted by the paste processing are considered. Do not match, and the two-dimensional image after the paste processing may be unnatural.

【0313】次に、図42を参照して、上述した一連の
処理を実行するプログラムをコンピュータにインストー
ルし、コンピュータによって実行可能な状態とするため
に用いられる媒体について説明する。
Next, with reference to FIG. 42, a description will be given of a medium used to install a program for executing the above-described series of processing in a computer and to make the computer executable.

【0314】プログラムは、図42(A)に示すよう
に、コンピュータ101に内蔵されている記録媒体とし
てのハードディスク102(例えば、図3の演算処理回
路1における外部記憶装置7に対応する)に予めインス
トールした状態でユーザに提供することができる。
As shown in FIG. 42A, the program is stored in a hard disk 102 (for example, corresponding to the external storage device 7 in the arithmetic processing circuit 1 in FIG. 3) as a recording medium built in the computer 101 in advance. It can be provided to the user in an installed state.

【0315】あるいはまた、プログラムは、図42
(B)に示すように、フロッピーディスク111、CD-R
OM(Compact Disc Read Only Memory)112,MO(Magnet
o optical)ディスク113,DVD(Digital Versatile Di
sc)114、磁気ディスク115、半導体メモリ116
などの記録媒体に、一時的あるいは永続的に格納し、パ
ッケージソフトウエアとして提供することができる。
Alternatively, the program is executed as shown in FIG.
As shown in (B), the floppy disk 111 and the CD-R
OM (Compact Disc Read Only Memory) 112, MO (Magnet
o optical) disc 113, DVD (Digital Versatile Di)
sc) 114, magnetic disk 115, semiconductor memory 116
And the like, can be temporarily or permanently stored in a recording medium such as a storage medium and provided as package software.

【0316】さらに、プログラムは、図42(C)に示
すように、ダウンロードサイト121から、ディジタル
衛星放送用の人工衛星122を介して、コンピュータ1
23に無線で転送したり、LAN(Local Area Network)、
インターネットといったネットワーク131を介して、
コンピュータ123に有線で転送し、コンピュータ12
3において、内蔵するハードディスクなどに格納させる
ようにすることができる。
Further, as shown in FIG. 42C, the program is transmitted from the download site 121 to the computer 1 via an artificial satellite 122 for digital satellite broadcasting.
23, wireless LAN, LAN (Local Area Network),
Via a network 131 such as the Internet,
The data is transferred to the computer 123 by wire, and
In 3, it may be stored in a built-in hard disk or the like.

【0317】本明細書における媒体とは、これら全ての
媒体を含む広義の概念を意味するものである。
[0317] In the present specification, the medium means a broad concept including all these media.

【0318】また、本明細書において、媒体により提供
されるプログラムを記述するステップは、必ずしもフロ
ーチャートとして記載された順序に沿って時系列に処理
する必要はなく、並列的あるいは個別に実行される処理
(例えば、並列処理あるいはオブジェクトによる処理)
も含むものである。
In this specification, the steps of describing a program provided by a medium need not necessarily be processed in chronological order in the order described in the flowchart, and may be performed in parallel or individually. (For example, parallel processing or object processing)
Is also included.

【0319】なお、本実施の形態では、図3の演算処理
回路1に、外部記憶装置7に記憶されたアプリケーショ
ンプログラムを実行させることで、図4の画像処理装置
を実現することとしたが、この画像処理装置は、図4に
示した各ブロックに相当するハードウェアによって実現
することも可能である。
In the present embodiment, the image processing apparatus shown in FIG. 4 is realized by causing the arithmetic processing circuit 1 shown in FIG. 3 to execute an application program stored in the external storage device 7. This image processing apparatus can be realized by hardware corresponding to each block shown in FIG.

【0320】[0320]

【発明の効果】以上の如く、本発明の画像処理装置およ
び画像処理方法、並びに媒体によれば、第1の形状情報
および第1の特徴点に基づいて、第1の2次元画像の中
の第1の3次元物体を構成する面を、その面を展開した
画像である展開画像に変換するための第1の変換式が算
出され、その第1の変換式に基づいて、第1の2次元画
像の中の第1の3次元物体を構成する面が、展開画像に
変換されて、記憶手段に記憶される。さらに、第2の形
状情報および第2の特徴点に基づいて、記憶手段に記憶
された画像を、第2の3次元物体を構成する面を投影し
た画像である投影画像に変換するための第2の変換式が
算出され、その第2の変換式に基づいて、記憶手段に記
憶された画像が、投影画像に変換される。そして、その
投影画像が、第2の2次元画像における第2の特徴点に
よって特定される部分に貼り付けられる。従って、2次
元画像に対して、容易に、3次元的な編集等を施すこと
が可能となる。
As described above, according to the image processing apparatus, the image processing method, and the medium of the present invention, the first two-dimensional image based on the first shape information and the first feature point is obtained. A first conversion formula for converting a surface constituting the first three-dimensional object into a developed image which is an image obtained by developing the surface is calculated, and a first conversion formula is calculated based on the first conversion formula. The surface constituting the first three-dimensional object in the three-dimensional image is converted into a developed image and stored in the storage unit. Further, based on the second shape information and the second feature point, a second image for converting the image stored in the storage unit into a projection image which is an image obtained by projecting a plane constituting a second three-dimensional object. 2 is calculated, and the image stored in the storage unit is converted into a projection image based on the second conversion formula. Then, the projection image is pasted on a portion specified by the second feature point in the second two-dimensional image. Therefore, it is possible to easily perform three-dimensional editing or the like on a two-dimensional image.

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

【図1】従来のペイントツールによる描画結果を示す図
である。
FIG. 1 is a diagram showing a drawing result by a conventional paint tool.

【図2】従来のペイントツールによる描画結果を示す図
である。
FIG. 2 is a diagram showing a drawing result by a conventional paint tool.

【図3】本発明を適用した画像処理装置の一実施の形態
のハードウェアの構成例を示すブロック図である。
FIG. 3 is a block diagram illustrating a configuration example of hardware of an image processing apparatus according to an embodiment of the present invention;

【図4】図3の画像処理装置の機能的構成例を示すブロ
ック図である。
FIG. 4 is a block diagram illustrating a functional configuration example of the image processing apparatus in FIG. 3;

【図5】図4の画像処理装置による2次元画像の処理結
果を示す図である。
FIG. 5 is a diagram showing a processing result of a two-dimensional image by the image processing apparatus of FIG. 4;

【図6】図4の画像処理装置による2次元画像の処理結
果を示す図である。
FIG. 6 is a diagram illustrating a processing result of a two-dimensional image by the image processing apparatus in FIG. 4;

【図7】図4の画像処理装置の処理を説明するためのフ
ローチャートである。
FIG. 7 is a flowchart illustrating a process of the image processing apparatus of FIG. 4;

【図8】図4の画像処理装置が起動されたときに表示さ
れるメインウインドウを示す図である。
FIG. 8 is a diagram showing a main window displayed when the image processing apparatus of FIG. 4 is started.

【図9】コピー処理を説明するための図である。FIG. 9 is a diagram illustrating a copy process.

【図10】ペースト処理を説明するための図である。FIG. 10 is a diagram for explaining a paste process.

【図11】コピー処理とペースト処理との組み合わせに
よるテクスチャのコピーを説明するための図である。
FIG. 11 is a diagram illustrating copying of a texture by a combination of a copy process and a paste process.

【図12】ユーザによって指定される特徴点を示す図で
ある。
FIG. 12 is a diagram showing feature points designated by a user.

【図13】図7のステップS7の処理の詳細を説明する
ためのフローチャートである。
FIG. 13 is a flowchart illustrating details of a process in step S7 of FIG. 7;

【図14】図13のステップS22の処理を説明するた
めの図である。
FIG. 14 is a diagram for explaining the process of step S22 in FIG.

【図15】2次元画像に表示された3次元物体の輪郭線
の抽出方法を説明するための図である。
FIG. 15 is a diagram for describing a method of extracting a contour of a three-dimensional object displayed on a two-dimensional image.

【図16】図7のステップS7の処理の詳細を説明する
ためのフローチャートである。
FIG. 16 is a flowchart illustrating details of a process in step S7 of FIG. 7;

【図17】特徴点の補正方法を説明するための図であ
る。
FIG. 17 is a diagram for explaining a feature point correction method.

【図18】逆変換式および順変換式の算出方法を説明す
るための図である。
FIG. 18 is a diagram for explaining a method of calculating an inverse conversion formula and a forward conversion formula.

【図19】3次元空間上の3次元物体、展開画像、およ
び投影画像の関係を示す図である。
FIG. 19 is a diagram illustrating a relationship among a three-dimensional object, a developed image, and a projected image in a three-dimensional space.

【図20】3次元物体が直方体である場合の、逆変換式
および順変換式の算出方法を説明するための図である。
FIG. 20 is a diagram for explaining a method of calculating an inverse conversion formula and a forward conversion formula when the three-dimensional object is a rectangular parallelepiped.

【図21】3次元物体が円柱である場合の、逆変換式お
よび順変換式の算出方法を説明するための図である。
FIG. 21 is a diagram for explaining a method of calculating an inverse conversion formula and a forward conversion formula when the three-dimensional object is a cylinder.

【図22】3次元物体が円柱である場合の、逆変換式お
よび順変換式の算出方法を説明するための図である。
FIG. 22 is a diagram for explaining a method of calculating an inverse conversion formula and a forward conversion formula when the three-dimensional object is a cylinder.

【図23】角度νを説明するための図である。FIG. 23 is a diagram for explaining an angle ν.

【図24】図21におけるθの算出方法を説明するため
のフローチャートである。
FIG. 24 is a flowchart illustrating a method of calculating θ in FIG. 21.

【図25】3次元物体が球である場合の、逆変換式およ
び順変換式の算出方法を説明するための図である。
FIG. 25 is a diagram for explaining a method of calculating an inverse conversion formula and a forward conversion formula when the three-dimensional object is a sphere.

【図26】3次元物体が球である場合の、逆変換式およ
び順変換式の算出方法を説明するための図である。
FIG. 26 is a diagram for explaining a method of calculating an inverse conversion formula and a forward conversion formula when the three-dimensional object is a sphere.

【図27】図26のλ1およびλ2から、μを算出する方
法を説明するための図である。
FIG. 27 is a diagram for explaining a method of calculating μ from λ 1 and λ 2 in FIG. 26;

【図28】図26のλ1およびλ2から、μを算出する方
法を説明するための図である。
FIG. 28 is a diagram for explaining a method of calculating μ from λ 1 and λ 2 in FIG. 26;

【図29】図26のλ1およびλ2から、μを算出する方
法を説明するための図である。
FIG. 29 is a diagram for explaining a method of calculating μ from λ 1 and λ 2 in FIG. 26;

【図30】図26のλ1およびλ2から、μを算出する方
法を説明するための図である。
30 is a diagram for explaining a method of calculating μ from λ 1 and λ 2 in FIG. 26;

【図31】3次元物体が円錐である場合の、逆変換式お
よび順変換式の算出方法を説明するための図である。
FIG. 31 is a diagram for explaining a method of calculating an inverse conversion formula and a forward conversion formula when a three-dimensional object is a cone.

【図32】3次元物体が円錐である場合の、逆変換式お
よび順変換式の算出方法を説明するための図である。
FIG. 32 is a diagram for explaining a method of calculating an inverse conversion formula and a forward conversion formula when a three-dimensional object is a cone.

【図33】角度νを説明するための図である。FIG. 33 is a diagram for explaining an angle ν.

【図34】円錐について指定される特徴点の例を示す図
である。
FIG. 34 is a diagram illustrating an example of a feature point specified for a cone;

【図35】マット処理を説明するための図である。FIG. 35 is a diagram for explaining a mat process.

【図36】図7のステップS16の処理の詳細を説明す
るためのフローチャートである。
FIG. 36 is a flowchart illustrating details of a process in step S16 of FIG. 7;

【図37】図36のステップS53の処理を説明するた
めの図である。
FIG. 37 is a view for explaining the processing in step S53 of FIG. 36;

【図38】物体の色分布を非線形に変換した変換結果を
示す図である。
FIG. 38 is a diagram illustrating a conversion result obtained by nonlinearly converting the color distribution of an object.

【図39】イレース処理を説明するための図である。FIG. 39 is a diagram for explaining an erasing process;

【図40】コピー処理を説明するための図である。FIG. 40 is a diagram for describing copy processing.

【図41】本発明を適用した輪郭抽出装置の一実施の形
態の構成例を示すブロック図である。
FIG. 41 is a block diagram illustrating a configuration example of an embodiment of a contour extraction device to which the present invention has been applied.

【図42】本発明を適用した媒体を説明するための図で
ある。
FIG. 42 is a diagram for explaining a medium to which the present invention is applied.

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

1 演算処理回路, 2 プログラムメモリ, 3 デ
ータメモリ, 4 フレームメモリ, 5 画像表示装
置, 6 入力装置, 7 外部記憶装置,8 外部イ
ンターフェイス, 9 カメラ, 11 入力イベント
処理部, 12 コピー操作処理部, 13 ペースト
操作処理部, 14 ペーストバッファ選択処理部,
15 イレース操作処理部, 16 マット操作処理
部, 17 物体属性操作処理部, 18 ペイント処
理部, 19 変換指定処理部,20 画像変換処理
部, 21 バッファID記憶部, 22 表示処理
部,31 コマンドボタン, 32 形状ボタン, 4
1 パラメータ算出部,42 関数記憶部, 43 輪
郭抽出部, 101 コンピュータ, 102ハードデ
ィスク, 103 半導体メモリ, 111 フロッピ
ーディスク,112 CD-ROM, 113 MOディスク,
114 DVD, 115 磁気ディスク, 116
半導体メモリ, 121 ダウンロードサイト, 12
2 衛星, 123 コンピュータ, 131 ネット
ワーク
1 arithmetic processing circuit, 2 program memory, 3 data memory, 4 frame memory, 5 image display device, 6 input device, 7 external storage device, 8 external interface, 9 camera, 11 input event processing unit, 12 copy operation processing unit, 13 paste operation processing unit, 14 paste buffer selection processing unit,
15 erase operation processing unit, 16 mat operation processing unit, 17 object attribute operation processing unit, 18 paint processing unit, 19 conversion designation processing unit, 20 image conversion processing unit, 21 buffer ID storage unit, 22 display processing unit, 31 command button , 32 shape buttons, 4
1 Parameter calculation unit, 42 function storage unit, 43 contour extraction unit, 101 computer, 102 hard disk, 103 semiconductor memory, 111 floppy disk, 112 CD-ROM, 113 MO disk,
114 DVD, 115 Magnetic disk, 116
Semiconductor memory, 121 download site, 12
2 satellites, 123 computers, 131 networks

Claims (42)

【特許請求の範囲】[Claims] 【請求項1】 2次元画像を編集する画像処理装置にお
いて、 第1の2次元画像の中に表示された第1の3次元物体を
構成する面の形状に関する第1の形状情報と、その面を
構成する、前記第1の2次元画像上の点である第1の特
徴点とを指定するときに操作される第1の操作手段と、 前記第1の形状情報および第1の特徴点に基づいて、前
記第1の2次元画像の中の前記第1の3次元物体を構成
する面を、2次元平面に展開した画像である展開画像に
変換するための第1の変換式を算出する第1の算出手段
と、 前記第1の変換式に基づいて、前記第1の2次元画像の
中の前記第1の3次元物体を構成する面を、前記展開画
像に変換する第1の変換手段と、 前記展開画像を記憶する記憶手段と、 第2の3次元物体を構成する面の形状に関する第2の形
状情報と、その面を構成させる第2の2次元画像上の点
である第2の特徴点とを指定するときに操作される第2
の操作手段と、 前記第2の形状情報および第2の特徴点に基づいて、前
記記憶手段に記憶された画像を、前記第2の3次元物体
を構成する面を投影した画像である投影画像に変換する
ための第2の変換式を算出する第2の算出手段と、 前記第2の変換式に基づいて、前記記憶手段に記憶され
た画像を、前記投影画像に変換する第2の変換手段と、 前記投影画像を、前記第2の2次元画像における前記第
2の特徴点によって特定される部分に貼り付ける貼り付
け手段とを備える。
An image processing apparatus for editing a two-dimensional image, comprising: first shape information relating to a shape of a surface forming a first three-dimensional object displayed in the first two-dimensional image; A first operation means operated when designating a first feature point which is a point on the first two-dimensional image, wherein the first shape information and the first feature point A first conversion formula for converting a surface constituting the first three-dimensional object in the first two-dimensional image into a developed image which is an image developed on a two-dimensional plane based on the first conversion formula; First conversion means for converting a surface constituting the first three-dimensional object in the first two-dimensional image into the developed image based on the first conversion formula; Means, a storage means for storing the developed image, and a shape of a surface constituting a second three-dimensional object. A second shape information, the second is operated to specify a second characteristic point is a point on the second two-dimensional image to be constituting the surface
A projection image, which is an image obtained by projecting a plane constituting the second three-dimensional object from an image stored in the storage unit based on the second shape information and the second feature point. A second calculating unit that calculates a second conversion formula for converting the image into a second image, and a second conversion unit that converts the image stored in the storage unit into the projection image based on the second conversion expression. Means for attaching the projection image to a portion of the second two-dimensional image specified by the second feature point.
【請求項2】 請求項1に記載の画像処理装置におい
て、 前記記憶手段に記憶された画像を加工する加工手段をさ
らに備える。
2. The image processing apparatus according to claim 1, further comprising processing means for processing an image stored in said storage means.
【請求項3】 請求項2に記載の画像処理装置におい
て、 前記加工手段は、前記記憶手段に記憶された画像の一部
を消去し、または他の画像を付加する。
3. The image processing apparatus according to claim 2, wherein the processing unit deletes a part of the image stored in the storage unit or adds another image.
【請求項4】 請求項1に記載の画像処理装置におい
て、 前記第2の2次元画像に表示された所定の物体の領域を
表すマットを生成するマット生成手段をさらに備える。
4. The image processing apparatus according to claim 1, further comprising: a mat generating unit configured to generate a mat representing an area of a predetermined object displayed in the second two-dimensional image.
【請求項5】 請求項4に記載の画像処理装置におい
て、 前記貼り付け手段は、前記マットにしたがって、前記投
影画像を、前記第2の2次元画像に貼り付ける。
5. The image processing apparatus according to claim 4, wherein the pasting unit pastes the projection image on the second two-dimensional image according to the mat.
【請求項6】 請求項4に記載の画像処理装置におい
て、 前記マットにより表される物体の領域における色分布を
検出する色分布検出手段と、 前記色分布を変換する色分布変換手段とをさらに備え
る。
6. The image processing apparatus according to claim 4, further comprising: a color distribution detecting unit that detects a color distribution in an area of the object represented by the mat; and a color distribution converting unit that converts the color distribution. Prepare.
【請求項7】 請求項6に記載の画像処理装置におい
て、 前記色分布において、彩度の最も大きい画素である最大
彩度画素を検出する最大彩度検出手段をさらに備え、 前記色分布変換手段は、前記最大彩度画素の色が、所定
の色になるように、前記色分布を線形的に変換する。
7. The image processing apparatus according to claim 6, further comprising: a maximum saturation detection unit that detects a maximum saturation pixel that is a pixel having the highest saturation in the color distribution, wherein the color distribution conversion unit Transforms the color distribution linearly so that the color of the maximum chroma pixel becomes a predetermined color.
【請求項8】 請求項6に記載の画像処理装置におい
て、 前記色分布変換手段は、前記色分布を非線形的に変換す
る。
8. The image processing apparatus according to claim 6, wherein said color distribution conversion means non-linearly converts said color distribution.
【請求項9】 請求項6に記載の画像処理装置におい
て、 前記色分布変換手段は、前記色分布を、前記物体におけ
る、光源からの光の拡散反射による拡散反射成分と、鏡
面反射による鏡面反射成分とに分け、その拡散反射成分
または鏡面反射成分それぞれを変換する。
9. The image processing apparatus according to claim 6, wherein the color distribution conversion unit converts the color distribution into a diffuse reflection component due to diffuse reflection of light from a light source and a specular reflection due to specular reflection in the object. And a diffuse reflection component or a specular reflection component is converted.
【請求項10】 請求項1に記載の画像処理装置におい
て、 前記第1の2次元画像と第2の2次元画像とは、同一の
2次元画像である。
10. The image processing apparatus according to claim 1, wherein the first two-dimensional image and the second two-dimensional image are the same two-dimensional image.
【請求項11】 請求項1に記載の画像処理装置におい
て、 前記展開画像を、3次元空間上の前記第1の3次元物体
を構成する面に写像する関数をψと、その第1の3次元
物体を、スクリーンに投影し、前記第1の2次元画像と
する関数をMと、それぞれするとき、 前記第1の算出手段は、前記第1の変換式として、関数
Mψの逆関数を算出する。
11. The image processing apparatus according to claim 1, wherein a function for mapping the developed image onto a surface constituting the first three-dimensional object in a three-dimensional space is represented by ψ, and a function of the first three When a function for projecting a two-dimensional object onto a screen and forming the first two-dimensional image is M, the first calculating means calculates an inverse function of a function Mψ as the first conversion formula. I do.
【請求項12】 請求項1に記載の画像処理装置におい
て、 前記記憶手段に記憶された画像を、3次元空間上の前記
第2の3次元物体を構成する面に写像する関数をψと、
その第2の3次元物体を、スクリーンに投影し、2次元
画像とする関数をMと、それぞれするとき、 前記第2の算出手段は、前記第2の変換式として、関数
Mψを算出する。
12. The image processing apparatus according to claim 1, wherein a function for mapping the image stored in the storage unit onto a surface constituting the second three-dimensional object in a three-dimensional space is:
When each of the functions of projecting the second three-dimensional object on the screen to form a two-dimensional image is represented by M, the second calculating means calculates a function Mψ as the second conversion equation.
【請求項13】 請求項1に記載の画像処理装置におい
て、 前記第1または第2の算出手段は、前記記憶手段に記憶
される画像の2次元座標系として、局所的に定義される
2次元座標系を用いて、前記第1または第2の変換式を
それぞれ算出する。
13. The image processing apparatus according to claim 1, wherein the first or second calculation unit is a two-dimensional coordinate system defined locally as a two-dimensional coordinate system of an image stored in the storage unit. The first or second conversion formula is calculated using a coordinate system.
【請求項14】 請求項1に記載の画像処理装置におい
て、 前記第1または第2の操作手段が操作されることにより
指定された前記第1または第2の特徴点を補正する補正
手段をさらに備える。
14. The image processing apparatus according to claim 1, further comprising a correction unit configured to correct the first or second feature point designated by operating the first or second operation unit. Prepare.
【請求項15】 2次元画像を編集する画像処理方法に
おいて、 第1の2次元画像の中に表示された第1の3次元物体を
構成する面の形状に関する第1の形状情報と、その面を
構成する、前記第1の2次元画像上の点である第1の特
徴点とを指定するときに操作される第1の操作手段によ
って、前記第1の形状情報および第1の特徴点が指定さ
れた場合に、 前記第1の形状情報および第1の特徴点に基づいて、前
記第1の2次元画像の中の前記第1の3次元物体を構成
する面を、2次元平面に展開した画像である展開画像に
変換するための第1の変換式を算出する第1の算出ステ
ップと、 前記第1の変換式に基づいて、前記第1の2次元画像の
中の前記第1の3次元物体を構成する面を、前記展開画
像に変換する第1の変換ステップと、 前記展開画像を、画像を記憶する記憶手段に記憶させる
記憶ステップと、 第2の3次元物体を構成する面の形状に関する第2の形
状情報と、その面を構成させる第2の2次元画像上の点
である第2の特徴点とを指定するときに操作される第2
の操作手段とによって、前記第2の形状情報および第2
の特徴点が指定された場合に、 前記第2の形状情報および第2の特徴点に基づいて、前
記記憶手段に記憶された画像を、前記第2の3次元物体
を構成する面を投影した画像である投影画像に変換する
ための第2の変換式を算出する第2の算出ステップと、 前記第2の変換式に基づいて、前記記憶手段に記憶され
た画像を、前記投影画像に変換する第2の変換ステップ
と、 前記投影画像を、前記第2の2次元画像における前記第
2の特徴点によって特定される部分に貼り付ける貼り付
けステップとを備える。
15. An image processing method for editing a two-dimensional image, comprising: first shape information relating to a shape of a surface constituting a first three-dimensional object displayed in the first two-dimensional image; The first shape information and the first feature point are changed by a first operation unit operated when designating a first feature point which is a point on the first two-dimensional image. When specified, a surface constituting the first three-dimensional object in the first two-dimensional image is developed into a two-dimensional plane based on the first shape information and the first feature point A first calculation step of calculating a first conversion formula for converting the image into a developed image, which is a converted image, and the first conversion formula in the first two-dimensional image based on the first conversion formula. A first conversion step of converting a surface constituting a three-dimensional object into the developed image; A storage step of storing the developed image in storage means for storing the image; second shape information relating to a shape of a surface forming the second three-dimensional object; and a second shape information on the second two-dimensional image forming the surface. A second point operated when designating a second feature point which is a point
The second shape information and the second
When the feature point is designated, the image stored in the storage means is projected on the surface constituting the second three-dimensional object based on the second shape information and the second feature point. A second calculation step of calculating a second conversion formula for converting the image into a projection image, and converting the image stored in the storage unit into the projection image based on the second conversion formula. And a pasting step of pasting the projection image to a portion specified by the second feature point in the second two-dimensional image.
【請求項16】 請求項15に記載の画像処理方法にお
いて、 前記記憶手段に記憶された画像を加工する加工ステップ
をさらに備える。
16. The image processing method according to claim 15, further comprising a processing step of processing an image stored in the storage unit.
【請求項17】 請求項16に記載の画像処理方法にお
いて、 前記加工ステップにおいて、前記記憶手段に記憶された
画像の一部を消去し、または他の画像を付加する。
17. The image processing method according to claim 16, wherein in the processing step, a part of an image stored in the storage unit is deleted or another image is added.
【請求項18】 請求項15に記載の画像処理方法にお
いて、 前記第2の2次元画像に表示された所定の物体の領域を
表すマットを生成するマット生成ステップをさらに備え
る。
18. The image processing method according to claim 15, further comprising a mat generating step of generating a mat representing an area of a predetermined object displayed in the second two-dimensional image.
【請求項19】 請求項18に記載の画像処理方法にお
いて、 前記貼り付けステップにおいて、前記マットにしたがっ
て、前記投影画像を、前記第2の2次元画像に貼り付け
る。
19. The image processing method according to claim 18, wherein, in the pasting step, the projection image is pasted on the second two-dimensional image according to the mat.
【請求項20】 請求項18に記載の画像処理方法にお
いて、 前記マットにより表される物体の領域における色分布を
検出する色分布検出ステップと、 前記色分布を変換する色分布変換ステップとをさらに備
える。
20. The image processing method according to claim 18, further comprising: a color distribution detecting step of detecting a color distribution in an area of the object represented by the mat; and a color distribution converting step of converting the color distribution. Prepare.
【請求項21】 請求項20に記載の画像処理方法にお
いて、 前記色分布において、彩度の最も大きい画素である最大
彩度画素を検出する最大彩度検出ステップをさらに備
え、 前記色分布変換ステップにおいて、前記最大彩度画素の
色が、所定の色になるように、前記色分布を線形的に変
換する。
21. The image processing method according to claim 20, further comprising a maximum chroma detection step of detecting a maximum chroma pixel that is a pixel having the highest chroma in the color distribution, wherein the color distribution conversion step is performed. , The color distribution is linearly converted so that the color of the maximum chroma pixel becomes a predetermined color.
【請求項22】 請求項20に記載の画像処理方法にお
いて、 前記色分布変換ステップにおいて、前記色分布を非線形
的に変換する。
22. The image processing method according to claim 20, wherein, in the color distribution conversion step, the color distribution is nonlinearly converted.
【請求項23】 請求項20に記載の画像処理方法にお
いて、 前記色分布変換ステップにおいて、前記色分布を、前記
物体における、光源からの光の拡散反射による拡散反射
成分と、鏡面反射による鏡面反射成分とに分け、その拡
散反射成分または鏡面反射成分それぞれを変換する。
23. The image processing method according to claim 20, wherein, in the color distribution conversion step, the color distribution is converted into a diffuse reflection component due to diffuse reflection of light from a light source and a specular reflection due to specular reflection in the object. And a diffuse reflection component or a specular reflection component is converted.
【請求項24】 請求項15に記載の画像処理方法にお
いて、 前記第1の2次元画像と第2の2次元画像とは、同一の
2次元画像である。
24. The image processing method according to claim 15, wherein the first two-dimensional image and the second two-dimensional image are the same two-dimensional image.
【請求項25】 請求項15に記載の画像処理方法にお
いて、 前記展開画像を、3次元空間上の前記第1の3次元物体
を構成する面に写像する関数をψと、その第1の3次元
物体を、スクリーンに投影し、前記第1の2次元画像と
する関数をMと、それぞれするとき、 前記第1の算出ステップにおいて、前記第1の変換式と
して、関数Mψの逆関数を算出する。
25. The image processing method according to claim 15, wherein a function for mapping the developed image onto a surface constituting the first three-dimensional object in a three-dimensional space is represented by ψ, and the first three When a function for projecting a two-dimensional object onto a screen and forming the first two-dimensional image is M, in the first calculation step, an inverse function of the function Mψ is calculated as the first conversion formula. I do.
【請求項26】 請求項15に記載の画像処理方法にお
いて、 前記記憶手段に記憶された画像を、3次元空間上の前記
第2の3次元物体を構成する面に写像する関数をψと、
その第2の3次元物体を、スクリーンに投影し、2次元
画像とする関数をMと、それぞれするとき、 前記第2の算出ステップにおいて、前記第2の変換式と
して、関数Mψを算出する。
26. The image processing method according to claim 15, wherein 関 数 represents a function for mapping the image stored in the storage means onto a surface constituting the second three-dimensional object in a three-dimensional space.
When the function of projecting the second three-dimensional object on the screen to form a two-dimensional image is represented by M, in the second calculation step, a function Mψ is calculated as the second conversion equation.
【請求項27】 請求項15に記載の画像処理方法にお
いて、 前記第1または第2の算出ステップにおいて、前記記憶
手段に記憶される画像の2次元座標系として、局所的に
定義される2次元座標系を用いて、前記第1または第2
の変換式をそれぞれ算出する。
27. The image processing method according to claim 15, wherein in the first or second calculation step, a two-dimensional coordinate system defined locally as a two-dimensional coordinate system of an image stored in the storage unit. Using the coordinate system, the first or second
Are calculated respectively.
【請求項28】 請求項15に記載の画像処理方法にお
いて、 前記第1または第2の操作手段が操作されることにより
指定された前記第1または第2の特徴点を補正する補正
ステップをさらに備える。
28. The image processing method according to claim 15, further comprising a correction step of correcting the first or second feature point designated by operating the first or second operation means. Prepare.
【請求項29】 2次元画像を編集する画像処理を行う
ためのコンピュータプログラムを、コンピュータに実行
させる媒体であって、 第1の2次元画像の中に表示された第1の3次元物体を
構成する面の形状に関する第1の形状情報と、その面を
構成する、前記第1の2次元画像上の点である第1の特
徴点とを指定するときに操作される第1の操作手段によ
って、前記第1の形状情報および第1の特徴点が指定さ
れた場合に、 前記第1の形状情報および第1の特徴点に基づいて、前
記第1の2次元画像の中の前記第1の3次元物体を構成
する面を、2次元平面に展開した画像である展開画像に
変換するための第1の変換式を算出する第1の算出ステ
ップと、 前記第1の変換式に基づいて、前記第1の2次元画像の
中の前記第1の3次元物体を構成する面を、前記展開画
像に変換する第1の変換ステップと、 前記展開画像を、画像を記憶する記憶手段に記憶させる
記憶ステップと、 第2の3次元物体を構成する面の形状に関する第2の形
状情報と、その面を構成させる第2の2次元画像上の点
である第2の特徴点とを指定するときに操作される第2
の操作手段によって、前記第2の形状情報および第2の
特徴点が指定された場合に、 前記第2の形状情報および第2の特徴点に基づいて、前
記記憶手段に記憶された画像を、前記第2の3次元物体
を構成する面を投影した画像である投影画像に変換する
ための第2の変換式を算出する第2の算出ステップと、 前記第2の変換式に基づいて、前記記憶手段に記憶され
た画像を、前記投影画像に変換する第2の変換ステップ
と、 前記投影画像を、前記第2の2次元画像における前記第
2の特徴点によって特定される部分に貼り付ける貼り付
けステップとを備えるコンピュータプログラムを、前記
コンピュータに実行させる。
29. A medium for causing a computer to execute a computer program for performing image processing for editing a two-dimensional image, comprising a first three-dimensional object displayed in the first two-dimensional image. First shape information relating to the shape of the surface to be formed and first operation means operated when designating a first feature point, which is a point on the first two-dimensional image, constituting the surface. , When the first shape information and the first feature point are designated, the first shape information and the first feature point in the first two-dimensional image based on the first feature point are designated. A first calculation step of calculating a first conversion formula for converting a surface forming the three-dimensional object into a developed image that is a developed image on a two-dimensional plane; and, based on the first conversion formula, The first three-dimensional object in the first two-dimensional image A first conversion step of converting a surface to be configured into the developed image; a storing step of storing the developed image in a storage unit that stores an image; and a second step related to a shape of a surface configuring a second three-dimensional object. 2 which is operated when designating the second shape information and the second feature point which is a point on the second two-dimensional image constituting the surface.
When the second shape information and the second feature point are designated by the operation means, the image stored in the storage means is determined based on the second shape information and the second feature point. A second calculating step of calculating a second conversion formula for converting a surface constituting the second three-dimensional object into a projection image, which is a projected image, based on the second conversion formula, A second conversion step of converting the image stored in the storage means into the projection image, and affixing the projection image to a portion of the second two-dimensional image specified by the second feature point. And causing the computer to execute a computer program including the attaching step.
【請求項30】 請求項29に記載の媒体において、 前記コンピュータプログラムは、前記記憶手段に記憶さ
れた画像を加工する加工ステップをさらに備える。
30. The medium according to claim 29, wherein the computer program further comprises a processing step of processing an image stored in the storage unit.
【請求項31】 請求項30の媒体において、 前記加工ステップにおいて、前記記憶手段に記憶された
画像の一部を消去し、または他の画像を付加する。
31. The medium according to claim 30, wherein in the processing step, a part of an image stored in the storage unit is deleted or another image is added.
【請求項32】 請求項29に記載の媒体において、 前記コンピュータプログラムは、前記第2の2次元画像
に表示された所定の物体の領域を表すマットを生成する
マット生成ステップをさらに備える。
32. The medium according to claim 29, wherein the computer program further comprises a mat generating step of generating a mat representing an area of the predetermined object displayed in the second two-dimensional image.
【請求項33】 請求項32に記載の媒体において、 前記貼り付けステップにおいて、前記マットにしたがっ
て、前記投影画像を、前記第2の2次元画像に貼り付け
る。
33. The medium according to claim 32, wherein in the attaching step, the projected image is attached to the second two-dimensional image according to the mat.
【請求項34】 請求項32に記載の媒体において、 前記コンピュータプログラムは、 前記マットにより表される物体の領域における色分布を
検出する色分布検出ステップと、 前記色分布を変換する色分布変換ステップとをさらに備
える。
34. The medium according to claim 32, wherein the computer program comprises: a color distribution detecting step of detecting a color distribution in an area of the object represented by the mat; and a color distribution converting step of converting the color distribution. And further provided.
【請求項35】 請求項34に記載の媒体において、 前記コンピュータプログラムは、前記色分布において、
彩度の最も大きい画素である最大彩度画素を検出する最
大彩度検出ステップをさらに備え、 前記色分布変換ステップにおいて、前記最大彩度画素の
色が、所定の色になるように、前記色分布を線形的に変
換する。
35. The medium according to claim 34, wherein the computer program comprises:
The method further includes a maximum saturation detection step of detecting a maximum saturation pixel that is a pixel having the highest saturation, wherein the color of the maximum saturation pixel is a predetermined color, and Transform the distribution linearly.
【請求項36】 請求項34に記載の媒体において、 前記色分布変換ステップにおいて、前記色分布を非線形
的に変換する。
36. The medium according to claim 34, wherein in the color distribution conversion step, the color distribution is nonlinearly converted.
【請求項37】 請求項34に記載の媒体において、 前記色分布変換ステップにおいて、前記色分布を、前記
物体における、光源からの光の拡散反射による拡散反射
成分と、鏡面反射による鏡面反射成分とに分け、その拡
散反射成分または鏡面反射成分それぞれを変換する。
37. The medium according to claim 34, wherein, in the color distribution conversion step, the color distribution is changed to a diffuse reflection component due to diffuse reflection of light from a light source and a specular reflection component due to specular reflection in the object. And the respective diffuse reflection components or specular reflection components are converted.
【請求項38】 請求項29に記載の媒体において、 前記第1の2次元画像と第2の2次元画像とは、同一の
2次元画像である。
38. The medium according to claim 29, wherein the first two-dimensional image and the second two-dimensional image are the same two-dimensional image.
【請求項39】 請求項29に記載の媒体において、 前記展開画像を、3次元空間上の前記第1の3次元物体
を構成する面に写像する関数をψと、その第1の3次元
物体を、スクリーンに投影し、前記第1の2次元画像と
する関数をMと、それぞれするとき、 前記第1の算出ステップにおいて、前記第1の変換式と
して、関数Mψの逆関数を算出する。
39. The medium according to claim 29, wherein 関 数 represents a function for mapping the developed image onto a plane constituting the first three-dimensional object in a three-dimensional space, and the first three-dimensional object Is projected onto a screen, and the function that sets the first two-dimensional image is M. In the first calculation step, an inverse function of the function M 関 数 is calculated as the first conversion equation.
【請求項40】 請求項29に記載の媒体において、 前記記憶手段に記憶された画像を、3次元空間上の前記
第2の3次元物体を構成する面に写像する関数をψと、
その第2の3次元物体を、スクリーンに投影し、2次元
画像とする関数をMと、それぞれするとき、 前記第2の算出ステップにおいて、前記第2の変換式と
して、関数Mψを算出する。
40. The medium according to claim 29, wherein a function for mapping the image stored in the storage means onto a surface of the second three-dimensional object in a three-dimensional space is ψ,
When the function of projecting the second three-dimensional object on the screen to form a two-dimensional image is represented by M, in the second calculation step, a function Mψ is calculated as the second conversion equation.
【請求項41】 請求項29に記載の媒体において、 前記第1または第2の算出ステップにおいて、前記記憶
手段に記憶される画像の2次元座標系として、局所的に
定義される2次元座標系を用いて、前記第1または第2
の変換式をそれぞれ算出する。
41. The medium according to claim 29, wherein in the first or second calculation step, a two-dimensional coordinate system locally defined as a two-dimensional coordinate system of an image stored in the storage unit. By using the first or second
Are calculated respectively.
【請求項42】 請求項29に記載の媒体において、 前記コンピュータプログラムは、前記第1または第2の
操作手段が操作されることにより指定された前記第1ま
たは第2の特徴点を補正する補正ステップをさらに備え
る。
42. The medium according to claim 29, wherein the computer program corrects the first or second feature point designated by operating the first or second operating means. The method further includes a step.
JP11146796A 1998-06-02 1999-05-26 Image processor, image processing method and medium Withdrawn JP2000057377A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11146796A JP2000057377A (en) 1998-06-02 1999-05-26 Image processor, image processing method and medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP15282198 1998-06-02
JP10-152821 1998-06-02
JP11146796A JP2000057377A (en) 1998-06-02 1999-05-26 Image processor, image processing method and medium

Publications (1)

Publication Number Publication Date
JP2000057377A true JP2000057377A (en) 2000-02-25

Family

ID=26477521

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11146796A Withdrawn JP2000057377A (en) 1998-06-02 1999-05-26 Image processor, image processing method and medium

Country Status (1)

Country Link
JP (1) JP2000057377A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003030031A (en) * 2001-07-10 2003-01-31 Dentsu Inc Method for acquiring information in network system and network system for acquiring information
JP2010246049A (en) * 2009-04-09 2010-10-28 Canon Inc Color processing method, color processing apparatus, and program
JP2010286896A (en) * 2009-06-09 2010-12-24 Canon Inc Drawing processor and drawing processing method
JP2017059041A (en) * 2015-09-17 2017-03-23 株式会社リコー Image processing device, image processing method, and program
US9916521B2 (en) 2015-03-23 2018-03-13 Canon Kabushiki Kaisha Depth normalization transformation of pixels
CN112509105A (en) * 2020-11-12 2021-03-16 杭州群核信息技术有限公司 Building surface paving method and device with continuous textures

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003030031A (en) * 2001-07-10 2003-01-31 Dentsu Inc Method for acquiring information in network system and network system for acquiring information
JP2010246049A (en) * 2009-04-09 2010-10-28 Canon Inc Color processing method, color processing apparatus, and program
JP2010286896A (en) * 2009-06-09 2010-12-24 Canon Inc Drawing processor and drawing processing method
US9916521B2 (en) 2015-03-23 2018-03-13 Canon Kabushiki Kaisha Depth normalization transformation of pixels
JP2017059041A (en) * 2015-09-17 2017-03-23 株式会社リコー Image processing device, image processing method, and program
CN112509105A (en) * 2020-11-12 2021-03-16 杭州群核信息技术有限公司 Building surface paving method and device with continuous textures

Similar Documents

Publication Publication Date Title
US6529206B1 (en) Image processing apparatus and method, and medium therefor
JP2000090290A (en) Device and method for processing image and medium
US6556195B1 (en) Image processing device and image processing method
US7199793B2 (en) Image-based modeling and photo editing
US7728848B2 (en) Tools for 3D mesh and texture manipulation
US6417850B1 (en) Depth painting for 3-D rendering applications
JP5299173B2 (en) Image processing apparatus, image processing method, and program
US20080278514A1 (en) Dynamically adjusted brush for direct paint systems on parameterized multi-dimensional surfaces
GB2419504A (en) Perspective editing tool
WO1997046975A1 (en) Techniques for creating and modifying 3d models and correlating such models with 2d pictures
US7167173B2 (en) Method and structure for image-based object editing
US10853990B2 (en) System and method for processing a graphic object
US6975334B1 (en) Method and apparatus for simulating the appearance of paving stone on an existing driveway
US6801654B2 (en) Picture processing apparatus, method and recording medium for a natural expansion drawing
JPH1049704A (en) Image conversion method
JP2000057377A (en) Image processor, image processing method and medium
JP2001266176A (en) Picture processor, picture processing method and recording medium
JP2000057378A (en) Image processor, image processing method, medium, and device and method for extracting contour
JPH07234949A (en) Method and system for supporting preparation of perspective drawing
JP2973413B2 (en) Illuminance calculation method and display device for computer graphics
JP3149389B2 (en) Method and apparatus for overlaying a bitmap image on an environment map
JP2005208867A (en) Three-dimensional computer graphics modeling system
US20030081849A1 (en) Method and system for creating seamless textured three dimensional models of objects
JP2000057376A (en) Method for generating new viewpoint image
Oh A system for image-based modeling and photo editing

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060801