JP2008046749A - Image processing method and device - Google Patents
Image processing method and device Download PDFInfo
- Publication number
- JP2008046749A JP2008046749A JP2006219844A JP2006219844A JP2008046749A JP 2008046749 A JP2008046749 A JP 2008046749A JP 2006219844 A JP2006219844 A JP 2006219844A JP 2006219844 A JP2006219844 A JP 2006219844A JP 2008046749 A JP2008046749 A JP 2008046749A
- Authority
- JP
- Japan
- Prior art keywords
- marker
- image
- index
- orientation
- superimposed
- 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
Links
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、撮影された画像から指標の位置姿勢を計算するものに関する。 The present invention relates to a method for calculating the position and orientation of an index from a captured image.
高品質な複合現実感を提供するための重要な技術の一つとして、現実空間と仮想空間の位置あわせ処理がある。位置あわせ処理として様々な手法が提案されているが、それらの中でも指標(マーカ)を撮影した画像(指標画像またはマーカ画像)から、指標と撮像装置(カメラ)の相対位置姿勢を計算する方法がコストや使い勝手の点から広く利用されている(非特許文献1参照)。本明細書では、マーカが撮影された画像をマーカ画像と表現する。 One of the important technologies for providing high-quality mixed reality is alignment processing between the real space and the virtual space. Various methods have been proposed as the alignment processing. Among them, there is a method for calculating the relative position and orientation of the index and the imaging device (camera) from the image (index image or marker image) obtained by capturing the index (marker). Widely used in terms of cost and usability (see Non-Patent Document 1). In this specification, an image in which a marker is photographed is expressed as a marker image.
撮影したマーカ画像中のマーカとカメラとの相対位置姿勢から、マーカ画像中のマーカとの相対位置姿勢が既知である別のマーカがどのように見えるかを三次元グラフィックス(3DCG)技術を用いて計算、描画することができる。本明細書では、この描画されたマーカの画像を投影マーカと表現する。また、実際のマーカを現実マーカ、マーカ画像中の現実マーカの画像領域を画像マーカと表現する。 Using a three-dimensional graphics (3DCG) technique, it looks as if another marker whose relative position and orientation with the marker in the marker image is known from the relative position and orientation between the marker in the photographed marker image and the camera. Can be calculated and drawn. In this specification, the drawn marker image is expressed as a projection marker. An actual marker is expressed as a real marker, and an image area of the real marker in the marker image is expressed as an image marker.
投影マーカをマーカ画像に重畳し、表示することにより、画像マーカと投影マーカとの位置姿勢のズレを視覚化することができる。操作者は投影マーカが重畳された画像から、位置あわせ処理の動作確認、精度、マーカの設置位置姿勢の間違い、マーカの設置忘れ等を把握することができる。 By superimposing and displaying the projection marker on the marker image, it is possible to visualize the displacement between the position and orientation of the image marker and the projection marker. The operator can grasp the operation confirmation of the alignment processing, the accuracy, the error in the marker installation position and posture, the marker installation forgotten, and the like from the image on which the projection marker is superimposed.
一方、位置あわせ処理はすべての現実マーカの位置姿勢が既知であることを前提としており、マーカの位置姿勢を予め測定し入力する作業が必要である。マーカの数や設置位置姿勢によっては人が手作業で測定を行うことは非現実的であり、マーカの位置姿勢を効率よくかつ高精度に測定する手段が求められている。 On the other hand, the alignment process is based on the premise that the positions and orientations of all the real markers are known, and requires an operation of measuring and inputting the marker positions and orientations in advance. Depending on the number of markers and the installation position / posture, it is unrealistic for a human to perform measurement manually, and means for efficiently and highly accurately measuring the position / posture of the marker is required.
近年、マーカ画像からマーカ間の相対位置姿勢を計算するマーカキャリブレーションに関する方法が提案されている(非特許文献2参照)。マーカキャリブレーションにより全てのマーカ間の相対位置姿勢を求めた後、任意のマーカの世界座標系における位置姿勢を決定することにより、世界座標系におけるすべてのマーカの位置姿勢を求めることができる。
投影マーカをマーカ画像に重畳し、投影マーカと画像マーカとを比較することにより、位置あわせ処理の動作、精度、マーカの設置位置姿勢の間違い、マーカの設置忘れ等を、操作者が把握することができる。 By superimposing the projected marker on the marker image and comparing the projected marker with the image marker, the operator can grasp the operation of the alignment process, accuracy, incorrect marker installation position and orientation, marker forgotten installation, etc. Can do.
このとき、位置姿勢が既知であるすべてのマーカの投影マーカを描画すると、投影マーカが重畳された画像を見た操作者を混乱させる可能性がある。例えば、操作者から見て衝立や柱の裏側に設置されたマーカの投影マーカを重畳すると、操作者から見た衝立や柱の表側にマーカを設置し忘れているのか、裏側のマーカの位置姿勢が既知となっているのかを容易に判別することができない。 At this time, if the projection markers of all the markers whose positions and orientations are known are drawn, there is a possibility that the operator who sees the image on which the projection markers are superimposed will be confused. For example, when the projected marker of a partition installed on the back side of a partition or a column when viewed from the operator is superimposed, whether the marker is forgotten to be installed on the front side of the partition or column viewed from the operator, or the position and orientation of the marker on the back side Cannot be easily determined.
また、6自由度を持つ可動物体の位置あわせを画像から行う場合には、カメラとの相対姿勢がいかなる値であってもカメラから見た物体表面にマーカが設置されてなくてはならない。この条件を満たすように物体表面にマーカを設置してマーカキャリブレーションを行うと、マーカキャリブレーション中においてカメラから見て物体の表側のマーカに対応する投影マーカと、裏側のマーカに対応する投影マーカが重なって表示される。このため、より一層操作者が混乱に陥る可能性が高い。 In addition, when positioning a movable object having six degrees of freedom from an image, a marker must be placed on the object surface viewed from the camera regardless of the value of the relative posture with the camera. When marker calibration is performed by setting a marker on the object surface so as to satisfy this condition, a projection marker corresponding to the marker on the front side of the object viewed from the camera during the marker calibration and a projection marker corresponding to the marker on the back side Are displayed overlapping. For this reason, the operator is more likely to be confused.
本発明は上記課題を鑑みてなされたものであり、画像に、画像に存在する指標の投影画像を重畳することにより、操作者が混乱することを防ぐことを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to prevent an operator from being confused by superimposing a projected image of an index existing in an image on the image.
上記目的を達成するために本発明は、撮影された画像から指標を検出する指標検出工程と、前記検出された指標の位置姿勢を計算する位置姿勢計算工程と、前記計算された指標の位置姿勢を保持する保持工程とを有し、前記取得された画像に対して、前記検出工程と、前記位置姿勢計算工程とを行うことにより、前記保持されている指標の位置姿勢を更新する画像処理方法であり、前記画像に投影画像を重畳すべき指標を判定する判定工程と、前記保持された指標の位置姿勢に基づき、前記画像に投影画像を重畳すべきであると判定された指標の投影画像を生成する生成工程と、前記生成された投影画像を前記画像に重畳する重畳工程とを有することを特徴とする。 To achieve the above object, the present invention provides an index detection step for detecting an index from a captured image, a position and orientation calculation step for calculating a position and orientation of the detected index, and a position and orientation of the calculated index. An image processing method for updating the position and orientation of the held index by performing the detection step and the position and orientation calculation step on the acquired image. And a determination step of determining an index on which the projection image is to be superimposed on the image, and a projection image of the index on which the projection image is determined to be superimposed on the image based on the position and orientation of the held index And a superimposing step of superimposing the generated projection image on the image.
本発明によれば、投影マーカが重畳された画像を見た操作者の混乱を軽減させることができる。よって、例えば、操作者の位置あわせ処理の確認やマーカキャリブレーションにおける処理を効率化することができる。 According to the present invention, it is possible to reduce the confusion of an operator who has seen an image on which a projection marker is superimposed. Therefore, for example, it is possible to improve the efficiency of confirmation of the operator alignment processing and processing in marker calibration.
(実施例1)
実施例1は、マーカキャリブレーションにおいて、マーカ画像からカメラとマーカとの相対位置姿勢を計算し、投影マーカをマーカ画像に重畳する例である。
(Example 1)
The first embodiment is an example in which the relative position and orientation between the camera and the marker are calculated from the marker image and the projected marker is superimposed on the marker image in the marker calibration.
図1は本実施例におけるマーカのフォーマット、図2は実際のマーカの1例である。マーカは16個の小正方形からなる1つの大正方形である。小正方形は白か黒で塗りつぶされており、1ビットの情報を表す。白で塗りつぶされていれば0、黒なら1を表している。小正方形の白黒の組み合わせによってマーカIDが表現される。 FIG. 1 shows a marker format in this embodiment, and FIG. 2 shows an example of an actual marker. The marker is one large square composed of 16 small squares. The small square is filled with white or black and represents 1-bit information. If it is painted white, it represents 0, and if it is black, it represents 1. A marker ID is expressed by a combination of small squares in black and white.
なお、本実施例においては、マーカの一辺の長さ(大正方形の一辺の長さ)は、全てのマーカで同じであり、予め決められた所定の値である。 In this embodiment, the length of one side of the marker (the length of one side of the large square) is the same for all markers, and is a predetermined value determined in advance.
マーカの姿勢は、マーカ上に定義されたマーカ座標系が世界座標系を基準にどのように回転しているかによって決定される。図3はマーカ座標系がどのように定義されているかを示している。 The posture of the marker is determined by how the marker coordinate system defined on the marker is rotated with respect to the world coordinate system. FIG. 3 shows how the marker coordinate system is defined.
マーカ座標系の各軸の方向は大正方形の角にある4つの小正方形で決定される。4つの小正方形のうち3つは必ず黒(blk1,2,3)、1つは必ず白(wht)であり、blk1,2を結ぶ線分の方向がx座標軸の正方向、blk3,2を結ぶ線分の方向がy座標軸の正方向である。また、マーカ表側の法線方向(マーカの向き)はz座標軸の正方向と一致する。マーカの位置は、世界座標系におけるマーカ座標系原点の位置で決定される。マーカ座標系の原点は図3に示すように大正方形の中心である。 The direction of each axis of the marker coordinate system is determined by four small squares at the corners of the large square. Three of the four small squares are always black (blk1,2,3), one is always white (wht), the direction of the line connecting blk1,2 is the positive direction of the x coordinate axis, and blk3,2 The direction of the connecting line segment is the positive direction of the y coordinate axis. The normal direction (marker direction) on the marker front side coincides with the positive direction of the z coordinate axis. The position of the marker is determined by the position of the origin of the marker coordinate system in the world coordinate system. The origin of the marker coordinate system is the center of the large square as shown in FIG.
マーカIDは情報ビット(x1〜x8)の8個の小正方形で決定される。マーカIDの範囲は8ビットすなわち0〜255となる。その他の4個の小正方形は検査ビット(c1〜c4)であり、画像処理による情報ビットの誤認識が発生した場合の訂正に使用される。 The marker ID is determined by eight small squares of information bits (x1 to x8). The range of the marker ID is 8 bits, that is, 0 to 255. The other four small squares are inspection bits (c1 to c4), and are used for correction when an information bit is erroneously recognized by image processing.
検査ビットの値は以下の式から求められる。
c1=not(x1+x2+x3+x5+x6)
c2=not(x2+x3+x4+x6+x7)
c3=not(x3+x4+x5+x7+x8)
c4=not(x1+x4+x5+x6+x8)
カメラとマーカとの相対位置姿勢は、マーカ画像中の四辺形の形状、四辺形の辺の長さ、マーカ画像中の四辺形の中心位置から求めることができる。
The value of the check bit can be obtained from the following equation.
c1 = not (x1 + x2 + x3 + x5 + x6)
c2 = not (x2 + x3 + x4 + x6 + x7)
c3 = not (x3 + x4 + x5 + x7 + x8)
c4 = not (x1 + x4 + x5 + x6 + x8)
The relative position and orientation between the camera and the marker can be obtained from the shape of the quadrilateral in the marker image, the length of the side of the quadrilateral, and the center position of the quadrilateral in the marker image.
以上、本実施例で使用するマーカについて説明した。 The marker used in the present embodiment has been described above.
図4は、本実施例における画像処理装置100のハードウェア構成を示すブロック図である。
FIG. 4 is a block diagram illustrating a hardware configuration of the
入力部110は、ビデオカメラ等の撮像装置(カメラ)であり、キャリブレーション対象であるマーカの撮影を行う。
The
取得部120は、入力部110で撮影された映像の静止画(スナップショット)を取得してマーカ検出部130に送信したり、入力部110で撮影された映像をマーカ検出部130および合成部170に送信したりする。スナップショットの取得は操作者からの指示に応じて任意の時間に行われるものとする。また、スナップショットを取得する以外は常に映像を撮影し続けるものとする。
The
マーカ検出部130は、入力部110で撮影された映像およびスナップショットからマーカの検出を行う。
The
取得部120からスナップショットが送られてきた場合は、スナップショットからマーカ検出を行う。一方、映像が送られてきた場合は、映像を構成する各フレームに対してマーカの検出処理を行い、その結果を位置姿勢計算部140に送信する。
When a snapshot is sent from the
位置姿勢計算部140は、マーカ検出部130から送られてきたマーカの検出結果から、検出されたマーカとビデオカメラの相対位置姿勢およびマーカ同士の相対位置姿勢を計算する。
The position and orientation calculation unit 140 calculates the relative position and orientation of the detected marker and the video camera and the relative position and orientation of the markers from the marker detection result sent from the
マーカ検出部130から、スナップショットから検出されたマーカの情報が送られてきた場合は、検出したマーカとカメラの相対位置姿勢を計算する。続いて同じスナップショット内に存在するマーカ同士の相対位置姿勢を計算する。マーカ同士の相対位置姿勢は記憶部150に保存される。そして記憶部150に保存されているマーカ同士の相対位置姿勢の組み合わせをすべて読み出して、全部のマーカ同士の相対位置姿勢を計算して、記憶部150に保存する。
When the
マーカ検出部130から、映像の各フレームから検出されたマーカ情報が送られてきた場合は、各フレームから検出されたマーカとフレーム撮影時のビデオカメラの相対位置姿勢を計算する。続いて記憶部150から読み出したマーカの相対位置姿勢情報と、計算されたマーカとカメラの相対位置姿勢とから、すべてのマーカとカメラとの相対位置姿勢を計算し、記憶部150に保存する。
When marker information detected from each frame of the video is sent from the
記憶部150には、図5で示されるように、マーカのID、相対位置姿勢、検出マーカフラグ、基準マーカフラグが関連付けるマーカ定義情報テーブルが記憶される。
As shown in FIG. 5, the
基準マーカとは相対位置姿勢の基準となるマーカのことである。本実施例では、スナップショットから検出された1つめのマーカが基準マーカと設定する。位置、姿勢は基準マーカとの相対位置姿勢である。ここでは姿勢は軸と回転角による表現が使用されているものとするが、これに限られることは無くオイラー角による表現を使用してもよい。 The reference marker is a marker that serves as a reference for the relative position and orientation. In this embodiment, the first marker detected from the snapshot is set as the reference marker. The position and orientation are relative positions and orientations with respect to the reference marker. Here, it is assumed that the expression by the axis and the rotation angle is used as the posture, but the expression is not limited to this, and the expression by Euler angle may be used.
検出マーカフラグは、対象マーカが、マーカ検出部130から送られてきたスナップショットやフレームに存在するかどうかを示すフラグである。検出マーカフラグは後述する生成部160における描画に利用される。
The detection marker flag is a flag indicating whether or not the target marker exists in the snapshot or frame sent from the
マーカ定義情報テーブルは、マーカ検出部130からスナップショットやフレームにおけるマーカ検出処理結果が送られてくるごとにマーカの追加、全マーカの位置姿勢の再計算、検出フラグの更新がなされ、最新の状態が保持される。
The marker definition information table is updated every time a marker detection processing result in a snapshot or a frame is sent from the
また、マーカ定義情報テーブルに格納されるマーカは、マーカ検出部130で検出されたマーカに限定されず、手動で追加されたマーカでも構わない。例えば、スナップショットを1枚も取得せず、すべてのマーカを手動で定義して本実施例の画像処理装置を運用することも可能である。
Further, the marker stored in the marker definition information table is not limited to the marker detected by the
生成部160は、位置姿勢計算部140の計算結果である、カメラとマーカとの相対位置姿勢から、マーカ検出が行われたフレームにおける投影マーカの画像を生成する。この時、マーカ定義情報テーブルの検出フラグが立っているマーカとそうでないマーカについて描画処理を変更する。 The generation unit 160 generates an image of the projection marker in the frame where the marker is detected from the relative position and orientation between the camera and the marker, which is the calculation result of the position and orientation calculation unit 140. At this time, the drawing process is changed for a marker for which a detection flag in the marker definition information table is set and a marker for which it is not.
合成部170では、取得部120から受信した映像のフレームに、生成部160で生成された投影マーカの画像を重畳する。なお、取得部120から送信されるフレームは、マーカ検出部130でマーカ検出処理を行ったフレームと同じになるよう同期が取られている。表示部180は、合成部170で合成された映像のフレームを表示する。
The
以上、本実施例のハードウェア構成とその動作概要について説明した。 Heretofore, the hardware configuration and the operation outline of the present embodiment have been described.
物体の表面に貼り付けられたマーカの相対位置姿勢をマーカキャリブレーションする手順および処理の流れを図6のフローチャートを利用して説明する。 The procedure for marker calibration of the relative position and orientation of the marker attached to the surface of the object and the flow of processing will be described using the flowchart of FIG.
なお、ここでは図7〜図8のような各面にサイコロの目と同じマーカIDのマーカが貼り付けられた直方体を物体の例として説明する。図7は物体を表から見た様子を、図8は裏から見た様子を、図9は右から見た様子を示している。また201〜206は直方体に貼り付けられたマーカであり、それぞれ、マーカID1〜6に対応している。
Here, a rectangular parallelepiped in which markers having the same marker ID as the dice eyes are attached to each surface as shown in FIGS. 7 to 8 will be described as an example of an object. 7 shows an object viewed from the front, FIG. 8 shows the object viewed from the back, and FIG. 9 shows the object viewed from the right.
また、撮影を行うカメラの座標系は図10のように定義されているものとする。カメラの撮影方向はz座標軸の負の方向と、右手方向がx座標軸の正方向、上方向がy座標軸の正方向となる。 Further, it is assumed that the coordinate system of the camera that performs shooting is defined as shown in FIG. The shooting direction of the camera is the negative direction of the z coordinate axis, the right hand direction is the positive direction of the x coordinate axis, and the upward direction is the positive direction of the y coordinate axis.
操作者のスナップショット取得指示に応じて、画像処理装置はスナップショットを取得し(S100)、スナップショット中のマーカを検出する(S102)。続いて検出されたすべてのマーカとカメラの相対位置姿勢を計算する(S104)。そして、検出されたマーカがマーカ定義情報テーブルに記載されてない場合はそれを追加し、マーカ定義情報テーブルに記載されているマーカ同士の相対位置姿勢すべての再計算を行い、更新する。そして、検出されたマーカのマーカ定義情報テーブル中の検出フラグを更新する(S106)。この時、基準マーカが決定されて無ければそれを決定し、マーカ定義情報テーブルの基準マーカとなったマーカの基準マーカフラグを立てる。計算結果はマーカ定義情報テーブルとして保持されS100に戻る。 In response to the operator's snapshot acquisition instruction, the image processing apparatus acquires a snapshot (S100), and detects a marker in the snapshot (S102). Subsequently, the relative positions and orientations of all the detected markers and the camera are calculated (S104). If the detected marker is not described in the marker definition information table, it is added, and all the relative positions and orientations of the markers described in the marker definition information table are recalculated and updated. Then, the detection flag in the marker definition information table of the detected marker is updated (S106). At this time, if the reference marker has not been determined, it is determined, and the reference marker flag of the marker that has become the reference marker in the marker definition information table is set. The calculation result is held as a marker definition information table and the process returns to S100.
例えば、マーカが貼り付けられた直方体200を図7ように見える方向からスナップショットを撮影すると、ID1(201)、ID2(202)、ID4(204)のマーカが検出され、相対位置姿勢が計算される。このとき、自動的に初めに検出されたID1のマーカが基準マーカとして決定される。マーカ定義情報テーブルにはID1、ID2、ID4のマーカが登録され、ID1の基準マーカフラグが立てられる。そして、ID2、ID4の位置姿勢は、ID1のマーカとの相対位置姿勢で更新される。ID1、ID2、ID4のマーカの検出フラグも立てられる。
For example, when taking a snapshot of the
続いて、マーカが貼り付けられた直方体200を図9のように見える方向からスナップショットを撮影するとID2(202)、ID4(204)、ID6(206)のマーカが検出される。ID2、ID6のマーカがマーカ定義情報テーブルに追加される。ID2、ID6の基準マーカからの相対位置姿勢がID4のマーカの相対位置姿勢を介して計算され、マーカ定義情報テーブルに記述される。同時にすべてのマーカの検出フラグが一旦下げられ、ID2、ID4、ID6のマーカの検出フラグのみが立てられる。
Subsequently, when taking a snapshot of the
このようにして、ID1、ID2、ID4、ID6の相対位置姿勢が計算される。 In this way, the relative positions and orientations of ID1, ID2, ID4, and ID6 are calculated.
スナップショット取得指示が無いと、画像処理装置は映像を撮影し続ける。そして撮影した映像のフレームからマーカ検出を行う(S110)。フレームから検出されたすべてのマーカとカメラの相対位置姿勢を計算する(S112)。そして、検出されたマーカがマーカ定義情報テーブルに記載されてない場合はそれを追加し、マーカ定義情報テーブルに記載されているマーカ同士の相対位置姿勢すべての再計算、更新を行う。そして検出されたマーカのマーカ定義情報テーブル中の検出フラグを更新する(S114)。 If there is no snapshot acquisition instruction, the image processing apparatus continues to shoot video. Then, marker detection is performed from the frame of the captured video (S110). The relative positions and orientations of all the markers detected from the frame and the camera are calculated (S112). If the detected marker is not described in the marker definition information table, it is added and all the relative positions and orientations of the markers described in the marker definition information table are recalculated and updated. Then, the detection flag in the marker definition information table of the detected marker is updated (S114).
マーカ定義情報テーブルに記載されているマーカのうち検出フラグが立っているマーカについては、投影マーカを描画する(S116、S118)。検出フラグが立ってないマーカについては投影マーカを描画しない。映像のフレームに、このフレームから計算された投影マーカの描画結果を重畳し(S120)、表示する(S122)。 Of the markers described in the marker definition information table, projection markers are drawn for markers for which a detection flag is set (S116, S118). Projection markers are not drawn for markers for which no detection flag is set. The projection marker drawing result calculated from this frame is superimposed on the video frame (S120) and displayed (S122).
例えば、マーカが貼り付けられた直方体を図7、図9ように見える方向からスナップショットを撮影済みの場合、ID1、ID2、ID4、ID6の相対位置姿勢は既知である。この時、再度、図7のように見える方向から長方形200を撮影し、登録されているすべての投影マーカを描画すると、図11のようになる。映像フレーム内のID1、ID2、ID4の画像マーカ201、202、204に加えて、ID1、ID2、ID4、ID6の投影マーカ301、302、304、306が表示される。つまり、図11のように映像フレーム内に存在しないID6の投影マーカ306が表示されてしまう。そこで本実施例では、検出フラグを用いて、マーカ定義情報テーブル記載のマーカの中から、映像から検出されたマーカのみ描画する。これにより、図12のように、検出されていないマーカの投影マーカを描画しないようにしている。
For example, when the snapshot is taken from the direction in which the rectangular solid with the marker attached is seen as shown in FIGS. 7 and 9, the relative positions and orientations of ID1, ID2, ID4, and ID6 are known. At this time, when the
以上、物体の表面に貼り付けられたマーカの相対位置姿勢をマーカキャリブレーションする手順および処理において、投影マーカがどのように表示されるのかを説明した。 As described above, how the projected marker is displayed in the procedure and processing for performing the marker calibration of the relative position and orientation of the marker attached to the surface of the object has been described.
本実施例によれば、6自由度の可動物体の表面に貼り付けられたマーカの相対位置姿勢をマーカキャリブレーションする際に、カメラから見えないマーカの投影マーカを描画しないようにした。本発明によれば、カメラから見えないマーカの投影マーカを描画しないようにすることができるため、投影マーカと画像マーカの一致を画面上で見る時に混乱しないようにすることができる。 According to the present embodiment, when performing the marker calibration of the relative position and orientation of the marker attached to the surface of the movable object having 6 degrees of freedom, the projection marker of the marker that cannot be seen from the camera is not drawn. According to the present invention, it is possible to prevent the projection marker of the marker that cannot be seen from the camera from being drawn, so that it is possible to avoid confusion when viewing the match between the projection marker and the image marker on the screen.
特に手に持って位置姿勢を自由に動かすことができる比較的小さな6自由度の可動物体の場合は、すべての投影マーカを描画すると、投影マーカで物体が覆いつくされてしまう。本実施例によれば、投影マーカで物体が覆いつくされてしまうことを防ぐことができる。 In particular, in the case of a relatively small 6-DOF movable object that can be held and moved freely by hand, if all projection markers are drawn, the object is covered with the projection markers. According to the present embodiment, it is possible to prevent the object from being covered with the projection marker.
また本実施例ではカメラから見えないマーカの投影マーカを描画しないようにしたが、まったく描画しないのではなく別の色や明度の低いくすんだ薄い色で描いて混乱を誘わない程度に目立たないようにしてもよい。さらには、描画する/しない/別の色で描くといった方法を操作者が選択できるようにしても構わない。また、本実施例ではマーカを設置した物体は可動であったが、固定設置されていても構わない。さらにはマーカキャリブレーションではなく、位置あわせ処理において同様の処理を行っても構わない。 Also, in this embodiment, projection markers that are invisible to the camera are not drawn, but they are not drawn at all, but they are drawn in another color or a dull and light color with low lightness so as not to cause confusion. It may be. Furthermore, the operator may select a method of drawing / not drawing / drawing with another color. In this embodiment, the object on which the marker is installed is movable, but it may be fixedly installed. Furthermore, instead of marker calibration, the same processing may be performed in the alignment processing.
(実施例2)
実施例2は、マーカ画像に画像マーカが存在するかどうかを判定する手段として、撮像装置の撮影方向と指標の法線方向との内積を利用する例である。基本的な構成、動作は実施例1に準ずる。
(Example 2)
Example 2 is an example in which the inner product of the imaging direction of the imaging apparatus and the normal direction of the index is used as means for determining whether or not an image marker exists in the marker image. The basic configuration and operation are the same as in the first embodiment.
図13のフローチャートは、物体の表面に貼り付けられたマーカの相対位置姿勢をキャリブレーションする手順および処理の流れを説明するものである。S215、S216以外は実施例1と同様の処理である。実施例1と同一の処理については、ステップの下2桁を図6と同一にした。 The flowchart in FIG. 13 explains the procedure and process flow for calibrating the relative position and orientation of the marker attached to the surface of the object. Except for S215 and S216, the processing is the same as in the first embodiment. For the same processing as in Example 1, the last two digits of the steps are the same as in FIG.
スナップショット取得指示が無い場合、画像処理装置は映像を撮影し続ける。そして撮影した映像のフレームからマーカ検出を行う(S210)。続いて検出されたすべてのマーカとカメラの相対位置姿勢を計算する(S212)。 When there is no snapshot acquisition instruction, the image processing apparatus continues to shoot video. Then, marker detection is performed from the frame of the captured video (S210). Subsequently, the relative positions and orientations of all the detected markers and the camera are calculated (S212).
そして検出されたマーカがマーカ定義情報テーブルに記載されてない場合はそれを追加して、マーカ定義情報テーブルに記載されているマーカ同士の相対位置姿勢すべての再計算、更新を行う。(S214)。 If the detected marker is not described in the marker definition information table, it is added, and all the relative positions and orientations of the markers described in the marker definition information table are recalculated and updated. (S214).
最後に、すべてのマーカ定義情報テーブルに記載されているマーカの法線と、カメラの撮像方向の内積を計算し(S215)、内積が0より小さいマーカは投影マーカを描画し、0以上であるマーカは投影マーカを描画しない(S216)。 Finally, the normal product of the markers described in all the marker definition information tables and the inner product in the imaging direction of the camera are calculated (S215). A marker whose inner product is smaller than 0 draws a projected marker and is greater than or equal to zero. The marker does not draw a projection marker (S216).
以上の処理をマーカ定義情報テーブルに記載されているマーカについて行った後、映像のフレームにこのフレームから計算された投影マーカの描画結果を重畳し(S220)、表示する(S222)。 After the above processing is performed for the markers described in the marker definition information table, the projection marker drawing result calculated from this frame is superimposed on the frame of the video (S220) and displayed (S222).
本実施例では、マーカ画像に画像マーカが存在するかどうかを判定する手段として、撮像装置の撮影方向と指標の法線方向との内積を利用した。 In this embodiment, the inner product of the imaging direction of the imaging device and the normal direction of the index is used as means for determining whether an image marker exists in the marker image.
人間はマーカが映っていると認識できるが、画像処理ではマーカが認識できない場合、例えば図14のように画像の端に半分だけマーカが映っているような場合、実施例1の処理方法では、マーカ212の投影マーカ312を描画しない。
Humans can recognize that a marker is reflected, but if the marker cannot be recognized by image processing, for example, if only a half of the marker is reflected at the edge of the image as shown in FIG. The
これに対し、実施例2の処理方法では、マーカ212の投影マーカ312を描画することが可能となる。
On the other hand, in the processing method according to the second embodiment, the
さらには、観測不可マーカの投影マーカ描画方法を予め用意した方法から選択可能とすることで、マーカが設置された物体の色、マーカの設置密度に応じた柔軟な使用が可能となる。 Furthermore, by making it possible to select a projection marker drawing method for the unobservable marker from methods prepared in advance, it becomes possible to use the marker flexibly according to the color of the object on which the marker is installed and the marker installation density.
(その他の実施の形態)
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記録媒体(または記憶媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記録媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記録媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記録した記録媒体は本発明を構成することになる。
(Other embodiments)
Also, an object of the present invention is to supply a recording medium (or storage medium) in which a program code of software that realizes the functions of the above-described embodiments is recorded to a system or apparatus, and a computer (or CPU or CPU) of the system or apparatus. Needless to say, this can also be achieved when the MPU) reads and executes the program code stored in the recording medium. In this case, the program code itself read from the recording medium realizes the functions of the above-described embodiment, and the recording medium on which the program code is recorded constitutes the present invention.
また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
さらに、記録媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。 Furthermore, after the program code read from the recording medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is based on the instruction of the program code. It goes without saying that the CPU or the like provided in the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
本発明を上記記録媒体に適用する場合、その記録媒体には、先に説明したフローチャートに対応するプログラムコードが格納されることになる。 When the present invention is applied to the recording medium, program code corresponding to the flowchart described above is stored in the recording medium.
Claims (5)
前記検出された指標の位置姿勢を計算する位置姿勢計算工程と、
前記計算された指標の位置姿勢を保持する保持工程とを有し、
前記取得された画像に対して、前記検出工程と、前記位置姿勢計算工程とを行うことにより、前記保持されている指標の位置姿勢を更新する画像処理方法であり、
前記画像に投影画像を重畳すべき指標を判定する判定工程と、
前記保持された指標の位置姿勢に基づき、前記画像に投影画像を重畳すべきであると判定された指標の投影画像を生成する生成工程と、
前記生成された投影画像を前記画像に重畳する重畳工程とを有することを特徴とする画像処理方法。 An index detection step of detecting an index from the captured image;
A position and orientation calculation step of calculating a position and orientation of the detected index;
Holding the calculated position and orientation of the index,
It is an image processing method for updating the position and orientation of the held index by performing the detection step and the position and orientation calculation step on the acquired image,
A determination step of determining an index on which the projection image should be superimposed on the image;
Generating a projected image of the index determined to be superimposed on the image based on the held position and orientation of the index;
An image processing method comprising: a superimposing step of superimposing the generated projection image on the image.
前記検出された指標の位置姿勢を計算する位置姿勢計算手段と、
前記計算された指標の位置姿勢を保持する保持手段とを有し、
前記取得された画像に対して、前記検出手段による検出と、前記位置姿勢計算手段による位置姿勢の計算とを行うことにより、前記保持されている指標の位置姿勢を更新する画像処理装置であり、
前記画像に投影画像を重畳すべき指標を判定する判定手段と、
前記保持された指標の位置姿勢に基づき、前記画像に投影画像を重畳すべきであると判定された指標の投影画像を生成する生成手段と、
前記生成された投影画像を前記画像に重畳する重畳手段とを有することを特徴とする画像処理装置。 Index detecting means for detecting the index from the captured image;
Position and orientation calculation means for calculating the position and orientation of the detected index;
Holding means for holding the calculated position and orientation of the index,
An image processing apparatus that updates the position and orientation of the held index by performing detection by the detection unit and calculation of a position and orientation by the position and orientation calculation unit with respect to the acquired image.
Determining means for determining an index on which a projection image should be superimposed on the image;
Generating means for generating a projected image of the index determined to be superimposed on the image based on the position and orientation of the index held;
An image processing apparatus comprising: a superimposing unit that superimposes the generated projection image on the image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006219844A JP2008046749A (en) | 2006-08-11 | 2006-08-11 | Image processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006219844A JP2008046749A (en) | 2006-08-11 | 2006-08-11 | Image processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008046749A true JP2008046749A (en) | 2008-02-28 |
Family
ID=39180457
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006219844A Withdrawn JP2008046749A (en) | 2006-08-11 | 2006-08-11 | Image processing method and device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008046749A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011185897A (en) * | 2010-03-11 | 2011-09-22 | Toyota Motor Corp | Object information detection system, information detection method, and program |
CN106827515A (en) * | 2017-02-20 | 2017-06-13 | 大族激光科技产业集团股份有限公司 | 3D printing is imaged calibration method and system |
FR3047590A1 (en) * | 2016-02-10 | 2017-08-11 | Fit Esic | METHOD FOR DETERMINING THE ORIENTATION AND POSITION OF AT LEAST ONE VIEWING APPARATUS USING A PARALLELEPIPEDIC GRAPHIC BEACON |
JP2017181374A (en) * | 2016-03-31 | 2017-10-05 | 三井住友建設株式会社 | Surface height display method |
WO2019244593A1 (en) * | 2018-06-18 | 2019-12-26 | オムロン株式会社 | Image processing system and image processing method |
WO2022168616A1 (en) * | 2021-02-05 | 2022-08-11 | 株式会社アマダ | Device determination system, device determination method, and device determination program |
-
2006
- 2006-08-11 JP JP2006219844A patent/JP2008046749A/en not_active Withdrawn
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011185897A (en) * | 2010-03-11 | 2011-09-22 | Toyota Motor Corp | Object information detection system, information detection method, and program |
FR3047590A1 (en) * | 2016-02-10 | 2017-08-11 | Fit Esic | METHOD FOR DETERMINING THE ORIENTATION AND POSITION OF AT LEAST ONE VIEWING APPARATUS USING A PARALLELEPIPEDIC GRAPHIC BEACON |
JP2017181374A (en) * | 2016-03-31 | 2017-10-05 | 三井住友建設株式会社 | Surface height display method |
CN106827515A (en) * | 2017-02-20 | 2017-06-13 | 大族激光科技产业集团股份有限公司 | 3D printing is imaged calibration method and system |
WO2019244593A1 (en) * | 2018-06-18 | 2019-12-26 | オムロン株式会社 | Image processing system and image processing method |
US11967095B2 (en) | 2018-06-18 | 2024-04-23 | Omron Corporation | Image processing system and image processing method |
WO2022168616A1 (en) * | 2021-02-05 | 2022-08-11 | 株式会社アマダ | Device determination system, device determination method, and device determination program |
JP7554130B2 (en) | 2021-02-05 | 2024-09-19 | 株式会社アマダ | DEVICE IDENTIFICATION SYSTEM, DEVICE IDENTIFICATION METHOD, AND DEVICE IDENTIFICATION PROGRAM |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8130385B2 (en) | Information processing apparatus and information processing method | |
JP4926817B2 (en) | Index arrangement information measuring apparatus and method | |
JP4532982B2 (en) | Arrangement information estimation method and information processing apparatus | |
US9990744B2 (en) | Image registration device, image registration method, and image registration program | |
EP1970860B1 (en) | Camera calibration apparatus and method | |
US7664341B2 (en) | Index layout measurement method, position and orientation estimation method, index layout measurement apparatus, and position and orientation estimation apparatus | |
US9696543B2 (en) | Information processing apparatus and information processing method | |
EP1437645A2 (en) | Position/orientation measurement method, and position/orientation measurement apparatus | |
US20050253870A1 (en) | Marker placement information estimating method and information processing device | |
JP4137078B2 (en) | Mixed reality information generating apparatus and method | |
Hübner et al. | Marker-based localization of the microsoft hololens in building models | |
JP2008046687A (en) | Photographic environment calibration method and information processor | |
JP2008224454A (en) | Information processing apparatus and information processing method | |
JP2017129567A (en) | Information processing apparatus, information processing method, and program | |
JP2017096725A (en) | Information processor and information processing method | |
JP2008249407A (en) | Image processing device and image processing method | |
JP4367926B2 (en) | Image composition system, image composition method, and image composition apparatus | |
JP2008046749A (en) | Image processing method and device | |
US10078906B2 (en) | Device and method for image registration, and non-transitory recording medium | |
JP2006513509A (en) | Composite information projection | |
JP2000275013A (en) | Method for deciding view point position attitude, computer and storage medium | |
JP2006267879A (en) | Image processing method, image processing apparatus and marker | |
JP4926598B2 (en) | Information processing method and information processing apparatus | |
JP4810403B2 (en) | Information processing apparatus and information processing method | |
CN113786229A (en) | AR augmented reality-based auxiliary puncture navigation method |
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: 20091110 |