JP6465789B2 - Program, apparatus and method for calculating internal parameters of depth camera - Google Patents

Program, apparatus and method for calculating internal parameters of depth camera Download PDF

Info

Publication number
JP6465789B2
JP6465789B2 JP2015253435A JP2015253435A JP6465789B2 JP 6465789 B2 JP6465789 B2 JP 6465789B2 JP 2015253435 A JP2015253435 A JP 2015253435A JP 2015253435 A JP2015253435 A JP 2015253435A JP 6465789 B2 JP6465789 B2 JP 6465789B2
Authority
JP
Japan
Prior art keywords
depth
camera
coordinates
point
image
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.)
Active
Application number
JP2015253435A
Other languages
Japanese (ja)
Other versions
JP2017118396A (en
Inventor
有哉 巻渕
有哉 巻渕
有希 永井
有希 永井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
KDDI Corp
Original Assignee
KDDI Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by KDDI Corp filed Critical KDDI Corp
Priority to JP2015253435A priority Critical patent/JP6465789B2/en
Publication of JP2017118396A publication Critical patent/JP2017118396A/en
Application granted granted Critical
Publication of JP6465789B2 publication Critical patent/JP6465789B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Studio Devices (AREA)

Description

本発明は、デプスカメラの内部及び外部パラメータを算出する端末校正の技術に関する。   The present invention relates to a terminal calibration technique for calculating internal and external parameters of a depth camera.

従来、RGB(Red-Green-Blue)画像とデプス画像とを同時に取得する「RGB−Dカメラ」がある。市販製品として、例えばMicrosoft社製「Kinect」や、ASUS社製「Xtion」、Intel社製「RealSense」がある。これらのRGB−Dカメラは、例えばジェスチャ入力を安価に実現するNUI(Natural User Interface)として利用されることが多い。また、デプス画像のみを取得するセンサ(例えばレーザレンジファインダ)と異なって、既存の画像処理技術に適用できるという観点から、AR/VR技術やロボットビジョン技術にも広く利用されている。   Conventionally, there is an “RGB-D camera” that simultaneously acquires an RGB (Red-Green-Blue) image and a depth image. Examples of commercially available products include “Kinect” manufactured by Microsoft, “Xtion” manufactured by ASUS, and “RealSense” manufactured by Intel. These RGB-D cameras are often used as, for example, a NUI (Natural User Interface) that realizes gesture input at low cost. Further, unlike a sensor (for example, a laser range finder) that acquires only a depth image, it is widely used in AR / VR technology and robot vision technology from the viewpoint that it can be applied to existing image processing technology.

例えばカメラデバイスを用いた用途として、対象物のRGB情報付き3次元モデルを作成する場合がある。
通常のRGBカメラを用いた場合、3次元情報を取得するために、多視点の撮影画像が必要となり、且つ、その点群も疎となる。
これに対し、RGB−Dカメラを用いた場合、1視点からの撮影だけで密な3次元情報を取得することができ、高精度な3次元モデルを簡単に作成することができる。
For example, as a use using a camera device, there is a case where a three-dimensional model with RGB information of an object is created.
When a normal RGB camera is used, in order to acquire three-dimensional information, a multi-viewpoint captured image is required, and the point cloud is also sparse.
On the other hand, when an RGB-D camera is used, dense three-dimensional information can be acquired only by photographing from one viewpoint, and a highly accurate three-dimensional model can be easily created.

図1は、RGB−DカメラにおけるデプスカメラとRGBカメラとのカメラ座標の対応関係を表す説明図である。   FIG. 1 is an explanatory diagram showing a correspondence relationship between camera coordinates of a depth camera and an RGB camera in an RGB-D camera.

図1によれば、RGB−Dカメラは、以下の3つのデバイスから構成される。
RGBカメラ(可視光カメラ)
デプスカメラ(赤外線カメラ+赤外線プロジェクタ)
RGBカメラは、市販のWEBカメラと同様に、RGB画像を取得する。
デプスカメラは、赤外線プロジェクタから赤外線を照射し、その反射を計測することによって、各座標にデプス値(Z座標)を対応付けたデプス画像を取得する。デプス画像は、被写体のデプスカメラ座標系での3次元座標(XYZ)に変換できる。
According to FIG. 1, the RGB-D camera is composed of the following three devices.
RGB camera (visible light camera)
Depth camera (infrared camera + infrared projector)
The RGB camera acquires an RGB image in the same manner as a commercially available WEB camera.
The depth camera irradiates infrared rays from an infrared projector and measures the reflection thereof, thereby acquiring a depth image in which a depth value (Z coordinate) is associated with each coordinate. The depth image can be converted into three-dimensional coordinates (XYZ) in the depth camera coordinate system of the subject.

RGB−Dカメラによれば、RGBカメラで取得したRGB画像と、デプスカメラで取得したデプス画像及び3次元のXYZ座標とを取得し、色情報付きの6次元データ(RGBXYZ)を有する点群(ポイントクラウドデータ)を生成することができる。   According to the RGB-D camera, an RGB image acquired by an RGB camera, a depth image acquired by a depth camera, and a three-dimensional XYZ coordinate are acquired, and a point group having 6-dimensional data with color information (RGBXYZ) ( Point cloud data).

ここで、RGBカメラ及びデプスカメラは、別デバイスであるために、それらのカメラ座標系は通常、一致しない。そのため、色情報付きのポイントクラウドデータを生成するためには、RGBカメラのRGB画像とデプスカメラのデプス画像との間の、ピクセル座標系の対応関係が必要となる。ピクセル座標系の対応関係は、通常、市販製品のSDK(Software Development Kit)や外部ライブラリにデフォルト値が用意されており、API(Application Programming Interface)を用いて取得することができる。例えば図1によれば、デプス画像の一点(ud,vd)と、対応するデプス値(Z座標)とを入力することにより、RGB画像中の対応点(uc,vc)が得られる。RGBカメラとデプスカメラとが一体的に組み込まれた市販のRGB−Dカメラ単体を用いる場合は、外部パラメータのキャリブレーション等の作業を別途行うことなく、メーカ側で用意されたデフォルト値を用いることにより、RGBポイントクラウドデータ(RGBXYZの6次元点群)を容易に生成することができる。   Here, since the RGB camera and the depth camera are separate devices, their camera coordinate systems usually do not match. Therefore, in order to generate point cloud data with color information, a correspondence relationship of the pixel coordinate system is required between the RGB image of the RGB camera and the depth image of the depth camera. The correspondence relationship of the pixel coordinate system is usually prepared as a default value in a commercially available SDK (Software Development Kit) or an external library, and can be acquired using an API (Application Programming Interface). For example, according to FIG. 1, a corresponding point (uc, vc) in an RGB image is obtained by inputting one point (ud, vd) of the depth image and the corresponding depth value (Z coordinate). When using a commercially available RGB-D single camera in which an RGB camera and a depth camera are integrated, use the default values prepared by the manufacturer without any additional work such as calibration of external parameters. Thus, RGB point cloud data (6-dimensional point group of RGBXYZ) can be easily generated.

図2は、ロボットビジョン装置の外観図である。   FIG. 2 is an external view of the robot vision apparatus.

図2によれば、ロボットビジョン装置には、1台の全方位RGBカメラと複数台のRGB−Dカメラとが一体的に組み込まれている(例えば非特許文献1参照)。この装置は、全方位RGBカメラによって取得されたRGB画像と、RGB−Dカメラによって取得されたXYZの3次元座標を対応付けることにより、広範囲のポイントクラウドデータを生成できる。尚、RGB−Dカメラについては、3次元情報を取得するためだけに使用しているため、代わりにデプスカメラを用いてもよい。この対応付けを実現するためには、全方位RGBカメラとデプスカメラとの間の位置関係を固定した上で、それらの相対位置姿勢Wc,dを事前に算出しておく必要がある。例えば以下の行列式によって、RGB−Dカメラで取得した3次元座標を、全方位RGBカメラのRGB画像に対応付けることができる。
Ac・Wc,d・Xd
Ac:全方位RGBカメラの内部パラメータの行列
Wc,d:デプスカメラ座標系から全方位RGBカメラ座標系への変換行列
Xd:デプスカメラ座標系における1点(3次元座標)
According to FIG. 2, one omnidirectional RGB camera and a plurality of RGB-D cameras are integrally incorporated in the robot vision apparatus (see, for example, Non-Patent Document 1). This apparatus can generate a wide range of point cloud data by associating an RGB image acquired by an omnidirectional RGB camera with an XYZ three-dimensional coordinate acquired by an RGB-D camera. Since the RGB-D camera is used only for acquiring three-dimensional information, a depth camera may be used instead. In order to realize this association, it is necessary to fix the positional relationship between the omnidirectional RGB camera and the depth camera and to calculate their relative position and orientation Wc, d in advance. For example, the three-dimensional coordinates acquired by the RGB-D camera can be associated with the RGB image of the omnidirectional RGB camera by the following determinant.
Ac ・ Wc, d ・ Xd
Ac: Matrix of internal parameters of omnidirectional RGB camera
Wc, d: transformation matrix from depth camera coordinate system to omnidirectional RGB camera coordinate system
Xd: one point in the depth camera coordinate system (three-dimensional coordinates)

<Acについて>
一般に、カメラの内部パラメータは、例えば非特許文献2に記載の技術で算出することができる。被写体としてのチェスボードを、様々な距離及び角度で撮影し、複数の撮影画像(例えば20枚程度)を取得する。そして、各撮影画像中のコーナー点を検出することによって、多数の点対応から内部パラメータを算出する。全方位RGBカメラの内部パラメータAcについても、同様の方式で容易に算出できる。
<About Ac>
In general, the internal parameters of the camera can be calculated by the technique described in Non-Patent Document 2, for example. A chess board as a subject is photographed at various distances and angles, and a plurality of photographed images (for example, about 20 images) are acquired. Then, by detecting a corner point in each captured image, an internal parameter is calculated from correspondence between a large number of points. The internal parameter Ac of the omnidirectional RGB camera can be easily calculated by the same method.

<Wc,dについて>
一方、Wc,dは、全方位RGBカメラ及びデプスカメラの両方の外部パラメータWc及びWdから算出することができる。一般に、カメラの外部パラメータは、カメラの内部パラメータが未知か又は既知であるかによって、必要となる点対応の数が異なる。カメラの内部パラメータAが未知の場合、最少6組の点対応とDLT(Direct Linear Transformation)アルゴリズムとを用いて投影行列を算出した後、内部パラメータAと外部パラメータWとに分解して算出することができる。このとき、点対応は、非同一平面上に存在する必要があり、且つ、十分な精度で計算するためには10組以上の点対応が必要となる。また、内部パラメータAが既知の場合、最少4組の点対応とPnP(Perspective n-Point)アルゴリズムとを用いて算出できる。4点は同一平面上にあってもよく、最少(4組)の点対応からでも、十分な精度のカメラ姿勢が得られる。全方位カメラの外部パラメータWcについては、上述で算出した内部パラメータAcを用いて、高精度に算出することができる。同様にして、デプスカメラの外部パラメータWdを算出するために、デプスカメラの内部パラメータAdが既知であることが望ましい。
<About Wc, d>
On the other hand, Wc, d can be calculated from the external parameters Wc and Wd of both the omnidirectional RGB camera and the depth camera. In general, the number of point correspondences required for the external parameters of the camera differs depending on whether the internal parameters of the camera are unknown or known. If the internal parameter A of the camera is unknown, calculate the projection matrix using a minimum of 6 point correspondences and a DLT (Direct Linear Transformation) algorithm, and then decompose it into the internal parameter A and the external parameter W. Can do. At this time, the point correspondence needs to exist on non-coplanar planes, and more than ten sets of point correspondences are necessary for calculation with sufficient accuracy. Further, when the internal parameter A is known, it can be calculated by using a minimum of four pairs of points and a PnP (Perspective n-Point) algorithm. The four points may be on the same plane, and a camera posture with sufficient accuracy can be obtained even from the minimum (four sets) of point correspondences. The external parameter Wc of the omnidirectional camera can be calculated with high accuracy using the internal parameter Ac calculated above. Similarly, in order to calculate the external parameter Wd of the depth camera, it is desirable that the internal parameter Ad of the depth camera is known.

<Adについて>
図3は、デプスカメラの内部パラメータを、チェスボードを用いて算出する説明図である。
非特許文献2に記載の技術におけるデプスカメラの内部パラメータを算出する場合、白い領域と半透明の領域とが交互に並んだチェスボードを被写体として用いる。これによって、デプス画像の濃淡情報によるコーナー点を検出することができる。内部パラメータのキャリブレーションについては、デプスカメラもRGBカメラと同様に、多数の点対応を用いて実行する。
<About Ad>
FIG. 3 is an explanatory diagram for calculating internal parameters of the depth camera using a chess board.
When calculating internal parameters of a depth camera in the technique described in Non-Patent Document 2, a chess board in which white areas and semi-transparent areas are alternately arranged is used as a subject. This makes it possible to detect a corner point based on the density information of the depth image. For the calibration of the internal parameters, the depth camera is also executed using a large number of point correspondences in the same manner as the RGB camera.

F. Okura, Y. Ueda, T. Sato and N. Yokoya: “Teleoperation of Mobile Robots by Generating Augmented Free-Viewpoint Images”, Proc. 2013 IEEE/RSJ Int. Conf. Intelligent Robots & Syst. (IROS’13), pp.665-671 (2013)F. Okura, Y. Ueda, T. Sato and N. Yokoya: “Teleoperation of Mobile Robots by Generating Augmented Free-Viewpoint Images”, Proc. 2013 IEEE / RSJ Int. Conf. Intelligent Robots & Syst. (IROS'13) , pp.665-671 (2013) A flexible new technique for camera calibration". IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330-1334, 2000.A flexible new technique for camera calibration ". IEEE Transactions on Pattern Analysis and Machine Intelligence, 22 (11): 1330-1334, 2000. 加藤博一,M.Billinghurst,浅野浩一,橘啓八郎,“マーカ追跡に基づく拡張現実感システムとそのキャリブレーション” ,日本バーチャルリアリティ学会論文誌,Vol4,No4,pp.607-616,(1999)Hirokazu Kato, M. Billinghurst, Koichi Asano, Keihachiro Tachibana, “Augmented Reality System Based on Marker Tracking and Its Calibration”, Transactions of the Virtual Reality Society of Japan, Vol4, No4, pp.607-616, (1999) Kinect camera calibration, http://doc-ok.org/?p=289Kinect camera calibration, http://doc-ok.org/?p=289

しかしながら、前述した従来技術によれば、デプスカメラの外部パラメータを算出するために、デプスカメラの内部パラメータを事前に算出する場合には、半透明のチェスボードを製作し、多数の撮影画像を用意する必要がある。また、図3のように、デプスカメラのデプス画像について、チェスボードを撮影したデプス画像の輪郭が不明瞭な場合や、コーナー点を正確に検出できない場合、内部パラメータを十分な精度で算出することができない。一方で、内部パラメータについてキャリブレーションを事前に実行しない場合は、外部パラメータを十分な精度で得るために10組以上の点対応が必要になる。   However, according to the prior art described above, in order to calculate the external parameters of the depth camera in advance, when calculating the internal parameters of the depth camera in advance, a semi-transparent chess board is produced and a large number of captured images are prepared. There is a need to. In addition, as shown in FIG. 3, when the depth image of the depth camera obtained by photographing the chess board is unclear or the corner point cannot be accurately detected, the internal parameters are calculated with sufficient accuracy. I can't. On the other hand, when the internal parameters are not calibrated in advance, more than 10 sets of points need to be handled in order to obtain the external parameters with sufficient accuracy.

図1のような、デプスカメラ及びRGBカメラを同一筐体に組み込んだRGB−Dカメラについて、SDK等によってデプスとRGBの対応関係を取得できる場合、ユーザ側で別途各カメラの外部パラメータを算出する必要はない。一方で、対応関係が取得できない場合は、ユーザ側で各カメラの外部パラメータを算出する必要があり、その精度は最終的に出力される色情報付きのポイントクラウドデータの精度に影響を及ぼす。   In the case of an RGB-D camera in which a depth camera and an RGB camera are incorporated in the same housing as shown in FIG. 1, when the correspondence relationship between depth and RGB can be obtained by SDK or the like, the external parameter of each camera is separately calculated on the user side. There is no need. On the other hand, if the correspondence cannot be acquired, it is necessary for the user to calculate the external parameters of each camera, and the accuracy affects the accuracy of the point cloud data with color information to be finally output.

図2のような、ロボットビジョン装置について、RGB−Dカメラと全方位RGBカメラとが別筐体で設置されている場合、RGBカメラのRGB値とデプスカメラとのデプス値との間のカメラ座標系間の変換行列を、ユーザ側で事前に算出しておく必要がある。ここで、変換行列は、RGB−Dカメラに含まれるデプスカメラ及び全方位RGBカメラ両方の外部パラメータから決定される。この変換行列を用いることによって、デプスカメラで取得したXYZの3次元点群と、全方位RGBカメラのような外部RGBカメラで取得したRGB画像とを対応付けることできる。結局、ロボットビジョン装置における色情報付きのポイントクラウドデータの精度も、その外部パラメータの精度の影響を受ける。
いずれの場合においても、デプスカメラの外部パラメータを高精度に算出するために、デプスカメラの内部パラメータを事前に高精度に算出しておくことが望ましい。
In the robot vision apparatus as shown in FIG. 2, when the RGB-D camera and the omnidirectional RGB camera are installed in separate housings, the camera coordinates between the RGB value of the RGB camera and the depth value of the depth camera. The conversion matrix between systems needs to be calculated in advance on the user side. Here, the transformation matrix is determined from external parameters of both the depth camera and the omnidirectional RGB camera included in the RGB-D camera. By using this conversion matrix, it is possible to associate an XYZ three-dimensional point group acquired by a depth camera with an RGB image acquired by an external RGB camera such as an omnidirectional RGB camera. After all, the accuracy of point cloud data with color information in the robot vision device is also affected by the accuracy of the external parameters.
In any case, in order to calculate the external parameters of the depth camera with high accuracy, it is desirable to calculate the internal parameters of the depth camera with high accuracy in advance.

そこで、本発明は、例えばチェスボードのような特有の撮影操作を伴うキャリブレーションを実行することなく、できる限り少数の点対応で、デプスカメラの内部パラメータを算出することができるプログラム、装置及び方法を提供することを目的とする。   Therefore, the present invention provides a program, an apparatus, and a method capable of calculating an internal parameter of a depth camera with as few points as possible without executing calibration with a specific photographing operation such as a chess board. The purpose is to provide.

本発明によれば、デプスカメラ(深度センサ)を有する装置に搭載されたコンピュータを、当該デプスカメラの内部パラメータを算出するように機能させるプログラムであって、
デプスカメラから、デプス画像の点座標(ud,vd)とデプス値(Z座標)との組を取得するデプスデータ取得手段と、
データベースを用いて、デプス画像の点座標(ud,vd)及びデプス値(Z座標)から、デプスカメラ座標系の3次元座標(X,Y,Z)を取得するポイントクラウドデータ取得手段と、
デプス画像の点座標(ud,vd)と、ポイントクラウドデータの3次元座標(X,Y,Z)との組を線形で対応付ける変換パラメータを、デプスカメラの内部パラメータとして算出する内部パラメータ算出手段と
してコンピュータを機能させることを特徴とする。
According to the present invention, there is provided a program for causing a computer installed in an apparatus having a depth camera (depth sensor) to function so as to calculate an internal parameter of the depth camera,
Depth data acquisition means for acquiring a set of point coordinates (ud, vd) and depth values (Z coordinates) of the depth image from the depth camera;
Point cloud data acquisition means for acquiring the three-dimensional coordinates (X, Y, Z) of the depth camera coordinate system from the point coordinates (ud, vd) and the depth values (Z coordinates) of the depth image using a database;
As an internal parameter calculation means for calculating a conversion parameter for linearly associating a set of the point coordinates (ud, vd) of the depth image and the three-dimensional coordinates (X, Y, Z) of the point cloud data as an internal parameter of the depth camera. It is characterized by making a computer function.

本発明のプログラムにおける他の実施形態によれば、
内部パラメータ算出手段は、点座標(ud,vd)とデプス値(Z座標)とを少なくとも2組を用いて、ピンホールカメラモデルに基づく以下の式によって、デプスカメラの内部パラメータAdを算出する
s:スケール係数
Ad:デプスカメラの内部パラメータ
fu:デプスカメラのu軸に対する焦点距離
fv:デプスカメラのv軸に対する焦点距離
Cu:デプスカメラのu軸に対する光軸ずれ
Cv:デプスカメラのv軸に対する光軸ずれ
ようにコンピュータを機能させることも好ましい。
According to another embodiment of the program of the present invention,
The internal parameter calculation means calculates the internal parameter Ad of the depth camera by the following formula based on the pinhole camera model using at least two sets of the point coordinates (ud, vd) and the depth value (Z coordinate).
s: scale factor Ad: internal parameter of depth camera fu: focal length with respect to u-axis of depth camera fv: focal length with respect to v-axis of depth camera Cu: optical axis deviation with respect to u-axis of depth camera Cv: with respect to v-axis of depth camera It is also preferable to make the computer function so as to shift the optical axis.

本発明のプログラムにおける他の実施形態によれば、
内部パラメータ算出手段は、点座標(ud,vd)とデプス値(Z座標)とを少なくとも1組を用いて、光軸のずれを画像中心と規定することによって、画像サイズをw×hとして、以下の式に基づく内部パラメータAdを算出する
ようにコンピュータを機能させることも好ましい。
According to another embodiment of the program of the present invention,
The internal parameter calculation means uses at least one set of point coordinates (ud, vd) and depth values (Z coordinates) and defines the optical axis shift as the image center, thereby setting the image size to w × h. Calculate the internal parameter Ad based on the following formula
It is also preferable to make the computer function.

本発明のプログラムにおける他の実施形態によれば、
内部パラメータ算出手段は、デプスカメラの横軸方向及び縦軸方向の両方の焦点距離を、同一距離fと規定することによって、以下の式に基づく内部パラメータAを算出する
ようにコンピュータを機能させることも好ましい。
According to another embodiment of the program of the present invention,
The internal parameter calculation means calculates the internal parameter A based on the following equation by defining the focal length in both the horizontal axis direction and the vertical axis direction of the depth camera as the same distance f.
It is also preferable to make the computer function.

本発明のプログラムにおける他の実施形態によれば、
デプスデータ取得手段は、デプス画像に映る任意の3次元物体を構成する頂点の中から、頂点間の距離が長くなるように頂点群を選択し、それぞれからデプス値(Z座標)を取得するようにコンピュータを機能させることも好ましい。
According to another embodiment of the program of the present invention,
The depth data acquisition means selects vertices from the vertices constituting an arbitrary three-dimensional object shown in the depth image so that the distance between the vertices becomes long, and acquires the depth value (Z coordinate) from each. It is also preferable to make the computer function.

本発明のプログラムにおける他の実施形態によれば、
デプスデータ取得手段は、デプス画像に映る、データベースに記憶された矩形マーカの頂点を、ユーザによって又は画像算出によって算出し、デプス画像の一点(ud,vd)として特定し、
当該矩形マーカ画像に基づいて設定された世界座標系の一点(Xw,Yw,Zw)をデータベースから取得する世界座標算出手段と、
デプス画像の点座標(ud,vd)と、内部パラメータAdと、世界座標系の点座標(Xw,Yw,Zw)とを用いて、以下の式によって世界座標系からデプスカメラ座標系への変換行列Wd,wを外部パラメータとして算出する外部パラメータ算出手段と
してコンピュータを更に機能させることも好ましい。
According to another embodiment of the program of the present invention,
The depth data acquisition means calculates the vertex of the rectangular marker stored in the database, which is reflected in the depth image, by the user or by image calculation, and identifies it as one point (ud, vd) of the depth image,
World coordinate calculation means for acquiring one point (Xw, Yw, Zw) of the world coordinate system set based on the rectangular marker image from the database;
Using the point coordinates (ud, vd) of the depth image, the internal parameters Ad, and the point coordinates (Xw, Yw, Zw) of the world coordinate system, conversion from the world coordinate system to the depth camera coordinate system is performed using the following formula. An external parameter calculating means for calculating the matrix Wd, w as an external parameter;
It is also preferable to make the computer further function.

本発明のプログラムにおける他の実施形態によれば、
デプスカメラは、対応関係が取得できる第1のRGBカメラと共に搭載されており、
世界座標算出手段は、デプス画像の各座標に対して対応するRGB値を格納し、その色情報に基づいて矩形マーカ画像の頂点を検出する
ようにコンピュータを更に機能させることも好ましい。
According to another embodiment of the program of the present invention,
The depth camera is mounted with the first RGB camera that can acquire the correspondence,
It is also preferable that the world coordinate calculation means further stores the RGB value corresponding to each coordinate of the depth image and further causes the computer to detect the vertex of the rectangular marker image based on the color information.

本発明のプログラムにおける他の実施形態によれば、
装置は、デプスカメラと第2のRGBカメラとを搭載しており、
デプスカメラ座標系を、第2のRGBカメラの座標系への変換行列Wc,dを、以下の式によって算出する変換行列算出手段と
Wc,d=Wc,w・Wd,w -1
Wc,w:世界座標系から第2のRGBカメラ座標系への外部パラメータ
Wd,w -1:世界座標系からデプスカメラ座標系への外部パラメータの逆行列
してコンピュータを更に機能させることも好ましい。
According to another embodiment of the program of the present invention,
The device is equipped with a depth camera and a second RGB camera,
Conversion matrix calculation means for calculating a transformation matrix Wc, d from the depth camera coordinate system to the coordinate system of the second RGB camera by the following formula: Wc, d = Wc, w · Wd, w −1
Wc, w: External parameter from the world coordinate system to the second RGB camera coordinate system Wd, w -1 : It is also preferable that the computer further function by performing an inverse matrix of the external parameters from the world coordinate system to the depth camera coordinate system. .

本発明のプログラムにおける他の実施形態によれば、
デプスカメラで取得した一点Xdを、第2のRGBカメラの一点(uc,vc)とを、以下の式で対応付けることにより、RGB情報付きのポイントクラウドデータを取得する外部RGBポイントクラウドデータ取得手段と
Ac・Wc,d・Xd
してコンピュータを更に機能させることも好ましい。
According to another embodiment of the program of the present invention,
External RGB point cloud data acquisition means for acquiring point cloud data with RGB information by associating one point Xd acquired by the depth camera with one point (uc, vc) of the second RGB camera by the following equation: Ac ・ Wc, d ・ Xd
It is also preferable to make the computer further function.

本発明によれば、デプスカメラ(深度センサ)を有し、当該デプスカメラの内部パラメータを算出する装置であって、
デプスカメラから、デプス画像の点座標(ud,vd)とデプス値(Z座標)との組を取得するデプスデータ取得手段と、
データベースを用いて、デプス画像の点座標(ud,vd)及びデプス値(Z座標)から、ポイントクラウドデータの3次元座標(X,Y,Z)を取得するポイントクラウドデータ取得手段と、
デプス画像の点座標(ud,vd)と、ポイントクラウドデータの3次元座標(X,Y,Z)との組を線形で対応付ける変換パラメータを、デプスカメラの内部パラメータとして算出する内部パラメータ算出手段と
を有することを特徴とする。
According to the present invention, there is provided a device that has a depth camera (depth sensor) and calculates internal parameters of the depth camera,
Depth data acquisition means for acquiring a set of point coordinates (ud, vd) and depth values (Z coordinates) of the depth image from the depth camera;
Point cloud data acquisition means for acquiring the three-dimensional coordinates (X, Y, Z) of the point cloud data from the point coordinates (ud, vd) and the depth value (Z coordinates) of the depth image using a database;
An internal parameter calculation means for calculating, as an internal parameter of the depth camera, a conversion parameter for linearly associating a set of point coordinates (ud, vd) of the depth image and three-dimensional coordinates (X, Y, Z) of the point cloud data; It is characterized by having.

本発明によれば、デプスカメラ(深度センサ)を有する装置を用いて、当該デプスカメラの内部パラメータを算出する装置の内部パラメータ算出方法であって、
デプスカメラから、デプス画像の点座標(ud,vd)とデプス値(Z座標)との組を取得する第1のステップと、
データベースを用いて、デプス画像の点座標(ud,vd)及びデプス値(Z座標)から、ポイントクラウドデータの3次元座標(X,Y,Z)を取得する第2のステップと、
デプス画像の点座標(ud,vd)と、ポイントクラウドデータの3次元座標(X,Y,Z)との組を線形で対応付ける変換パラメータを、デプスカメラの内部パラメータとして算出する第3のステップと
を実行することを特徴とする。
According to the present invention, there is provided an internal parameter calculation method of an apparatus for calculating an internal parameter of the depth camera using an apparatus having a depth camera (depth sensor),
A first step of acquiring a set of point coordinates (ud, vd) and depth values (Z coordinates) of the depth image from the depth camera;
A second step of acquiring the three-dimensional coordinates (X, Y, Z) of the point cloud data from the point coordinates (ud, vd) and the depth values (Z coordinates) of the depth image using a database;
A third step of calculating, as an internal parameter of the depth camera, a conversion parameter for linearly associating a set of point coordinates (ud, vd) of the depth image and three-dimensional coordinates (X, Y, Z) of the point cloud data; It is characterized by performing.

本発明のプログラム、装置及び方法によれば、例えばチェスボードのような特有の撮影操作を伴うキャリブレーションを実行することなく、できる限り少数の点対応で、デプスカメラの内部パラメータを算出することができる。
この内部パラメータを用いることによって、デプスカメラの外部パラメータを、できる限り少数の点対応から、高精度に算出することができる。結果として、デプスカメラ及びRGBカメラが同一筐体をなすRGB−Dカメラを用いる場合や、デプスカメラと別途設置した外部のRGBカメラとを連携させる場合に、高精度なRGB情報付きポイントクラウドデータを算出することができる。
According to the program, the apparatus, and the method of the present invention, it is possible to calculate the internal parameters of the depth camera in correspondence with as few points as possible without executing calibration with a specific photographing operation such as a chess board. it can.
By using these internal parameters, the external parameters of the depth camera can be calculated with high accuracy from as few points as possible. As a result, when using an RGB-D camera in which the depth camera and the RGB camera form the same housing, or when linking a depth camera and an external RGB camera installed separately, highly accurate point cloud data with RGB information is obtained. Can be calculated.

RGB−DカメラにおけるデプスカメラとRGBカメラとのカメラ座標の対応関係を表す説明図である。It is explanatory drawing showing the correspondence of the camera coordinate of the depth camera and RGB camera in a RGB-D camera. ロボットビジョン装置の外観図である。It is an external view of a robot vision device. デプスカメラの内部パラメータを、チェスボードを用いて算出する説明図である。It is explanatory drawing which calculates the internal parameter of a depth camera using a chess board. 外部パラメータを推定する際の矩形マーカの検出処理を表す説明図である。It is explanatory drawing showing the detection process of the rectangular marker at the time of estimating an external parameter. 本発明における撮影装置の機能構成図である。It is a functional block diagram of the imaging device in this invention. RGB−Dカメラと外部RGBカメラとの間でカメラ座標の対応関係を表す説明図である。It is explanatory drawing showing the correspondence of a camera coordinate between an RGB-D camera and an external RGB camera.

以下、本発明の実施の形態について、図面を用いて詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図5は、本発明における撮影装置の機能構成図である。   FIG. 5 is a functional configuration diagram of the photographing apparatus according to the present invention.

図5によれば、撮影装置としてのロボットビジョン装置は、RGB−Dカメラ101と、全方位RGBカメラ102とを搭載する。本発明によれば、RGB−Dカメラ101のデプスカメラにおける内部パラメータを算出することができる。また、RGB−Dカメラ101のデプスカメラにおける外部パラメータも算出することができる。更に、RGB−Dカメラ101のデプス画像と全方位RGBカメラ102のRGB画像との間で、座標の対応関係を表す変換行列を算出することもできる。
尚、本発明によれば、市販のRGB−Dカメラを用いることを必須とするものではなく、単体のデプスカメラであっても、内部パラメータの算出に用いることができる。
According to FIG. 5, the robot vision device as the photographing device includes an RGB-D camera 101 and an omnidirectional RGB camera 102. According to the present invention, internal parameters in the depth camera of the RGB-D camera 101 can be calculated. In addition, external parameters in the depth camera of the RGB-D camera 101 can also be calculated. Furthermore, it is possible to calculate a conversion matrix that represents the coordinate relationship between the depth image of the RGB-D camera 101 and the RGB image of the omnidirectional RGB camera 102.
According to the present invention, it is not essential to use a commercially available RGB-D camera, and even a single depth camera can be used to calculate internal parameters.

本発明の撮影装置1は、ポイントクラウドデータベース11と、デプスデータ取得部12と、ポイントクラウドデータ取得部13と、内部パラメータ算出部14とを有する。また、撮影装置1は、世界座標算出部15と、外部パラメータ算出部16と、変換行列算出部17と、外部RGBポイントクラウドデータ取得部18とを有する。これら機能構成部は、撮影装置に搭載されたコンピュータを機能させるプログラムを実行することによって実現できる。また、これら機能構成部の処理の流れは、内部/外部パラメータの算出方法としても理解できる。   The photographing apparatus 1 of the present invention includes a point cloud database 11, a depth data acquisition unit 12, a point cloud data acquisition unit 13, and an internal parameter calculation unit 14. In addition, the photographing apparatus 1 includes a world coordinate calculation unit 15, an external parameter calculation unit 16, a conversion matrix calculation unit 17, and an external RGB point cloud data acquisition unit 18. These functional components can be realized by executing a program that causes a computer mounted on the photographing apparatus to function. The processing flow of these functional components can also be understood as a method for calculating internal / external parameters.

[ポイントクラウドデータベース11]
ポイントクラウドデータベース11は、デプス画像の点座標(ud,vd)とデプス値(Z座標)について、デプスカメラ座標系(3次元空間)の対応点(X、Y,Z)の点群を、ルックアップテーブルとして記憶したデータベースである。又は、デプス画像の点座標(ud,vd)及びデプス値(Z座標)が入力された際に、その都度、対応点を算出するものであってもよい。
[Point cloud database 11]
The point cloud database 11 looks up the point cloud of the corresponding point (X, Y, Z) of the depth camera coordinate system (three-dimensional space) for the point coordinates (ud, vd) and the depth value (Z coordinate) of the depth image. It is a database stored as an uptable. Alternatively, when the point coordinates (ud, vd) and the depth value (Z coordinate) of the depth image are input, the corresponding points may be calculated each time.

[デプスデータ取得部12]
デプスデータ取得部12は、RGB−Dカメラ101のデプスカメラから、デプス画像の点座標(ud,vd)とデプス値(Z座標)との組を取得する。取得した点対応を、ポイントクラウドデータ取得部13へ出力する。ここで取得される点対応は、デプス画像上で広範囲の適当な位置から取得した必要数だけの点対応であってもよい。即ち、デプス画像に映る任意の3次元物体を構成する頂点の中から、頂点間の距離が長くなるように頂点群を選択し、それぞれからデプス値(Z座標)を取得するものであってもよい。勿論、デプス値が取得できた全ての点対応であってもよい。
[Depth data acquisition unit 12]
The depth data acquisition unit 12 acquires a set of point coordinates (ud, vd) and depth values (Z coordinates) of the depth image from the depth camera of the RGB-D camera 101. The acquired point correspondence is output to the point cloud data acquisition unit 13. The point correspondence acquired here may be the required number of point correspondences acquired from a wide range of appropriate positions on the depth image. That is, even if the vertex group is selected so that the distance between the vertices becomes long from the vertices constituting an arbitrary three-dimensional object reflected in the depth image, and the depth value (Z coordinate) is acquired from each vertex group. Good. Of course, it may correspond to all points for which depth values have been acquired.

[ポイントクラウドデータ取得部13]
ポイントクラウドデータ取得部13は、ポイントクラウドデータベース11を用いて、デプス画像の点座標(ud,vd)及びデプス値(Z座標)から、デプスカメラ座標系の3次元座標(X,Y,Z)を取得する。即ち、デプス画像上の1点座標とそのデプス値(Z座標)とを入力することによって、ポイントクラウドデータベース11からポイントクラウドデータの3次元座標(X,Y,Z)が取得される。
[Point cloud data acquisition unit 13]
The point cloud data acquisition unit 13 uses the point cloud database 11 to calculate the three-dimensional coordinates (X, Y, Z) of the depth camera coordinate system from the point coordinates (ud, vd) and the depth value (Z coordinates) of the depth image. To get. That is, by inputting one point coordinate on the depth image and its depth value (Z coordinate), the three-dimensional coordinates (X, Y, Z) of the point cloud data are acquired from the point cloud database 11.

他の実施形態として、デプスデータ取得部12は、マーカ画像記憶部に記憶された矩形マーカ画像をデプス画像から取得し、当該矩形マーカ画像の頂点を、ユーザによって又は画像算出によって当該デプス画像の頂点として特定する。被写体となる矩形マーカ画像は、任意のものであってよい。   As another embodiment, the depth data acquisition unit 12 acquires the rectangular marker image stored in the marker image storage unit from the depth image, and the vertex of the rectangular marker image is obtained by the user or by image calculation. As specified. The rectangular marker image that is the subject may be arbitrary.

[内部パラメータ算出部14]
内部パラメータ算出部14は、デプス画像の点座標(ud,vd)と、ポイントクラウドデータの3次元座標(X,Y,Z)との組を線形で対応付ける変換パラメータを、デプスカメラの内部パラメータとして算出する。
[Internal parameter calculation unit 14]
The internal parameter calculation unit 14 uses, as an internal parameter of the depth camera, a conversion parameter that linearly associates a set of the point coordinates (ud, vd) of the depth image and the three-dimensional coordinates (X, Y, Z) of the point cloud data. calculate.

ここで、内部パラメータ算出部14は、以下の2つの実施形態を用いて、内部パラメータを算出することができる。
<ピンホールカメラモデルに基づく第1の内部パラメータ算出方法>
<光軸のずれを画像中心と規定した第2の内部パラメータ算出方法>
Here, the internal parameter calculation unit 14 can calculate the internal parameter using the following two embodiments.
<First internal parameter calculation method based on pinhole camera model>
<Second Internal Parameter Calculation Method Defining Optical Axis Deviation as Image Center>

<ピンホールカメラモデルに基づく第1の内部パラメータ算出方法>
内部パラメータ算出部14は、点座標(ud,vd)とデプス値(X,Y,Z)とを少なくとも2組を用いて、ピンホールカメラモデルに基づく以下の式によって、デプスカメラの内部パラメータAを算出する。
s:スケール係数
Ad:デプスカメラの内部パラメータ
fu:デプスカメラのu軸に対する焦点距離
fv:デプスカメラのv軸に対する焦点距離
Cu:デプスカメラのu軸に対する光軸ずれ
Cv:デプスカメラのv軸に対する光軸ずれ
<First internal parameter calculation method based on pinhole camera model>
The internal parameter calculation unit 14 uses at least two sets of point coordinates (ud, vd) and depth values (X, Y, Z), and calculates the internal parameter A of the depth camera by the following formula based on the pinhole camera model. Is calculated.
s: scale factor Ad: internal parameter of depth camera fu: focal length with respect to u-axis of depth camera fv: focal length with respect to v-axis of depth camera Cu: optical axis deviation with respect to u-axis of depth camera Cv: with respect to v-axis of depth camera Optical axis misalignment

前述の式によれば、1組の点対応(ud,vd)(X,Y,Z)から、未知パラメータ(fu,fv,cu,cv)を算出するべく2つの観測方程式が得られる。この観測方程式は、未知パラメータに対して線形であるため、最少2組の点対応から、4つの未知パラメータ(fu,fv,cu,cv)を、線型最小二乗法によって算出することができる。また、RANSAC(RAndom SAmple Consensus)のロバスト算出アルゴリズムを用いてもよい。   According to the above equation, two observation equations are obtained to calculate the unknown parameter (fu, fv, cu, cv) from a set of point correspondences (ud, vd) (X, Y, Z). Since this observation equation is linear with respect to the unknown parameters, four unknown parameters (fu, fv, cu, cv) can be calculated by the linear least square method from a minimum of two pairs of points. Alternatively, a RANSAC (RAndom SAmple Consensus) robust calculation algorithm may be used.

<光軸のずれを画像中心と規定した第2の内部パラメータ算出方法>
内部パラメータ算出部14は、点座標(ud,vd)とデプス値(Z座標)とを少なくとも1組を用いて、光軸のずれを画像中心と規定することによって、画像サイズをw×hとして、以下の式に基づく内部パラメータAを算出する。
Ad:デプスカメラの内部パラメータ
w:画像の横幅
h:画像の縦幅
w/2 and h/2:画像中心
これは、投影中心の位置を、焦点距離(fu,fv)と光軸のずれ(Cu,Cv)とによって定めたものである。
<Second Internal Parameter Calculation Method Defining Optical Axis Deviation as Image Center>
The internal parameter calculation unit 14 uses at least one set of point coordinates (ud, vd) and depth values (Z coordinates) to define the optical axis shift as the image center, thereby setting the image size to w × h. The internal parameter A based on the following formula is calculated.
Ad: Internal parameter of depth camera w: Horizontal width of image h: Vertical width of image w / 2 and h / 2: Image center This is the position of the projection center, the focal length (fu, fv) and the optical axis shift ( Cu, Cv).

第2の内部パラメータ算出方法について、内部パラメータ算出部14は、デプスカメラの横軸方向及び縦軸方向の両方の焦点距離を、同一距離f(=fu=fv)と規定することによって、以下の式に基づく内部パラメータAdを算出するものであってもよい。
Ad:デプスカメラの内部パラメータ
Regarding the second internal parameter calculation method, the internal parameter calculation unit 14 defines the following focal lengths in the horizontal axis direction and the vertical axis direction of the depth camera as the same distance f (= fu = fv). The internal parameter Ad based on the equation may be calculated.
Ad: Internal parameters of depth camera

[世界座標算出部15]
世界座標算出部15は、RGB画像に映る矩形マーカ画像に対する世界座標系の点座標(Xw,Yw,Zw)を取得する。世界座標系の4点として矩形マーカの四隅を定義して、デプス画像中の対応点をユーザがポインティングしてもよい。また、デプス値の濃淡情報を利用して画像処理によって検出するものであってもよい。
[World Coordinate Calculation Unit 15]
The world coordinate calculation unit 15 acquires point coordinates (Xw, Yw, Zw) of the world coordinate system for the rectangular marker image shown in the RGB image. The four corners of the rectangular marker may be defined as four points in the world coordinate system, and the user may point to corresponding points in the depth image. Further, it may be detected by image processing using depth information.

また、デフォルト値として与えられたデプス画像とRGB画像間の対応関係を用いて、デプス画像の各座標に対応するRGB値を格納することで、矩形マーカの四隅を正確にポインティングできるようにしてもよい。また、色情報を用いたマーカ検出アルゴリズムを適用してもよい(例えば非特許文献3参照)。   Further, by storing the RGB values corresponding to the coordinates of the depth image using the correspondence relationship between the depth image and the RGB image given as default values, it is possible to accurately point the four corners of the rectangular marker. Good. In addition, a marker detection algorithm using color information may be applied (see, for example, Non-Patent Document 3).

他の実施形態として、デプスデータ取得部11が、デプス画像の濃淡情報に基づいて矩形マーカ画像の頂点を検出した場合、世界座標算出部16は、デプス画像の各座標に対して対応するRGB値を格納し、その色情報に基づいて矩形マーカ画像の頂点を検出する。   As another embodiment, when the depth data acquisition unit 11 detects the vertex of the rectangular marker image based on the density information of the depth image, the world coordinate calculation unit 16 selects the corresponding RGB value for each coordinate of the depth image. And the vertex of the rectangular marker image is detected based on the color information.

[外部パラメータ算出部16]
外部パラメータ算出部16は、デプスデータ取得部12からデプス画像の点座標(ud,vd)を入力し、内部パラメータ算出部14から内部パラメータAdを入力し、世界座標算出部15から世界座標系(Xw,Yw,Zw)を入力する。そして、以下の式によって世界座標系からデプスカメラ座標系への変換行列Wd,wを外部パラメータとして算出する。
これは、PnPアルゴリズムを用いることによって、最少4組の点対応から、外部パラメータを算出することができる。
[External parameter calculation unit 16]
The external parameter calculation unit 16 inputs the point coordinates (ud, vd) of the depth image from the depth data acquisition unit 12, inputs the internal parameter Ad from the internal parameter calculation unit 14, and receives a global coordinate system ( Xw, Yw, Zw). Then, the transformation matrix Wd, w from the world coordinate system to the depth camera coordinate system is calculated as an external parameter by the following equation.
In this case, by using the PnP algorithm, it is possible to calculate external parameters from a minimum of four pairs of points.

これによって、RGB−Dカメラ101について、少数の点対応から、デプスカメラの外部パラメータを算出することができる。   Thereby, the external parameters of the depth camera can be calculated from the RGB-D camera 101 from a small number of points.

図6は、RGB−Dカメラと外部RGBカメラとの間でカメラ座標の対応関係を表す説明図である。   FIG. 6 is an explanatory diagram showing the correspondence of camera coordinates between the RGB-D camera and the external RGB camera.

図6によれば、デプス画像の座標(ud,vd)及びデプス値(Z座標)と、RGB画像中の座標(uc,vc)とが対応付けられることが理解できる。RGBカメラとデプスカメラを連携させる場合に、デプスカメラの内部パラメータについてチェスボードを用いたキャリブレーションを別途実行することなく、広範囲のRGB情報付き3次元モデルを高精度に生成することができる。   According to FIG. 6, it can be understood that the coordinates (ud, vd) and depth values (Z coordinates) of the depth image are associated with the coordinates (uc, vc) in the RGB image. When the RGB camera and the depth camera are linked, a three-dimensional model with a wide range of RGB information can be generated with high accuracy without separately performing calibration using a chess board for the internal parameters of the depth camera.

尚、ポイントクラウドデータには、奥行き方向にのみ測定誤差を含む場合が多い。
1:ポイントクラウドデータの真値
X'1:測定誤差を含むポイントクラウドデータの値
このとき、図6のように、X'1は、X1と(ud,vd)とを結ぶ投影上に乗っているために、奥行き方向の測定誤差は、内部パラメータを算出する際に問題とならない。
Note that the point cloud data often includes measurement errors only in the depth direction.
X 1 : True value of point cloud data X ′ 1 : Value of point cloud data including measurement error At this time, X ′ 1 is on the projection connecting X 1 and (ud, vd) as shown in FIG. Due to the riding, the measurement error in the depth direction does not pose a problem when calculating the internal parameters.

[変換行列算出部17]
変換行列算出部17は、デプスカメラ座標系を、全方位RGBカメラ(第2のRGBカメラ)の座標系への変換行列(相対位置姿勢)Wc,dを、以下の式によって算出する。
Wc,d=Wc,w・Wd,w-1
Wc,w:世界座標系から第2のRGBカメラ座標系への外部パラメータ
Wd,w-1:世界座標系からデプスカメラ座標系への外部パラメータの逆行列
尚、Wc,w及びWd,wを算出するために必要な点対応の数は、各カメラの内部パラメータ(焦点距離と光軸のずれ)が既知か否かによって異なる。
[Conversion matrix calculation unit 17]
The transformation matrix calculation unit 17 calculates a transformation matrix (relative position and orientation) Wc, d from the depth camera coordinate system to the coordinate system of the omnidirectional RGB camera (second RGB camera) by the following equation.
Wc, d = Wc, w · Wd, w -1
Wc, w: external parameter from the world coordinate system to the second RGB camera coordinate system Wd, w −1 : inverse matrix of external parameters from the world coordinate system to the depth camera coordinate system W c, w and W d, The number of point correspondences necessary for calculating w differs depending on whether or not the internal parameters (focal length and optical axis deviation) of each camera are known.

[外部RGBポイントクラウドデータ取得部18]
外部RGBポイントクラウドデータ取得部18は、変換行列算出部17によって算出された変換行列Wc,dを入力し、以下の式を用いて、デプスカメラで取得した一点Xdと、第2のRGBカメラの一点(uc,vc)とを対応付けることによって、RGB情報付きのポイントクラウドデータを取得する。
Ac・Wc,d・Xd
Ac:全方位RGBカメラの内部パラメータの行列
Wc,d:デプスカメラ座標系から全方位RGBカメラ座標系への変換行列
Xd:デプスカメラ座標系における1点(3次元座標)
[External RGB point cloud data acquisition unit 18]
The external RGB point cloud data acquisition unit 18 receives the conversion matrix Wc, d calculated by the conversion matrix calculation unit 17 and uses the following equation to obtain the single point Xd acquired by the depth camera and the second RGB camera. Point cloud data with RGB information is acquired by associating it with one point (uc, vc).
Ac ・ Wc, d ・ Xd
Ac: Matrix of internal parameters of omnidirectional RGB camera Wc, d: Conversion matrix from depth camera coordinate system to omnidirectional RGB camera coordinate system Xd: One point (3D coordinates) in depth camera coordinate system

以上、詳細に説明したように、本発明のプログラム、装置及び方法によれば、例えばチェスボードのような特有の撮影操作を伴うキャリブレーションを実行することなく、できる限り少数の点対応で、デプスカメラの内部パラメータを算出することができる。
この内部パラメータを用いることによって、デプスカメラの外部パラメータを、できる限り少数の点対応から、高精度に算出することができる。結果として、デプスカメラとRGBカメラが同一筐体をなすRGB−Dカメラを用いる場合や、デプスカメラと別途設置した外部のRGBカメラとを連携させる場合に、高精度なRGB情報付きポイントクラウドデータを算出することができる。
As described above in detail, according to the program, the apparatus, and the method of the present invention, the depth can be dealt with as few points as possible without performing calibration with a specific photographing operation such as a chess board. The camera internal parameters can be calculated.
By using these internal parameters, the external parameters of the depth camera can be calculated with high accuracy from as few points as possible. As a result, when using an RGB-D camera in which the depth camera and RGB camera form the same housing, or when linking a depth camera and an external RGB camera installed separately, highly accurate point cloud data with RGB information is obtained. Can be calculated.

具体的に、従来技術における外部パラメータの算出については、少なくとも6組の点対応が必要であって、高い精度では10組以上の点対応が必要となる。チェスボードを用いて事前に内部パラメータを算出している場合は、4組の点対応が必要となる。
これに対し、本発明によれば、任意物体を撮影するだけで内部パラメータを算出できる。そのため、チェスボードといった特殊な被写体を用意する手間をかけることなく、少なくとも4組の点対応で、デプスカメラの外部パラメータを算出することができる。
Specifically, in the calculation of external parameters in the prior art, at least 6 sets of point correspondences are necessary, and with high accuracy, 10 pairs or more point correspondences are necessary. When internal parameters are calculated in advance using a chess board, four points of correspondence are required.
On the other hand, according to the present invention, the internal parameters can be calculated simply by photographing an arbitrary object. Therefore, the external parameters of the depth camera can be calculated with at least four pairs of points without taking the trouble of preparing a special subject such as a chess board.

前述した本発明の種々の実施形態について、本発明の技術思想及び見地の範囲の種々の変更、修正及び省略は、当業者によれば容易に行うことができる。前述の説明はあくまで例であって、何ら制約しようとするものではない。本発明は、特許請求の範囲及びその均等物として限定するものにのみ制約される。   Various changes, modifications, and omissions of the above-described various embodiments of the present invention can be easily made by those skilled in the art. The above description is merely an example, and is not intended to be restrictive. The invention is limited only as defined in the following claims and the equivalents thereto.

1 撮影装置
101 RGB−Dカメラ
102 全方位RGBカメラ
11 ポイントクラウドデータベース
12 デプスデータ取得部
13 ポイントクラウドデータ取得部
14 内部パラメータ算出部
15 世界座標算出部
16 外部パラメータ算出部
17 変換行列算出部
DESCRIPTION OF SYMBOLS 1 Imaging device 101 RGB-D camera 102 Omnidirectional RGB camera 11 Point cloud database 12 Depth data acquisition part 13 Point cloud data acquisition part 14 Internal parameter calculation part 15 World coordinate calculation part 16 External parameter calculation part 17 Conversion matrix calculation part

Claims (11)

デプスカメラ(深度センサ)を有する装置に搭載されたコンピュータを、当該デプスカメラの内部パラメータを算出するように機能させるプログラムであって、
前記デプスカメラから、デプス画像の点座標(ud,vd)とデプス値(Z座標)との組を取得するデプスデータ取得手段と、
データベースを用いて、前記デプス画像の点座標(ud,vd)及びデプス値(Z座標)から、デプスカメラ座標系の3次元座標(X,Y,Z)を取得するポイントクラウドデータ取得手段と、
前記デプス画像の点座標(ud,vd)と、前記ポイントクラウドデータの3次元座標(X,Y,Z)との組を線形で対応付ける変換パラメータを、前記デプスカメラの内部パラメータとして算出する内部パラメータ算出手段と
してコンピュータを機能させることを特徴とするプログラム。
A program for causing a computer mounted on a device having a depth camera (depth sensor) to function to calculate an internal parameter of the depth camera,
Depth data acquisition means for acquiring a set of point coordinates (ud, vd) and depth values (Z coordinates) of the depth image from the depth camera;
Point cloud data acquisition means for acquiring the three-dimensional coordinates (X, Y, Z) of the depth camera coordinate system from the point coordinates (ud, vd) and the depth values (Z coordinates) of the depth image using a database;
An internal parameter for calculating, as an internal parameter of the depth camera, a conversion parameter that linearly associates a set of the point coordinates (ud, vd) of the depth image and the three-dimensional coordinates (X, Y, Z) of the point cloud data A program that causes a computer to function as calculation means.
前記内部パラメータ算出手段は、点座標(ud,vd)とデプス値(Z座標)とを少なくとも2組を用いて、ピンホールカメラモデルに基づく以下の式によって、前記デプスカメラの内部パラメータAdを算出する
s:スケール係数
Ad:デプスカメラの内部パラメータ
fu:デプスカメラのu軸に対する焦点距離
fv:デプスカメラのv軸に対する焦点距離
Cu:デプスカメラのu軸に対する光軸ずれ
Cv:デプスカメラのv軸に対する光軸ずれ
ようにコンピュータを機能させることを特徴とする請求項1に記載のプログラム。
The internal parameter calculation means calculates the internal parameter Ad of the depth camera by using the following formula based on a pinhole camera model using at least two sets of point coordinates (ud, vd) and depth values (Z coordinates). Do
s: scale factor Ad: internal parameter of depth camera fu: focal length with respect to u-axis of depth camera fv: focal length with respect to v-axis of depth camera Cu: optical axis deviation with respect to u-axis of depth camera Cv: with respect to v-axis of depth camera The program according to claim 1, wherein the computer functions so as to shift an optical axis.
前記内部パラメータ算出手段は、点座標(ud,vd)とデプス値(Z座標)とを少なくとも1組を用いて、光軸のずれを画像中心と規定することによって、画像サイズをw×hとして、以下の式に基づく内部パラメータAdを算出する
ようにコンピュータを機能させることを特徴とする請求項2に記載のプログラム。
The internal parameter calculation means uses at least one set of point coordinates (ud, vd) and depth values (Z coordinates), and defines the optical axis shift as the image center, thereby setting the image size to w × h. The internal parameter Ad based on the following formula is calculated
The program according to claim 2, wherein the computer functions as described above.
前記内部パラメータ算出手段は、前記デプスカメラの横軸方向及び縦軸方向の両方の焦点距離を、同一距離fと規定することによって、以下の式に基づく内部パラメータAを算出する
ようにコンピュータを機能させることを特徴とする請求項2又は3に記載のプログラム。
The internal parameter calculation means calculates an internal parameter A based on the following equation by defining the focal length in both the horizontal axis direction and the vertical axis direction of the depth camera as the same distance f.
The program according to claim 2 or 3, wherein the computer functions as described above.
前記デプスデータ取得手段は、デプス画像に映る任意の3次元物体を構成する頂点の中から、頂点間の距離が長くなるように頂点群を選択し、それぞれから前記デプス値(Z座標)を取得するようにコンピュータを機能させることを特徴とする請求項1から4のいずれか1項に記載のプログラム。   The depth data acquisition means selects a vertex group so that the distance between the vertices becomes long from vertices constituting an arbitrary three-dimensional object shown in the depth image, and acquires the depth value (Z coordinate) from each. The program according to any one of claims 1 to 4, wherein the computer is caused to function. 前記デプスデータ取得手段は、デプス画像に映る、データベースに記憶された矩形マーカの頂点を、ユーザによって又は画像算出によって算出し、デプス画像の一点(ud,vd)として特定し、
当該矩形マーカ画像に基づいて設定された世界座標系の一点(Xw,Yw,Zw)をデータベースから取得する世界座標算出手段と、
前記デプス画像の点座標(ud,vd)と、前記内部パラメータAdと、前記世界座標系の点座標(Xw,Yw,Zw)とを用いて、以下の式によって世界座標系からデプスカメラ座標系への変換行列Wd,wを外部パラメータとして算出する外部パラメータ算出手段と
してコンピュータを更に機能させることを特徴とする請求項1から5のいずれか1項に記載のプログラム。
The depth data acquisition means calculates the vertex of the rectangular marker stored in the database, which is reflected in the depth image, by the user or by image calculation, and identifies it as one point (ud, vd) of the depth image,
World coordinate calculation means for acquiring one point (Xw, Yw, Zw) of the world coordinate system set based on the rectangular marker image from the database;
Using the point coordinates (ud, vd) of the depth image, the internal parameters Ad, and the point coordinates (Xw, Yw, Zw) of the world coordinate system, the following expression is used to calculate the depth camera coordinate system from the world coordinate system. An external parameter calculation means for calculating the transformation matrix Wd, w into the external parameter;
The program according to claim 1, further causing the computer to function.
前記デプスカメラは、対応関係が取得できる第1のRGBカメラと共に搭載されており、
前記世界座標算出手段は、デプス画像の各座標に対して対応するRGB値を格納し、その色情報に基づいて前記矩形マーカ画像の頂点を検出する
ようにコンピュータを更に機能させることを特徴とする請求項6に記載のプログラム。
The depth camera is mounted together with a first RGB camera that can acquire the correspondence relationship,
The world coordinate calculation means stores RGB values corresponding to the coordinates of the depth image, and further causes the computer to function to detect the vertex of the rectangular marker image based on the color information. The program according to claim 6.
前記装置は、前記デプスカメラと第2のRGBカメラとを搭載しており、
前記デプスカメラ座標系を、第2のRGBカメラの座標系への変換行列Wc,dを、以下の式によって算出する変換行列算出手段と
Wc,d=Wc,w・Wd,w -1
Wc,w:世界座標系から第2のRGBカメラ座標系への外部パラメータ
Wd,w -1:世界座標系からデプスカメラ座標系への外部パラメータの逆行列
してコンピュータを更に機能させることを特徴とする請求項6又は7に記載のプログラム。
The apparatus is equipped with the depth camera and a second RGB camera,
A conversion matrix calculation means for calculating a conversion matrix Wc, d from the depth camera coordinate system to the coordinate system of the second RGB camera by the following equation: Wc, d = Wc, w · Wd, w −1
Wc, w: external parameter from the world coordinate system to the second RGB camera coordinate system Wd, w −1 : an external matrix of the external parameter from the world coordinate system to the depth camera coordinate system to further function the computer The program according to claim 6 or 7.
前記デプスカメラで取得した一点Xdを、第2のRGBカメラの一点(uc,vc)とを、以下の式で対応付けることにより、RGB情報付きのポイントクラウドデータを取得する外部RGBポイントクラウドデータ取得手段と
Ac・Wc,d・Xd
してコンピュータを更に機能させることを特徴とする請求項8に記載のプログラム。
External RGB point cloud data acquisition means for acquiring point cloud data with RGB information by associating one point Xd acquired by the depth camera with one point (uc, vc) of the second RGB camera by the following expression And Ac ・ Wc, d ・ Xd
The program according to claim 8, further causing the computer to function.
デプスカメラ(深度センサ)を有し、当該デプスカメラの内部パラメータを算出する装置であって、
前記デプスカメラから、デプス画像の点座標(ud,vd)とデプス値(Z座標)との組を取得するデプスデータ取得手段と、
データベースを用いて、前記デプス画像の点座標(ud,vd)及びデプス値(Z座標)から、ポイントクラウドデータの3次元座標(X,Y,Z)を取得するポイントクラウドデータ取得手段と、
前記デプス画像の点座標(ud,vd)と、前記ポイントクラウドデータの3次元座標(X,Y,Z)との組を線形で対応付ける変換パラメータを、前記デプスカメラの内部パラメータとして算出する内部パラメータ算出手段と
を有することを特徴とする装置。
An apparatus that has a depth camera (depth sensor) and calculates internal parameters of the depth camera,
Depth data acquisition means for acquiring a set of point coordinates (ud, vd) and depth values (Z coordinates) of the depth image from the depth camera;
Point cloud data acquisition means for acquiring the three-dimensional coordinates (X, Y, Z) of the point cloud data from the point coordinates (ud, vd) and the depth value (Z coordinates) of the depth image using a database;
An internal parameter for calculating, as an internal parameter of the depth camera, a conversion parameter that linearly associates a set of the point coordinates (ud, vd) of the depth image and the three-dimensional coordinates (X, Y, Z) of the point cloud data And a calculating means.
デプスカメラ(深度センサ)を有する装置を用いて、当該デプスカメラの内部パラメータを算出する装置の内部パラメータ算出方法であって、
前記デプスカメラから、デプス画像の点座標(ud,vd)とデプス値(Z座標)との組を取得する第1のステップと、
データベースを用いて、前記デプス画像の点座標(ud,vd)及びデプス値(Z座標)から、ポイントクラウドデータの3次元座標(X,Y,Z)を取得する第2のステップと、
前記デプス画像の点座標(ud,vd)と、前記ポイントクラウドデータの3次元座標(X,Y,Z)との組を線形で対応付ける変換パラメータを、前記デプスカメラの内部パラメータとして算出する第3のステップと
を実行することを特徴とする装置の内部パラメータ算出方法。
An apparatus internal parameter calculation method for calculating an internal parameter of a depth camera using an apparatus having a depth camera (depth sensor),
A first step of obtaining a set of point coordinates (ud, vd) and depth values (Z coordinates) of the depth image from the depth camera;
A second step of acquiring three-dimensional coordinates (X, Y, Z) of point cloud data from a point coordinate (ud, vd) and a depth value (Z coordinate) of the depth image using a database;
A conversion parameter for linearly associating a set of point coordinates (ud, vd) of the depth image and three-dimensional coordinates (X, Y, Z) of the point cloud data is calculated as an internal parameter of the depth camera. An internal parameter calculation method for the apparatus, characterized in that:
JP2015253435A 2015-12-25 2015-12-25 Program, apparatus and method for calculating internal parameters of depth camera Active JP6465789B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015253435A JP6465789B2 (en) 2015-12-25 2015-12-25 Program, apparatus and method for calculating internal parameters of depth camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015253435A JP6465789B2 (en) 2015-12-25 2015-12-25 Program, apparatus and method for calculating internal parameters of depth camera

Publications (2)

Publication Number Publication Date
JP2017118396A JP2017118396A (en) 2017-06-29
JP6465789B2 true JP6465789B2 (en) 2019-02-06

Family

ID=59232404

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015253435A Active JP6465789B2 (en) 2015-12-25 2015-12-25 Program, apparatus and method for calculating internal parameters of depth camera

Country Status (1)

Country Link
JP (1) JP6465789B2 (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109785376B (en) * 2017-11-15 2023-02-28 富士通株式会社 Training method of depth estimation device, depth estimation device and storage medium
KR102109814B1 (en) * 2018-10-31 2020-05-13 에스케이텔레콤 주식회사 Apparatus and method for registering images
CN111210471B (en) * 2018-11-22 2023-08-25 浙江欣奕华智能科技有限公司 Positioning method, device and system
CN109725303B (en) * 2018-12-04 2021-07-02 北京万集科技股份有限公司 Coordinate system correction method and device, and storage medium
CN109848073A (en) * 2019-02-22 2019-06-07 浙江大学滨海产业技术研究院 A kind of apparatus and method for sorting coal and gangue
CN109938841B (en) * 2019-04-11 2020-10-30 哈尔滨理工大学 Surgical instrument navigation system based on multi-view camera coordinate fusion
CN110006343B (en) * 2019-04-15 2021-02-12 Oppo广东移动通信有限公司 Method and device for measuring geometric parameters of object and terminal
CN112541950A (en) * 2019-09-20 2021-03-23 杭州海康机器人技术有限公司 Method and device for calibrating external parameter of depth camera
JP2021085679A (en) * 2019-11-25 2021-06-03 トヨタ自動車株式会社 Target device for sensor axis adjustment
CN113140008A (en) * 2020-01-17 2021-07-20 上海途擎微电子有限公司 Calibration method, image calibration method and calibration system
CN111457859B (en) * 2020-03-06 2022-12-09 奥比中光科技集团股份有限公司 Alignment calibration method and system for 3D measuring device and computer readable storage medium
CN111638159A (en) * 2020-05-29 2020-09-08 新兴铸管股份有限公司 Blast furnace raw fuel particle size detection method
CN111768370B (en) * 2020-06-03 2022-05-10 北京汉飞航空科技有限公司 Aeroengine blade detection method based on RGB-D camera
CN111915684A (en) * 2020-08-13 2020-11-10 浙江大华技术股份有限公司 Method and device for determining coordinate transformation matrix, storage medium and electronic device
CN113096027B (en) * 2021-03-02 2024-01-23 吉林农业大学 Point cloud-based farmland soil layer horizontal correction and removal method
CN113436242B (en) * 2021-07-22 2024-03-29 西安电子科技大学 Method for obtaining high-precision depth value of static object based on mobile depth camera
CN113900435B (en) * 2021-08-31 2022-09-27 深圳蓝因机器人科技有限公司 Mobile robot obstacle avoidance method, equipment, medium and product based on double cameras
CN114413958A (en) * 2021-12-28 2022-04-29 浙江大学 Monocular vision distance and speed measurement method of unmanned logistics vehicle
CN114708318B (en) * 2022-04-12 2024-05-28 西安交通大学 Unknown surface curvature measurement method based on depth camera

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002202122A (en) * 2001-01-05 2002-07-19 Olympus Optical Co Ltd Calibration method for two-dimensional distance image sensor
JP4307934B2 (en) * 2003-08-13 2009-08-05 株式会社トプコン Imaging apparatus and method with image correction function, and imaging apparatus and method
JP2015056057A (en) * 2013-09-12 2015-03-23 トヨタ自動車株式会社 Method of estimating posture and robot

Also Published As

Publication number Publication date
JP2017118396A (en) 2017-06-29

Similar Documents

Publication Publication Date Title
JP6465789B2 (en) Program, apparatus and method for calculating internal parameters of depth camera
US20200096317A1 (en) Three-dimensional measurement apparatus, processing method, and non-transitory computer-readable storage medium
JP5624394B2 (en) Position / orientation measurement apparatus, measurement processing method thereof, and program
US10068344B2 (en) Method and system for 3D capture based on structure from motion with simplified pose detection
JP4708752B2 (en) Information processing method and apparatus
JP4492654B2 (en) 3D measuring method and 3D measuring apparatus
JP6324025B2 (en) Information processing apparatus and information processing method
JP6092530B2 (en) Image processing apparatus and image processing method
WO2013008804A1 (en) Measurement device and information processing device
CN107025663A (en) It is used for clutter points-scoring system and method that 3D point cloud is matched in vision system
JP7486740B2 (en) System and method for efficient 3D reconstruction of an object using a telecentric line scan camera - Patents.com
JP2011179908A (en) Three-dimensional measurement apparatus, method for processing the same, and program
JP6282098B2 (en) Calibration apparatus and method
JPWO2021140886A5 (en)
JP2017033429A (en) Three-dimensional object inspection device
JP2016170050A (en) Position attitude measurement device, position attitude measurement method and computer program
JP5976089B2 (en) Position / orientation measuring apparatus, position / orientation measuring method, and program
JP2016148649A (en) Information processing apparatus, control method therefor, and program
WO2015159835A1 (en) Image processing device, image processing method, and program
JP2014053018A (en) Information processing device, control method for information processing device, and program
JP7420135B2 (en) Information processing device, information processing method, and program
Siddique et al. 3d object localization using 2d estimates for computer vision applications
JP2015135333A (en) Information processing device, control method for information processing device, and program
JP6486083B2 (en) Information processing apparatus, information processing method, and program
JP6890422B2 (en) Information processing equipment, control methods and programs for information processing equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180306

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181210

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: 20190108

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190108

R150 Certificate of patent or registration of utility model

Ref document number: 6465789

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150