JP2007293453A - Method for acquiring color information from image - Google Patents

Method for acquiring color information from image Download PDF

Info

Publication number
JP2007293453A
JP2007293453A JP2006118446A JP2006118446A JP2007293453A JP 2007293453 A JP2007293453 A JP 2007293453A JP 2006118446 A JP2006118446 A JP 2006118446A JP 2006118446 A JP2006118446 A JP 2006118446A JP 2007293453 A JP2007293453 A JP 2007293453A
Authority
JP
Japan
Prior art keywords
color
pen
video
user
orientation
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.)
Granted
Application number
JP2006118446A
Other languages
Japanese (ja)
Other versions
JP2007293453A5 (en
JP4847195B2 (en
Inventor
Takeshi Kuroki
剛 黒木
Sandor Christian
クリスチャン サンドア
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2006118446A priority Critical patent/JP4847195B2/en
Publication of JP2007293453A publication Critical patent/JP2007293453A/en
Publication of JP2007293453A5 publication Critical patent/JP2007293453A5/ja
Application granted granted Critical
Publication of JP4847195B2 publication Critical patent/JP4847195B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

<P>PROBLEM TO BE SOLVED: To easily acquire a color corresponding to a designated position in a real space. <P>SOLUTION: When a position 505 in a real space is designated by a pen 511 to be operated by a user, a projecting position 506 of the position 505 to an image plane 503 where the real space is photographed is found. Then, the position of the pixel of the position shifted from the pixel of the projection position 506 to a direction shown by the pen 511 by the predetermined number of pixels is acquired as the color of the designated position. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、画像から現実世界の物体の色を取得する技術に関する。   The present invention relates to a technique for acquiring the color of an object in the real world from an image.

VR(バーチャルリアリティ)システムは、コンピュータの作り出す三次元CG(コンピュータ・グラフィクス)を、ユーザが装着するHMD(ヘッドマウントディスプレイ)等に提示することで、ユーザに仮想の空間をあたかも現実の空間であるかのように感じさせるシステムである。HMDを利用したVRシステムでは、ユーザの頭部の動きに合わせてユーザに提示される三次元CGが変化するため、ユーザはあたかも自分の周囲に実際に三次元CGで表される空間が存在しているかのように感じることができる。   The VR (virtual reality) system presents a virtual space to the user as if it were a real space by presenting the computer generated 3D CG (computer graphics) to an HMD (head mounted display) worn by the user. It is a system that makes you feel as if. In the VR system using the HMD, the 3D CG presented to the user changes in accordance with the movement of the user's head, and therefore the user has a space that is actually represented by the 3D CG around him / her. You can feel as if you are.

また、近年、現実空間もしくはその映像に三次元CGを重畳して提示することで、VRでは見ることができなかった現実世界をユーザに提示する技術も開発されており、それらはMR(Mixed Reality,複合現実感)システムと呼ばれている(特許文献1参照)。   In recent years, a technology has also been developed that presents the real world, which could not be viewed in VR, by superimposing and presenting a 3D CG on a real space or its video, and this is MR (Mixed Reality). , Mixed reality) system (see Patent Document 1).

MRシステムでは、ユーザに映像を提示する表示装置として、HMDが一般に用いられる。MRシステムは、現実空間と、通常はCGで表される仮想空間とを位置合わせし、ユーザの視点位置姿勢に追従させてHMDに表示することにより、ユーザに複合現実感を体感させる。   In the MR system, an HMD is generally used as a display device that presents video to a user. The MR system aligns a real space and a virtual space, usually represented by CG, and causes the user to experience mixed reality by following the user's viewpoint position and orientation and displaying them on the HMD.

MRシステムで用いるHMDには半透過型の表示装置に三次元CG等の画像を重畳する光学シースルー方式と、ビデオカメラで撮影した現実空間の映像に三次元CG等の画像を合成した後、HMDに表示するビデオシースルー方式がある。ビデオシースルー方式では、現実空間の映像を撮影するビデオカメラを、HMDに設けることが多い。   The HMD used in the MR system includes an optical see-through method in which an image such as a three-dimensional CG is superimposed on a transflective display device, and an image of a three-dimensional CG or the like synthesized with a real-space image captured by a video camera. There is a video see-through method. In the video see-through method, the HMD is often provided with a video camera that captures an image of a real space.

MRシステムの用途としては、患者の体内の様子をCGで描画し、患者やその実写画像と重畳して医師に提示する医療補助の用途や、工場において、製品の組み立て手順を実物の部品やその画像に重ねて表示する作業補助の用途などが考えられている。   The MR system can be used for medical assistance in which the patient's internal state is drawn with CG and superimposed on the patient and its actual image and presented to the doctor. A work assisting application that displays images in an overlapping manner is considered.

さて、このようなMRシステムにおいて、ユーザが色の選択を求められる場合がある。たとえば、MRシステムによる製品設計システムにおいて、設計物の色を指定する場合などである。従来、こうした場合には、HMDとは別の表示装置に表示される、色選択のためのGUIから色を選ぶ方式が多くとられていた。   Now, in such an MR system, the user may be asked to select a color. For example, in a product design system using an MR system, the color of a design is specified. Conventionally, in such a case, a method of selecting a color from a GUI for color selection displayed on a display device different from the HMD has been adopted.

また、非特許文献1に見られるように、ユーザが手に持ち、位置姿勢を計測されている板の上に仮想の色を表す複数の仮想の球体を載せ、ユーザがもう一方の手に持った位置姿勢を計測されているペンで球体を選択して色を選ぶ方式も行われてきた。   Further, as seen in Non-Patent Document 1, a plurality of virtual spheres representing virtual colors are placed on a plate that is held by a user and whose position and orientation are measured, and the user holds the other hand in the other hand. A method of selecting a color by selecting a sphere with a pen whose position and orientation are measured has also been performed.

また、非特許文献2では、位置姿勢を計測された現実物体を手に持ち、位置姿勢を計測されたペンで現実物体上に複数の点を設定していく。その後、ユーザが装着しているHMDに内蔵しているカメラが、設定済の点から定義される三角形群の内部の映像を取得し、現実の物体の外観を取得していく。   In Non-Patent Document 2, a real object whose position and orientation are measured is held in a hand, and a plurality of points are set on the real object with a pen whose position and orientation are measured. Thereafter, the camera built in the HMD worn by the user acquires an image inside the triangle group defined from the set points, and acquires the appearance of the actual object.

特許第3363861号公報Japanese Patent No. 3363861 特許第3631151号公報Japanese Patent No. 3631151 Fiorentino,M.ほか、 ”Spacedesign: A Mixed Reality Workspace for Aesthetic Industrial Design”, Proc. IEEE and ACM International Symposium on Mixed and Augmented Reality (ISMAR) 2002, pp. 86-94.Fiorentino, M. et al., “Spacedesign: A Mixed Reality Workspace for Aesthetic Industrial Design”, Proc. IEEE and ACM International Symposium on Mixed and Augmented Reality (ISMAR) 2002, pp. 86-94. Joohi Leeほか、 ”Modeling Real Objects Using Video See-Through Augmented Reality”、 Proc. Second International Symposium on Mixed Reality (ISMR) 2001、 pp. 19-26.Joohi Lee et al., “Modeling Real Objects Using Video See-Through Augmented Reality”, Proc. Second International Symposium on Mixed Reality (ISMR) 2001, pp. 19-26.

HMDとは別の表示装置に表示されるGUIから色を選択する方法では、次のような問題がある。つまり、ユーザが色を選択する際には、装着中のHMDを外し、マウスを使ってGUIを操作して色を選択する、といった面倒な手順が必要なため、操作性が悪く、また色の選択に時間がかかる。   The method for selecting a color from a GUI displayed on a display device different from the HMD has the following problems. In other words, when the user selects a color, the user has to take troublesome procedures such as removing the installed HMD and operating the GUI using the mouse to select the color. Selection takes time.

非特許文献1に示される方法を用いるとこの問題は解決されるが、選択した色が現実世界になじみにくいという別の問題が発生する。つまり、非特許文献1の方法において、ユーザが手に持つ板の上に提示される球体の色は、コンピュータ上に予め定義された色である。これらの色はHMDに提示されている現実世界と関わりなく独立に定義されているため、選択した色を三次元CGに適用すると、その三次元CGの周りの現実世界となじまないことがあった。なお、この問題は、GUIを用いる方法でも同様に発生する。   This method can be solved by using the method disclosed in Non-Patent Document 1, but another problem arises that the selected color is difficult to adapt to the real world. That is, in the method of Non-Patent Document 1, the color of the sphere presented on the board held by the user is a color predefined on the computer. Since these colors are defined independently regardless of the real world presented in the HMD, applying the selected color to the 3D CG may not be compatible with the real world around the 3D CG. . Note that this problem also occurs in the method using the GUI.

非特許文献2に示される方法は、設定点から定義される三角形の内部の映像を取得する方法であるため、色を選択することはできない。しかし、仮にこの方法を用いて色を取得使用とした場合、例えばペンで現実の物体上の点を設定した瞬間に、ユーザが装着しているHMDに取り付けられたカメラが撮影している映像から、設定点の色を取得する構成が想定される。しかし、この構成では、設定点が常にペン先で隠された状態の映像を用いて色を取得することになり、設定点ではなくペン先自体の色が取得されてしまう。   Since the method shown in Non-Patent Document 2 is a method of acquiring an image inside a triangle defined from a set point, a color cannot be selected. However, if the color is acquired and used using this method, for example, from the image captured by the camera attached to the HMD worn by the user at the moment when a point on the real object is set with a pen, for example. A configuration for obtaining the color of the set point is assumed. However, in this configuration, the color is acquired using an image in which the set point is always hidden by the pen tip, and the color of the pen tip itself is acquired instead of the set point.

また、別の問題として、非特許文献1および非特許文献2に示される方法では、ユーザがペンを持たない方の手に持つ物体の位置姿勢の測定が必要であり、ペンの位置姿勢を含めて複数の物体の位置姿勢を計測する必要があった。MRシステムではこの他にも現実空間を撮影するカメラ、又はユーザ視点の位置姿勢を検出する必要があるため、位置姿勢計測の負荷が大きい。   As another problem, the methods disclosed in Non-Patent Document 1 and Non-Patent Document 2 require measurement of the position and orientation of an object held by a user who does not have a pen, and include the position and orientation of the pen. It was necessary to measure the position and orientation of multiple objects. In addition to this, in the MR system, since it is necessary to detect the position and orientation of the camera that captures the real space or the user viewpoint, the load on the position and orientation is heavy.

本発明は、このような問題に鑑みてなされたものであり、現実空間中で指定された位置に応じた色を容易に取得可能とすることを目的とする。   The present invention has been made in view of such a problem, and an object of the present invention is to enable easy acquisition of a color corresponding to a position designated in a real space.

上述の目的を達成するため、本発明の色情報取得方法は、現実空間の映像を取得する映像取得工程と、ユーザが操作する指示手段により、現実空間中の位置が指定されたことを検出する指示検出工程と、検出に応答して、指定された現実空間中の位置に対応する、映像中の位置を求める算出工程と、算出工程が求めた位置の近傍で、かつ算出工程が求めた位置に対応する映像中の画素とは異なる画素の色を、ユーザが指定した色として取得する色取得工程とを有することを特徴とする。   In order to achieve the above-described object, the color information acquisition method of the present invention detects that a position in the real space is specified by a video acquisition step of acquiring a video of the real space and an instruction means operated by the user. An instruction detection step, a calculation step for obtaining a position in the video corresponding to the position in the specified real space in response to the detection, and a position obtained by the calculation step in the vicinity of the position obtained by the calculation step And a color acquisition step of acquiring, as a color designated by the user, a color of a pixel different from the pixel in the video corresponding to.

また、上述の目的を達成するため、本発明の色情報取得装置は、現実空間の映像を取得する映像取得手段と、ユーザが操作する指示手段により、映像に含まれる現実空間中の位置が指定されたことを検出する指示検出手段と、検出に応答して、指定された現実空間中の位置に対応する、映像中の位置を求める算出手段と、算出手段が求めた位置の近傍で、かつ算出手段が求めた位置に対応する映像中の画素とは異なる画素の色を、ユーザが指定した色として取得する色取得手段とを有することを特徴とする。   In order to achieve the above object, the color information acquisition apparatus of the present invention specifies a position in the real space included in the video by the video acquisition means for acquiring the video in the real space and the instruction means operated by the user. In response to the detection, a calculation means for obtaining a position in the video corresponding to the position in the specified real space, and in the vicinity of the position obtained by the calculation means, and It has a color acquisition means which acquires the color of the pixel different from the pixel in the image | video corresponding to the position which the calculation means calculated | required as a color designated by the user.

このような構成により、本発明によれば、現実空間中で指定された位置に応じた色を容易に取得可能となる。   With such a configuration, according to the present invention, it is possible to easily acquire a color corresponding to a position designated in the real space.

以下、添付図面を参照して本発明の好適な実施形態について説明する。
以下の実施形態では、本発明による色情報取得方法を、HMDを装着したユーザが指示手段としてのペンを操作して現実空間中の物体から色を選択し、選択した色で複合現実空間中に描画を行う操作をユーザに体感させるMRシステムに適用した例を説明する。
Preferred embodiments of the present invention will be described below with reference to the accompanying drawings.
In the following embodiments, the color information acquisition method according to the present invention is a method in which a user wearing an HMD operates a pen as an instruction unit to select a color from an object in the real space, and enters the mixed reality space with the selected color. An example will be described in which the present invention is applied to an MR system that allows a user to experience drawing operations.

図5は、本実施形態のMRシステムの概念を説明する図である。510は現実物体のティーポットを、511はユーザが操作するペンを、503はユーザに提示される画像平面を、512はHMDに備えられた撮像部のカメラ中心の位置、すなわちユーザの視点位置を示している。その他の構成については後述する。   FIG. 5 is a diagram for explaining the concept of the MR system of the present embodiment. Reference numeral 510 denotes a real object teapot, 511 denotes a pen operated by the user, 503 denotes an image plane presented to the user, and 512 denotes the position of the camera center of the imaging unit provided in the HMD, that is, the viewpoint position of the user. ing. Other configurations will be described later.

なお、ここでは、説明及び理解を容易にするため、カメラの中心位置がユーザの視点位置と一致しているものとして説明するが、実際には、HMDに取り付けられたカメラの中心位置とユーザの視点位置とは異なるため、差を補正し、ユーザの視点位置から撮影したものとして取り扱う。この補正処理については本発明の本質とは関係せず、また周知の技術を用いて実現可能であるため、これ以上の説明は省略する。   Note that here, for ease of explanation and understanding, it is assumed that the center position of the camera matches the viewpoint position of the user, but in reality, the center position of the camera attached to the HMD and the user Since it is different from the viewpoint position, the difference is corrected, and it is handled as being taken from the viewpoint position of the user. Since this correction process is not related to the essence of the present invention and can be realized by using a well-known technique, further explanation is omitted.

図3は、本実施形態に係るMRシステムの機能構成例を示すブロック図である。
100はユーザが装着するビデオシースルー型のHMDであり、撮像部101と映像表示部102が内蔵されている。なお、本実施形態では撮像部101と映像表示部102がHMD100に内蔵されるものとしたが、撮像部101と映像表示部102はそれぞれ別の場所に配置されてもよい。
FIG. 3 is a block diagram illustrating a functional configuration example of the MR system according to the present embodiment.
Reference numeral 100 denotes a video see-through type HMD worn by a user, and includes an imaging unit 101 and a video display unit 102. In the present embodiment, the imaging unit 101 and the video display unit 102 are built in the HMD 100. However, the imaging unit 101 and the video display unit 102 may be arranged in different places.

撮像部101は、CCDセンサやCMOSセンサ等の撮像素子を用いたビデオカメラを代表とする撮像装置である。撮影された映像は映像合成部108に送られる。
映像表示部102は、小型のLCD等で構成され、映像合成部108から送られてきた合成映像を表示する。
The imaging unit 101 is an imaging device represented by a video camera using an imaging element such as a CCD sensor or a CMOS sensor. The captured video is sent to the video composition unit 108.
The video display unit 102 is composed of a small LCD or the like, and displays the synthesized video sent from the video synthesis unit 108.

位置姿勢センサ103は、例えば内蔵する撮像素子により、現実空間中に含まれるマーカを撮影することによって任意の物体の位置および姿勢を計測する。マーカは例えば予め定めた大きさ、形状、方向性等を有するパターンが印刷されたシールのようなものであり、撮影された画像中で検出される形状や大きさなどから、位置姿勢を検出することが可能である。   The position / orientation sensor 103 measures the position and orientation of an arbitrary object, for example, by photographing a marker included in the real space using an internal image sensor. The marker is, for example, a sticker printed with a pattern having a predetermined size, shape, direction, etc., and detects the position and orientation from the shape and size detected in the captured image. It is possible.

本実施形態では位置姿勢センサ103は光学式センサ(撮像素子)によって構成されているが、予め定めた任意の物体の位置および姿勢を計測できればどのような装置で構成されてもよく、たとえば磁気センサによって構成されてもよい。位置姿勢センサ103からは、予めマーカを付けた任意の物体の位置姿勢信号が出力される。本実施形態では、マーカはHMD100とペン511に付けられており、その位置姿勢信号は撮像部の位置姿勢計測部104およびペンの位置姿勢計測部105に等しく出力される。   In the present embodiment, the position / orientation sensor 103 is configured by an optical sensor (imaging device). However, the position / orientation sensor 103 may be configured by any device as long as it can measure the position and orientation of a predetermined object. It may be constituted by. From the position / orientation sensor 103, a position / orientation signal of an arbitrary object with a marker attached in advance is output. In this embodiment, the marker is attached to the HMD 100 and the pen 511, and the position / orientation signal is equally output to the position / orientation measurement unit 104 of the imaging unit and the position / orientation measurement unit 105 of the pen.

なお、本実施形態では1つの位置姿勢センサ103の出力を撮像部の位置姿勢計測部104およびペンの位置姿勢計測部105が用いる構成とした。しかし、撮像部の位置姿勢計測部104およびペンの位置姿勢計測部105のそれぞれについて別の位置姿勢センサが存在する構成であってもよい。つまり、これら二つの現実物体の位置姿勢が計測されさえすれば、構成は任意である。   In this embodiment, the output of one position / orientation sensor 103 is used by the position / orientation measurement unit 104 of the imaging unit and the position / orientation measurement unit 105 of the pen. However, another position and orientation sensor may exist for each of the position and orientation measurement unit 104 of the imaging unit and the position and orientation measurement unit 105 of the pen. That is, the configuration is arbitrary as long as the positions and orientations of these two real objects are measured.

本実施形態において、位置姿勢センサ103は、位置を予め定められたxyz座標系である世界座標系におけるx座標、y座標、z座標の形で出力する。また、姿勢をz軸中心の回転であるロール角、x軸中心の回転であるピッチ角、y軸中心の回転であるヨー角で出力し、ヨー回転、ピッチ回転、ロール回転の順で回転を加えると測定対象の姿勢が得られる。   In the present embodiment, the position / orientation sensor 103 outputs the position in the form of x, y, and z coordinates in a world coordinate system that is a predetermined xyz coordinate system. Also, the posture is output as a roll angle that is rotation about the z-axis, a pitch angle that is rotation about the x-axis, and a yaw angle that is rotation about the y-axis, and is rotated in the order of yaw rotation, pitch rotation, and roll rotation. In addition, the posture of the measurement object can be obtained.

なお、以下の説明においては、位置および姿勢の情報を四行四列の行列を意味するアルファベットの記号、たとえばMなどとして表現する。この行列の中身について、位置姿勢センサ103によって得られた値を例として説明する。   In the following description, the position and orientation information is expressed as alphabetic symbols that mean a matrix with 4 rows and 4 columns, for example, M. The contents obtained by the position and orientation sensor 103 will be described as an example with respect to the contents of this matrix.

位置姿勢センサによって得られるx座標、y座標、z座標の値をそれぞれx、y、zとすると、位置姿勢センサによって得られる位置を表す三次元ベクトルtは
で表される。
When the x, y, and z coordinates obtained by the position and orientation sensor are x, y, and z, respectively, the three-dimensional vector t that represents the position obtained by the position and orientation sensor is
It is represented by

また、位置姿勢センサによって得られるロール角、ピッチ角、ヨー角の値をそれぞれr、p、yとすると、ロール角、ピッチ角、ヨー角から得られる三行三列の回転変換行列Rr、Rp、Ryは
で表される。
Also, assuming that the roll angle, pitch angle, and yaw angle values obtained by the position and orientation sensor are r, p, and y, respectively, three rows and three columns of rotation transformation matrices Rr, Rp obtained from the roll angle, pitch angle, and yaw angle. , Ry
It is represented by

従って、姿勢を表す三行三列の回転変換行列Rは
で表される。
Therefore, the three-row, three-column rotation transformation matrix R representing the posture is
It is represented by

以上得られたtとRを用いて、位置姿勢センサ103から得られる位置と姿勢の両方を表現する四行四列の行列Mは、以下のように表現することができる。
位置および姿勢は、どのような形式で得られようと、このような四行四列の行列として表現できることは広く知られている。
A four-by-four matrix M expressing both the position and orientation obtained from the position and orientation sensor 103 using the t and R obtained above can be expressed as follows.
It is well known that the position and orientation can be expressed as such a 4-by-4 matrix, regardless of the format.

撮像部の位置姿勢計測部104は、位置姿勢センサ103からの位置姿勢信号を受信して、撮像部101の位置姿勢情報を生成する。生成した位置姿勢情報はCG描画部107および色取得部123に送られる。   The position / orientation measuring unit 104 of the image capturing unit receives the position / orientation signal from the position / orientation sensor 103 and generates position / orientation information of the image capturing unit 101. The generated position / orientation information is sent to the CG rendering unit 107 and the color acquisition unit 123.

なお、本実施形態においては、撮像部の位置姿勢計測部104が出力する位置姿勢情報が、位置姿勢センサ103の出力のみから求められるものとした。しかし、撮像部101の撮影した映像を用いて位置姿勢情報の補正を行う構成としてもよい。このような手法は、たとえば特許文献2などに記されている。また、撮像部101の撮影した映像のみを用いて撮像部の位置姿勢計測部104で位置姿勢情報を求める構成としてもよい。   In the present embodiment, the position / orientation information output from the position / orientation measurement unit 104 of the imaging unit is obtained only from the output of the position / orientation sensor 103. However, the configuration may be such that the position and orientation information is corrected using the video captured by the imaging unit 101. Such a method is described in Patent Document 2, for example. Further, the position / orientation information may be obtained by the position / orientation measuring unit 104 of the image capturing unit using only the image captured by the image capturing unit 101.

ペンの位置姿勢計測部105は、位置姿勢センサ103からの位置姿勢信号を受信して、ペン511の位置姿勢情報を生成する。生成した位置姿勢情報はペン描画部122および色取得部123に送られる。   The pen position / orientation measurement unit 105 receives a position / orientation signal from the position / orientation sensor 103 and generates position / orientation information of the pen 511. The generated position and orientation information is sent to the pen drawing unit 122 and the color acquisition unit 123.

CGシーン管理部106は、三次元CGの生成に必要な、仮想物体の三次元CGモデルの情報を管理する。CGシーン管理部106の情報はペン描画部122によって更新される。また、CGシーン管理部106の情報はCG描画部107によって参照される。   The CG scene management unit 106 manages information on a three-dimensional CG model of a virtual object necessary for generating a three-dimensional CG. Information of the CG scene management unit 106 is updated by the pen drawing unit 122. The information of the CG scene management unit 106 is referred to by the CG drawing unit 107.

CG描画部107は、撮像部の位置姿勢計測部104から撮像部101の位置姿勢情報を受信し、CGシーン管理部106からは三次元CGシーン情報を受信して、撮像部101の撮像範囲に収まるCG映像を生成する。生成したCG映像は映像合成部108に送信される。   The CG rendering unit 107 receives the position / orientation information of the imaging unit 101 from the position / orientation measurement unit 104 of the imaging unit, receives the 3D CG scene information from the CG scene management unit 106, and enters the imaging range of the imaging unit 101. A CG image that fits is generated. The generated CG video is transmitted to the video synthesis unit 108.

映像合成部108は、画像メモリを有し、撮像部101から受信した撮影映像を描画しておき、その上にCG描画部107から受信したCG映像を上書きすることで、合成映像を生成する。合成した合成映像は映像表示部102に送出される。   The video composition unit 108 has an image memory, draws a captured video received from the imaging unit 101, and generates a composite video by overwriting the CG video received from the CG rendering unit 107 thereon. The synthesized composite video is sent to the video display unit 102.

描画ボタン120は、ペン511に設けられ、ユーザがペン511を握った際に容易に押すことができる位置、例えば人差し指で押せる位置に配置される。また、描画ボタン120は通常OFFになっており、ユーザが押した時だけONとなるように構成される。描画ボタン120のON/OFF状態を表す信号(ON/OFF信号)は、常時、ペン描画部122に送信される。   The drawing button 120 is provided on the pen 511, and is arranged at a position where the user can easily press the pen 511, for example, a position where the user can press it with the index finger. The drawing button 120 is normally OFF, and is configured to be ON only when the user presses it. A signal (ON / OFF signal) indicating the ON / OFF state of the drawing button 120 is always transmitted to the pen drawing unit 122.

色取得ボタン121は、ユーザが手に持つペン511の先端に配置される。また、色取得ボタン121は通常OFFになっており、ユーザがペン511の先端を現実物体に押しつけた時だけONとなるように構成される。色取得ボタンのONにより、本実施形態のMRシステムは、現実空間中の位置が指定されたことを検出する。色取得ボタン121のON/OFF信号は、常時、色取得部123に送信される。
なお、本実施形態において、ペン511が有する各種ボタンの状態は、無線送信されるものとする。
The color acquisition button 121 is disposed at the tip of a pen 511 that the user holds. The color acquisition button 121 is normally OFF, and is configured to be ON only when the user presses the tip of the pen 511 against a real object. When the color acquisition button is turned on, the MR system of this embodiment detects that a position in the real space has been designated. The ON / OFF signal of the color acquisition button 121 is always transmitted to the color acquisition unit 123.
In the present embodiment, the state of various buttons included in the pen 511 is wirelessly transmitted.

ペン描画部122は、描画ボタン120からON/OFF信号、ペンの位置姿勢計測部105からペン511の位置姿勢情報を取得し、空間中に三次元CGの描画を行う。また、ペン描画部122は、ペン511の現在の描画色バッファを持っており、ペン511の描画色を常に保持している。本実施形態では、ペン511の描画色は、最初は白に設定されている。また、ペン描画部122は、前回のペンの位置姿勢情報を記録する位置姿勢バッファを持っている。   The pen drawing unit 122 acquires the ON / OFF signal from the drawing button 120 and the position / orientation information of the pen 511 from the pen position / orientation measurement unit 105, and performs three-dimensional CG drawing in the space. The pen drawing unit 122 has a current drawing color buffer of the pen 511 and always holds the drawing color of the pen 511. In the present embodiment, the drawing color of the pen 511 is initially set to white. The pen drawing unit 122 has a position / orientation buffer for recording the previous pen position / orientation information.

色取得部123は、色取得ボタン121からON/OFF信号、映像合成部108から合成映像、撮像部の位置姿勢計測部104から撮像部の位置姿勢情報、ペンの位置姿勢計測部105からペンの位置姿勢情報をそれぞれ取得し、ペン511の描画色を求める。なお、色取得部123は、撮像部101の焦点距離情報及び主点位置情報を予め持っている。   The color acquisition unit 123 receives an ON / OFF signal from the color acquisition button 121, a composite video from the video synthesis unit 108, a position / orientation information of the imaging unit from the position / orientation measurement unit 104 of the imaging unit, and a position of the pen from the position / orientation measurement unit 105 of the pen. The position and orientation information is acquired, and the drawing color of the pen 511 is obtained. The color acquisition unit 123 has the focal length information and principal point position information of the imaging unit 101 in advance.

なお、図3に示した本実施形態の構成の少なくとも一部は、独立した装置として実現しても良いし、一つもしくは複数のコンピュータのCPUにより実行することで機能を実現するソフトウェアとして実現しても良い。本実施形態では、撮像部の位置姿勢計測部104、ペンの位置姿勢計測部105、CGシーン管理部106、CG描画部107、映像合成部108、ペン描画部122、色取得部123の各部はそれぞれソフトウェアにより実現され、同一のコンピュータにインストールされているものとする。   Note that at least a part of the configuration of the present embodiment shown in FIG. 3 may be realized as an independent device, or as software that realizes a function by being executed by a CPU of one or a plurality of computers. May be. In the present embodiment, each of the position / orientation measurement unit 104 of the imaging unit, the pen position / orientation measurement unit 105, the CG scene management unit 106, the CG drawing unit 107, the video composition unit 108, the pen drawing unit 122, and the color acquisition unit 123 includes It is assumed that each is realized by software and installed in the same computer.

図1は、上述の、ソフトウェアにより実現される各部として機能することが可能なコンピュータの基本構成を示す図である。
CPU1001は、RAM1002やROM1003に格納されたプログラムやデータを用いてコンピュータ全体の制御を行うと共に、それぞれのソフトウェアの実行を制御して、各部の機能を実現する。
FIG. 1 is a diagram illustrating a basic configuration of a computer that can function as each unit realized by software.
The CPU 1001 controls the entire computer using programs and data stored in the RAM 1002 and the ROM 1003, and controls the execution of each software to realize the functions of the respective units.

RAM1002は、外部記憶装置1007や記憶媒体ドライブ1008からロードされたプログラムやデータを一時的に記憶するエリアを備えると共に、CPU1001が各種の処理を行うために必要とするワークエリアを備える。   The RAM 1002 includes an area for temporarily storing programs and data loaded from the external storage device 1007 and the storage medium drive 1008, and a work area required for the CPU 1001 to perform various processes.

ROM1003は、一般にコンピュータのプログラムや設定データなどが格納されている。キーボード1004、マウス1005は入力デバイスであり、操作者はこれらを用いて、各種の指示をCPU1001に入力することができる。   The ROM 1003 generally stores computer programs and setting data. A keyboard 1004 and a mouse 1005 are input devices, and an operator can input various instructions to the CPU 1001 using these devices.

表示部1006は、CRTや液晶ディスプレイなどにより構成されており、本実施形態においては、HMD100の映像表示部102に相当する。あるいは、別途表示装置を設けてもよい。この場合、例えば映像表示部102に表示している映像を表示することができる。   The display unit 1006 is configured by a CRT, a liquid crystal display, or the like, and corresponds to the video display unit 102 of the HMD 100 in the present embodiment. Alternatively, a separate display device may be provided. In this case, for example, the video displayed on the video display unit 102 can be displayed.

外部記憶装置1007は、ハードディスクドライブなどの大容量情報記憶装置として機能する装置であって、ここにOS(オペレーティングシステム)やCPU1001が実行するプログラム等を保存する。また本実施形態の説明において、既知であると説明する情報はここに保存されており、必要に応じてRAM1002にロードされる。   The external storage device 1007 is a device that functions as a large-capacity information storage device such as a hard disk drive, and stores an OS (operating system), a program executed by the CPU 1001, and the like. In the description of the present embodiment, information that is described as being known is stored here, and loaded into the RAM 1002 as necessary.

記憶媒体ドライブ1008は、CD−ROMやDVD−ROMなどのリムーバブル記憶媒体に記憶されているプログラムやデータをCPU1001からの指示に従って読み出して、RAM1002や外部記憶装置1007に出力する。   The storage medium drive 1008 reads a program or data stored in a removable storage medium such as a CD-ROM or DVD-ROM in accordance with an instruction from the CPU 1001 and outputs it to the RAM 1002 or the external storage device 1007.

I/F1009は、撮像部101を接続するためのアナログビデオポートあるいはIEEE1394等のデジタル入出力ポート、位置姿勢センサ103を接続するためのRS232CあるいはUSB等のシリアルポート、ペン511のボタンの状態を取得するための無線通信ポート等によって構成される。それぞれが入力したデータはI/F1009を介してRAM1002に取り込まれる。   The I / F 1009 acquires an analog video port for connecting the imaging unit 101 or a digital input / output port such as IEEE1394, a serial port such as RS232C or USB for connecting the position / orientation sensor 103, and a button state of the pen 511. For example, a wireless communication port. The data inputted by each is taken into the RAM 1002 via the I / F 1009.

上述した各構成要素は、バス1010によって相互に接続される。   The above-described components are connected to each other by a bus 1010.

(色取得処理)
図2は、本実施形態のMRシステムにおける色取得動作を説明するフローチャートである。色取得動作に関わるプログラムは例えば外部記憶装置1007に記憶され、ユーザがキーボード1004、マウス1005を使ってシステムの実行を指示したときにCPU1001がそのプログラムを読み出し、実行する。
(Color acquisition processing)
FIG. 2 is a flowchart for explaining the color acquisition operation in the MR system of this embodiment. A program related to the color acquisition operation is stored in, for example, the external storage device 1007. When the user instructs execution of the system using the keyboard 1004 and the mouse 1005, the CPU 1001 reads and executes the program.

S101は、現実空間撮像ステップである。このステップでは撮像部101が現実空間の映像を撮影する。撮影した映像は映像合成部108に送られる。S101が終わると、S102およびS103が並行して実行される。   S101 is a real space imaging step. In this step, the imaging unit 101 captures a real space image. The captured video is sent to the video composition unit 108. When S101 ends, S102 and S103 are executed in parallel.

S102は撮像部の位置姿勢計測ステップである。このステップでは撮像部の位置姿勢計測部104が、位置姿勢センサ103からの位置姿勢信号を受け取り、撮像部101の位置姿勢情報を算出する。本実施形態では、位置姿勢センサ103のマーカがHMD100に取り付けられているため、位置姿勢センサ103はHMD100に取り付けられたマーカの位置姿勢信号を出力する。しかし、撮像部101はHMD100の内部に固定して取り付けられているため、撮像部101とマーカの位置関係は測定可能であり、その位置関係を予めキャリブレーションして求めておくことができる。   S102 is a position and orientation measurement step of the imaging unit. In this step, the position / orientation measuring unit 104 of the image capturing unit receives the position / orientation signal from the position / orientation sensor 103 and calculates position / orientation information of the image capturing unit 101. In this embodiment, since the marker of the position / orientation sensor 103 is attached to the HMD 100, the position / orientation sensor 103 outputs a position / orientation signal of the marker attached to the HMD 100. However, since the imaging unit 101 is fixedly attached to the inside of the HMD 100, the positional relationship between the imaging unit 101 and the marker can be measured, and the positional relationship can be obtained by calibration in advance.

なお、このキャリブレーションを行うためには、予め撮像部101の座標系(撮像部座標系)が定められている必要がある。本実施形態では、撮像部座標系は図5の501に示されるように定められている。すなわち、撮像部101のカメラ中心を原点とし、原点から画像平面503に下ろした垂線をZ軸の負方向、画像平面503の上方をY軸の正方向、画像平面503の水平右方向をX軸の正方向とするように定められている。   In order to perform this calibration, the coordinate system (imaging unit coordinate system) of the imaging unit 101 needs to be determined in advance. In the present embodiment, the imaging unit coordinate system is determined as indicated by 501 in FIG. That is, the camera center of the imaging unit 101 is the origin, the perpendicular line drawn from the origin to the image plane 503 is the negative direction of the Z axis, the upper direction of the image plane 503 is the positive direction of the Y axis, and the horizontal right direction of the image plane 503 is the X axis. The positive direction is determined.

S102では、予めキャリブレーションした撮像部101とマーカ(図示せず)との相対的な位置関係を用い、HMD100に取り付けられたマーカを撮影して得られる位置姿勢信号から、撮像部101の位置姿勢情報を算出する。この位置姿勢情報、すなわち世界座標系における撮像部座標系の位置および姿勢は、CG描画部107および色取得部123に伝えられる。   In S102, the position and orientation of the imaging unit 101 are obtained from a position and orientation signal obtained by photographing a marker attached to the HMD 100 using a relative positional relationship between the imaging unit 101 and a marker (not shown) calibrated in advance. Calculate information. This position and orientation information, that is, the position and orientation of the imaging unit coordinate system in the world coordinate system is transmitted to the CG drawing unit 107 and the color acquisition unit 123.

S103はペンの位置姿勢計測ステップである。このステップではペンの位置姿勢計測部105が、位置姿勢センサ103からの位置姿勢信号を受け取り、ペン511の先端部分の位置姿勢情報を算出する。本実施形態では、位置姿勢センサ103のマーカ(図示せず)がペン511に取り付けられている。ペン511の先端と、マーカの位置関係は固定されているため、両者の位置関係を予めキャリブレーションして求めておくことができる。   S103 is a pen position / orientation measurement step. In this step, the pen position / orientation measurement unit 105 receives the position / orientation signal from the position / orientation sensor 103 and calculates the position / orientation information of the tip portion of the pen 511. In the present embodiment, a marker (not shown) of the position / orientation sensor 103 is attached to the pen 511. Since the positional relationship between the tip of the pen 511 and the marker is fixed, the positional relationship between the two can be obtained by calibration in advance.

なお、このキャリブレーションを行うためには、予めペン座標系が定められている必要がある。本実施形態では、ペン座標系は図5の502に示されるように定められている。すなわち、ペン先を原点とし、ペンの軸方向をZ軸の正方向、ペン軸の描画ボタン120がある側をY軸の正方向とするように定められている。   In order to perform this calibration, a pen coordinate system needs to be determined in advance. In the present embodiment, the pen coordinate system is determined as indicated by 502 in FIG. That is, the pen tip is set as the origin, the pen axis direction is defined as the positive direction of the Z axis, and the pen axis drawing button 120 side is defined as the positive direction of the Y axis.

S103では、予めキャリブレーションした、ペン511の先端とマーカとの相対的な位置関係と、ペン511に取り付けられたマーカの位置姿勢を表す信号とから、ペン511の先端の位置姿勢情報を算出する。この位置姿勢情報、すなわち世界座標系におけるペン座標系の位置および姿勢は、ペン描画部122および色取得部123に伝えられる。S102およびS103が終了したら、S110に進む。   In S103, the position and orientation information of the tip of the pen 511 is calculated from the relative positional relationship between the tip of the pen 511 and the marker and the signal indicating the position and orientation of the marker attached to the pen 511. . This position and orientation information, that is, the position and orientation of the pen coordinate system in the world coordinate system is transmitted to the pen drawing unit 122 and the color acquisition unit 123. When S102 and S103 are completed, the process proceeds to S110.

S110は描画ボタン判定ステップで、ここでは、ペン描画部122が、描画ボタン120のON/OFFを判定する。描画ボタン120が押下されてON状態にあればS121に、OFF状態であればS111に進む。   S110 is a drawing button determination step. Here, the pen drawing unit 122 determines ON / OFF of the drawing button 120. If the drawing button 120 is pressed and in the ON state, the process proceeds to S121, and if it is in the OFF state, the process proceeds to S111.

S121はペン描画ステップである。図8は、このステップの処理を説明するための図である。
ペン描画ステップでは、ペン描画部122が予め保持している前回のペンの位置姿勢802を始点、ペンの位置姿勢計測部105から送られてきた現在のペンの位置姿勢803を終点とする三次元の線のCGを仮想空間中に描画する。換言すれば、この三次元の線のCGをCG描画部107で描画するための三次元データを生成する。この際、線の色は、ペンの現在の描画色バッファに記録されている色に設定される。生成された三次元の線801を表す三次元データは、CGシーン管理部106に送られ、記録される。S121が終了すると、S111に進む。
S121 is a pen drawing step. FIG. 8 is a diagram for explaining the processing of this step.
In the pen drawing step, the previous pen position and orientation 802 held in advance by the pen drawing unit 122 is set as the start point, and the current pen position and orientation 803 sent from the pen position and orientation measurement unit 105 is set as the end point. The CG of the line is drawn in the virtual space. In other words, three-dimensional data for drawing the CG of the three-dimensional line by the CG drawing unit 107 is generated. At this time, the line color is set to the color recorded in the current drawing color buffer of the pen. The generated three-dimensional data representing the three-dimensional line 801 is sent to the CG scene management unit 106 and recorded. When S121 ends, the process proceeds to S111.

S111はCG描画ステップで、CG描画部107が撮像部101の位置姿勢情報を用いて、撮像部101の視点から見た仮想空間のCG映像を生成する。この際には、CGシーン管理部106に格納されている三次元CGモデルの情報(ペン描画部122が生成した線801の情報を含む)が参照される。生成されたCG映像は映像合成部108に送出される。S111が終わったら、S112が実行される。   S <b> 111 is a CG drawing step, in which the CG drawing unit 107 uses the position and orientation information of the imaging unit 101 to generate a CG image of the virtual space viewed from the viewpoint of the imaging unit 101. At this time, information on the 3D CG model (including information on the line 801 generated by the pen drawing unit 122) stored in the CG scene management unit 106 is referred to. The generated CG video is sent to the video composition unit 108. When S111 ends, S112 is executed.

S112は映像合成ステップで、まず撮像部101から送出されてきた撮影映像が映像合成部108の画像バッファに書き込まれる。次に、CG描画部107から送出されてきたCG映像が画像バッファに上書きされる。この結果、撮影映像を背景にし、仮想空間のCG映像が描画された合成映像が生成される。生成された合成映像は映像表示部102および色取得部123に送出される。S112が終わったら、S113が実行される。   S 112 is a video composition step. First, a captured video transmitted from the imaging unit 101 is written in the image buffer of the video composition unit 108. Next, the CG video transmitted from the CG rendering unit 107 is overwritten in the image buffer. As a result, a composite video is generated in which the CG video in the virtual space is drawn with the captured video as the background. The generated composite video is sent to the video display unit 102 and the color acquisition unit 123. When S112 ends, S113 is executed.

S113は映像表示ステップで、映像表示部102が合成映像を表示する。S113が終了すると、S120に進む。
S120は色取得ボタン判定ステップである。このステップでは、色取得部123が、色取得ボタン121のON/OFF状態を判定する。色取得ボタン121が押下されてON状態にあればS122に、OFF状態であればS130に進む。
S113 is a video display step, in which the video display unit 102 displays a composite video. When S113 ends, the process proceeds to S120.
S120 is a color acquisition button determination step. In this step, the color acquisition unit 123 determines the ON / OFF state of the color acquisition button 121. If the color acquisition button 121 is pressed and in the ON state, the process proceeds to S122, and if it is in the OFF state, the process proceeds to S130.

S122は色取得ステップである。このステップは、色取得部123で実行される。ここで、色取得ステップで行う処理の詳細を、図4のフローチャートを用いて説明する。   S122 is a color acquisition step. This step is executed by the color acquisition unit 123. Here, details of the processing performed in the color acquisition step will be described with reference to the flowchart of FIG.

S122が開始されると、S401が実行される。
S401では、撮像部座標系における、ペン511の先端部分(ペン先)の位置姿勢を算出する。撮像部101の位置姿勢情報をC、ペン511の位置姿勢情報をPで表現すると、撮像部座標系でのペン先の位置姿勢情報Mは
で求められる。S401が終了するとS402に進む。
When S122 is started, S401 is executed.
In S401, the position and orientation of the tip portion (pen tip) of the pen 511 in the imaging unit coordinate system are calculated. If the position and orientation information of the imaging unit 101 is expressed by C and the position and orientation information of the pen 511 is expressed by P, the position and orientation information M of the pen tip in the imaging unit coordinate system is
Is required. When S401 ends, the process proceeds to S402.

S402では、ペン先の画像平面503上での投影位置を算出する。ここで、投影位置は、まず、画像平面503内で、ペン先の位置に対応する画素の、撮像部の座標系501における位置として求められる。   In S402, the projection position of the pen tip on the image plane 503 is calculated. Here, the projection position is first obtained as the position of the pixel corresponding to the position of the pen tip in the image plane 503 in the coordinate system 501 of the imaging unit.

色取得部123は、予め撮像部101の光学系の焦点距離情報を持っている。すなわち、撮像部の座標系501の原点と、画像平面503の中心を結ぶ線504の長さfは予めわかっている。図5において、505はペン先の位置を、506は画像平面503上でのペン先の投影位置を表す。ここで、撮像部の座標系501でのペン先の位置を(P、P、P)とする。また、画像平面503の中心から画像平面503上でのペン先の投影位置506まで伸ばしたベクトルの、撮像部の座標系501のX軸方向の成分508の長さをw、Y軸方向の成分507の長さをhとすると、
となる。S402が終了するとS403に進む。
The color acquisition unit 123 has focal length information of the optical system of the imaging unit 101 in advance. That is, the length f of the line 504 that connects the origin of the coordinate system 501 of the imaging unit and the center of the image plane 503 is known in advance. In FIG. 5, 505 represents the position of the pen tip, and 506 represents the projection position of the pen tip on the image plane 503. Here, it is assumed that the position of the pen tip in the coordinate system 501 of the imaging unit is (P x , P y , P z ). In addition, the length of the component 508 in the X-axis direction of the coordinate system 501 of the imaging unit of the vector extended from the center of the image plane 503 to the projection position 506 of the pen tip on the image plane 503 is w and the component in the Y-axis direction. If the length of 507 is h,
It becomes. When S402 ends, the process proceeds to S403.

S403では、ここまでに求められた、撮像部の座標系501における、画像平面503上でのペン先の投影位置506を、画像平面503の座標系での座標値に変換する。ここで、画像平面503の座標系は、図5の509に示されるように、画像平面503の左上を原点とし、右方向をx軸、下方向をy軸とするxy座標系である。いま、画像平面503の座標系でのペン先の投影位置を(a,b)、画像平面503の座標系での撮像部101の主点位置、すなわち撮像部の座標系501の原点座標を(C、C)とすると、
となる。なお、ここで、wとhの前の符号が違っているのは、図5に示されるように、撮像部のXYZ座標系501と画像平面のxy座標系509で、xの正方向は同じ方向であるが、yの正方向が逆であることによる。
In S403, the projection position 506 of the pen tip on the image plane 503 in the coordinate system 501 of the imaging unit obtained so far is converted into a coordinate value in the coordinate system of the image plane 503. Here, the coordinate system of the image plane 503 is an xy coordinate system in which the upper left of the image plane 503 is the origin, the right direction is the x axis, and the lower direction is the y axis, as indicated by 509 in FIG. Now, the projection position of the pen tip in the coordinate system of the image plane 503 is (a, b), the principal point position of the imaging unit 101 in the coordinate system of the image plane 503, that is, the origin coordinate of the coordinate system 501 of the imaging unit ( C x , C y )
It becomes. Here, the sign before w and h is different, as shown in FIG. 5, in the XYZ coordinate system 501 of the imaging unit and the xy coordinate system 509 of the image plane, the positive direction of x is the same. This is because the positive direction of y is opposite.

ここで、撮像部101のカメラのレンズにより生じる歪面収差、例えば放射方向歪面収差(radial distortion)が予めわかっている場合には、その影響を考慮した補正を行っても良い。この補正処理は、画像平面内における二次元の変換処理であり、上記の射影変換とは独立して処理することができる。
なお、上記の計算において、f、(C、C)の単位はすべて、画像平面上での画素で表されているものとする。
Here, when distortion aberration caused by the lens of the camera of the imaging unit 101, for example, radial distortion, is known in advance, correction may be performed in consideration of the influence. This correction process is a two-dimensional conversion process in the image plane, and can be performed independently of the projective conversion.
In the above calculation, all the units of f and (C x , C y ) are assumed to be represented by pixels on the image plane.

S403が終わると、S404に進む。ここまでの処理で、画像平面上でのペン先の投影位置が求められた。しかし、上述したように、ペン先の投影位置の画素の色を取得すると、ペン先それ自体の色を取得してしまう可能性がある。そのため、本実施形態では、以降の処理を加えることにより、画像平面503上で、ペン先の投影位置の画素近傍の画素であって、現実空間の映像に写されたペンに対応する画素とは異なる画素の色を、ユーザが指定した位置の色として取得する。具体的には、ペン先の投影位置の画素から、指示手段としてのペンが指す方向、すなわちペン先の向いている方向に所定量ずれた位置の画素の色を取得するようにする。   When S403 ends, the process proceeds to S404. With the processing so far, the projection position of the pen tip on the image plane has been obtained. However, as described above, if the color of the pixel at the projection position of the pen tip is acquired, the color of the pen tip itself may be acquired. For this reason, in the present embodiment, by adding the following processing, the pixels in the vicinity of the pixel at the projection position of the pen tip on the image plane 503 and the pixel corresponding to the pen imaged in the image in the real space are The color of the different pixel is acquired as the color at the position specified by the user. Specifically, the color of the pixel at a position shifted by a predetermined amount in the direction indicated by the pen as the instruction means, that is, the direction in which the pen tip is directed, is acquired from the pixel at the projection position of the pen tip.

S404では、画像平面上でのペン先の傾き方向を算出する。図6は画像平面503を表す図である。この図において、601は画像平面上でのペン511の傾き方向、すなわちペン511を画像平面503上に投影したときにペン先が示す方向を表す、画像平面の座標系509でのベクトルT(T,T)である。 In S404, the tilt direction of the pen tip on the image plane is calculated. FIG. 6 is a diagram illustrating the image plane 503. In this figure, reference numeral 601 represents a tilt direction of the pen 511 on the image plane, that is, a direction indicated by the pen tip when the pen 511 is projected onto the image plane 503, and a vector T (T x , Ty ).

ベクトルTを求めるためには、まず、図5の513に示されている、ペン先からペンの向いている方向に仮想的に伸ばした線の上に存在する、ペン延長点を仮定する。次に、図6の602に示されている、ペン延長点513の画像平面503上への投影位置(画像平面座標系での位置)を求める。その後、S403で求めたペン先の投影位置と、ペン延長点の投影位置の差分をとることで、ベクトルTが求められる。   In order to obtain the vector T, first, a pen extension point existing on a line that is virtually extended from the pen tip to the direction of the pen shown in 513 in FIG. 5 is assumed. Next, the projection position (position in the image plane coordinate system) of the pen extension point 513 on the image plane 503 shown in 602 in FIG. 6 is obtained. Then, the vector T is calculated | required by taking the difference of the projection position of the pen tip calculated | required by S403, and the projection position of a pen extension point.

まず、ペン延長点513の位置を求める。撮像部の座標系501でのペン延長点513の位置をSで表し、ペン先からペン延長点513への距離を1とすると、
S=M・L
となる。ここで、LはZ軸方向に−1移動することを表す行列、すなわち
である。
First, the position of the pen extension point 513 is obtained. When the position of the pen extension point 513 in the coordinate system 501 of the imaging unit is represented by S and the distance from the pen tip to the pen extension point 513 is 1,
S = ML
It becomes. Here, L is a matrix indicating a -1 movement in the Z-axis direction, that is,
It is.

また、Mは、S122で求められている撮像部座標系でのペン先の位置姿勢情報である。Mには三行三列の回転行列Rが含まれており、このRからは、回転を表すロール角、ピッチ角、ヨー角を求めることができる。このロール角、ピッチ角、ヨー角をr、p、yで表すと、Sは以下のように求められる。
M is the position and orientation information of the pen tip in the imaging unit coordinate system obtained in S122. M includes a three-row, three-column rotation matrix R, from which a roll angle, pitch angle, and yaw angle representing rotation can be obtained. When the roll angle, pitch angle, and yaw angle are represented by r, p, and y, S is obtained as follows.

ここで、ペン座標系502においてロール角rは、ペン511の軸周りの回転(Z軸周りの回転)を意味する。そのため、ペン延長点513の座標を求める際には、r=0に設定してもかまわない。すると、上式は
となる。
Here, in the pen coordinate system 502, the roll angle r means rotation around the axis of the pen 511 (rotation around the Z axis). Therefore, when obtaining the coordinates of the pen extension point 513, r = 0 may be set. Then, the above formula is
It becomes.

すなわち、撮像部の座標系501でのペン延長点513の三次元位置は、
である。この三次元位置を、S=(S、S、S)として表す。
That is, the three-dimensional position of the pen extension point 513 in the coordinate system 501 of the imaging unit is
It is. This three-dimensional position is represented as S = (S x , S y , S z ).

次に、このペン延長点513の画像平面503上への投影位置(c,d)を求めると、S403での計算と同様に、
となる。
Next, when the projection position (c, d) of the pen extension point 513 on the image plane 503 is obtained, as in the calculation in S403,
It becomes.

すると、ベクトルTは、
となる。S404が終了すると、S405に進む。
Then the vector T is
It becomes. When S404 ends, the process proceeds to S405.

S405では、画像平面上でのペン先の座標からのオフセットを追加する。すなわち、S403で求められたペン先の投影位置(a,b)から、S404で求められた傾き方向に、予め定められた長さ分だけ座標を移動させる。本実施形態では、5画素分の長さ分だけ移動させる。すると、求められる座標は
となる。S405が終了するとS406に進む。
In step S405, an offset from the coordinates of the pen tip on the image plane is added. That is, the coordinates are moved by a predetermined length from the pen tip projection position (a, b) obtained in S403 in the tilt direction obtained in S404. In this embodiment, it is moved by the length of 5 pixels. Then the required coordinates are
It becomes. When S405 ends, the process proceeds to S406.

S406では、画像平面503上から色を取得する。すなわち、S405で求めた座標に対応する画素の色を、映像合成部108から送られてきた合成映像から取得する。取得した色は、ペン描画部122の描画色バッファに格納する。S406が終了すると、S122の処理全体が終了され、S130に進む。   In S406, a color is acquired from the image plane 503. That is, the color of the pixel corresponding to the coordinates obtained in S405 is acquired from the synthesized video sent from the video synthesizing unit 108. The acquired color is stored in the drawing color buffer of the pen drawing unit 122. When S406 ends, the entire process of S122 ends, and the process proceeds to S130.

S130は終了判定ステップである。ユーザがキーボード1004、マウス1005を使ってシステムの終了を指示していればプログラムを終了し、指示していなければS101に進む。   S130 is an end determination step. If the user has instructed to end the system using the keyboard 1004 and the mouse 1005, the program ends. If not, the process proceeds to S101.

以上説明したように、本実施形態によれば、ユーザがペン511を持ち、ペン先を現実物体に押し付けて、ペンに設けられた色取得ボタン121をONにすれば、ペン先近傍の位置の色が取得できる。以上の処理により、ペン先の色を誤って取得することなく、ユーザは、表示されている映像中の色を簡単に取得することが出来る。さらに、ユーザがペン511を別の位置に動かしてペンの描画ボタン120を押すと、直近のペン先位置を始点とし、取得した色を有する三次元の線のCGを描画することができる。   As described above, according to the present embodiment, if the user holds the pen 511, presses the pen tip against a real object, and turns on the color acquisition button 121 provided on the pen, the position near the pen tip is determined. The color can be acquired. With the above processing, the user can easily acquire the color in the displayed video without erroneously acquiring the pen tip color. Furthermore, when the user moves the pen 511 to a different position and presses the pen drawing button 120, a CG of a three-dimensional line having the acquired color can be drawn starting from the most recent pen tip position.

なお、本実施形態では合成画像を表示する装置と、現実空間の画像を撮像する装置として、撮像部と表示部を備えたHMD100を用いた。しかし、据え置き型のディスプレイと可動のカメラとを用いるなど、他の構成であってもよい。このような他の構成であっても、本実施形態で説明した手順により同様の効果が実現できる。   In this embodiment, the HMD 100 including an imaging unit and a display unit is used as a device that displays a composite image and a device that captures an image of a real space. However, other configurations such as using a stationary display and a movable camera may be used. Even in such other configurations, the same effect can be realized by the procedure described in the present embodiment.

本実施形態では説明及び理解を容易にするため、HMD100は撮像部101と映像表示部102を一つずつ持つ、単眼型のHMDを使用するものとした。しかし、撮像部101と映像表示部102をそれぞれ二つずつ持つ複眼型のHMDを使用してもよく、その場合は、撮像部の位置姿勢計測や合成画像の生成に係る処理を、個々の撮像部や撮像が像に対して行えばよい。   In the present embodiment, in order to facilitate explanation and understanding, the HMD 100 uses a monocular HMD having one imaging unit 101 and one video display unit 102. However, a compound eye type HMD having two imaging units 101 and two video display units 102 may be used. In that case, the processing related to the position and orientation measurement of the imaging unit and the generation of the composite image is performed individually. What is necessary is just to perform a part and imaging with respect to an image.

また、本実施形態では色を取得するための現実物体として、ティーポットの表面の色を取得する例について説明した。しかし、現実物体として、図7の701に示されるような色選択のためのカラーチャートを用いてもよい。このようなカラーチャート701を用いれば、ユーザが多様な色を容易に選択することができる。この場合も、本実施形態と同一の手順を実行すればよい。   Further, in the present embodiment, the example in which the color of the surface of the teapot is acquired as a real object for acquiring the color has been described. However, a color chart for color selection as shown at 701 in FIG. 7 may be used as a real object. By using such a color chart 701, the user can easily select various colors. In this case as well, the same procedure as in this embodiment may be executed.

また、本実施形態では撮像部101の撮影した現実空間の映像から色を取得する例について説明した。しかし、本実施形態と同一の構成・手順で、CG映像から色を取得することも可能である。この場合、例えばCG映像が上述のティーポットに重畳表示された合成画像を見ながらユーザが上述と同様の操作を行ったとすると、合成画像上のCG映像の画素から色を取得することができる。   Further, in the present embodiment, an example in which colors are acquired from a real space image captured by the imaging unit 101 has been described. However, it is also possible to acquire a color from a CG video with the same configuration and procedure as in this embodiment. In this case, for example, if the user performs the same operation as described above while viewing the composite image in which the CG video is superimposed and displayed on the teapot, the color can be acquired from the pixels of the CG video on the composite image.

また、本実施形態では色取得ボタン121が現実物体に押し付けられONとなった際に色の取得を行ったが、色取得ボタン121は必須ではなく、色取得のタイミングを指定することが可能な任意の構成を用いることができる。たとえば、色取得ボタン以外を用いる例として、ペン先の軌跡をジェスチャ認識する機構を備えて、ペン先が円を描くなど特定の軌跡を描いたことが検出された時点で、ペン先の位置から上述の色取得処理を行うようにしてもよい。   Further, in the present embodiment, the color acquisition is performed when the color acquisition button 121 is pressed against the real object and is turned on. However, the color acquisition button 121 is not essential, and the timing of color acquisition can be specified. Any configuration can be used. For example, as an example using a button other than the color acquisition button, a mechanism for recognizing the locus of the pen tip is provided, and when it is detected that the pen tip has drawn a specific locus such as a circle, the position of the pen tip is detected. The color acquisition process described above may be performed.

さらに、本実施形態では、位置姿勢センサによってペンの先端の位置および姿勢が計測された。しかしながら、位置のみの計測であっても同様の効果を得ることができる。この場合、S404のペン先の傾き方向算出ステップにおいて、画像平面上でのペンの先端が向いている方向を求める際、ペンの姿勢の代わりにペン先の移動方向を用いればよい。すなわち、ペン先の前回の位置を記録しておき、現在の位置との差分で得られるベクトルを、ペンの先端が向いている方向を表すベクトルとして求めることができる。   Furthermore, in the present embodiment, the position and orientation of the pen tip are measured by the position and orientation sensor. However, the same effect can be obtained even when only the position is measured. In this case, when calculating the direction in which the tip of the pen is facing on the image plane in the step of calculating the tilt direction of the pen tip in S404, the movement direction of the pen tip may be used instead of the posture of the pen. That is, the previous position of the pen tip is recorded, and the vector obtained by the difference from the current position can be obtained as a vector representing the direction in which the pen tip is facing.

さらに、本実施形態では位置姿勢が計測されているペンを用いて色の取得位置を指定したが、他の構成を用いて位置指定を行ってもよい。すなわち、現実空間中の一点を指定可能で、位置または位置姿勢の計測が可能な任意の手段を位置指定手段として用いることが可能である。たとえば、HMDに備えられたステレオカメラが撮影する視差画像からユーザの指先の位置を測定し、ユーザの指先により色取得位置を指定するようにしてもよい。   Furthermore, in the present embodiment, the color acquisition position is specified using a pen whose position and orientation is measured, but the position may be specified using another configuration. That is, any means that can designate one point in the real space and can measure the position or the position and orientation can be used as the position designation means. For example, the position of the user's fingertip may be measured from a parallax image captured by a stereo camera provided in the HMD, and the color acquisition position may be designated by the user's fingertip.

加えて、本実施形態では、取得した色はペン描画部の描画色バッファに保持され、最終的に合成画像が生成されるまでユーザは色の確認ができなかった。しかし、取得した色を都度提示することで、ユーザが取得した色を容易に視認することができる。この場合、表示領域中の一部を描画色表示領域としたり、ペン先の位置に、取得色を有する三次元仮想ブラシをCGで描画し、合成画像中に表示すればよい。   In addition, in the present embodiment, the acquired color is held in the drawing color buffer of the pen drawing unit, and the user cannot confirm the color until a composite image is finally generated. However, by presenting the acquired color each time, the color acquired by the user can be easily visually recognized. In this case, a part of the display area may be used as a drawing color display area, or a three-dimensional virtual brush having an acquired color may be drawn with CG at the pen tip position and displayed in the composite image.

<第2の実施形態>
本実施形態では、第1の実施形態の色取得処理(S122)において、色に加えて描画位置を取得するものである。
<Second Embodiment>
In this embodiment, in the color acquisition process (S122) of the first embodiment, the drawing position is acquired in addition to the color.

本実施形態では、ペン511に取得モードスイッチ(図示せず)が追加される。取得モードスイッチは例えばペンの後端付近に設置される。取得モードスイッチはON/OFFのいずれかに設定されると、その状態が保持され続けるスイッチである。   In the present embodiment, an acquisition mode switch (not shown) is added to the pen 511. The acquisition mode switch is installed near the rear end of the pen, for example. The acquisition mode switch is a switch that keeps its state when set to either ON or OFF.

また、本実施形態では、ペン描画部122が描画色バッファを持つ代わりに、描画モデルバッファを持つ。描画モデルバッファとは、ペン511の描画ボタンを押したときに、ペン先に描画される仮想物の三次元モデルを保持するためのバッファである。描画モデルバッファは、初期状態で空白になっている。   In this embodiment, the pen drawing unit 122 has a drawing model buffer instead of the drawing color buffer. The drawing model buffer is a buffer for holding a virtual three-dimensional model drawn on the pen tip when the drawing button of the pen 511 is pressed. The drawing model buffer is initially blank.

本実施形態では、第1の実施形態で説明した図2に示される処理手順が、図10に示されるように変更される。以下、図10を用いて、本実施形態における処理の流れについて説明する。なお、図10において、図2と同様の処理については同じ参照数字を付して重複する説明を省略する。   In the present embodiment, the processing procedure shown in FIG. 2 described in the first embodiment is changed as shown in FIG. Hereinafter, the flow of processing in the present embodiment will be described with reference to FIG. In FIG. 10, the same processes as those in FIG. 2 are denoted by the same reference numerals and redundant description is omitted.

本実施形態では、S121において描画がなされる際に、直近のペン先位置を始点とし、描画ボタンが押下された際のペン先位置を終点とする三次元の線の代わりに、ペンの先端の位置に、描画モデルバッファに入っている三次元モデルを描画するためのデータを生成する。このデータはCGシーン管理部106に送られ、記録される。   In the present embodiment, when drawing is performed in S121, instead of a three-dimensional line starting from the most recent pen tip position and ending at the pen tip position when the drawing button is pressed, Data for drawing the three-dimensional model stored in the drawing model buffer is generated at the position. This data is sent to the CG scene management unit 106 and recorded.

また、本実施形態では、S113の後にS200が実行される。S200は取得モード判定ステップであり、取得モード判定スイッチがONであるかOFFであるかを判定する。そして、ONであればS120に、OFFであればS130に進む。また、前回の取得モード判定スイッチの状態を記録しておき、取得モードがOFFからONになった際にはS201に進む。   In this embodiment, S200 is executed after S113. S200 is an acquisition mode determination step, in which it is determined whether the acquisition mode determination switch is ON or OFF. If ON, the process proceeds to S120, and if OFF, the process proceeds to S130. Further, the state of the previous acquisition mode determination switch is recorded, and when the acquisition mode is changed from OFF to ON, the process proceeds to S201.

S201は描画モデルバッファクリアステップである。このステップでは、ペン描画部122の描画三次元モデルバッファがクリアされ、空白にされる。S201が終了したら、S130に進む。   S201 is a drawing model buffer clear step. In this step, the drawing 3D model buffer of the pen drawing unit 122 is cleared and left blank. When S201 ends, the process proceeds to S130.

また、本実施形態では、S122の色取得ステップ内の処理が、図11のフローチャートで示す処理に変更される。以下、図11を参照して、本実施形態の色取得処理について説明する。なお、図11において、図4と同様の処理については同じ参照数字を付して重複する説明を省略する。   In the present embodiment, the process in the color acquisition step of S122 is changed to the process shown in the flowchart of FIG. Hereinafter, with reference to FIG. 11, the color acquisition processing of the present embodiment will be described. In FIG. 11, the same processes as those in FIG. 4 are denoted by the same reference numerals, and redundant description is omitted.

S406が終了すると、S410が実行される。S410では、描画モデルバッファが空白であるかどうかが判定される。空白であればS411に、空白でなければS412に進む。   When S406 ends, S410 is executed. In S410, it is determined whether or not the drawing model buffer is blank. If it is blank, the process proceeds to S411, and if it is not blank, the process proceeds to S412.

S411では、描画モデルバッファ座標系が設定される。このステップでは、この時点でのペン座標系502が描画モデルバッファの座標系として設定される。すなわち、描画モデルバッファに記録される三次元モデルは、この時点でのペンの位置を原点として記録されることになる。S411が終了すると、S412に進む。   In S411, a drawing model buffer coordinate system is set. In this step, the pen coordinate system 502 at this time is set as the coordinate system of the drawing model buffer. That is, the 3D model recorded in the drawing model buffer is recorded with the position of the pen at this time as the origin. When S411 ends, the process proceeds to S412.

S412では、描画モデルバッファにペン先の位置と色が記録される。このとき、ペン先の位置は、S411で求められた描画モデルバッファの座標系での位置として記録される。すなわち、S411の時点でのペン先の世界座標系での位置姿勢をP、S412の時点でのペン先の位置姿勢をSとすると、P−1・Sが現在の位置として描画モデルバッファに記録される。S412が終了すると、S122が終了される。 In step S412, the position and color of the pen tip are recorded in the drawing model buffer. At this time, the position of the pen tip is recorded as the position in the coordinate system of the drawing model buffer obtained in S411. That is, assuming that the position and orientation of the pen tip in the world coordinate system at the time of S411 is P, and the position and orientation of the pen tip at the time of S412 is S, P −1 · S is recorded in the drawing model buffer as the current position. Is done. When S412 ends, S122 ends.

このようにして、本実施形態では、取得モードスイッチがONである取得モードにおいて、色取得ボタンがONとなる毎に、描画モデルバッファにペン先近傍の画素の色と、ペン先の位置とが記録される。   Thus, in this embodiment, in the acquisition mode in which the acquisition mode switch is ON, every time the color acquisition button is turned ON, the color of the pixel near the pen tip and the position of the pen tip are displayed in the drawing model buffer. To be recorded.

従って、本実施形態によれば、ユーザがペンを持ち、取得モードスイッチをONにして、ペン先を現実物体の表面に接触させて色取得ボタン121をONとする操作を繰り返すことで、描画モデルバッファには現実物体の表面を構成する点に関する位置並びに色の情報が蓄積されていく。その結果、現実物体の表面形状や色を記録することが可能となる。   Therefore, according to the present embodiment, the drawing model is repeated by repeating the operation in which the user holds the pen, turns on the acquisition mode switch, contacts the pen tip with the surface of the real object, and turns on the color acquisition button 121. In the buffer, position and color information relating to points constituting the surface of the real object are accumulated. As a result, the surface shape and color of the real object can be recorded.

そして、描画ボタン120をONとした場合には、この描画モデルバッファに記録された三次元データに基づいて、CG描画を行うことで、記録した現実物体のCG映像をペン先に表示することができる。   When the drawing button 120 is turned ON, a CG image of the recorded real object can be displayed on the pen tip by performing CG drawing based on the three-dimensional data recorded in the drawing model buffer. it can.

図9は、本実施形態によって記録した三次元データを用いてCGを描画した状態を模式的に示す図である。図9において、510は現実のティーポット、901は記録した三次元データに基づいて描画された仮想のティーポットである。   FIG. 9 is a diagram schematically illustrating a state in which a CG is drawn using the three-dimensional data recorded according to the present embodiment. In FIG. 9, 510 is an actual teapot, and 901 is a virtual teapot drawn based on the recorded three-dimensional data.

このように、本実施形態によれば、色のみならずペン先の位置も合わせて取得することにより、第1の実施形態による効果に加え、現実物体の形状についても記録することが可能となるという効果を有する。   As described above, according to the present embodiment, by acquiring not only the color but also the position of the pen tip, it is possible to record the shape of the real object in addition to the effects of the first embodiment. It has the effect.

(他の実施形態)
上述したように、上述の実施形態は、システム或は装置のコンピュータ(或いはCPU、MPU等)によりソフトウェア的に実現することも可能である。
(Other embodiments)
As described above, the above-described embodiment can be realized by software by a computer (or CPU, MPU, etc.) of a system or apparatus.

従って、上述の実施形態をコンピュータで実現するために、該コンピュータに供給されるコンピュータプログラム自体も本発明を実現するものである。つまり、上述の実施形態の機能を実現するためのコンピュータプログラム自体も本発明の一つである。   Therefore, the computer program itself supplied to the computer in order to implement the above-described embodiment by the computer also realizes the present invention. That is, the computer program itself for realizing the functions of the above-described embodiments is also one aspect of the present invention.

なお、上述の実施形態を実現するためのコンピュータプログラムは、コンピュータで読み取り可能であれば、どのような形態であってもよい。例えば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等で構成することができるが、これらに限るものではない。   The computer program for realizing the above-described embodiment may be in any form as long as it can be read by a computer. For example, it can be composed of object code, a program executed by an interpreter, script data supplied to the OS, but is not limited thereto.

上述の実施形態を実現するためのコンピュータプログラムは、記憶媒体又は有線/無線通信によりコンピュータに供給される。プログラムを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、磁気テープ等の磁気記憶媒体、MO、CD、DVD等の光/光磁気記憶媒体、不揮発性の半導体メモリなどがある。   A computer program for realizing the above-described embodiment is supplied to a computer via a storage medium or wired / wireless communication. Examples of the storage medium for supplying the program include a magnetic storage medium such as a flexible disk, a hard disk, and a magnetic tape, an optical / magneto-optical storage medium such as an MO, CD, and DVD, and a nonvolatile semiconductor memory.

有線/無線通信を用いたコンピュータプログラムの供給方法としては、コンピュータネットワーク上のサーバを利用する方法がある。この場合、本発明を形成するコンピュータプログラムとなりうるデータファイル(プログラムファイル)をサーバに記憶しておく。プログラムファイルとしては、実行形式のものであっても、ソースコードであっても良い。   As a computer program supply method using wired / wireless communication, there is a method of using a server on a computer network. In this case, a data file (program file) that can be a computer program forming the present invention is stored in the server. The program file may be an executable format or a source code.

そして、このサーバにアクセスしたクライアントコンピュータに、プログラムファイルをダウンロードすることによって供給する。この場合、プログラムファイルを複数のセグメントファイルに分割し、セグメントファイルを異なるサーバに分散して配置することも可能である。   Then, the program file is supplied by downloading to a client computer that has accessed the server. In this case, the program file can be divided into a plurality of segment files, and the segment files can be distributed and arranged on different servers.

つまり、上述の実施形態を実現するためのプログラムファイルをクライアントコンピュータに提供するサーバ装置も本発明の一つである。   That is, a server apparatus that provides a client computer with a program file for realizing the above-described embodiment is also one aspect of the present invention.

また、上述の実施形態を実現するためのコンピュータプログラムを暗号化して格納した記憶媒体をユーザに配布し、所定の条件を満たしたユーザに、暗号化を解く鍵情報を供給し、ユーザの有するコンピュータへのインストールを可能とすることも可能である。鍵情報は、例えばインターネットを介してホームページからダウンロードさせることによって供給することができる。   In addition, a storage medium in which a computer program for realizing the above-described embodiment is encrypted and stored is distributed to the user, and key information for decrypting is supplied to the user who satisfies a predetermined condition, and the user's computer It is also possible to enable installation on Windows. The key information can be supplied by being downloaded from a homepage via the Internet, for example.

また、上述の実施形態を実現するためのコンピュータプログラムは、すでにコンピュータ上で稼働するOSの機能を利用するものであってもよい。   Further, the computer program for realizing the above-described embodiment may use an OS function already running on the computer.

さらに、上述の実施形態を実現するためのコンピュータプログラムは、その一部をコンピュータに装着される拡張ボード等のファームウェアで構成してもよいし、拡張ボード等が備えるCPUで実行するようにしてもよい。   Further, a part of the computer program for realizing the above-described embodiment may be configured by firmware such as an expansion board attached to the computer, or may be executed by a CPU provided in the expansion board. Good.

MRシステムにおいて、ソフトウェアにより実現される各部として機能することが可能なコンピュータの基本構成を示す図である。FIG. 2 is a diagram illustrating a basic configuration of a computer capable of functioning as each unit realized by software in an MR system. 第1の実施形態に係るMRシステムにおける、色取得動作を説明するフローチャートである。6 is a flowchart illustrating a color acquisition operation in the MR system according to the first embodiment. 第1の実施形態に係るMRシステムの機能構成例を示すブロック図である。It is a block diagram which shows the function structural example of MR system which concerns on 1st Embodiment. 第1の実施形態に係るMRシステムにおける色取得処理を説明するためのフローチャートである。It is a flowchart for demonstrating the color acquisition process in MR system which concerns on 1st Embodiment. 第1の実施形態に係るMRシステムの概念を説明する図である。It is a figure explaining the concept of MR system concerning a 1st embodiment. ペン先が示す方向を取得する処理を説明するための図である。It is a figure for demonstrating the process which acquires the direction which a nib shows. 色を指定するために用いる現実物体としてのカラーチャートの例を示す図である。It is a figure which shows the example of the color chart as a real object used in order to designate a color. 第1の実施形態に係るMRシステムにおけるペン描画処理を説明するための図である。It is a figure for demonstrating the pen drawing process in the MR system which concerns on 1st Embodiment. 第2の実施形態に係るMRシステムにおいて、ペン操作により記録した三次元データを用いてCGを描画した状態を模式的に示す図である。It is a figure which shows typically the state which drawn CG using the three-dimensional data recorded by pen operation in MR system which concerns on 2nd Embodiment. 第2の実施形態に係るMRシステムにおける、色取得動作を説明するフローチャートである。It is a flowchart explaining the color acquisition operation | movement in MR system which concerns on 2nd Embodiment. 第2の実施形態に係るMRシステムにおける色取得処理を説明するためのフローチャートである。It is a flowchart for demonstrating the color acquisition process in MR system which concerns on 2nd Embodiment.

符号の説明Explanation of symbols

100 HMD
101 撮像部
102 映像表示部
103 位置姿勢センサ
104 撮像部の位置姿勢計測部
105 ペンの位置姿勢計測部
106 CGシーン管理部
107 CG描画部
108 映像合成部
120 描画ボタン
121 色取得ボタン
122 ペン描画部
123 色取得部
501 撮像部座標系
502 ペン座標系
503 画像平面
504 撮像部の座標系の原点と画像平面の中心を結ぶ線
505 ペン先の位置
506 画像平面上でのペン先の投影位置
507 画像平面の中心から画像平面上でのペン先の投影位置まで伸ばしたベクトルの視野座標系Y軸方向の成分
508画像平面の中心から画像平面上でのペン先の投影位置まで伸ばしたベクトルの視野座標系X軸方向の成分
509 画像平面の座標系
510 現実のティーポット
511 ユーザが持っているペン
512 撮像部のカメラ中心
513 ペン延長点
601 画面上でのペンの傾き方向
602 画像平面上でのペン延長点の投影位置
701 色選択のためのカラーチャート
801 生成された三次元の線のCG
802 前回のペンの位置姿勢
803 現在のペンの位置姿勢
901 仮想のティーポット
1001 CPU
1002 RAM
1003 ROM
1004 キーボード
1005 マウス
1006 表示部
1007 外部記憶装置
1008 記憶媒体ドライブ
1009 I/F
1010 バス
100 HMD
DESCRIPTION OF SYMBOLS 101 Image pick-up part 102 Image | video display part 103 Position / orientation sensor 104 Position / orientation measurement part 105 of image pick-up part Pen position / orientation measurement part 106 CG scene management part 107 CG drawing part 108 Image composition part 120 Drawing button 121 Color acquisition button 122 Pen drawing part 123 Color acquisition unit 501 Imaging unit coordinate system 502 Pen coordinate system 503 Image plane 504 Line connecting the origin of the coordinate system of the imaging unit and the center of the image plane 505 Pen tip position 506 Pen tip projection position 507 on the image plane Vector field coordinate system extended from the center of the plane to the projected position of the pen tip on the image plane Y-axis component 508 Vector field coordinates of the vector extended from the center of the image plane to the projected position of the pen tip on the image plane System X-axis direction component 509 Image plane coordinate system 510 Real teapot 511 Pen 512 held by user Camera center 513 of imaging unit Pen extension point 601 Pen tilt direction 602 on the screen Projection position 701 of pen extension point on the image plane Color chart 801 for color selection CG of generated three-dimensional line
802 Previous pen position and orientation 803 Current pen position and orientation 901 Virtual teapot 1001 CPU
1002 RAM
1003 ROM
1004 Keyboard 1005 Mouse 1006 Display unit 1007 External storage device 1008 Storage medium drive 1009 I / F
1010 bus

Claims (10)

現実空間の映像を取得する映像取得工程と、
ユーザが操作する指示手段により、前記現実空間中の位置が指定されたことを検出する指示検出工程と、
前記検出に応答して、前記指定された前記現実空間中の位置に対応する、前記映像中の位置を求める算出工程と、
前記算出工程が求めた位置の近傍で、かつ前記算出工程が求めた位置に対応する前記映像中の画素とは異なる画素の色を、前記ユーザが指定した色として取得する色取得工程とを有することを特徴とする色情報取得方法。
An image acquisition process for acquiring an image of a real space;
An instruction detecting step for detecting that a position in the real space is designated by an instruction means operated by a user;
In response to the detection, calculating a position in the video corresponding to the specified position in the real space;
A color acquisition step of acquiring, as a color designated by the user, a color of a pixel different from the pixel in the video corresponding to the position obtained by the calculation step and in the vicinity of the position obtained by the calculation step. The color information acquisition method characterized by this.
前記色取得工程が、
前記算出工程が求めた位置から、前記指示手段が示す方向に予め定めた画素数ずれた位置の画素の色を、ユーザが指定した色として取得することを特徴とする請求項1記載の色情報取得方法。
The color acquisition step
2. The color information according to claim 1, wherein the color of a pixel at a position shifted by a predetermined number of pixels in the direction indicated by the instruction means from the position obtained by the calculating step is acquired as a color designated by the user. Acquisition method.
さらに、前記現実空間の映像に重畳してコンピュータ・グラフィックス映像を合成する合成工程を有し、
当該合成工程により得られた映像に対して、前記算出工程、前記色取得工程を適用することを特徴とする請求項1又は請求項2記載の色情報取得方法。
Furthermore, it has a synthesis step of synthesizing a computer graphics video superimposed on the video of the real space,
3. The color information acquisition method according to claim 1, wherein the calculation step and the color acquisition step are applied to an image obtained by the synthesis step.
前記色取得工程で取得した色で描画したコンピュータ・グラフィックスを表示する表示工程をさらに有することを特徴とする請求項1乃至請求項3のいずれか1項に記載の色情報取得方法。   4. The color information acquisition method according to claim 1, further comprising a display step of displaying computer graphics drawn in the color acquired in the color acquisition step. 5. さらに、前記色取得工程が、前記指定された前記現実空間中の位置を合わせて記録することを特徴とする請求項1乃至請求項4のいずれか1項に記載の色情報取得方法。   5. The color information acquisition method according to claim 1, wherein the color acquisition step records the specified position in the real space together. 前記指示手段は、ペン型の指示手段であり、
前記色取得工程は、前記ペン型の指示手段の先端部から、先端方向に予め定めた距離だけ延長した位置に対応する画素の色を、前記ユーザが指定した色として取得することを特徴とする請求項1乃至請求項5に記載の色情報取得方法。
The instruction means is a pen-type instruction means,
The color acquisition step acquires the color of a pixel corresponding to a position extended by a predetermined distance in the direction of the tip from the tip of the pen-shaped instruction means as a color designated by the user. The color information acquisition method according to claim 1.
現実空間の映像を取得する映像取得手段と、
ユーザが操作する指示手段により、前記映像に含まれる現実空間中の位置が指定されたことを検出する指示検出手段と、
前記検出に応答して、前記指定された前記現実空間中の位置に対応する、前記映像中の位置を求める算出手段と、
前記算出手段が求めた位置の近傍で、かつ前記算出手段が求めた位置に対応する前記映像中の画素とは異なる画素の色を、前記ユーザが指定した色として取得する色取得手段とを有することを特徴とする色情報取得装置。
Image acquisition means for acquiring images of real space;
Instruction detecting means for detecting that the position in the real space included in the video is designated by the instruction means operated by the user;
In response to the detection, calculating means for obtaining a position in the video corresponding to the designated position in the real space;
Color obtaining means for obtaining, as a color designated by the user, a color of a pixel in the vicinity of the position obtained by the calculating means and different from the pixel in the video corresponding to the position obtained by the calculating means. A color information acquisition apparatus characterized by that.
さらに、前記映像取得手段が取得した映像を、前記ユーザの眼前に提示する表示装置を有することを特徴とする請求項7記載の色情報取得装置。   The color information acquisition apparatus according to claim 7, further comprising a display device that presents the video acquired by the video acquisition unit in front of the user's eyes. コンピュータに、請求項1乃至請求項6のいずれか1項に記載の色情報取得方法を実行させるためのプログラム。   The program for making a computer perform the color information acquisition method of any one of Claims 1 thru | or 6. 請求項9記載のプログラムが格納されたコンピュータ読み取り可能な記憶媒体。   A computer-readable storage medium in which the program according to claim 9 is stored.
JP2006118446A 2006-04-21 2006-04-21 How to get color information from an image Active JP4847195B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006118446A JP4847195B2 (en) 2006-04-21 2006-04-21 How to get color information from an image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006118446A JP4847195B2 (en) 2006-04-21 2006-04-21 How to get color information from an image

Publications (3)

Publication Number Publication Date
JP2007293453A true JP2007293453A (en) 2007-11-08
JP2007293453A5 JP2007293453A5 (en) 2009-06-04
JP4847195B2 JP4847195B2 (en) 2011-12-28

Family

ID=38764044

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006118446A Active JP4847195B2 (en) 2006-04-21 2006-04-21 How to get color information from an image

Country Status (1)

Country Link
JP (1) JP4847195B2 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010020526A (en) * 2008-07-10 2010-01-28 Ritsumeikan Manipulation system
JP2012014680A (en) * 2010-06-02 2012-01-19 Nintendo Co Ltd Information processing program, information processor, information processing system and information processing method
JP2012174219A (en) * 2011-02-24 2012-09-10 Ohbayashi Corp Image composition method
JP2013207744A (en) * 2012-03-29 2013-10-07 Dainippon Printing Co Ltd Print generation device
JP2013219460A (en) * 2012-04-05 2013-10-24 Dainippon Printing Co Ltd Printed matter creation device
US9282319B2 (en) 2010-06-02 2016-03-08 Nintendo Co., Ltd. Image display system, image display apparatus, and image display method
US9278281B2 (en) 2010-09-27 2016-03-08 Nintendo Co., Ltd. Computer-readable storage medium, information processing apparatus, information processing system, and information processing method
US10015473B2 (en) 2010-06-11 2018-07-03 Nintendo Co., Ltd. Computer-readable storage medium, image display apparatus, image display system, and image display method
JP2019087241A (en) * 2017-11-09 2019-06-06 ザ・ボーイング・カンパニーThe Boeing Company Systems, methods and tools for spatially registering virtual content with physical environment in augmented reality platforms
CN111880658A (en) * 2020-07-31 2020-11-03 湖南汽车工程职业学院 Virtual reality's look appearance sampling device
JP7425641B2 (en) 2020-03-25 2024-01-31 鹿島建設株式会社 Ranging equipment and programs

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11110577A (en) * 1997-08-04 1999-04-23 Sony Corp Device and method for processing image data, and transmission medium thereof
JP2000148381A (en) * 1998-11-05 2000-05-26 Telecommunication Advancement Organization Of Japan Input image processing method, input image processor and recording medium on which input image processing program has been recorded
JP2002163670A (en) * 2000-11-24 2002-06-07 Mixed Reality Systems Laboratory Inc Device for presenting combined sense of reality and its controlling method
JP2002287904A (en) * 2001-03-28 2002-10-04 Canon Inc Indicating position display method on display, device and storage medium
JP3363861B2 (en) * 2000-01-13 2003-01-08 キヤノン株式会社 Mixed reality presentation device, mixed reality presentation method, and storage medium
JP3631151B2 (en) * 2000-11-30 2005-03-23 キヤノン株式会社 Information processing apparatus, mixed reality presentation apparatus and method, and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11110577A (en) * 1997-08-04 1999-04-23 Sony Corp Device and method for processing image data, and transmission medium thereof
JP2000148381A (en) * 1998-11-05 2000-05-26 Telecommunication Advancement Organization Of Japan Input image processing method, input image processor and recording medium on which input image processing program has been recorded
JP3363861B2 (en) * 2000-01-13 2003-01-08 キヤノン株式会社 Mixed reality presentation device, mixed reality presentation method, and storage medium
JP2002163670A (en) * 2000-11-24 2002-06-07 Mixed Reality Systems Laboratory Inc Device for presenting combined sense of reality and its controlling method
JP3631151B2 (en) * 2000-11-30 2005-03-23 キヤノン株式会社 Information processing apparatus, mixed reality presentation apparatus and method, and storage medium
JP2002287904A (en) * 2001-03-28 2002-10-04 Canon Inc Indicating position display method on display, device and storage medium

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010020526A (en) * 2008-07-10 2010-01-28 Ritsumeikan Manipulation system
JP2012014680A (en) * 2010-06-02 2012-01-19 Nintendo Co Ltd Information processing program, information processor, information processing system and information processing method
US9282319B2 (en) 2010-06-02 2016-03-08 Nintendo Co., Ltd. Image display system, image display apparatus, and image display method
US10015473B2 (en) 2010-06-11 2018-07-03 Nintendo Co., Ltd. Computer-readable storage medium, image display apparatus, image display system, and image display method
US9278281B2 (en) 2010-09-27 2016-03-08 Nintendo Co., Ltd. Computer-readable storage medium, information processing apparatus, information processing system, and information processing method
JP2012174219A (en) * 2011-02-24 2012-09-10 Ohbayashi Corp Image composition method
JP2013207744A (en) * 2012-03-29 2013-10-07 Dainippon Printing Co Ltd Print generation device
JP2013219460A (en) * 2012-04-05 2013-10-24 Dainippon Printing Co Ltd Printed matter creation device
JP2019087241A (en) * 2017-11-09 2019-06-06 ザ・ボーイング・カンパニーThe Boeing Company Systems, methods and tools for spatially registering virtual content with physical environment in augmented reality platforms
JP7336184B2 (en) 2017-11-09 2023-08-31 ザ・ボーイング・カンパニー Systems, methods, and tools for spatially aligning virtual content with a physical environment in an augmented reality platform
JP7425641B2 (en) 2020-03-25 2024-01-31 鹿島建設株式会社 Ranging equipment and programs
CN111880658A (en) * 2020-07-31 2020-11-03 湖南汽车工程职业学院 Virtual reality's look appearance sampling device
CN111880658B (en) * 2020-07-31 2023-04-07 湖南汽车工程职业学院 Virtual reality's look appearance sampling device

Also Published As

Publication number Publication date
JP4847195B2 (en) 2011-12-28

Similar Documents

Publication Publication Date Title
JP4847195B2 (en) How to get color information from an image
JP4137078B2 (en) Mixed reality information generating apparatus and method
JP4533087B2 (en) Image processing method and image processing apparatus
US7627137B2 (en) Image composition system, image composition method, and image composition apparatus
KR100823649B1 (en) Calibration method and apparatus
JP4795091B2 (en) Information processing method and apparatus
JP4933406B2 (en) Image processing apparatus and image processing method
JP4667111B2 (en) Image processing apparatus and image processing method
JP4434890B2 (en) Image composition method and apparatus
JP4401728B2 (en) Mixed reality space image generation method and mixed reality system
US7834909B2 (en) Image processing method and image processing apparatus
JP2000102036A (en) Composite actual feeling presentation system, composite actual feeling presentation method, man-machine interface device and man-machine interface method
US20070252833A1 (en) Information processing method and information processing apparatus
JP6775957B2 (en) Information processing equipment, information processing methods, programs
JP4144888B2 (en) Image processing method and image processing apparatus
JP2006012042A (en) Image generating method and device
JP2009087161A (en) Image processor and image processing method
JP2008070319A (en) Object measurement device and method
JP2004233201A (en) Position attitude measuring method
JP7279113B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, COMPUTER PROGRAM
JP4217661B2 (en) Image processing method and image processing apparatus
JP2008040913A (en) Information processing method, and information processor
JP2007293412A (en) Information processing method and apparatus
JP2015201734A (en) Image processing system, control method of the same, and program
JP2009015648A (en) Image processor and image processing method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090421

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090421

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110629

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110711

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110909

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20111011

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111013

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

Free format text: PAYMENT UNTIL: 20141021

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 4847195

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20141021

Year of fee payment: 3