Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7517170B2 - Calibration device and calibration method for line sensor camera - Google Patents
[go: Go Back, main page]

JP7517170B2 - Calibration device and calibration method for line sensor camera - Google Patents

Calibration device and calibration method for line sensor camera Download PDF

Info

Publication number
JP7517170B2
JP7517170B2 JP2021008589A JP2021008589A JP7517170B2 JP 7517170 B2 JP7517170 B2 JP 7517170B2 JP 2021008589 A JP2021008589 A JP 2021008589A JP 2021008589 A JP2021008589 A JP 2021008589A JP 7517170 B2 JP7517170 B2 JP 7517170B2
Authority
JP
Japan
Prior art keywords
line sensor
sensor camera
lens
dimensional
parameters
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
JP2021008589A
Other languages
Japanese (ja)
Other versions
JP2022112695A (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.)
Meidensha Corp
Original Assignee
Meidensha 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 Meidensha Corp filed Critical Meidensha Corp
Priority to JP2021008589A priority Critical patent/JP7517170B2/en
Publication of JP2022112695A publication Critical patent/JP2022112695A/en
Application granted granted Critical
Publication of JP7517170B2 publication Critical patent/JP7517170B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Image Analysis (AREA)

Description

本発明は、ラインセンサカメラのキャリブレーション装置及びキャリブレーション方法に関する。 The present invention relates to a calibration device and calibration method for a line sensor camera.

従来技術の一例である非特許文献1には、カメラのキャリブレーション方法として、エリアカメラで平面マーカを様々な位置及び姿勢で撮影することにより、撮影毎の外部パラメータ及びカメラの内部パラメータを求める技術が開示されている。 Non-Patent Document 1, an example of conventional technology, discloses a camera calibration method in which an area camera captures images of a planar marker at various positions and orientations to determine external parameters and internal camera parameters for each image.

従来技術の一例である特許文献1には、キャリブレーション用マーカを用いてラインセンサカメラの内部パラメータを校正するラインセンサカメラのキャリブレーション装置及びキャリブレーション方法が開示されている。 Patent Document 1, an example of conventional technology, discloses a calibration device and calibration method for a line sensor camera that uses calibration markers to calibrate the internal parameters of the line sensor camera.

なお、従来技術の一例である非特許文献2は、後述するレンズの歪みについて説明する文献である。 Note that Non-Patent Document 2, an example of prior art, is a document that explains lens distortion, which will be described later.

特開2016-218815号公報JP 2016-218815 A

Z. Zhang. "A Flexible New Technique for Camera Calibration", IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 22, No. 11, 2000年, pp.1330-1334.Z. Zhang. "A Flexible New Technique for Camera Calibration", IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 22, No. 11, 2000, pp.1330-1334. Richard Szeliski,玉木 徹 他,“コンピュータビジョン‐アルゴリズムと応用‐”,共立出版,2013年, pp.51Richard Szeliski, Toru Tamaki et al., "Computer Vision - Algorithms and Applications", Kyoritsu Shuppan, 2013, pp.51

しかしながら、上記の従来技術は、ピンホールカメラモデルを用いており、歪みの大きいレンズ(例えば魚眼レンズ)を備えたラインセンサカメラには適用することが困難である。 However, the above conventional technology uses a pinhole camera model, making it difficult to apply to line sensor cameras equipped with lenses that have large distortions (e.g., fisheye lenses).

本発明は、上記に鑑みてなされたものであって、歪みの大きいレンズを備えたラインセンサカメラのキャリブレーションを可能にすることを目的とする。 The present invention has been made in consideration of the above, and aims to enable the calibration of a line sensor camera equipped with a lens with large distortion.

上述の課題を解決して目的を達成する本発明の一態様は、ラインセンサカメラの撮像範囲となる2次元平面上での2次元平面座標が既知の複数の検出点を有する立体マーカを前記ラインセンサカメラでレンズを介して撮像した複数の画像に基づいて、前記ラインセンサカメラのキャリブレーション用の内部パラメータ及び外部パラメータを算出するラインセンサカメラのキャリブレーション装置であって、前記レンズに応じて複数のレンズモデルのいずれかを選択するレンズモデル選択部と、位置及び姿勢が各々異なる前記立体マーカの前記画像が各々入力される画像入力部と、前記立体マーカの前記検出点の前記画像上の1次元画像座標を前記画像毎に算出する計測座標算出部と、前記2次元平面座標から前記1次元画像座標へ変換する前記ラインセンサカメラの数式モデルに基づいて求めた変換行列について、前記変換行列における初期の内部パラメータとして既知の初期値を入力し、線形解法により前記変換行列から初期の外部パラメータを前記画像毎に算出する外部パラメータ算出部と、前記数式モデルに基づいて求めたレンズ歪みを考慮した誤差関数について、前記誤差関数に前記初期の内部パラメータ及び前記初期の外部パラメータを入力し、前記検出点の全数及び前記画像の全数についての前記誤差関数の総和が最小となる前記内部パラメータ及び前記外部パラメータを、反復計算を用いた非線形解法により算出する非線形最小二乗計算部とを有し、前記非線形最小二乗計算部は、前記レンズの歪みを補正する歪み補正計算部を有することを特徴とするラインセンサカメラのキャリブレーション装置である。 One aspect of the present invention that solves the above-mentioned problems and achieves the object is a calibration device for a line sensor camera that calculates internal and external parameters for calibration of the line sensor camera based on a plurality of images captured by the line sensor camera through a lens of a three-dimensional marker having a plurality of detection points whose two-dimensional coordinates on a two-dimensional plane that is the imaging range of the line sensor camera are known, the calibration device comprising: a lens model selection unit that selects one of a plurality of lens models according to the lens; an image input unit to which the images of the three-dimensional markers, each having a different position and orientation, are input; a measurement coordinate calculation unit that calculates one-dimensional image coordinates on the image of the detection points of the three-dimensional marker for each image; and a line sensor camera that converts the two-dimensional coordinates into the one-dimensional image coordinates. The calibration device for a line sensor camera includes an external parameter calculation unit that inputs known initial values as initial internal parameters in a transformation matrix obtained based on a mathematical model, and calculates initial external parameters from the transformation matrix for each image using a linear solution; and a nonlinear least squares calculation unit that inputs the initial internal parameters and the initial external parameters into an error function that takes lens distortion into account and calculates the internal parameters and the external parameters that minimize the sum of the error function for all the detection points and all the images using a nonlinear solution using iterative calculation, and the nonlinear least squares calculation unit includes a distortion correction calculation unit that corrects the lens distortion.

上記構成のラインセンサカメラのキャリブレーション装置において、前記立体マーカは、L字型の形状であり、L字型に折れ曲がった内側の面に前記複数の検出点が配置されていることが好ましい。 In the calibration device for a line sensor camera having the above configuration, it is preferable that the three-dimensional marker is L-shaped and the multiple detection points are arranged on the inner surface bent into the L shape.

上記構成のラインセンサカメラのキャリブレーション装置において、前記数式モデルは、魚眼レンズモデルを用いたものとすることができる。 In the calibration device for a line sensor camera having the above configuration, the mathematical model may use a fisheye lens model.

又は、上述の課題を解決して目的を達成する本発明の一態様は、ラインセンサカメラの撮像範囲となる2次元平面上での2次元平面座標が既知の複数の検出点を有する立体マーカを、レンズを介して前記ラインセンサカメラで撮像した複数の画像に基づいて、前記ラインセンサカメラのキャリブレーション用の内部パラメータ及び外部パラメータを算出するラインセンサカメラのキャリブレーション方法であって、前記レンズに応じて複数のレンズモデルのいずれかを選択するレンズモデル選択工程と、位置及び姿勢が各々異なる前記立体マーカの前記画像が各々入力される画像入力工程と、前記立体マーカの前記検出点の前記画像上の1次元画像座標を前記画像毎に算出する計測座標算出工程と、前記2次元平面座標から前記1次元画像座標へ変換する前記ラインセンサカメラの数式モデルに基づいて求めた変換行列について、前記変換行列における初期の内部パラメータとして既知の初期値を入力し、線形解法により前記変換行列から初期の外部パラメータを前記画像毎に算出する外部パラメータ算出工程と、前記レンズの歪みを補正する歪み補正計算処理工程と、前記数式モデルに基づいて求めたレンズ歪みを考慮した誤差関数について、前記誤差関数に前記初期の内部パラメータ及び前記初期の外部パラメータを入力し、前記検出点の全数及び前記画像の全数についての前記誤差関数の総和が最小となる前記内部パラメータ及び前記外部パラメータを、反復計算を用いた非線形解法により算出する非線形最小二乗計算工程とを有することを特徴とするラインセンサカメラのキャリブレーション方法である。 Alternatively, one aspect of the present invention for solving the above-mentioned problems and achieving the object is a calibration method for a line sensor camera, which calculates internal and external parameters for calibration of the line sensor camera based on a plurality of images captured by the line sensor camera through a lens of a three-dimensional marker having a plurality of detection points whose two-dimensional coordinates on a two-dimensional plane that is the imaging range of the line sensor camera are known, and includes a lens model selection step of selecting one of a plurality of lens models according to the lens, an image input step of inputting the images of the three-dimensional markers each having a different position and orientation, a measurement coordinate calculation step of calculating one-dimensional image coordinates on the image of the detection points of the three-dimensional marker for each image, and a measurement coordinate calculation step of converting the two-dimensional coordinates into the one-dimensional image coordinates. This is a calibration method for a line sensor camera, characterized by comprising: an external parameter calculation step of inputting known initial values as initial internal parameters in a transformation matrix calculated based on a mathematical model of the line sensor camera, and calculating initial external parameters from the transformation matrix for each image using a linear solution; a distortion correction calculation processing step of correcting the lens distortion; and a nonlinear least squares calculation step of inputting the initial internal parameters and the initial external parameters into an error function that takes into account the lens distortion calculated based on the mathematical model, and calculating the internal parameters and the external parameters that minimize the sum of the error function for the total number of detection points and the total number of images using a nonlinear solution using iterative calculation.

上記構成のラインセンサカメラのキャリブレーション方法において、前記立体マーカとして、L字型の形状であって、L字型に折れ曲がった内側の面に前記複数の検出点が配置されているものを用いることが好ましい。 In the calibration method for a line sensor camera having the above configuration, it is preferable that the three-dimensional marker is L-shaped and the multiple detection points are arranged on the inner surface of the L-shape.

上記構成のラインセンサカメラのキャリブレーション方法において、前記数式モデルとして、魚眼レンズモデルを用いることができる。 In the calibration method for a line sensor camera configured as above, a fisheye lens model can be used as the mathematical model.

本発明によれば、歪みの大きいレンズを備えたラインセンサカメラのキャリブレーションを行うことができる。 The present invention makes it possible to calibrate a line sensor camera equipped with a lens that has large distortion.

図1は、実施形態におけるラインセンサカメラ及びL字マーカを示す図である。FIG. 1 is a diagram showing a line sensor camera and an L-shaped marker according to an embodiment. 図2は、魚眼レンズの歪みモデルを示す図である。FIG. 2 is a diagram showing a fisheye lens distortion model. 図3は、実施形態に係るラインセンサカメラのキャリブレーション装置の構成を示す図である。FIG. 3 is a diagram showing the configuration of a calibration device for a line sensor camera according to an embodiment. 図4は、本実施形態に係るラインセンサカメラのキャリブレーション方法を示すフローチャートである。FIG. 4 is a flowchart showing a calibration method for a line sensor camera according to this embodiment.

以下、添付図面を参照して、本発明を実施するための形態について説明する。
ただし、本発明は、以下の実施形態の記載によって限定解釈されるものではない。
Hereinafter, an embodiment of the present invention will be described with reference to the accompanying drawings.
However, the present invention should not be construed as being limited to the following embodiments.

<実施形態>
カメラを用いた計測を行う際、カメラの焦点距離、主点座標、歪み係数などといったカメラパラメータを事前に求めることは必須であり、これを求めることをカメラキャリブレーションという。
なお、以下の説明では、カメラキャリブレーションを、単に、キャリブレーションと呼ぶ。
<Embodiment>
When performing measurements using a camera, it is essential to determine the camera parameters in advance, such as the focal length, principal point coordinates, and distortion coefficients. This process is called camera calibration.
In the following description, camera calibration will simply be called calibration.

本実施形態においては、非特許文献1に記載された方法のように、ラインセンサカメラのキャリブレーションに、マーカの複数回撮影と非線形最適化手法によるカメラパラメータ算出を導入する。
しかしながら、非特許文献1ではエリアカメラを前提としているため、この方法をそのままラインセンサカメラのキャリブレーションに導入することはできない。
例えば、ラインセンサカメラでは、次元数が少ないため、回転行列の直交性を活用することができず、又、ラインセンサカメラがキャリブレーション用の平面マーカをチェスボード状に撮影できないため、焦点距離と外部パラメータ算出が不安定になることが問題となる。
そこで、本実施形態においては、キャリブレーション用として、立体マーカを用いている。
In this embodiment, as in the method described in Non-Patent Document 1, multiple photographing of a marker and calculation of camera parameters by a non-linear optimization method are introduced into the calibration of the line sensor camera.
However, since Non-Patent Document 1 is based on the assumption that an area camera is used, this method cannot be directly introduced into the calibration of a line sensor camera.
For example, with a line sensor camera, the number of dimensions is small, so it is not possible to utilize the orthogonality of the rotation matrix. In addition, since a line sensor camera cannot capture the planar marker used for calibration in a chessboard shape, there is a problem that the focal length and external parameter calculation becomes unstable.
Therefore, in this embodiment, a three-dimensional marker is used for calibration.

また、本実施形態では、カメラモデルとして、ピンホールカメラモデル及び魚眼レンズモデルを用いる。
ただし、本実施形態では、ラインセンサカメラを使うため、撮像範囲の2次元平面が1次元画像となる。
そして、撮像範囲の2次元平面上に立体マーカを設置することで、求める外部パラメータについて、回転を1軸、平行移動を2次元とすることができる。
In this embodiment, a pinhole camera model and a fisheye lens model are used as the camera model.
However, in this embodiment, since a line sensor camera is used, the two-dimensional plane of the imaging range becomes a one-dimensional image.
Then, by placing a stereoscopic marker on a two-dimensional plane in the imaging range, the rotation can be determined along one axis and the translation can be determined along two dimensions for the external parameters to be determined.

また、下記の説明の式中において、ボールド体(太字)ではないアルファベットはスカラーであり、ボールド体(太字)の小文字のアルファベットはベクトルであり、ボールド体(太字)の大文字のアルファベットは行列である。
なお、文書中においては、ボールド体(太字)を使用できないので、通常の書式とし、該当するアルファベットの直後に“(ボールド体)”と付記する。
In addition, in the formulas in the following description, non-bold alphabets are scalars, bold lowercase alphabets are vectors, and bold uppercase alphabets are matrices.
Since boldface cannot be used in the document, normal formatting is used, with "(boldface)" added immediately after the relevant alphabet.

図1は、本実施形態におけるラインセンサカメラ10及びL字マーカ20を示す図である。
図1において、ラインセンサカメラ10は1ラインしか撮像を行わないため、撮像範囲は3次元空間上では2次元平面11となる。
2次元平面11上のL字マーカ20のオブジェクト座標系(2次元平面座標系)は、X軸及びY軸で表現されている。
ラインセンサカメラ10のカメラ座標系(1次元画像座標系)は、ラインセンサカメラ10の光軸方向の軸wに直交し、撮像範囲の2次元平面11と平行なu軸で表現される。
画像座標系の座標をuと定義し、カメラ座標系の座標を(x,y)と定義すると、カメラ座標系から画像座標系への変換式は、以下の式(1)で表される。
FIG. 1 is a diagram showing a line sensor camera 10 and an L-shaped marker 20 according to this embodiment.
In FIG. 1, since the line sensor camera 10 captures only one line, the imaging range is a two-dimensional plane 11 in a three-dimensional space.
The object coordinate system (two-dimensional plane coordinate system) of the L-shaped marker 20 on the two-dimensional plane 11 is expressed by the X axis and the Y axis.
The camera coordinate system (one-dimensional image coordinate system) of the line sensor camera 10 is expressed by a u axis that is perpendicular to an axis w in the optical axis direction of the line sensor camera 10 and parallel to a two-dimensional plane 11 of the imaging range.
If the coordinate of the image coordinate system is defined as u and the coordinate of the camera coordinate system is defined as (x, y), the conversion equation from the camera coordinate system to the image coordinate system is expressed by the following equation (1).

Figure 0007517170000001
Figure 0007517170000001

ここで、sはスケーリング係数であり、fは焦点距離であり、cは主点座標である。
オブジェクト座標系の座標を(X,Y)と定義すると、オブジェクト座標系からカメラ座標系への変換式は下記の式(2)で表される。
where s is the scaling factor, f is the focal length, and c is the principal point coordinate.
When the coordinates of the object coordinate system are defined as (X, Y), the conversion equation from the object coordinate system to the camera coordinate system is expressed by the following equation (2).

Figure 0007517170000002
Figure 0007517170000002

Figure 0007517170000003
Figure 0007517170000003

また、オブジェクト座標系とカメラ座標系との間の回転行列をR(ボールド体)(回転軸は1軸であり、その角度はθ)、並進ベクトルをt(ボールド体)(2次元ベクトルであり、その要素はt,t)とする。
ここで、図1に示す構成におけるピンホールモデルの数式モデルは、下記の式(4)で表される。
Also, the rotation matrix between the object coordinate system and the camera coordinate system is R (bold) (the rotation axis is 1 and its angle is θ), and the translation vector is t (bold) (a two-dimensional vector whose elements are t 1 and t 2 ).
Here, the mathematical model of the pinhole model in the configuration shown in FIG.

Figure 0007517170000004
Figure 0007517170000004

なお、uは実際に観測されたカメラ座標系における位置(ピクセル座標における計測座標)であり、X、Yはオブジェクト座標系における位置(L字マーカ20の実空間(2次元平面11)上における真値座標)である。 Note that u is the position in the camera coordinate system that is actually observed (measurement coordinates in pixel coordinates), and X, Y are the positions in the object coordinate system (true coordinates of the L-shaped marker 20 in the real space (two-dimensional plane 11)).

上記の式(4)は、L字マーカ20のオブジェクト座標(2次元平面座標)からラインセンサカメラ10のカメラ座標(1次元画像座標)へ変換する数式モデルとなっている。
ただし、上記の式(4)では、ラインセンサカメラ10のレンズの歪みが考慮されていない。
そこで、上記の式(2)のように(x,y)を定義すると、下記の式(5),(6),(7)のように歪みを表すことができる。
なお、k~kは半径歪み係数である。
また、レンズの歪みについては、非特許文献2(特に、51頁)を参考にしている。
The above formula (4) is a mathematical model for converting the object coordinates (two-dimensional plane coordinates) of the L-shaped marker 20 into the camera coordinates (one-dimensional image coordinates) of the line sensor camera 10.
However, in the above formula (4), the distortion of the lens of the line sensor camera 10 is not taken into consideration.
Therefore, if (x, y) is defined as in the above equation (2), the distortion can be expressed as in the following equations (5), (6), and (7).
Note that k 1 to k 3 are radial distortion coefficients.
Regarding lens distortion, reference is made to Non-Patent Document 2 (especially page 51).

Figure 0007517170000005
Figure 0007517170000005

Figure 0007517170000006
Figure 0007517170000006

Figure 0007517170000007
Figure 0007517170000007

ここで、式(7)にx’をそのまま代入することができないため、下記の式(8)を上記の式(6)に代入する。
また、式(2),(4),(5)についても式(6)に代入すると、下記の式(9)が得られる。
Here, since x′ cannot be substituted directly into equation (7), equation (8) below is substituted into equation (6) above.
Moreover, by substituting the formulas (2), (4), and (5) into the formula (6), the following formula (9) is obtained.

Figure 0007517170000008
Figure 0007517170000008

Figure 0007517170000009
Figure 0007517170000009

このカメラモデルでキャリブレーションを行う場合には、単位焦点距離面での誤差最小化を行うことになり、下記の式(10)が最小となるように、レーベンバーグマーカート法により、内部パラメータ及び外部パラメータが求められる。 When calibrating this camera model, the error is minimized on the unit focal length plane, and the intrinsic and extrinsic parameters are found using the Levenberg-Marquardt algorithm so that the following equation (10) is minimized.

Figure 0007517170000010
Figure 0007517170000010

上記の式(10)において、Mは画像の撮影回数であり、Nは各撮影において取得される特徴点数(白黒帯23の検出点数)である。
上記の式(10)は、上記の式(9)に基づく誤差関数を、撮像した画像の全数M及び検出点の全数Nについて総和したものとなる。
In the above formula (10), M is the number of times an image is captured, and N is the number of feature points (the number of detected points of the black and white bands 23) obtained in each capture.
The above formula (10) is the sum of the error function based on the above formula (9) for the total number M of captured images and the total number N of detected points.

ここで、立体マーカを用いて実際にキャリブレーションを行ってみると、立体マーカを用いるのみでは、解が不安定になることを完全には防げないことが分かった。
ここで、不安定というのは「焦点距離はレンズに定められた初期値から大きくは変化しないはずだ」、「レンズの歪み係数k,k,kは極端に大きな値にはならず、またレンズの歪み係数k,k,kは一般的にk>k>kとなることが多い」というカメラキャリブレーションを行う熟練者であれば知っている一般的な知識から大きく外れることを指す。
Here, when calibration was actually performed using a 3D marker, it was found that the use of the 3D marker alone could not completely prevent the solution from becoming unstable.
Here, "unstable" refers to a significant deviation from common knowledge known to experts in camera calibration , such as "the focal length should not change significantly from the initial value set for the lens" and "the lens distortion coefficients k1 , k2 , and k3 do not become extremely large values, and generally the lens distortion coefficients k1 , k2, and k3 often satisfy k1 > k2 > k3 ."

すなわち、上記の式(10)が最小になるパラメータを最適化処理で求めると、パラメータが非現実的な値になるおそれがある。
そこで、本実施例では、上記の式(9)に基づく誤差関数に、「焦点距離fはレンズの規定値f0から大きくは変わらない」、「主点座標cは(カメラによるが)画像中心c0の近くである」、「レンズの歪み係数k,k,kは極端に大きな数字にはならない」、「レンズの歪み係数の大きさはk>k>kとなることが多い」等の専門家の知識を導入した評価関数である下記の式(11)が最小となるように、レーベンバーグマーカート法により内部パラメータ及び外部パラメータを求める。
That is, if the parameters that minimize the above equation (10) are found by optimization processing, the parameters may end up being unrealistic values.
Therefore, in this embodiment, the intrinsic parameters and extrinsic parameters are found by the Levenberg-Marquardt method so as to minimize the following equation (11), which is an evaluation function that incorporates expert knowledge such as "the focal length f does not vary greatly from the lens' specified value f0", "the principal point coordinate c is near the image center c0 (although this depends on the camera)", "the lens distortion coefficients k1 , k2 , and k3 do not become extremely large numbers", and "the magnitudes of the lens distortion coefficients are often k1 > k2 >k3", into the error function based on the above equation (9).

Figure 0007517170000011
Figure 0007517170000011

上記の式(11)において、wは焦点距離の正則化項の重み係数であり、wは主点座標の正則化項の重み係数であり、cは主点座標の既定値であり、wk1は歪み係数kの正則化項の重み係数であり、wk2は歪み係数kの正則化項の重み係数であり、wk3は歪み係数kの正則化項の重み係数である。 In the above equation (11), wf is a weighting coefficient of the regularization term for the focal length, wc is a weighting coefficient of the regularization term for the principal point coordinates, c0 is a default value of the principal point coordinates, wk1 is a weighting coefficient of the regularization term for the distortion coefficient k1 , wk2 is a weighting coefficient of the regularization term for the distortion coefficient k2 , and wk3 is a weighting coefficient of the regularization term for the distortion coefficient k3 .

上記の式(11)を用いることで、誤差が小さいのみならず、焦点距離の大きさ、主点座標の位置及び歪み係数の大きさ等の内部パラメータを考慮したキャリブレーションを行うことができる。
また、各内部パラメータ(ここでは、焦点距離の大きさ、主点座標の位置及び歪み係数の大きさ)に重み付けをすることで、焦点距離の大きさ、主点座標の位置及び歪み係数の大きさのうち、どのパラメータを重要視するかを必要に応じて設定することができ、これにより、設計者及び専門家の知識を導入することができる。
なお、上記の式(11)ではL2ノルムと呼ばれる二乗の指標を用いたが、L1ノルムと呼ばれる絶対値指標を使用することも有効である。
By using the above formula (11), not only can the error be reduced, but calibration can also be performed taking into account internal parameters such as the focal length, the position of the principal point coordinates, and the magnitude of the distortion coefficient.
Furthermore, by weighting each internal parameter (here, the focal length, the position of the principal point coordinates, and the magnitude of the distortion coefficient), it is possible to set, as necessary, which parameter among the focal length, the position of the principal point coordinates, and the magnitude of the distortion coefficient is to be given importance, thereby making it possible to incorporate the knowledge of designers and experts.
In addition, in the above formula (11), a squared index called L2 norm is used, but it is also effective to use an absolute value index called L1 norm.

<魚眼レンズモデルの説明>
図2は、魚眼レンズの歪みモデルを示す図である。
魚眼レンズの歪みモデルはピンホールモデルとは異なり、カメラ光軸の入射角φを用いて以下の式(12)で表される。
なお、ここでは歪みのない画像から歪みのある画像を作成するようなモデルとなっているが、歪みのある画像から歪みのない画像を作成するモデルを利用することも可能である。
<Fisheye lens model explanation>
FIG. 2 is a diagram showing a fisheye lens distortion model.
The fisheye lens distortion model is different from the pinhole model and is expressed by the following equation (12) using the incidence angle φ of the camera optical axis.
In this case, a model is used in which a distorted image is created from an undistorted image, but it is also possible to use a model in which an undistorted image is created from a distorted image.

Figure 0007517170000012
Figure 0007517170000012

カメラ光軸の入射角φは、正規化座標系における座標位置x’との関係から下記の式となる。 The incidence angle φ of the camera optical axis is expressed by the following formula in relation to the coordinate position x' in the normalized coordinate system.

Figure 0007517170000013
Figure 0007517170000013

そして、魚眼レンズの場合、上記の式(8)及び(12)から下記の式(14)が得られる。 And in the case of a fisheye lens, the following equation (14) can be obtained from the above equations (8) and (12).

Figure 0007517170000014
Figure 0007517170000014

従って、求める内部パラメータ及び外部パラメータは、下記の式(15)の誤差最小化を行うことにより求められる。 The desired internal and external parameters are therefore found by minimizing the error in equation (15) below.

Figure 0007517170000015
Figure 0007517170000015

<X,Yの算出>
次に、上述した内部パラメータ及び外部パラメータが全て校正済み(キャリブレーション済み)の場合に、計測座標uが得られた時のX,Yについて求める。
これは、上記の式(8)をX,Yについて解けばよいが、上記の式(8)にはX,Yの双方が含まれているため、このままでは解くことができない。
そこで、L字マーカ20の検出点では、X,Yの2次元平面11上の真値座標のいずれか、すなわち、X,Yの真値のいずれかが0であることを利用して、真値座標が0となる方向で得られたパラメータによって算出される値も0であると仮定すると、下記の式(16)が得られる。
ここで、x’及びx’dは上記の式(5),(6),(7)で定義された値である。
<Calculation of X and Y>
Next, when the above-mentioned internal parameters and external parameters have all been calibrated, X and Y when the measurement coordinate u is obtained are obtained.
This can be achieved by solving the above equation (8) for X and Y. However, since the above equation (8) contains both X and Y, it cannot be solved as it is.
Therefore, at the detection point of the L-shaped marker 20, one of the true coordinates on the two-dimensional plane 11 of X and Y, i.e., one of the true values of X and Y, is 0. By assuming that the value calculated from the parameters obtained in the direction where the true coordinate is 0 is also 0, the following equation (16) is obtained.
Here, x' and x'd are the values defined in equations (5), (6), and (7) above.

Figure 0007517170000016
Figure 0007517170000016

次に、外部パラメータを撮影毎に求める方法について述べる。
並進と回転を表す変換行列を下記の式(17)とすると、上記の式(4)に基づいて、変換行列は下記の式(18)で表すことができる。
Next, a method for determining the external parameters for each shot will be described.
If the transformation matrix representing translation and rotation is expressed by the following equation (17), the transformation matrix can be expressed by the following equation (18) based on the above equation (4).

Figure 0007517170000017
Figure 0007517170000017

Figure 0007517170000018
Figure 0007517170000018

これを展開、整理すると、ピンホールモデルでは、下記の式(19)となる。 Expanding and rearranging this gives the following equation (19) for the pinhole model.

Figure 0007517170000019
Figure 0007517170000019

<魚眼レンズの場合>
魚眼レンズの場合においては、下記の式(20)をXについて解けばよい。
<In the case of a fisheye lens>
In the case of a fisheye lens, the following equation (20) should be solved for X.

Figure 0007517170000020
Figure 0007517170000020

しかしながら、上記の式(20)には、X,Yの双方が含まれているため、このままでは解くことができない。
そこで、L字マーカでは、X,Yの真値のいずれかが0であることを利用して、真値が0となる方向では得られたパラメータによって算出される値も0であると仮定すると上記の式(16)が得られる。
However, since the above equation (20) contains both X and Y, it cannot be solved as it is.
Therefore, in the case of the L-shaped marker, by taking advantage of the fact that either the true value of X or Y is 0, and assuming that the value calculated using the obtained parameters in the direction where the true value is 0 is also 0, the above equation (16) is obtained.

ここで、正規化画像座標x’は、上記の式(5)をφについて解き、下記の式(21)に代入することで求められる。 Here, the normalized image coordinate x' can be found by solving the above equation (5) for φ and substituting it into the following equation (21).

Figure 0007517170000021
Figure 0007517170000021

上述のように、ピンホールモデルにおいても、魚眼レンズにおいても、解析的にX,Yの値が求められる。 As mentioned above, the values of X and Y can be found analytically in both the pinhole model and the fisheye lens.

<魚眼レンズにおける初期値の外部パラメータ>
ここで、魚眼レンズにおいて、初期値の外部パラメータを、撮影毎に求める方法について述べる。
通常、ピンホールモデルでは歪みが微小なため、歪みを無視し、すなわち歪みのない状態のモデルを仮定して、外部パラメータが求められる。
しかし、魚眼レンズでは歪みが大きく無視することができない。
そのため、下記の式(22)のような既知の値で構成された歪みモデルのいずれかを利用することで初期値の外部パラメータを算出する。
<Initial external parameters for fisheye lenses>
Here, a method for determining initial external parameters for each image taken with a fisheye lens will be described.
Normally, in a pinhole model, distortion is very small, so the external parameters are found by ignoring distortion, that is, by assuming a model without distortion.
However, fisheye lenses produce significant distortion that cannot be ignored.
For this reason, the initial external parameters are calculated by using any of the distortion models configured with known values such as those in the following equation (22).

Figure 0007517170000022
Figure 0007517170000022

例えば、正射影方式モデルを利用する場合、上記の式(22)の正射影の式を上記の式(8)に代入すると下記の式(23)になる。 For example, when using an orthogonal projection model, substituting the orthogonal projection equation (22) above into equation (8) above gives the following equation (23).

Figure 0007517170000023
Figure 0007517170000023

上記の式(23)、式(20)及び式(21)を用いると、下記の式(24)が得られる。 Using the above formulas (23), (20), and (21), we obtain the following formula (24).

Figure 0007517170000024
Figure 0007517170000024

上記の式を特異値分解することで、初期値外部パラメータが得られる。 The initial external parameters can be obtained by singular value decomposition of the above equation.

ここで、スケールが次数を1つ減らせる性質を利用し、3本以上の同時方程式を立てることで変換行列を解くことができる。
実際には、L字マーカ20の座標は3点以上あるが、この場合、方程式と未知数の数が一致しないので、最小二乗法を用いる。
二乗誤差をE、各計測点で生じる誤差ベクトルをe(ボールド体)とすると、下記の式(25)が得られる。
なお、“T”は、転置行列を表す記号である。
Here, by utilizing the property that the scale can reduce the order by one, the transformation matrix can be solved by formulating three or more simultaneous equations.
In reality, the L-shaped marker 20 has three or more coordinates, but in this case, the equations and the number of unknowns do not match, so the least squares method is used.
If the squared error is E and the error vector occurring at each measurement point is e (in bold), the following equation (25) is obtained.
It should be noted that "T" is the symbol representing a transposed matrix.

Figure 0007517170000025
Figure 0007517170000025

二乗誤差Eを最小化するためのベクトルは、BB(ボールド体)の最小の固有値に対応する固有ベクトルとなる。
そこで、解となる固有ベクトルを求めるため、特異値分解を用いると、下記の式(26)の2つの上式が得られる。
ここで、U(ボールド体)は左特異行列、V(ボールド体)は右特異行列であり、Σ(ボールド体)は特異値行列であり、I(ボールド体)は単位行列である。
これにより、BB(ボールド体)は下記の式(26)の下式で表すことができる。
The vector for minimizing the squared error E is the eigenvector corresponding to the smallest eigenvalue of B T B (in bold).
Therefore, when singular value decomposition is used to find the eigenvector that is the solution, the two upper expressions of the following expression (26) are obtained.
where U (bold) is the left singular matrix, V (bold) is the right singular matrix, Σ (bold) is the singular value matrix, and I (bold) is the identity matrix.
As a result, B T B (bold) can be expressed by the following formula (26).

Figure 0007517170000026
Figure 0007517170000026

この結果より、固有ベクトルが右特異行列V(ボールド体)の右特異ベクトルと同じになり、固有値が特異値の二乗と同じになることが分かる。
このことから、特異値分解を用いることで、変換行列を求めることができる。
From this result, it can be seen that the eigenvectors are the same as the right singular vectors of the right singular matrix V (in bold), and the eigenvalues are the same as the squares of the singular values.
From this, the transformation matrix can be obtained by using singular value decomposition.

実際の外部パラメータとするには、スケール不定及びt>0のため、tで正規化を行い、回転行列の性質より、(cosθ)+(sinθ)=1を使用して、回転と並進のパラメータを求める。 To obtain actual external parameters, normalization is performed at t 2 because the scale is indefinite and t 2 >0, and the rotation and translation parameters are obtained using (cos θ) 2 +(sin θ) 2 =1 due to the nature of the rotation matrix.

このように、ラインセンサカメラであっても、計測座標u、真値座標X,Y、焦点距離f及び主点座標cが得られると、線形解法で解を求めることができる。
実際には、焦点距離f及び主点座標cは、最初には分からないため、適当な値を入力することで、初期の外部パラメータを求める。
そして、最終的に、この初期の外部パラメータを初期値として、上記の式(11)をレーベンバーグマーカート法によって解くことで、最終的な内部パラメータ及び外部パラメータを得ることができる。
In this way, even in the case of a line sensor camera, if the measurement coordinate u, true coordinates X, Y, focal length f, and principal point coordinate c are obtained, a solution can be found by a linear solution method.
In reality, the focal length f and the principal point coordinate c are not known at first, so the initial external parameters are obtained by inputting appropriate values.
Then, finally, by using these initial external parameters as initial values and solving the above equation (11) by the Levenberg-Marquardt method, the final internal parameters and external parameters can be obtained.

次に、上述した計算を行う本発明に係るラインセンサカメラのキャリブレーション装置及びキャリブレーション方法について、図4及び図3を参照して以下に説明する。 Next, the calibration device and calibration method for a line sensor camera according to the present invention, which performs the above-mentioned calculations, will be described below with reference to Figures 4 and 3.

図3は、本実施形態に係るラインセンサカメラのキャリブレーション装置30の構成を示す図である。
図3に示すキャリブレーション装置30は、ラインセンサカメラ10のキャリブレーション装置であり、記憶部31、画像入力部32、計測座標算出部33、外部パラメータ算出部34、非線形最小二乗計算部35及びレンズモデル選択部36を有する。
非線形最小二乗計算部35は、歪み補正計算部350を有する。
FIG. 3 is a diagram showing the configuration of a calibration device 30 for a line sensor camera according to this embodiment.
The calibration device 30 shown in FIG. 3 is a calibration device for the line sensor camera 10, and includes a memory unit 31, an image input unit 32, a measurement coordinate calculation unit 33, an external parameter calculation unit 34, a nonlinear least squares calculation unit 35, and a lens model selection unit 36.
The nonlinear least squares calculation unit 35 includes a distortion correction calculation unit 350 .

ラインセンサカメラ10は、CCD(Charge-Coupled Device)などの撮像素子が1次元の線状に配置され、1次元の線状に撮像対象物の画像を撮像するカメラである。 The line sensor camera 10 is a camera in which imaging elements such as CCDs (Charge-Coupled Devices) are arranged in a one-dimensional line, and captures an image of an object in a one-dimensional line.

L字マーカ20は、L字型の形状の立体マーカであり、その中央21で90°に折れ曲がり、折れ曲がった内側の面22に白黒帯23を有する剛体である。
白黒帯23は、中央21を中心に対称的に配置されると共に、内側の面22の長手方向に沿って交互に白黒となるように配置され、白黒帯23の白黒の幅が既知、つまり、白黒帯23による複数の検出点が2次元平面11上における2次元平面座標で既知である。
上述した非特許文献1の方法のように、平面マーカを用いる場合には焦点距離が不安定になるが、本実施形態では、L字マーカ20をキャリブレーションに用いており、焦点距離を正確に算出可能である。
The L-shaped marker 20 is a three-dimensional marker in an L-shape, which is bent at 90° at its center 21 and is a rigid body having a black and white band 23 on its inner surface 22 of the bend.
The black and white bands 23 are arranged symmetrically around the center 21 and are arranged so that they alternate between black and white along the longitudinal direction of the inner surface 22, and the width of the black and white of the black and white bands 23 is known, in other words, the multiple detection points of the black and white bands 23 are known in two-dimensional plane coordinates on the two-dimensional plane 11.
When using a planar marker as in the method of Non-Patent Document 1 mentioned above, the focal length becomes unstable. However, in this embodiment, an L-shaped marker 20 is used for calibration, making it possible to accurately calculate the focal length.

なお、本実施形態では、キャリブレーションのマーカとしてL字型の立体マーカを用いているが、複数の検出点に奥行きを持たせることができ、且つ、全ての検出点の2次元平面11上のX、Yの真値座標のどちらかを必ず0とすることができるのであれば、キャリブレーションのマーカは、L字型の立体マーカに限定されるものではない。
例えば、直方体又は直角三角柱において、直角を挟む2辺の外面に図1に示す白黒帯23が設けられていてもよい。
In this embodiment, an L-shaped three-dimensional marker is used as the calibration marker, but as long as it is possible to give depth to multiple detection points and it is possible to ensure that either the X or Y true coordinate of all detection points on the two-dimensional plane 11 is 0, the calibration marker is not limited to the L-shaped three-dimensional marker.
For example, in the case of a rectangular parallelepiped or a right-angled triangular prism, the black and white bands 23 shown in FIG. 1 may be provided on the outer surfaces of two sides that sandwich the right angle.

記憶部31は、後述するように、選択したレンズモデル、ラインセンサカメラ10からの画像データ、各撮影でのL字マーカ20の白黒帯23の画像上の計測座標データ(計測座標u)、レンズ初期値、L字マーカ20の白黒帯23の真値座標X,Y、ラインセンサカメラ10の内部パラメータ(焦点距離f、主点座標c及び歪み係数k~k)及び各撮影でのラインセンサカメラ10の外部パラメータ(回転θ、並進t、t)を記憶する。
なお、歪み係数は、ピンホールカメラモデルと魚眼レンズモデルとで相違する。
記憶部31としては、RAM(Random Access Memory)、HDD(Hard Disk Drive)、SSD(Solid State Drive)などの記憶装置を例示することができる。
As described below, the memory unit 31 stores the selected lens model, image data from the line sensor camera 10, measurement coordinate data (measurement coordinate u) on the image of the black and white band 23 of the L-shaped marker 20 in each shot, the lens initial value, the true coordinates X, Y of the black and white band 23 of the L-shaped marker 20, internal parameters of the line sensor camera 10 (focal length f, principal point coordinate c, and distortion coefficients k1 to k3 ), and external parameters of the line sensor camera 10 in each shot (rotation θ, translation t1 , t2 ).
It should be noted that the distortion coefficients differ between the pinhole camera model and the fisheye lens model.
Examples of the storage unit 31 include storage devices such as a random access memory (RAM), a hard disk drive (HDD), and a solid state drive (SSD).

レンズモデル選択部36は、上記の式(22)の複数のレンズモデルのいずれかを選択し、選択されたレンズモデルを記憶部31に記憶する。 The lens model selection unit 36 selects one of the multiple lens models in the above formula (22) and stores the selected lens model in the storage unit 31.

画像入力部32は、ラインセンサカメラ10で取得したL字マーカ20の画像データを入力とし、入力された画像データを記憶部31に記憶する。 The image input unit 32 receives image data of the L-shaped marker 20 acquired by the line sensor camera 10 and stores the input image data in the memory unit 31.

計測座標算出部33は、ラインセンサカメラ10で撮像した画像データからL字マーカ20の白黒帯23(検出点)を検出し、各撮影でのL字マーカ20の白黒帯23(検出点)の画像上の計測座標u(1次元画像座標)を求め、計測座標データとして記憶部31に記憶する。
なお、L字マーカ20の白黒帯23(検出点)の画像上の座標は、2値化処理又はエッジ検出といった画像処理により検出される。
The measurement coordinate calculation unit 33 detects the black and white band 23 (detection point) of the L-shaped marker 20 from the image data captured by the line sensor camera 10, calculates the measurement coordinate u (one-dimensional image coordinate) on the image of the black and white band 23 (detection point) of the L-shaped marker 20 for each capture, and stores it in the memory unit 31 as measurement coordinate data.
The coordinates of the black and white band 23 (detection point) of the L-shaped marker 20 on the image are detected by image processing such as binarization or edge detection.

外部パラメータ算出部34は、計測座標算出部33で算出した各撮影における計測座標u、レンズ初期値、L字マーカ20の白黒帯23(検出点)の真値座標X,Yから、上述した式を用いて、各撮影でのラインセンサカメラ10の外部パラメータを求め、記憶部31に記憶する。 The external parameter calculation unit 34 uses the above-mentioned formula to calculate the external parameters of the line sensor camera 10 for each shot from the measurement coordinate u, lens initial value, and true coordinates X, Y of the black and white band 23 (detection point) of the L-shaped marker 20 for each shot calculated by the measurement coordinate calculation unit 33, and stores the parameters in the memory unit 31.

非線形最小二乗計算部35は、計測座標算出部33で算出した各撮影での計測座標u、レンズ初期値、L字マーカ20の白黒帯23(検出点)の真値座標X,Y及び外部パラメータ算出部34で求めた各撮影でのラインセンサカメラ10の外部パラメータを用い、最終的なラインセンサカメラ10の内部パラメータ及び各撮影でのラインセンサカメラ10の外部パラメータについて、上述した式(11)をレーベンバーグマーカート法により算出し、記憶部31に記憶する。
なお、非線形最小二乗計算部35の歪み補正計算部350は、上述のように魚眼レンズにおいては歪みを無視できないため、歪みを補正する計算を行う。
The nonlinear least squares calculation unit 35 uses the measurement coordinate u for each image captured calculated by the measurement coordinate calculation unit 33, the lens initial value, the true coordinates X, Y of the black and white band 23 (detection point) of the L-shaped marker 20, and the external parameters of the line sensor camera 10 for each image captured calculated by the external parameter calculation unit 34 to calculate the final internal parameters of the line sensor camera 10 and the external parameters of the line sensor camera 10 for each image captured by the Levenberg-Marquardt method using the above-mentioned equation (11).The nonlinear least squares calculation unit 35 then stores the results in the memory unit 31.
Incidentally, since distortion cannot be ignored in a fisheye lens as described above, the distortion correction calculation section 350 of the nonlinear least squares calculation section 35 performs calculations to correct the distortion.

図4は、本実施形態に係るラインセンサカメラのキャリブレーション方法を示すフローチャートである。 Figure 4 is a flowchart showing the calibration method for the line sensor camera according to this embodiment.

(ステップS1)
レンズモデル選択工程においては、レンズモデル選択部36によって上記の式(22)の複数のレンズモデルのいずれかが選択されて、選択されたレンズモデルが記憶部31に記憶される。
(Step S1)
In the lens model selection step, the lens model selection unit 36 selects one of the multiple lens models of the above formula (22), and the selected lens model is stored in the storage unit 31.

(ステップS2)
画像入力工程においては、画像入力部32によって、位置が固定されたL字マーカ20に対し、ラインセンサカメラ10が様々な位置及び姿勢(w軸周りの回転角θ及びu軸及びv軸に平行な向きの位置t,tの少なくともひとつが異なり、且つ立体マーカ全体が撮影できる位置及び姿勢)になるように設置されて、それぞれの位置及び姿勢での画像が撮像され、記憶部31に記憶される。
L字マーカ20は、位置が固定されているので、設置誤差は含まれないようになっている。
(Step S2)
In the image input process, the image input unit 32 sets the line sensor camera 10 in various positions and orientations (positions and orientations in which at least one of the rotation angle θ around the w axis and the positions t1 , t2 in directions parallel to the u axis and v axis are different, and which allow the entire three-dimensional marker to be captured) relative to the L-shaped marker 20, which has a fixed position, and images are captured at each position and orientation and stored in the memory unit 31.
The position of the L-shaped marker 20 is fixed, so that installation error is not included.

(ステップS3)
計測座標算出工程においては、計測座標算出部33によって、撮影した画像毎に、L字マーカ20の白黒帯23(検出点)の検出処理が行われ、L字マーカ20の白黒帯23(検出点)の画像上の計測座標u(1次元画像座標)が算出され、計測座標データとして記憶部31に記憶される。
(Step S3)
In the measurement coordinate calculation process, the measurement coordinate calculation unit 33 performs a detection process of the black and white band 23 (detection point) of the L-shaped marker 20 for each captured image, calculates the measurement coordinate u (one-dimensional image coordinate) on the image of the black and white band 23 (detection point) of the L-shaped marker 20, and stores it in the memory unit 31 as measurement coordinate data.

(ステップS4)
外部パラメータ算出工程においては、外部パラメータ算出部34によって、ラインセンサカメラ10の初期の内部パラメータとなるレンズ初期値として、焦点距離fをメーカの公表値とし、主点座標cを総画素数の半分とし、歪み係数k~kを全て0とし、撮影した画像毎に、上述した式を用いて、線形解法により初期の外部パラメータが算出され、記憶部31に記憶される。
なお、歪み係数は、ピンホールカメラモデルと魚眼レンズモデルとで相違する。
(Step S4)
In the external parameter calculation step, the external parameter calculation unit 34 sets the focal length f to the manufacturer's published value, the principal point coordinate c to half the total number of pixels, and the distortion coefficients k1 to k3 to all 0 as lens initial values that become the initial internal parameters of the line sensor camera 10, and calculates initial external parameters for each captured image by linear solution using the above-mentioned equations, and stores them in the memory unit 31.
It should be noted that the distortion coefficients differ between the pinhole camera model and the fisheye lens model.

(ステップS5)
歪み補正計算処理工程においては、上述したように魚眼レンズでは歪みを無視できないため、歪み補正計算部350によって、レンズの歪みを補正する計算が行われる(歪み補正計算部350)。
(Step S5)
In the distortion correction calculation process, since distortion cannot be ignored in a fisheye lens as described above, the distortion correction calculation unit 350 performs calculations to correct lens distortion (distortion correction calculation unit 350).

(ステップS6)
非線形最小二乗計算工程においては、非線形最小二乗計算部35によって、上述した初期の内部パラメータ及びステップS4で算出した初期の外部パラメータを初期値として、撮影した画像毎に、上述した式(11)を用いて、レーベンバーグマーカート法で最終的な内部パラメータ及び外部パラメータが算出され、記憶部31に記憶する。
(Step S6)
In the nonlinear least squares calculation step, the nonlinear least squares calculation unit 35 uses the above-mentioned initial internal parameters and the initial extrinsic parameters calculated in step S4 as initial values to calculate final internal parameters and extrinsic parameters for each captured image using the above-mentioned equation (11) by the Levenberg-Marquardt method, and stores the final internal parameters and extrinsic parameters in the memory unit 31.

本実施形態は、1台のラインセンサカメラ10と1つのL字マーカ20を用い、以上の手順により、ラインセンサカメラ10の焦点距離f、主点座標c及び歪み係数k~kといった内部パラメータを求めると共に、撮影毎のL字マーカ20の回転θ、平行移動t,tといった外部パラメータを求めることが可能となる。
なお、歪み係数は、ピンホールカメラモデルと魚眼レンズモデルとで相違する。
In this embodiment, one line sensor camera 10 and one L-shaped marker 20 are used, and by following the above procedure, it is possible to determine internal parameters of the line sensor camera 10, such as the focal length f, the principal point coordinate c, and the distortion coefficients k1 to k3 , as well as external parameters of the L-shaped marker 20, such as the rotation θ and the translations t1 and t2 , for each shot.
It should be noted that the distortion coefficients differ between the pinhole camera model and the fisheye lens model.

以上説明したように、本実施形態によれば、例えば魚眼レンズのように歪みの大きいレンズを備えたラインセンサカメラのキャリブレーションを行うことができる。 As described above, according to this embodiment, it is possible to calibrate a line sensor camera equipped with a lens that has a large distortion, such as a fisheye lens.

なお、本発明は、上述の実施形態に限定されるものではなく、上述の構成に対して、構成要素の付加、削除又は転換を行った様々な変形例も含むものとする。 The present invention is not limited to the above-described embodiment, but also includes various modifications in which components are added, deleted, or converted from the above-described configuration.

10 ラインセンサカメラ
11 2次元平面
20 L字マーカ
21 中央
22 内側の面
23 白黒帯
30 キャリブレーション装置
31 記憶部
32 画像入力部
33 計測座標算出部
34 外部パラメータ算出部
35 非線形最小二乗計算部
36 レンズモデル選択部
350 歪み補正計算部
REFERENCE SIGNS LIST 10 Line sensor camera 11 Two-dimensional plane 20 L-shaped marker 21 Center 22 Inner surface 23 Black and white band 30 Calibration device 31 Storage unit 32 Image input unit 33 Measurement coordinate calculation unit 34 External parameter calculation unit 35 Nonlinear least squares calculation unit 36 Lens model selection unit 350 Distortion correction calculation unit

Claims (6)

ラインセンサカメラの撮像範囲となる2次元平面上での2次元平面座標が既知の複数の検出点を有する立体マーカを前記ラインセンサカメラでレンズを介して撮像した複数の画像に基づいて、前記ラインセンサカメラのキャリブレーション用の内部パラメータ及び外部パラメータを算出するラインセンサカメラのキャリブレーション装置であって、
前記レンズに応じて複数のレンズモデルのいずれかを選択するレンズモデル選択部と、
位置及び姿勢が各々異なる前記立体マーカの前記画像が各々入力される画像入力部と、
前記立体マーカの前記検出点の前記画像上の1次元画像座標を前記画像毎に算出する計測座標算出部と、
前記2次元平面座標から前記1次元画像座標へ変換する前記ラインセンサカメラの数式モデルに基づいて求めた変換行列について、前記変換行列における初期の内部パラメータとして既知の初期値を入力し、線形解法により前記変換行列から初期の外部パラメータを前記画像毎に算出する外部パラメータ算出部と、
前記数式モデルに基づいて求めたレンズ歪みを考慮した誤差関数について、前記誤差関数に前記初期の内部パラメータ及び前記初期の外部パラメータを入力し、前記検出点の全数及び前記画像の全数についての前記誤差関数の総和が最小となる前記内部パラメータ及び前記外部パラメータを、反復計算を用いた非線形解法により算出する非線形最小二乗計算部とを有し、
前記非線形最小二乗計算部は、前記レンズの歪みを補正する歪み補正計算部を有する
ことを特徴とするラインセンサカメラのキャリブレーション装置。
1. A calibration device for a line sensor camera, the device calculating internal parameters and external parameters for calibration of the line sensor camera based on a plurality of images captured by the line sensor camera through a lens of a three-dimensional marker having a plurality of detection points whose two-dimensional coordinates on a two-dimensional plane that is an imaging range of the line sensor camera are known, the device comprising:
a lens model selection unit that selects one of a plurality of lens models according to the lens;
an image input unit to which the images of the three-dimensional markers each having a different position and orientation are input;
a measurement coordinate calculation unit that calculates one-dimensional image coordinates on the image of the detection point of the stereoscopic marker for each of the images;
an external parameter calculation unit that inputs known initial values as initial internal parameters in a transformation matrix obtained based on a mathematical model of the line sensor camera that transforms the two-dimensional plane coordinates into the one-dimensional image coordinates, and calculates initial external parameters from the transformation matrix for each of the images by a linear solution;
a nonlinear least squares calculation unit that inputs the initial internal parameters and the initial external parameters into an error function that takes into account the lens distortion obtained based on the mathematical model, and calculates the internal parameters and the external parameters that minimize a sum of the error function for all the detection points and all the images by a nonlinear solution using iterative calculation,
The calibration device for a line sensor camera, wherein the nonlinear least squares calculation unit has a distortion correction calculation unit that corrects the distortion of the lens.
請求項1に記載のラインセンサカメラのキャリブレーション装置において、
前記立体マーカは、L字型の形状であり、L字型に折れ曲がった内側の面に前記複数の検出点が配置されていることを特徴とするラインセンサカメラのキャリブレーション装置。
2. The line sensor camera calibration device according to claim 1,
A calibration device for a line sensor camera, wherein the three-dimensional marker is L-shaped, and the plurality of detection points are arranged on the inner surface of the L-shape.
請求項1又は請求項2に記載のラインセンサカメラのキャリブレーション装置において、
前記数式モデルは、魚眼レンズモデルを用いたものであることを特徴とするラインセンサカメラのキャリブレーション装置。
3. The calibration device for a line sensor camera according to claim 1,
13. A calibration device for a line sensor camera, wherein the mathematical model uses a fisheye lens model.
ラインセンサカメラの撮像範囲となる2次元平面上での2次元平面座標が既知の複数の検出点を有する立体マーカを、レンズを介して前記ラインセンサカメラで撮像した複数の画像に基づいて、前記ラインセンサカメラのキャリブレーション用の内部パラメータ及び外部パラメータを算出するラインセンサカメラのキャリブレーション方法であって、
前記レンズに応じて複数のレンズモデルのいずれかを選択するレンズモデル選択工程と、
位置及び姿勢が各々異なる前記立体マーカの前記画像が各々入力される画像入力工程と、
前記立体マーカの前記検出点の前記画像上の1次元画像座標を前記画像毎に算出する計測座標算出工程と、
前記2次元平面座標から前記1次元画像座標へ変換する前記ラインセンサカメラの数式モデルに基づいて求めた変換行列について、前記変換行列における初期の内部パラメータとして既知の初期値を入力し、線形解法により前記変換行列から初期の外部パラメータを前記画像毎に算出する外部パラメータ算出工程と、
前記レンズの歪みを補正する歪み補正計算処理工程と、
前記数式モデルに基づいて求めたレンズ歪みを考慮した誤差関数について、前記誤差関数に前記初期の内部パラメータ及び前記初期の外部パラメータを入力し、前記検出点の全数及び前記画像の全数についての前記誤差関数の総和が最小となる前記内部パラメータ及び前記外部パラメータを、反復計算を用いた非線形解法により算出する非線形最小二乗計算工程とを有する
ことを特徴とするラインセンサカメラのキャリブレーション方法。
A method for calibrating a line sensor camera, comprising the steps of: calculating internal and external parameters for calibration of the line sensor camera based on a plurality of images captured by the line sensor camera through a lens of a three-dimensional marker having a plurality of detection points whose two-dimensional coordinates on a two-dimensional plane that is an imaging range of the line sensor camera, the method comprising:
a lens model selection step of selecting one of a plurality of lens models according to the lens;
an image input step of inputting images of the three-dimensional markers each having a different position and orientation;
a measurement coordinate calculation step of calculating one-dimensional image coordinates on the image of the detection point of the stereoscopic marker for each of the images;
an external parameter calculation step of inputting known initial values as initial internal parameters in a transformation matrix obtained based on a mathematical model of the line sensor camera that transforms the two-dimensional plane coordinates into the one-dimensional image coordinates, and calculating initial external parameters from the transformation matrix for each of the images by a linear solution;
a distortion correction calculation processing step for correcting the distortion of the lens;
and a nonlinear least squares calculation step of inputting the initial internal parameters and the initial external parameters into the error function, for an error function taking into account lens distortion obtained based on the mathematical model, and calculating, by a nonlinear solution using iterative calculation, the internal parameters and the external parameters that minimize the sum of the error function for all of the detection points and all of the images.
請求項4に記載のラインセンサカメラのキャリブレーション方法において、
前記立体マーカとして、L字型の形状であって、L字型に折れ曲がった内側の面に前記複数の検出点が配置されているものを用いることを特徴とするラインセンサカメラのキャリブレーション方法。
5. The method for calibrating a line sensor camera according to claim 4,
A calibration method for a line sensor camera, characterized in that the three-dimensional marker is L-shaped and the multiple detection points are arranged on the inner surface of the L-shape.
請求項4又は請求項5に記載のラインセンサカメラのキャリブレーション方法において、
前記数式モデルとして、魚眼レンズモデルを用いることを特徴とするラインセンサカメラのキャリブレーション方法。

6. The method for calibrating a line sensor camera according to claim 4, further comprising:
A calibration method for a line sensor camera, comprising the steps of: (a) detecting a position of a fisheye lens;

JP2021008589A 2021-01-22 2021-01-22 Calibration device and calibration method for line sensor camera Active JP7517170B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021008589A JP7517170B2 (en) 2021-01-22 2021-01-22 Calibration device and calibration method for line sensor camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021008589A JP7517170B2 (en) 2021-01-22 2021-01-22 Calibration device and calibration method for line sensor camera

Publications (2)

Publication Number Publication Date
JP2022112695A JP2022112695A (en) 2022-08-03
JP7517170B2 true JP7517170B2 (en) 2024-07-17

Family

ID=82657139

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021008589A Active JP7517170B2 (en) 2021-01-22 2021-01-22 Calibration device and calibration method for line sensor camera

Country Status (1)

Country Link
JP (1) JP7517170B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116184627B (en) * 2022-12-30 2025-11-25 江苏中科贯微自动化科技有限公司 SAM lens module, line laser sensor

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012191380A (en) 2011-03-10 2012-10-04 Panasonic Corp Camera, image conversion apparatus, and image conversion method
WO2019049421A1 (en) 2017-09-08 2019-03-14 株式会社ソニー・インタラクティブエンタテインメント Calibration device, calibration system, and calibration method
JP2020038550A (en) 2018-09-05 2020-03-12 株式会社明電舎 Line sensor camera calibration apparatus and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012191380A (en) 2011-03-10 2012-10-04 Panasonic Corp Camera, image conversion apparatus, and image conversion method
WO2019049421A1 (en) 2017-09-08 2019-03-14 株式会社ソニー・インタラクティブエンタテインメント Calibration device, calibration system, and calibration method
JP2020038550A (en) 2018-09-05 2020-03-12 株式会社明電舎 Line sensor camera calibration apparatus and method

Also Published As

Publication number Publication date
JP2022112695A (en) 2022-08-03

Similar Documents

Publication Publication Date Title
JP6641729B2 (en) Line sensor camera calibration apparatus and method
EP2795579B1 (en) Image registration method and system robust to noise
JP6664000B2 (en) Calibration device, calibration method, optical device, photographing device, and projection device
EP2926543B1 (en) A method of calibrating a camera and a system therefor
CN102472609B (en) Position and posture calibration method and device
JP6217227B2 (en) Calibration apparatus, method and program
JP6079333B2 (en) Calibration apparatus, method and program
US10771776B2 (en) Apparatus and method for generating a camera model for an imaging system
CN102750697A (en) A parameter calibration method and device
CN101887585B (en) Method for calibrating camera based on non-coplanar characteristic point
JP7044016B2 (en) Line sensor camera calibration device and method
WO2016042779A1 (en) Triangulation device, triangulation method, and recording medium recording program therefor
JP7121936B2 (en) Camera calibration information acquisition device, image processing device, camera calibration information acquisition method and program
CN112686961B (en) Correction method and device for calibration parameters of depth camera
CN109003312B (en) Camera calibration method based on nonlinear optimization
CN103258328A (en) Method for locating distorted center of wide-field lens
JP2012198031A (en) Image correction method and image correction device
JP5998532B2 (en) Correction formula calculation method, correction method, correction apparatus, and imaging apparatus
CN109544642B (en) N-type target-based TDI-CCD camera parameter calibration method
CN117953083B (en) Robot vision guiding method, device, equipment and storage medium
JP6696230B2 (en) Stereo calibration device and stereo calibration method for line sensor camera
JP7517170B2 (en) Calibration device and calibration method for line sensor camera
KR20250136030A (en) Method and device of camera calibration algorithm using unbiased estimator of distorted conic
CN117197170A (en) A method and system for measuring the field of view of a monocular camera
Ricolfe-Viala et al. Optimal conditions for camera calibration using a planar template

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230830

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240523

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240617

R150 Certificate of patent or registration of utility model

Ref document number: 7517170

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150