JP2013239905A - Calibration apparatus for in-vehicle camera - Google Patents

Calibration apparatus for in-vehicle camera Download PDF

Info

Publication number
JP2013239905A
JP2013239905A JP2012111721A JP2012111721A JP2013239905A JP 2013239905 A JP2013239905 A JP 2013239905A JP 2012111721 A JP2012111721 A JP 2012111721A JP 2012111721 A JP2012111721 A JP 2012111721A JP 2013239905 A JP2013239905 A JP 2013239905A
Authority
JP
Japan
Prior art keywords
calibration
parameter value
internal parameter
camera
index
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.)
Pending
Application number
JP2012111721A
Other languages
Japanese (ja)
Inventor
Hiroyuki Kimura
浩之 木村
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.)
Faurecia Clarion Electronics Co Ltd
Original Assignee
Clarion Co Ltd
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 Clarion Co Ltd filed Critical Clarion Co Ltd
Priority to JP2012111721A priority Critical patent/JP2013239905A/en
Publication of JP2013239905A publication Critical patent/JP2013239905A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To calibrate an internal parameter value of a camera within a short period of time in a simple way.SOLUTION: A calibration apparatus for in-vehicle camera images at least three calibration indices 80, disposed within an imaging area of a camera 20 and aligned on a straight line, with the camera 20 which has a default internal parameter value and a default external parameter value. The calibration apparatus for in-vehicle camera calculates positions of the calibration indices 80 for at least three of them, within the imaged picture by a calibration index position calculation part 71. Based on the calculated positions, a linearity calculation part 72 calculates an angle ωbetween a line, passing through two calibration indices within at least the three of the calibration indices 80 aligned on a straight line, and another line, passing through one of the two calibration indices and a calibration index other than the two calibration indices. An internal parameter value adjustment part 74 adjusts the internal parameter value so as to make the angle ωsmaller than a predetermined value.

Description

本発明は、車両に搭載されたカメラのキャリブレーションを行う車載カメラのキャリブレーション装置に関する。   The present invention relates to an in-vehicle camera calibration device that calibrates a camera mounted on a vehicle.

近年、自動車にカメラおよびモニタを設置して、カメラで撮影した車両周囲の映像を車室内のモニタに表示して、運転操作時の利便性を向上させる技術が提案されている。   2. Description of the Related Art In recent years, a technique has been proposed in which a camera and a monitor are installed in an automobile, and images around the vehicle photographed by the camera are displayed on a monitor in the vehicle interior to improve convenience during driving operation.

このような車載カメラとして、車の前方を撮影するフロントカメラ、後方を撮影するリアカメラ、側方を撮影するサイドカメラなど、複数のカメラを備えて、各カメラで撮影された映像を切り替えて表示するシステムや、画面の表示領域を分割して、分割して得られた各表示領域に、これらの映像を個別に表示するシステムが実用化されている。   As such an in-vehicle camera, there are multiple cameras such as a front camera that captures the front of the car, a rear camera that captures the rear, and a side camera that captures the side, and the images captured by each camera can be switched and displayed. Systems that divide the display area of the screen and display these videos individually in each of the display areas obtained by the division have been put into practical use.

また、モニタに映ったカメラ映像に車両の予測軌跡を重畳表示するシステムや、前記した複数の映像を、それぞれ、例えば車両の真上から見た擬似的な映像に変換する、いわゆる視点変換処理を施した上で、これら複数の映像をシームレスに繋げて俯瞰映像を表示するシステムも実用化されている。   In addition, a system that superimposes and displays a predicted trajectory of a vehicle on a camera image displayed on a monitor, or a so-called viewpoint conversion process that converts each of the plurality of images into, for example, a pseudo image viewed from directly above the vehicle. In addition, a system that seamlessly connects these multiple images and displays an overhead image has also been put into practical use.

このような予測軌跡の表示や俯瞰映像の表示を行う場合には、車両に対するカメラの設置位置や設置姿勢を表すカメラパラメータを精度よく調整する必要があった。   When displaying such a predicted trajectory or a bird's-eye view video, it is necessary to accurately adjust camera parameters representing the installation position and installation orientation of the camera with respect to the vehicle.

カメラパラメータには、カメラの焦点距離、矩形画素の縦横比、画像の中心位置(光軸位置)、レンズ歪等の設計値(内部要素)に依存する内部パラメータと、カメラの設置位置や設置方向に依存する外部パラメータとがある。一般には、内部パラメータの値(内部パラメータ値)はカメラ単体で既に調整済みであるとして、カメラを車両に設置した後で外部パラメータの値(外部パラメータ値)のみを調整(キャリブレーション)している。しかし、内部パラメータ値の調整が不十分である場合には、仮に外部パラメータ値の調整を行っても、直線状の物体が歪曲して画像化されるという問題があった。そのため、カメラの内部パラメータ値と外部パラメータ値は、ともに調整できることが望ましい。   Camera parameters include camera focal length, rectangular pixel aspect ratio, image center position (optical axis position), internal parameters that depend on design values (internal elements) such as lens distortion, camera installation position and orientation Depending on the external parameters. Generally, assuming that the internal parameter value (internal parameter value) has already been adjusted by the camera alone, only the external parameter value (external parameter value) is adjusted (calibrated) after the camera is installed in the vehicle. . However, when the adjustment of the internal parameter value is insufficient, there is a problem that even if the external parameter value is adjusted, the linear object is distorted and imaged. Therefore, it is desirable that both the internal parameter value and the external parameter value of the camera can be adjusted.

そのため、外部パラメータ値と内部パラメータ値の両方の調整を行うことができるキャリブレーション装置が提案されている(例えば、特許文献1)。   Therefore, a calibration device that can adjust both the external parameter value and the internal parameter value has been proposed (for example, Patent Document 1).

特開2003−307466号公報JP 2003-307466 A

この特許文献1に記載されたキャリブレーション装置によると、キャリブレーション指標を撮像した画像の中から、画像内におけるキャリブレーション指標の位置を算出して、こうして算出された画像内の位置と、キャリブレーション指標が本来観測されると予測される画像内の位置と、のずれの大きさを小さくすることによって、外部パラメータ値と内部パラメータ値のキャリブレーションを行っている。   According to the calibration apparatus described in Patent Document 1, the position of the calibration index in the image is calculated from the image obtained by capturing the calibration index, and the position in the image thus calculated and the calibration are calculated. The external parameter value and the internal parameter value are calibrated by reducing the amount of deviation from the position in the image where the index is expected to be observed.

しかしながら、特に内部パラメータ値のキャリブレーションにおいては、内部パラメータの数や種類が多いため、それに伴って多くのキャリブレーション指標が必要となり、これによって演算処理の時間が増加するという問題点があった。   However, especially in the calibration of internal parameter values, since the number and types of internal parameters are large, a large number of calibration indices are required accordingly, which increases the processing time.

さらに、特許文献1に記載されたキャリブレーション装置にあっては、異なる2方向からキャリブレーション指標を撮像する必要があるため、キャリブレーション作業に手間と時間がかかるという問題点があった。   Furthermore, in the calibration apparatus described in Patent Document 1, it is necessary to image the calibration index from two different directions, so that there is a problem that the calibration work takes time and effort.

本発明は上記事情に鑑みなされたもので、キャリブレーションに多くの指標を必要とする、カメラの内部パラメータ値のキャリブレーションを、短時間で簡便に行うことができる車載カメラのキャリブレーション装置を提供することを目的とする。   The present invention has been made in view of the above circumstances, and provides an in-vehicle camera calibration device that can easily calibrate internal parameter values of a camera that requires many indexes for calibration in a short time. The purpose is to do.

本発明に係る車載カメラのキャリブレーション装置は、光学系と受光素子とを備え、デフォルトの内部パラメータ値とデフォルトの外部パラメータ値を有するカメラと、前記カメラの撮像範囲内に配置された、直線上に並ぶ少なくとも3個のキャリブレーション指標と、前記カメラで前記キャリブレーション指標を撮像した画像の中から、少なくとも3個のキャリブレーション指標の前記画像内での位置を算出するキャリブレーション指標位置算出部と、前記キャリブレーション指標位置算出部で算出された前記位置に基づいて、前記画像内において、前記少なくとも3個のキャリブレーション指標のうち、2個のキャリブレーション指標の位置を通る直線と、前記2個のキャリブレーション指標のうちの一方のキャリブレーション指標の位置と前記2個のキャリブレーション指標以外のキャリブレーション指標の位置を通る直線と、のなす角度を算出する直線性算出部と、前記直線性算出部で算出された前記角度に基づいて、前記カメラの少なくとも1つの内部パラメータ値を調整する内部パラメータ値調整部と、前記内部パラメータ値調整部によって調整された内部パラメータ値と前記デフォルトの外部パラメータ値とに基づいて、前記画像内におけるキャリブレーション指標の位置を計算するキャリブレーション指標位置再計算部と、前記直線性算出部で算出された前記角度の値に基づいて、内部パラメータ値の調整を終了する判断を行うキャリブレーション終了判断部と、を有することを特徴とする。   An in-vehicle camera calibration device according to the present invention includes an optical system and a light receiving element, a camera having a default internal parameter value and a default external parameter value, and a straight line disposed within an imaging range of the camera. And at least three calibration indices, and a calibration index position calculation unit that calculates positions of at least three calibration indices in the image from images obtained by capturing the calibration indices with the camera. Based on the position calculated by the calibration index position calculation unit, a straight line passing through the positions of two calibration indices among the at least three calibration indices in the image, and the two Of one calibration index of And a straight line passing through the position of a calibration index other than the two calibration indices, a linearity calculation unit that calculates an angle formed by the linearity calculation unit, and the angle calculated by the linearity calculation unit, An internal parameter value adjusting unit for adjusting at least one internal parameter value; a position of a calibration index in the image based on the internal parameter value adjusted by the internal parameter value adjusting unit and the default external parameter value; A calibration index position recalculation unit that calculates the value, and a calibration end determination unit that determines to end the adjustment of the internal parameter value based on the value of the angle calculated by the linearity calculation unit. It is characterized by.

このように構成された本発明の請求項1に係る車載カメラのキャリブレーション装置によれば、デフォルトの内部パラメータ値とデフォルトの外部パラメータ値を有するカメラの撮像範囲内に配置された、直線上に並ぶ少なくとも3個のキャリブレーション指標をカメラで撮像して、こうして撮像された画像の中から、キャリブレーション指標位置算出部によって少なくとも3個のキャリブレーション指標の画像内での位置を算出して、こうして算出された少なくとも3個のキャリブレーション指標の画像内での位置に基づいて、直線性算出部において、同一直線上にある少なくとも3個のキャリブレーション指標のうち、2個のキャリブレーション指標を通る直線と、2個のキャリブレーション指標のうちの一方と2個のキャリブレーション指標以外のキャリブレーション指標を通る直線と、のなす角度を算出して、内部パラメータ値調整部において、直線性算出部で算出された角度に基づいて、内部パラメータ値を調整して、こうして調整された内部パラメータ値とデフォルトの外部パラメータ値に基づいて、キャリブレーション指標位置再計算部において、画像内におけるキャリブレーション指標の位置を再計算して、キャリブレーション終了判断部が、再計算されたキャリブレーション指標の位置に基づいて直線性算出部で算出された角度によって、内部パラメータ値の調整を終了する判断を行うため、キャリブレーション指標を撮像した画像の中で、直線上に配置された少なくとも3つのキャリブレーション指標の直線性が評価されて、その評価結果に基づいて、3つのキャリブレーション指標の直線性が高くなる方向に内部パラメータ値が調整されるため、キャリブレーション指標を撮像した画像を用いて、内部パラメータ値の調整を短時間で簡便に行うことができる。   According to the on-vehicle camera calibration device according to the first aspect of the present invention configured as described above, on the straight line arranged in the imaging range of the camera having the default internal parameter value and the default external parameter value. At least three calibration indices arranged in a line are imaged by a camera, and the positions of at least three calibration indices in the image are calculated by the calibration index position calculation unit from the images thus captured. Based on the calculated positions of at least three calibration indices in the image, the linearity calculation unit uses a straight line passing through two calibration indices among at least three calibration indices on the same straight line. And one of the two calibration indices and two calibration indices. The angle formed by the straight line passing through the calibration index other than the index is calculated, and the internal parameter value adjustment unit adjusts the internal parameter value based on the angle calculated by the linearity calculation unit, and is thus adjusted. Based on the internal parameter value and the default external parameter value, the calibration index position recalculation unit recalculates the position of the calibration index in the image, and the calibration end determination unit recalculates the calibration. In order to determine whether to end the adjustment of the internal parameter value based on the angle calculated by the linearity calculation unit based on the position of the index, at least three images arranged on the straight line in the image obtained by capturing the calibration index The linearity of the calibration index is evaluated, and based on the evaluation result, Since the intrinsic parameters are adjusted in the direction in which linearity is higher the catcher calibration indices, using the image of the captured calibration indices, it can be easily performed in a short time to adjust the internal parameter values.

本発明に係る車載カメラのキャリブレーション装置によれば、キャリブレーション指標を撮像した1枚の画像を用いて、カメラの内部パラメータ値のキャリブレーションを短時間で正確に行うことができる車載カメラのキャリブレーション装置を提供することができる。   According to the in-vehicle camera calibration apparatus of the present invention, the in-vehicle camera calibration capable of accurately calibrating the internal parameter values of the camera in a short time using a single image obtained by imaging the calibration index. Can be provided.

本発明の実施例に係る車載カメラのキャリブレーション装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the calibration apparatus of the vehicle-mounted camera which concerns on the Example of this invention. 本発明の実施例におけるキャリブレーション指標の配置例を示す図である。It is a figure which shows the example of arrangement | positioning of the calibration parameter | index in the Example of this invention. (a)はキャリブレーション指標を撮像して得られた画像の一例である。(b)は、(a)の画像のキャリブレーション指標の位置を、内部パラメータ値と外部パラメータ値に基づいて変換した画像である。(A) is an example of an image obtained by imaging a calibration index. (B) is an image obtained by converting the position of the calibration index of the image of (a) based on the internal parameter value and the external parameter value. (a)はキャリブレーション指標の直線性を評価する方法の1例を説明する図である。(b)はキャリブレーション指標の直線性を評価する方法の別の例を説明する図である。(A) is a figure explaining an example of the method of evaluating the linearity of a calibration parameter | index. (B) is a figure explaining another example of the method of evaluating the linearity of a calibration parameter | index. 本発明の実施例におけるキャリブレーション作業の流れを説明するフローチャートである。It is a flowchart explaining the flow of the calibration operation | work in the Example of this invention. 本発明の実施例における内部パラメータ値のキャリブレーション作業の流れを説明するフローチャートである。It is a flowchart explaining the flow of the calibration operation | work of the internal parameter value in the Example of this invention. 本発明の実施例における外部パラメータ値のキャリブレーション作業の流れを説明するフローチャートである。It is a flowchart explaining the flow of the calibration operation | work of the external parameter value in the Example of this invention. 本発明の実施例において画像表示部に表示される画像の一例を示す図である。It is a figure which shows an example of the image displayed on an image display part in the Example of this invention.

以下、本発明に係るカメラのキャリブレーション装置の実施形態について、図面を参照して説明する。   Embodiments of a camera calibration apparatus according to the present invention will be described below with reference to the drawings.

本実施例は、本発明の車載カメラのキャリブレーション装置を、車載された複数のカメラで車両の周囲を監視して、撮像された複数の画像を、それぞれ、車両の真上から車両を俯瞰した俯瞰画像に変換して、さらに、それらの俯瞰画像を1枚の画像に合成して表示する車両周辺監視装置に適用した例である。   In this embodiment, the in-vehicle camera calibration device of the present invention is monitored around the vehicle with a plurality of in-vehicle cameras, and a plurality of captured images are respectively viewed from directly above the vehicle. This is an example applied to a vehicle periphery monitoring device that converts to a bird's-eye view image and further combines and displays the bird's-eye view image into a single image.

まず、図1から図3を用いて本装置の構成を説明する。本実施例に係る車両周辺監視装置5は、図2に示す車両10に設置されている。   First, the configuration of this apparatus will be described with reference to FIGS. The vehicle periphery monitoring device 5 according to the present embodiment is installed in the vehicle 10 shown in FIG.

車両10の前方には、車両前方を撮像する第1カメラ21が設置されており、車両10の左側方には、車両左側方を撮像する第2カメラ22が設置されており、車両10の右側方には、車両右側方を撮像する第3カメラ23が設置されており、車両10の後方には、車両後方を撮像する第4カメラ24が設置されている。   A first camera 21 that images the front of the vehicle is installed in front of the vehicle 10, and a second camera 22 that images the left side of the vehicle is installed on the left side of the vehicle 10. The third camera 23 that captures the right side of the vehicle is installed on the side, and the fourth camera 24 that captures the rear of the vehicle is installed behind the vehicle 10.

以後、特に識別する必要がない場合は、第1カメラ21、第2カメラ22、第3カメラ23、第4カメラ24を総称してカメラ20と呼ぶ。   Hereinafter, the first camera 21, the second camera 22, the third camera 23, and the fourth camera 24 are collectively referred to as the camera 20 unless it is particularly necessary to identify them.

そして、車両10前方の地面や床面には、第1カメラ21で撮像可能な第1指標81が配置されており、車両10左側方の地面や床面には、第2カメラ22で撮像可能な第2指標82が配置されており、車両10右側方の地面や床面には、第3カメラ23で撮像可能な第3指標83が配置されており、車両10後方の地面や床面には、第4カメラ24で撮像可能な第4指標84が配置されている。   A first index 81 that can be captured by the first camera 21 is disposed on the ground or floor in front of the vehicle 10, and can be captured by the second camera 22 on the ground or floor on the left side of the vehicle 10. A second index 82 is disposed, and a third index 83 that can be imaged by the third camera 23 is disposed on the ground or floor surface on the right side of the vehicle 10, and is disposed on the ground or floor surface behind the vehicle 10. Is arranged with a fourth index 84 that can be imaged by the fourth camera 24.

ここで、前記した車両10が置かれている地面や床面は、平面形状であるものとする。   Here, the ground and the floor on which the vehicle 10 is placed are assumed to be planar.

第1指標81は、縦横に3個ずつ配列された、個々の指標である同一サイズ、同一形状の黒い円形マーカ(81a、81b、81c、81d、81e、81f、81g、81h、81i)からなり、第2指標82は、縦横に3個ずつ配列された、個々の指標である同一サイズ、同一形状の黒い円形マーカ(82a、82b、82c、82d、82e、82f、82g、82h、82i)からなり、第3指標83は、縦横に3個ずつ配列された、個々の指標である同一サイズ、同一形状の黒い円形マーカ(83a、83b、83c、83d、83e、83f、83g、83h、83i)からなり、第4指標84は、縦横に3個ずつ配列された、個々の指標である同一サイズ、同一形状の黒い円形マーカ(84a、84b、84c、84d、84e、84f、84g、84h、84i)からなる。なお、これらの円形マーカのうち、縦方向に並んだ3個の円形マーカと横方向に並んだ3個の円形マーカは、いずれも直線上に配置されている。   The first index 81 is composed of black circular markers (81a, 81b, 81c, 81d, 81e, 81f, 81g, 81h, 81i) having the same size and the same shape, which are individual indices, arranged three by one vertically and horizontally. The second index 82 is composed of black circular markers (82a, 82b, 82c, 82d, 82e, 82f, 82g, 82h, 82i) of the same size and the same shape, each of which is arranged in three vertical and horizontal directions. Thus, the third index 83 is a black circular marker having the same size and the same shape (83a, 83b, 83c, 83d, 83e, 83f, 83g, 83h, and 83i), each of which is an individual index and is arranged three by three. The fourth index 84 is a black circular marker (84a, 84b, 84c, 84d, 84) having the same size and the same shape, which is an individual index, arranged in three vertical and horizontal directions. , It made 84f, 84g, 84h, from 84i). Of these circular markers, three circular markers arranged in the vertical direction and three circular markers arranged in the horizontal direction are all arranged on a straight line.

以後、特に識別する必要がない場合は、第1指標81、第2指標82、第3指標83、第4指標84を総称してキャリブレーション指標80と呼ぶ。   Hereinafter, when it is not particularly necessary to identify, the first index 81, the second index 82, the third index 83, and the fourth index 84 are collectively referred to as a calibration index 80.

本車両周辺監視装置5は、さらに、図1に示すように、第1カメラ21、第2カメラ22、第3カメラ23、第4カメラ24にトリガをかけて撮像を行わせ、撮像された画像を入力してA/D変換を行ってデジタル画像に変換する画像入力部30と、カメラ20から入力された画像の記憶、カメラ20から入力された画像の座標変換や合成処理、後述する画像表示部60への画像表示の実施、および、車両から取得した情報に基づく予測軌跡の描画などの画像制御を行う画像制御部40と、キャリブレーションの結果得られた座標変換テーブル、および、複数のカメラで撮像した画像を俯瞰画像に変換して、さらに1枚の画像に合成する際の座標変換テーブルを記憶保持しておくデータテーブル50と、データテーブル50に記憶された情報に基づいて座標変換された画像が出力される画像表示部60と、内部パラメータ値と外部パラメータ値のキャリブレーションを行うキャリブレーション実行部70を備えている。   Further, as shown in FIG. 1, the vehicle periphery monitoring apparatus 5 triggers the first camera 21, the second camera 22, the third camera 23, and the fourth camera 24 to perform imaging, and the captured image The image input unit 30 that performs A / D conversion and converts it into a digital image, stores the image input from the camera 20, coordinate conversion and synthesis processing of the image input from the camera 20, and image display to be described later An image control unit 40 for performing image display on the unit 60 and image control such as drawing a predicted trajectory based on information obtained from the vehicle, a coordinate conversion table obtained as a result of calibration, and a plurality of cameras A data table 50 that stores and holds a coordinate conversion table for converting an image captured in step S1 into an overhead image and further compositing the image, and information stored in the data table 50 An image display unit 60 image coordinate transformation are output based, and a calibration execution unit 70 which performs calibration of the intrinsic parameters and extrinsic parameters values.

キャリブレーション実行部70は、さらに、撮像されたキャリブレーション指標の画像内での位置を算出するキャリブレーション指標位置算出部71と、キャリブレーション指標位置算出部71で算出されたキャリブレーション指標のうち、直線上に配置された3つのキャリブレーション指標の画像上での直線性を算出する直線性算出部72と、直線性算出部72で算出された直線性に基づいてキャリブレーションの終了判断を行うキャリブレーション終了判断部73と、直線性算出部72で算出された直線性に基づいて第1カメラ21から第4カメラ24の内部パラメータ値を調整する内部パラメータ値調整部74と、キャリブレーション指標位置算出部71で算出されたキャリブレーション指標の画像内での位置と、第1カメラ21から第4カメラ24の外部パラメータ値に基づいて計算された画像内におけるキャリブレーション指標の位置とのずれの大きさを算出する指標位置ずれ量算出部76と、指標位置ずれ量算出部76で算出された位置ずれの大きさに基づいて第1カメラ21から第4カメラ24の外部パラメータ値を調整する外部パラメータ値調整部77と、内部パラメータ値調整部74で調整された内部パラメータ値、または、外部パラメータ値調整部77で調整された外部パラメータ値に基づいて、画像上のキャリブレーション指標の位置を再計算するキャリブレーション指標位置再計算部75と、を有する。   The calibration execution unit 70 further includes a calibration index position calculation unit 71 that calculates the position of the captured calibration index in the image, and among the calibration indexes calculated by the calibration index position calculation unit 71. A linearity calculation unit 72 that calculates linearity on an image of three calibration indexes arranged on a straight line, and calibration that determines whether calibration is completed based on the linearity calculated by the linearity calculation unit 72 An end parameter determining unit 73, an internal parameter value adjusting unit 74 for adjusting the internal parameter values of the fourth camera 24 from the first camera 21 based on the linearity calculated by the linearity calculating unit 72, and a calibration index position calculation The position of the calibration index calculated by the unit 71 in the image and the first camera 21 Calculated by the index position deviation amount calculation unit 76 that calculates the magnitude of deviation from the position of the calibration index in the image calculated based on the external parameter values of the four cameras 24, and the index position deviation amount calculation unit 76. An external parameter value adjustment unit 77 that adjusts external parameter values of the first camera 21 to the fourth camera 24 based on the magnitude of the positional deviation, and an internal parameter value adjusted by the internal parameter value adjustment unit 74, or an external parameter And a calibration index position recalculation unit 75 that recalculates the position of the calibration index on the image based on the external parameter value adjusted by the value adjustment unit 77.

次に、本実施形態に係る車両周辺監視装置5の作用について、図5〜7のフローチャートに基づいて説明する。   Next, the effect | action of the vehicle periphery monitoring apparatus 5 which concerns on this embodiment is demonstrated based on the flowchart of FIGS.

全体の処理の流れを、図5のフローチャートに示す。本実施例では、まずステップS50において、内部パラメータ値のキャリブレーションが行われて、次にステップS55において、外部パラメータ値のキャリブレーションが行われる。   The overall process flow is shown in the flowchart of FIG. In the present embodiment, first, in step S50, internal parameter values are calibrated, and in step S55, external parameter values are calibrated.

次に、第1カメラ21の内部パラメータ値のキャリブレーションの流れを、図6のフローチャートに基づいて説明する。   Next, the flow of calibration of the internal parameter values of the first camera 21 will be described based on the flowchart of FIG.

まず、第1カメラ21で第1指標81の撮像を行う(ステップS60)。   First, the first camera 81 images the first index 81 (step S60).

ここで、ステップS60において、例えば、図3(a)に示す画像が撮像されたものとする。   Here, in step S60, for example, it is assumed that the image shown in FIG.

図3(a)に示す画像は、第1カメラ21で、第1指標81を撮像して得られた画像の例であり、縦横に延びた直線上に3個ずつ規則的に配列された同一サイズ、同一形状の9個の黒い円形マーカ(81a、81b、81c、81d、81e、81f、81g、81h、81i)が、それぞれ、撮像された画像上で9個の像(81a’、81b’、81c’、81d’、81e’、81f’、81g’、81h’、81i’)として撮像された様子を表している。   The image shown in FIG. 3 (a) is an example of an image obtained by imaging the first index 81 with the first camera 21, and the same three images are regularly arranged on a straight line extending vertically and horizontally. Nine black circular markers (81a, 81b, 81c, 81d, 81e, 81f, 81g, 81h, 81i) of the same size and shape have nine images (81a ′, 81b ′) on the captured images, respectively. , 81c ′, 81d ′, 81e ′, 81f ′, 81g ′, 81h ′, 81i ′).

このとき、第1カメラ21は、地面や床面に設置された第1指標81を斜め方向から観測しているため、第1カメラ21から近い位置にある円形マーカほど、面積が大きく、かつ、円形マーカ同士の間隔が広く撮像される。   At this time, since the first camera 21 is observing the first index 81 installed on the ground or floor from an oblique direction, the circular marker located closer to the first camera 21 has a larger area, and A wide interval between the circular markers is imaged.

そして、さらに、第1カメラ21の内部パラメータ値と外部パラメータ値のキャリブレーションが済んでいないため、縦横に延びた直線上に3個ずつ規則的に配列された第1指標81の像は、図3(a)に示すように、直線からずれて画像化される。   Further, since the calibration of the internal parameter value and the external parameter value of the first camera 21 has not been completed, the image of the first index 81 regularly arranged three by three on a straight line extending vertically and horizontally is shown in FIG. As shown in FIG. 3A, the image is shifted from the straight line.

次に、ステップS60で撮像された画像の中から、キャリブレーション指標位置算出部71の作用によって、第1指標81の画像内における位置座標が算出される(ステップS61)。   Next, position coordinates in the image of the first index 81 are calculated from the image captured in step S60 by the action of the calibration index position calculation unit 71 (step S61).

ステップS61では、まず、撮像された画像に輪郭抽出処理を施し、9個の円形マーカの輪郭を抽出する。次に、輪郭を抽出した画像を予め設定されたしきい値で2値化することで、9個の円形マーカの輪郭を構成する画素を決定する。本実施例の場合、白地に黒い指標を検出するため、所定のしきい値よりも暗い画素を検出する2値化処理が行われ、例えば、所定値よりも暗い画素には1、所定値よりも明るい画素には0が与えられて、円形マーカの輪郭を表す2値画像が生成される。   In step S61, first, contour extraction processing is performed on the captured image, and the contours of nine circular markers are extracted. Next, the image which extracted the outline is binarized with the preset threshold value, The pixel which comprises the outline of nine circular markers is determined. In this embodiment, in order to detect a black index on a white background, a binarization process for detecting pixels darker than a predetermined threshold value is performed. The bright pixels are given 0, and a binary image representing the outline of the circular marker is generated.

ここで、撮像される画像の明るさは、周囲の明るさや撮像条件(シャッタ速度や絞り)等によって変化するため、前記した所定のしきい値は、キャリブレーション作業を行う操作者が、撮像された画像とそこから生成された、第1指標81の輪郭を表す2値画像を見ながら、任意に変更できるようにしてもよい。   Here, since the brightness of the image to be captured varies depending on the ambient brightness, imaging conditions (shutter speed, aperture, etc.), the predetermined threshold value is captured by the operator who performs the calibration operation. The image may be arbitrarily changed while viewing the binary image representing the contour of the first index 81 and the image generated therefrom.

こうして2値化された9個の第1指標81の輪郭を表す2値画像に対して、次に、輪郭を表す2値画像の重心位置の座標(x,y)を求める処理を行う。 Next, a process of obtaining the coordinates (x g , y g ) of the centroid position of the binary image representing the contour is performed on the binary image representing the contour of the nine first indexes 81 binarized in this way. .

このとき、輪郭を表す2値画像の重心位置の座標を求める前に、生成された2値画像に対して、領域に番号を付けるラベリング処理を行って、9個の第1指標81が漏れなく検出できたことを確認するようにしてもよい。そして、第1指標81が9個全て検出されないとき、もしくは、9個を越える領域が検出されたときは、2値化のしきい値を変更して再度2値化処理が繰り返される。   At this time, before obtaining the coordinates of the center of gravity position of the binary image representing the contour, a labeling process for numbering the region is performed on the generated binary image, and the nine first indexes 81 are not leaked. You may make it confirm that it was able to detect. When all nine first indices 81 are not detected, or when more than nine areas are detected, the binarization threshold is changed and the binarization process is repeated again.

第1指標81の輪郭を表す2値画像の重心位置の座標(x,y)を求める処理は、抽出した9個の第1指標81の像の各々に対して、1つのキャリブレーション指標の像を構成する画素の水平方向座標(x座標)の総和Σxと、垂直方向の座標(y座標)の総和Σyと、像の面積Sをそれぞれ算出して、(式1)、(式2)によって算出する。
=Σx/S (式1)
=Σy/S (式2)
The process of obtaining the coordinates (x g , y g ) of the centroid position of the binary image representing the contour of the first index 81 is one calibration index for each of the nine extracted images of the first index 81. A total sum Σx of horizontal coordinates (x coordinates), a total sum Σy of vertical coordinates (y coordinates), and an area S of the image are calculated respectively as (Equation 1) and (Equation 2). ).
x g = Σx / S (Formula 1)
y g = Σy / S (Formula 2)

(式1)と(式2)で算出された第1指標81の各々の指標の座標値は、後述する直線性評価に利用するため、各々の指標の設置位置と関連付けて、すなわち、例えば第1指標81の配列を行列表現して、各行番号、および各列番号と関連付けて、直線性算出部72の中に記憶される。   The coordinate value of each index of the first index 81 calculated by (Equation 1) and (Equation 2) is associated with the installation position of each index, for example, in order to use for the linearity evaluation described later. The array of 1 index 81 is expressed in a matrix form and stored in the linearity calculation unit 72 in association with each row number and each column number.

以後、同様の処理が、第2カメラ22で撮像された第2指標82の画像、第3カメラ23で撮像された第3指標83の画像、第4カメラ24で撮像された第4指標84の画像に対しても行われる。   Thereafter, the same processing is performed for the second index 82 image captured by the second camera 22, the third index 83 image captured by the third camera 23, and the fourth index 84 captured by the fourth camera 24. It is also performed on images.

次に、内部パラメータ値調整部74において、第1カメラ21の内部パラメータ値と外部パラメータ値が暫定的に設定される(ステップS62)。   Next, the internal parameter value adjustment unit 74 provisionally sets the internal parameter value and the external parameter value of the first camera 21 (step S62).

ここで、内部パラメータ値として、レンズの焦点距離であるf、撮像素子の画素の縦方向サイズSyと画素の横方向サイズSx(Sy/Sxが撮像素子のアスペクト比を表す)、画像上の光軸の位置である(Cx,Cy)、レンズ歪Distortion(x,y)のそれぞれの値が設定される。なお、これらの内部パラメータ値の正確な値は、キャリブレーションが終了するまでわからないため、暫定値として、デフォルト値が設定される。そして、デフォルト値としては、設計値を設定しておくのが望ましい。   Here, as the internal parameter value, f which is the focal length of the lens, the vertical size Sy of the pixel of the image sensor and the horizontal size Sx of the pixel (Sy / Sx represents the aspect ratio of the image sensor), the light on the image Respective values of the axis position (Cx, Cy) and lens distortion Distortion (x, y) are set. Note that the accurate values of these internal parameter values are not known until the calibration is completed, and therefore default values are set as provisional values. And it is desirable to set a design value as a default value.

ステップS62において、外部パラメータ値も暫定的に設定される。具体的には、第1カメラ21が設置された世界座標系での位置座標(T,T,T)と第1カメラ21の設置方向(θ,Φ,ψ)が設定される。なお、θはx軸回りの回転角度を表し、Φはy軸回りの回転角度を表し、ψはz軸回りの回転角度を表す。これらの外部パラメータ値の正確な値は、キャリブレーションが終了するまでわからないため、暫定値として、デフォルト値が設定される。そして、デフォルト値としては、車両10における第1カメラ21の取り付け位置と、第1カメラ21と第1指標81との相対的な位置関係を表す設計値を設定しておくのが望ましい。 In step S62, external parameter values are also provisionally set. Specifically, the position coordinates (T x , T y , T z ) in the world coordinate system where the first camera 21 is installed and the installation direction (θ, Φ, ψ) of the first camera 21 are set. Θ represents a rotation angle around the x axis, Φ represents a rotation angle around the y axis, and ψ represents a rotation angle around the z axis. Since the exact values of these external parameter values are not known until the calibration is completed, default values are set as provisional values. And as a default value, it is desirable to set the design value showing the relative positional relationship between the mounting position of the first camera 21 in the vehicle 10 and the first camera 21 and the first index 81.

ここで、前記した全ての内部パラメータ値を調整する必要がない場合、すなわち、前記した内部パラメータのうち、信頼性の高い内部パラメータ値が事前にわかっているときには、その内部パラメータについてはキャリブレーションを行う必要がないため、内部パラメータのキャリブレーション対象から外してもよい。そのとき、キャリブレーション対象から外した内部パラメータには、事前にわかっている値を設定して、以後のキャリブレーション作業の中で固定値として取り扱う。   Here, when it is not necessary to adjust all the internal parameter values described above, that is, when a reliable internal parameter value is known in advance among the internal parameters, calibration is performed for the internal parameters. Since it is not necessary to perform this, the internal parameter may be excluded from the calibration target. At this time, a value known in advance is set for the internal parameter excluded from the calibration target, and is handled as a fixed value in the subsequent calibration work.

次に、キャリブレーション指標位置再計算部75の作用によって、ステップS61で算出された第1指標81の像の位置座標が、ステップS62で暫定的に設定された内部パラメータ値と外部パラメータ値に基づいて、本来観測されると予測される位置に座標変換される(ステップS63)。   Next, the position coordinate of the image of the first index 81 calculated in step S61 is based on the internal parameter value and the external parameter value provisionally set in step S62 by the action of the calibration index position recalculating unit 75. Thus, the coordinates are converted to a position where it is predicted to be observed (step S63).

ここで、キャリブレーション指標80が設置された世界座標系上の位置(x,y,z)と、キャリブレーション指標80を撮像したカメラの受光素子上に設定したカメラ座標系上の位置(x,y,z)との関係について説明する。ここで、カメラの光軸方向をカメラ座標系のz軸とする。 Here, the position (x w , y w , z w ) on the world coordinate system where the calibration index 80 is installed, and the position on the camera coordinate system set on the light receiving element of the camera that captured the calibration index 80 The relationship with (x c , y c , z c ) will be described. Here, the optical axis direction of the camera is taken as the z-axis of the camera coordinate system.

両者は、前記した外部パラメータ値を介して、(式3)によって結ばれている。   Both are connected by (Equation 3) via the external parameter value described above.

また、(式3)で算出されるキャリブレーション指標の画像上の位置(x,y)は、内部パラメータ値に応じて、(式4)から(式7)にしたがって決定する。
Further, the position (x c , y c ) on the image of the calibration index calculated in (Equation 3) is determined according to (Equation 4) to (Equation 7) according to the internal parameter value.

ここで、(式4)は透視変換に伴って発生する座標のずれを表している。また、(式5)はカメラ20のレンズ系がレンズ歪を有することに伴って発生する座標のずれを表している。そして、(式6)、(式7)は、撮像した光信号をデジタル信号に変換してデジタル画像を生成する際に、撮像素子の画素の縦方向サイズSyと画素の横方向サイズSxが1:1でないことによって発生する座標のずれと、レンズの光軸の位置が画像の中心と一致していないことによって発生する座標のずれ(Cx,Cy)を表している。   Here, (Expression 4) represents a coordinate shift that occurs in accordance with the perspective transformation. Further, (Equation 5) represents a coordinate shift that occurs when the lens system of the camera 20 has lens distortion. (Expression 6) and (Expression 7) indicate that when the captured optical signal is converted into a digital signal to generate a digital image, the vertical size Sy of the pixel of the image sensor and the horizontal size Sx of the pixel are 1. 1 represents a coordinate shift caused by not being 1 and a coordinate shift (Cx, Cy) generated when the position of the optical axis of the lens does not coincide with the center of the image.

次に、ステップS63で座標変換された第1指標81の位置座標に基づいて、直線性算出部72の作用によって、1直線上に配置された少なくとも3個のキャリブレーション指標の直線性が算出される(ステップS64)。   Next, based on the position coordinates of the first index 81 transformed in step S63, the linearity of at least three calibration indices arranged on one straight line is calculated by the action of the linearity calculation unit 72. (Step S64).

この直線性の算出方法について、図4(a)を用いて説明する。   This linearity calculation method will be described with reference to FIG.

図4(a)は、第1指標81の中で直線上に配置された3個の指標が、第1カメラ21で撮像されて、更に、設定された内部パラメータ値と外部パラメータ値に基づいて、画像上で、点P(x,y)、点P(x,y)、点P(x,y)の位置に変換されたことを表している。 In FIG. 4A, three indices arranged on a straight line in the first index 81 are imaged by the first camera 21, and further, based on the set internal parameter value and external parameter value. , On the image, it has been converted to the positions of point P 1 (x 1 , y 1 ), point P 2 (x 2 , y 2 ), and point P 3 (x 3 , y 3 ).

ここで、点P(x,y)、点P(x,y)、点P(x,y)は、それぞれ、図3(a)の左下の像81g’、中央下の像81h’、右下の像81i’に対応しているものとする。すなわち、点P(x,y)、点P(x,y)、点P(x,y)は、元々、直線上に配置されていた3つの指標に対応する点である。 Here, the point P 1 (x 1 , y 1 ), the point P 2 (x 2 , y 2 ), and the point P 3 (x 3 , y 3 ) are respectively the lower left image 81g ′ in FIG. The lower center image 81h ′ corresponds to the lower right image 81i ′. That is, the point P 1 (x 1 , y 1 ), the point P 2 (x 2 , y 2 ), and the point P 3 (x 3 , y 3 ) correspond to the three indexes originally arranged on the straight line. It is a point to do.

このとき、点Pと点Pを結ぶ直線iと、点Pと点Pを結ぶ直線iのなす角度をωとすると、ωは、ベクトルの内積を求める式を利用して、(式8)によって算出される。
In this case, the straight line i 1 connecting the point P 1 and point P 2, when the angle of the straight line i 2 connecting the point P 2 and the point P 3 and omega 1, omega 1 is utilized formula for the inner product of vectors Then, it is calculated by (Equation 8).

こうして算出された角度ωを直線性評価指標として、ωの2乗あるいは絶対値によって直線性を判定する。すなわち、角度ωの値が小さいほど、3点P,P,Pの直線性が高くなる。 Using the angle ω 1 calculated in this way as a linearity evaluation index, linearity is determined by the square or absolute value of ω 1 . That is, the smaller the value of the angle ω 1, the higher the linearity of the three points P 1 , P 2 , P 3 .

なお、上記した角度ωの設定方法は、図4(a)の例に限定されるものではなく、例えば、図4(b)に示すように、点Pと点Pを結ぶ直線iと、点Pと点Pを結ぶ直線iのなす角度をωとして、角度ωの値に基づいて、3点P,P,Pの直線性を評価してもよい。この場合も、角度ωの値が小さいほど、3点P,P,Pの直線性が高くなる。 Note that the method of setting the angle ω 1 is not limited to the example of FIG. 4A. For example, as shown in FIG. 4B, a straight line i connecting the points P 1 and P 2 is used. 1 and the straight line i 3 connecting the points P 1 and P 3 is ω 2 , and the linearity of the three points P 1 , P 2 , P 3 is evaluated based on the value of the angle ω 2. Good. Also in this case, the smaller the value of the angle ω 2, the higher the linearity of the three points P 1 , P 2 , P 3 .

そして、同様にして、図3(b)の直線L,L,L上に配置されている指標の座標が、キャリブレーション指標位置算出部71から順に読み出されて、直線性算出部72において、順次直線性評価指標が算出される。 Similarly, the coordinates of the indices arranged on the straight lines L 2 , L 3 , and L 4 in FIG. 3B are sequentially read from the calibration index position calculating unit 71, and the linearity calculating unit At 72, linearity evaluation indices are sequentially calculated.

次に、内部パラメータ値調整部74の作用によって、直線性算出部72で算出された4つの角度ωが、それぞれ所定のしきい値ωthよりも小さいか否かが判定される(ステップS65)。 Next, it is determined whether or not the four angles ω calculated by the linearity calculation unit 72 are smaller than a predetermined threshold value ω th by the action of the internal parameter value adjustment unit 74 (step S65). .

そして、4つの角度ωが、全て所定のしきい値ωthよりも小さいときは、ステップS68に進み、1つでも所定のしきい値ωthよりも大きい角度ωがあったときは、ステップS66に進む。 When all the four angles ω are smaller than the predetermined threshold value ω th , the process proceeds to step S68, and when at least one angle ω is larger than the predetermined threshold value ω th , the process proceeds to step S66. Proceed to

ステップS66において、内部パラメータ値調整部74の作用によって、後述する内部パラメータ値の調整が所定回数行われたか否かが判定される。内部パラメータ値の調整が所定回数行われたと判定されたときはステップS68に進み、それ以外のときは、ステップS67に進む。   In step S66, it is determined whether or not internal parameter value adjustment described later has been performed a predetermined number of times by the action of the internal parameter value adjustment unit 74. If it is determined that the internal parameter value has been adjusted a predetermined number of times, the process proceeds to step S68. Otherwise, the process proceeds to step S67.

そして、ステップS67において、内部パラメータ値調整部74の作用によって、内部パラメータ値の調整が行われる。   In step S67, the internal parameter value adjustment unit 74 adjusts the internal parameter value.

ここで、カメラ20の内部パラメータについて説明する。カメラ20の内部パラメータには、先述したように、複数のパラメータが含まれている。   Here, the internal parameters of the camera 20 will be described. The internal parameters of the camera 20 include a plurality of parameters as described above.

本実施例では、その全ての内部パラメータのキャリブレーションを行うことができるが、一部の内部パラメータのみのキャリブレーションも行うこともできる。   In this embodiment, all the internal parameters can be calibrated, but only some internal parameters can be calibrated.

なお、キャリブレーションを行う内部パラメータの種類によって、必要となるキャリブレーション指標80を構成する円形マーカの数は異なる。例えば、先述したレンズ歪は、画像上の位置によって異なる歪量を有し、その歪量は、一般に多数のパラメータを用いて記述されるため、レンズ歪のキャリブレーションを行う際には、キャリブレーション指標として多数の円形マーカ(例えば7×7=49点など)を使用する必要がある。   Note that the number of circular markers constituting the required calibration index 80 differs depending on the type of internal parameter to be calibrated. For example, the lens distortion described above has a different amount of distortion depending on the position on the image, and the amount of distortion is generally described using a number of parameters. Therefore, when performing lens distortion calibration, It is necessary to use a large number of circular markers (for example, 7 × 7 = 49 points) as an index.

すなわち、本実施例では、調整する内部パラメータの種類と数に応じた個数の指標である円形マーカが設置される。そして、設置する円形マーカの個数は、調整するパラメータの種類によって異なり、また、調整するパラメータの数が多いほど多く設置するように、調整する内部パラメータの種類と数に応じて、予め決めておく。   In other words, in this embodiment, circular markers, which are the number of indexes corresponding to the types and number of internal parameters to be adjusted, are installed. The number of circular markers to be installed differs depending on the type of parameter to be adjusted, and is determined in advance according to the type and number of internal parameters to be adjusted so that the larger the number of parameters to be adjusted, the greater the number of parameters to be adjusted. .

本実施例では、調整する内部パラメータの種類を3種類とし、その各々の内部パラメータがそれぞれ1つの内部パラメータ値で記述されるとして、さらに、直線性評価を行う直線の数を4本とした場合を例にあげて、内部パラメータ値の調整方法について説明する。なお、調整する内部パラメータ値をp,p,pで表し、また、設定される4本の直線は、図3(b)に示した直線L,L,L,Lに対応しているものとする。 In this embodiment, there are three types of internal parameters to be adjusted, each internal parameter is described by one internal parameter value, and further, the number of straight lines to be evaluated for linearity is four. As an example, a method for adjusting the internal parameter value will be described. The internal parameter values to be adjusted are represented by p 1 , p 2 , and p 3 , and the four set straight lines are the straight lines L 1 , L 2 , L 3 , L 4 shown in FIG. It shall correspond to.

直線L上に配置された3個のキャリブレーション指標に対して算出される直線性評価指標をf(p,p,p)で表すと、f(p,p,p)は、テイラー展開の1次近似式によって、(式9)の形で表される。なお、本実施例の場合、直線性評価を行う直線の本数を4本としたため、(式9)におけるnは、n=1〜4となる。 When the linearity evaluation index calculated for the three calibration indices arranged on the straight line L n is represented by f n (p 1 , p 2 , p 3 ), f n (p 1 , p 2 , p 3 ) is expressed in the form of (Expression 9) by a first order approximation formula of Taylor expansion. In the case of this example, since the number of straight lines to be evaluated for linearity is four, n in (Expression 9) is n = 1 to 4.

ここで、∂f/∂pは、内部パラメータ値p(r=1〜3)を微少変化させたときの直線性評価指標fの変化量を表す。また、dpは内部パラメータ値pの調整量を表す。なお、調整する内部パラメータの選択方法と、その調整量の決め方については後述する。 Here, ∂f n / ∂p r represents the amount of change in linearity metric f n when internal parameter values p r a (r = 1 to 3) was minimal change. Also, dp r represents the adjustment amount of the internal parameter value p r. The method for selecting the internal parameter to be adjusted and how to determine the adjustment amount will be described later.

そして、直線性を評価する直線が4本あるため、(式9)を変形すると(式10)が成り立つ。   Since there are four straight lines for evaluating the linearity, (Expression 10) is satisfied when (Expression 9) is modified.

このとき、(式10)の左辺の行列の逆行列を求めて、求めた逆行列を(式10)の両辺に左側から乗算すると、内部パラメータ値の調整量dp,dp,dpがそれぞれ算出される。 At this time, when the inverse matrix of the matrix on the left side of (Equation 10) is obtained and the obtained inverse matrix is multiplied on both sides of (Equation 10) from the left side, the adjustment amounts dp 1 , dp 2 , dp 3 of the internal parameter values are obtained. Each is calculated.

そして、現在の内部パラメータ値p,p,pに、内部パラメータの調整量dp,dp,dpをそれぞれ加算すると、(式11)によって、新しい内部パラメータ値が算出される。なお、(式11)のpr(n)は、r番めの内部パラメータ値pのn回目の調整値であることを表す。
Then, by adding the adjustment amounts dp 1 , dp 2 , dp 3 of the internal parameters to the current internal parameter values p 1 , p 2 , p 3 , new internal parameter values are calculated by (Equation 11). Note that pr (n) in (Expression 11) represents the nth adjustment value of the r- th internal parameter value pr.

ステップS63において、こうして算出された新しい内部パラメータ値の調整値pr(n)を用いて、画像上の第1指標81の位置を再計算した後、再びステップS64において、(式8)に基づいて、直線L,L,L,Lの各々に対して直線性評価指標である角度ωが算出されて、ステップS65において、算出された4つの角度ωと所定のしきい値ωthとの大小関係が判定される。 In step S63, the position of the first index 81 on the image is recalculated using the adjustment value pr (n) of the new internal parameter value thus calculated, and then in step S64 again, based on (Equation 8). Thus, an angle ω, which is a linearity evaluation index, is calculated for each of the straight lines L 1 , L 2 , L 3 , and L 4. In step S65, the calculated four angles ω and a predetermined threshold value ω are calculated. The magnitude relationship with th is determined.

そして、4つの角度ωが、全てωthよりも小さい(直線性が高くなる)か、もしくは、新しい内部パラメータ値を計算する計算回数が所定の値を超えるまで、ステップS67において内部パラメータ値の調整が繰り返される。内部パラメータ値の調整が完了すると、ステップS63に戻る。 The four angles omega is smaller (linearity is high) than all omega th or, or, until the calculated number of times to calculate a new internal parameter value exceeds a predetermined value, adjusting the internal parameter values in step S67 Is repeated. When the adjustment of the internal parameter value is completed, the process returns to step S63.

こうして調整された第1カメラ21の内部パラメータ値は、ステップS68においてデータテーブル50に記憶される。そして、これにより、第1カメラ21の内部パラメータのキャリブレーションが終了する。   The internal parameter values of the first camera 21 adjusted in this way are stored in the data table 50 in step S68. Thereby, the calibration of the internal parameters of the first camera 21 is completed.

次に、ステップS67で行われる内部パラメータ値の具体的な調整方法について説明する。   Next, a specific method for adjusting the internal parameter value performed in step S67 will be described.

まず、調整すべき内部パラメータ値のうち少なくとも1つの内部パラメータ値を、そのパラメータ値が大きくなる方向、もしくは小さくなる方向のいずれかの方向に所定量だけ調整して、ステップS64において直線性評価指標である角度ωが算出される。   First, at least one of the internal parameter values to be adjusted is adjusted by a predetermined amount in either the direction in which the parameter value increases or decreases, and the linearity evaluation index is determined in step S64. Is calculated.

次に、先ほど調整した内部パラメータ値を、先ほどと同じ方向に再び所定量だけ調整して、直線性評価指標である角度ωを再度算出する。   Next, the internal parameter value adjusted earlier is adjusted again by a predetermined amount in the same direction as before, and the angle ω which is the linearity evaluation index is calculated again.

そして、算出された直線性評価指標である角度ωと、1回前に算出された直線性評価指標である角度ωとの差分値に基づいて、内部パラメータ値の次の調整方向と調整量を計算する。   Based on the difference value between the calculated linearity evaluation index angle ω and the previous linearity evaluation index angle ω, the next adjustment direction and adjustment amount of the internal parameter value are determined. calculate.

すなわち、直線性評価指標である角度ωが小さくなった場合は、内部パラメータ値の調整精度が高くなったと判断して、内部パラメータ値を1回前と同一方向にさらに調整する。   That is, when the angle ω, which is a linearity evaluation index, becomes smaller, it is determined that the adjustment accuracy of the internal parameter value has increased, and the internal parameter value is further adjusted in the same direction as before.

このとき、内部パラメータ値の調整量は、直線性評価指標の差分値に基づいて決定すればよい。すなわち、直線性評価指標の差分値が大きいときは、内部パラメータ値の調整量を小さくして、逆に、直線性評価指標の差分値が小さいときは、内部パラメータ値の調整量を大きくすればよい。これによって、内部パラメータ値を早期に収束させることができるため、キャリブレーションを効率的に行うことができる。   At this time, the adjustment amount of the internal parameter value may be determined based on the difference value of the linearity evaluation index. That is, when the difference value of the linearity evaluation index is large, the adjustment amount of the internal parameter value is decreased. Conversely, when the difference value of the linearity evaluation index is small, the adjustment amount of the internal parameter value is increased. Good. As a result, the internal parameter values can be converged at an early stage, so that calibration can be performed efficiently.

一方、直線性評価指標である角度ωが大きくなった場合は、内部パラメータ値の調整精度が低くなったと判断して、内部パラメータ値を1回前と反対方向に調整する。   On the other hand, when the angle ω, which is a linearity evaluation index, is increased, it is determined that the adjustment accuracy of the internal parameter value has decreased, and the internal parameter value is adjusted in the opposite direction to the previous time.

このとき、内部パラメータの調整量は、直線性評価指標の差分値に基づいて決定される。すなわち、直線性評価指標の差分値が大きいときには、内部パラメータ値の調整量を小さくして、逆に、直線性評価指標の差分値が小さいときには、内部パラメータ値の調整量を大きくすればよい。これによって、内部パラメータ値を早期に収束させることができるため、キャリブレーションを効率的に行うことができる。   At this time, the adjustment amount of the internal parameter is determined based on the difference value of the linearity evaluation index. That is, when the difference value of the linearity evaluation index is large, the adjustment amount of the internal parameter value is decreased. Conversely, when the difference value of the linearity evaluation index is small, the adjustment amount of the internal parameter value may be increased. As a result, the internal parameter values can be converged at an early stage, so that calibration can be performed efficiently.

そして、全く同様の手続きが、第2カメラ22、第3カメラ23、第4カメラ24に対しても行われて、カメラ20の内部パラメータ値のキャリブレーションが終了する。   Then, exactly the same procedure is performed for the second camera 22, the third camera 23, and the fourth camera 24, and the calibration of the internal parameter values of the camera 20 is completed.

ここで、内部パラメータ値を調整する際には、調整の対象とした内部パラメータを1つずつ個別に調整してもよいし、調整する全ての内部パラメータを同時に変更しながら調整してもよい。   Here, when adjusting the internal parameter value, the internal parameters to be adjusted may be individually adjusted one by one, or may be adjusted while simultaneously changing all the internal parameters to be adjusted.

なお、前記した内部パラメータ値のキャリブレーションは、数学的には、非線形の最小二乗法で表現される。そして、具体的には、ガウス・ニュートン法やLevenberg-Marquardt法を用いて解くことができる。   The above-described calibration of the internal parameter value is mathematically expressed by a non-linear least square method. Specifically, it can be solved using the Gauss-Newton method or the Levenberg-Marquardt method.

なお、第1カメラ21に対する内部パラメータ値の調整が終了した後で、同様にして、第2カメラ22、第3カメラ23、第4カメラ24のそれぞれに対する内部パラメータ値の調整が行われる。   After the adjustment of the internal parameter values for the first camera 21 is completed, the internal parameter values for the second camera 22, the third camera 23, and the fourth camera 24 are similarly adjusted.

次に、内部パラメータ値のキャリブレーションに続いて、外部パラメータ値のキャリブレーションが行われる。   Next, calibration of external parameter values is performed following calibration of internal parameter values.

以下、第1カメラ21の外部パラメータ値のキャリブレーションの流れを、図7のフローチャートに基づいて説明する。   Hereinafter, the flow of calibration of the external parameter values of the first camera 21 will be described based on the flowchart of FIG.

まず、外部パラメータ値調整部77において、第1カメラ21の外部パラメータ値と内部パラメータ値が設定される(ステップS70)。外部パラメータ値としては、先に内部パラメータ値のキャリブレーションにおいて、図6のステップS62で設定したデフォルト値を設定すればよい。   First, the external parameter value adjustment unit 77 sets the external parameter value and the internal parameter value of the first camera 21 (step S70). As the external parameter value, the default value previously set in step S62 in FIG. 6 in the internal parameter value calibration may be set.

ステップS70において、同時に内部パラメータ値も設定されるが、これは、先に行った内部パラメータ値のキャリブレーションによって調整されて、データテーブル50に記憶された値が設定される。   In step S70, the internal parameter value is also set at the same time. This is adjusted by the calibration of the internal parameter value performed previously, and the value stored in the data table 50 is set.

次に、キャリブレーション指標位置再計算部75の作用によって、内部パラメータ値のキャリブレーションによって最終的に得られた第1指標81の像の位置座標が、ステップS70で暫定的に設定された内部パラメータ値と外部パラメータ値に基づいて、本来観測されると予測される位置に座標変換される(ステップS71)。この座標変換は、前記した内部パラメータ値のキャリブレーションの説明の中で述べた方法と同様にして行うことができる。   Next, the position coordinate of the image of the first index 81 finally obtained by the calibration of the internal parameter value by the action of the calibration index position recalculating unit 75 is the internal parameter temporarily set in step S70. Based on the value and the external parameter value, coordinate conversion is performed to a position where it is predicted to be observed (step S71). This coordinate conversion can be performed in the same manner as described in the description of the calibration of the internal parameter value.

次に、指標位置ずれ量算出部76の作用によって、内部パラメータ値のキャリブレーションによって最終的に得られた第1指標81の像の位置座標と、ステップS71で算出された第1指標81の像の位置座標とのずれの大きさが算出される(ステップS72)。   Next, the position coordinates of the image of the first index 81 finally obtained by the calibration of the internal parameter value by the action of the index position deviation amount calculation unit 76 and the image of the first index 81 calculated in step S71. The magnitude of the deviation from the position coordinate is calculated (step S72).

具体的には、両者の水平方向の位置のずれΔxと垂直方向の位置のずれΔyが、指標毎に算出される。   Specifically, a horizontal position shift Δx and a vertical position shift Δy are calculated for each index.

こうして算出された水平方向の位置のずれΔxと垂直方向の位置のずれΔyをより小さく調整することによって、外部パラメータ値のキャリブレーションが遂行される。   The external parameter values are calibrated by adjusting the horizontal position shift Δx and the vertical position shift Δy calculated in this way to be smaller.

すなわち、外部パラメータ値調整部77の作用によって、算出された水平方向の位置のずれΔxと垂直方向の位置のずれΔyが、それぞれ所定のしきい値Δxth、およびΔythよりも小さいか否かが判定される(ステップS73)。 That is, whether or not the calculated horizontal position deviation Δx and vertical position deviation Δy are smaller than predetermined threshold values Δx th and Δy th by the action of the external parameter value adjusting unit 77, respectively. Is determined (step S73).

そして、指標毎に算出された複数のΔx、Δyが全て所定のしきい値よりも小さいときは、ステップS76に進み、1つでも所定のしきい値より大きいずれがあったときは、ステップS74に進む。   Then, when all of the plurality of Δx and Δy calculated for each index are smaller than the predetermined threshold value, the process proceeds to step S76, and when even one of the deviations is larger than the predetermined threshold value, the process proceeds to step S74. Proceed to

次に、ステップS74において、外部パラメータ値調整部77の作用によって、後述する外部パラメータ値の調整が所定回数行われたか否かが判定される。外部パラメータ値の調整が所定回数行われたと判定されたときはステップS76に進み、それ以外のときは、ステップS75に進む。   Next, in step S74, it is determined whether or not the external parameter value adjustment described later has been performed a predetermined number of times by the action of the external parameter value adjustment unit 77. When it is determined that the adjustment of the external parameter value has been performed a predetermined number of times, the process proceeds to step S76, and otherwise, the process proceeds to step S75.

そして、ステップS75において、外部パラメータ値調整部77の作用によって、外部パラメータ値の調整が行われる。   In step S75, the external parameter value adjustment unit 77 adjusts the external parameter value.

外部パラメータ値の調整方法は、先述した内部パラメータ値の調整方法と同様にして行うことができ、具体的には、ステップS75において、外部パラメータ値を所定の方向に所定量だけ変化させて、その都度ステップS71において、第1指標81の像の位置座標を計算し、ステップS72においてずれの大きさを計算して、ステップS73において、ずれの大きさが所定値以下になったら、外部パラメータ値の調整を完了したと判断すればよい。   The adjustment method of the external parameter value can be performed in the same manner as the adjustment method of the internal parameter value described above. Specifically, in step S75, the external parameter value is changed by a predetermined amount in a predetermined direction. In each step S71, the position coordinates of the image of the first index 81 are calculated. In step S72, the magnitude of the deviation is calculated. In step S73, when the magnitude of the deviation becomes a predetermined value or less, the external parameter value is calculated. What is necessary is just to judge that adjustment was completed.

もしくは、ステップS74において、外部パラメータ値の調整を所定回数行った時点で、外部パラメータ値の調整を完了したと判断してもよい。   Alternatively, in step S74, it may be determined that the adjustment of the external parameter value is completed when the external parameter value is adjusted a predetermined number of times.

こうして調整された第1カメラ21の外部パラメータ値は、ステップS76においてデータテーブル50に記憶される。そして、これにより、第1カメラ21の外部パラメータ値のキャリブレーションが終了する。   The external parameter value of the first camera 21 adjusted in this way is stored in the data table 50 in step S76. Thereby, the calibration of the external parameter value of the first camera 21 is completed.

このようにして、内部パラメータ値と外部パラメータ値のキャリブレーションを行うことによって、キャリブレーションを行う前に撮像された図3(a)の画像は、図3(b)のように変換される。ここで、図3(b)は、図3(a)に示す9個の第1指標81の像(81a’ ,81b’ ,81c’ ,81d’ ,81e’ ,81f’ ,81g’ ,81h’ ,81i’)が、それぞれ、9個の第1指標81の像(81a” ,81b” ,81c” ,81d” ,81e” ,81f” ,81g” ,81h” ,81i”)に座標変換されることを示している。   Thus, by calibrating the internal parameter value and the external parameter value, the image of FIG. 3A captured before the calibration is converted as shown in FIG. 3B. Here, FIG. 3B shows the images (81a ′, 81b ′, 81c ′, 81d ′, 81e ′, 81f ′, 81g ′, 81h ′) of the nine first indicators 81 shown in FIG. , 81i ′) are transformed into nine images of the first index 81 (81a ″, 81b ″, 81c ″, 81d ″, 81e ″, 81f ″, 81g ″, 81h ″, 81i ″), respectively. It is shown that.

そして、図3(b)に示す直線L,L,L,Lが、内部パラメータ値のキャリブレーションを行う際に設定した4本の直線に対応している。 The straight lines L 1 , L 2 , L 3 , and L 4 shown in FIG. 3B correspond to the four straight lines set when the internal parameter values are calibrated.

なお、第1カメラ21に対する外部パラメータ値の調整が終了した後で、同様にして、第2カメラ22、第3カメラ23、第4カメラ24のそれぞれに対する外部パラメータ値の調整が行われる。   In addition, after the adjustment of the external parameter value for the first camera 21 is completed, the adjustment of the external parameter value for each of the second camera 22, the third camera 23, and the fourth camera 24 is similarly performed.

次に、調整された内部パラメータ値、および外部パラメータ値を用いて、4台のカメラ20で撮像した4枚の画像を視点変換して、車両10を上空から見下ろした画像に変換して、さらに1枚の画像に合成する処理について説明する。   Next, using the adjusted internal parameter value and the external parameter value, the four images captured by the four cameras 20 are subjected to viewpoint conversion to convert the vehicle 10 into an image looking down from above, and further A process of combining one image will be described.

視点変換は、周知の座標変換によって実施される。その際に、画素毎に逐一座標変換を行っていたのでは処理時間がかかるため、座標変換テーブルを用いて座標変換を行う方法が採られる。   The viewpoint conversion is performed by well-known coordinate conversion. At that time, if coordinate conversion is performed for each pixel one by one, processing time is required. Therefore, a method of performing coordinate conversion using a coordinate conversion table is adopted.

そのため、まずは、内部パラメータ値と外部パラメータ値のキャリブレーションの結果算出された内部パラメータ値と外部パラメータ値を用いて、4台のカメラ20の各々に対して、座標変換テーブルが作成される。   Therefore, first, a coordinate conversion table is created for each of the four cameras 20 using the internal parameter value and the external parameter value calculated as a result of the calibration of the internal parameter value and the external parameter value.

作成された座標変換テーブルは、データテーブル50に格納されて記憶される。   The created coordinate conversion table is stored and stored in the data table 50.

次に、4台のカメラ20で撮像して視点変換された画像を1枚の画像に合成するための合成テーブルが作成される。   Next, a synthesis table is created for synthesizing the images captured by the four cameras 20 and converted into viewpoints into one image.

この合成テーブルは、図8に示す画像を生成するためのテーブルである。   This synthesis table is a table for generating the image shown in FIG.

すなわち、この合成テーブルは、図8に示すように、第1カメラ21で撮像されて視点変換された画像を、第1部分画像210として車両10を模した車両アイコン100の前方に配置するために必要な座標変換の規則と、第2カメラ22で撮像されて視点変換された画像を、第2部分画像220として車両10を模した車両アイコン100の左方に配置するために必要な座標変換の規則と、第3カメラ23で撮像されて視点変換された画像を、第3部分画像230として車両10を模した車両アイコン100の右方に配置するために必要な座標変換の規則と、第4カメラ24で撮像されて視点変換された画像を、第4部分画像240として車両10を模した車両アイコン100の後部に配置するために必要な座標変換の規則が格納されたテーブルである。   That is, as shown in FIG. 8, this synthesis table is used to place an image captured by the first camera 21 and subjected to viewpoint conversion in front of the vehicle icon 100 simulating the vehicle 10 as the first partial image 210. Necessary coordinate conversion rules and coordinate conversion necessary for placing the image captured by the second camera 22 and the viewpoint-converted image on the left side of the vehicle icon 100 simulating the vehicle 10 as the second partial image 220. A rule, a coordinate conversion rule necessary to arrange an image captured by the third camera 23 and subjected to viewpoint conversion to the right of the vehicle icon 100 imitating the vehicle 10 as the third partial image 230, and a fourth The image that is captured by the camera 24 and whose viewpoint is converted is stored as a fourth partial image 240 in which a coordinate conversion rule that is necessary for placing the image at the rear of the vehicle icon 100 simulating the vehicle 10 is stored. It is a bull.

そして、このようにして生成された合成テーブルを用いて、画像制御部40は、4台のカメラ20で撮像された画像を座標変換して、図8に示す画像を生成する。なお、図8の中に規則的に描かれた線(V,V,V,V,V,V)は、路面に描かれた縦横の区画線を示しており、図8の画像が、車両の上空から路面を見下ろした画像であることを示すために、便宜的に表示したものである。 Then, using the synthesis table generated in this way, the image control unit 40 performs coordinate conversion on the images captured by the four cameras 20 to generate the image shown in FIG. The lines (V 1 , V 2 , V 3 , V 4 , V 5 , V 6 ) regularly drawn in FIG. 8 indicate the vertical and horizontal division lines drawn on the road surface. The image 8 is displayed for the sake of convenience in order to show that it is an image looking down on the road surface from above the vehicle.

次に、画像制御部40は、合成された画像の中央部に、予め用意された車両10を模した車両アイコン100を重畳して、画像表示部60に出力する。   Next, the image control unit 40 superimposes a vehicle icon 100 simulating the vehicle 10 prepared in advance on the center of the synthesized image, and outputs the superimposed image to the image display unit 60.

車両10の運転者は、画像表示部60に表示された画像を目視して車両周囲の状況を確認しながら、必要な駐車動作を実行することができる。   The driver of the vehicle 10 can execute a necessary parking operation while visually checking the image displayed on the image display unit 60 and confirming the situation around the vehicle.

以上説明したように、このように構成された本発明の車載カメラのキャリブレーション装置によれば、デフォルトの内部パラメータ値とデフォルトの外部パラメータ値を有するカメラ20の撮像範囲内に配置された、直線上に並ぶ少なくとも3個のキャリブレーション指標80をカメラ20で撮像して、こうして撮像された画像の中から、キャリブレーション指標位置算出部71によって少なくとも3個のキャリブレーション指標80の画像内での位置を算出して、こうして算出された少なくとも3個のキャリブレーション指標80の画像内での位置に基づいて、直線性算出部72において、同一直線上にある少なくとも3個のキャリブレーション指標80のうち、2個のキャリブレーション指標を通る直線と、2個のキャリブレーション指標のうちの一方と2個のキャリブレーション指標以外のキャリブレーション指標を通る直線と、のなす角度ωを算出して、内部パラメータ値調整部74において、直線性算出部72で算出された角度ωに基づいて、内部パラメータ値を調整して、こうして調整された内部パラメータ値とデフォルトの外部パラメータ値に基づいて、キャリブレーション指標位置再計算部75において、画像内におけるキャリブレーション指標の位置を再計算して、キャリブレーション終了判断部73が、再計算されたキャリブレーション指標の位置に基づいて直線性算出部72で算出された角度ωによって、内部パラメータ値の調整を終了する判断を行う構成としたため、キャリブレーション指標80を撮像した画像の中で、直線上に配置された少なくとも3つのキャリブレーション指標の直線性を算出して、その算出結果に基づいて、3つのキャリブレーション指標の画像内における直線性が高くなる方向に内部パラメータ値を調整するため、簡単な演算によって内部パラメータ値の調整を行うことができ、これによって、キャリブレーションを短時間で簡便に行うことができる。また、外部パラメータの値の影響を受けずに内部パラメータの値を調整することができるため、カメラ20を車両10に取り付けた状態で内部パラメータ値の調整を行うことができ、これによって、キャリブレーションを効率的に行うことができる。 As described above, according to the on-vehicle camera calibration device of the present invention configured as described above, the straight line arranged in the imaging range of the camera 20 having the default internal parameter value and the default external parameter value. At least three calibration indices 80 arranged on the top are imaged by the camera 20, and positions of at least three calibration indices 80 in the image by the calibration index position calculation unit 71 from the images thus captured are captured. Based on the positions in the image of the at least three calibration indexes 80 calculated in this way, the linearity calculation unit 72 selects at least three calibration indexes 80 on the same straight line. A straight line that passes through two calibration indices and two calibration fingers While the calculated and the straight line passing through the calibration index other than the two calibration indices, the angle omega 1 of one of, the internal parameter value adjustment section 74, the angle omega calculated by linear calculation unit 72 1 , the internal parameter value is adjusted, and the calibration index position recalculating unit 75 re-calibrates the position of the calibration index in the image based on the adjusted internal parameter value and the default external parameter value. The calculation is performed so that the calibration end determination unit 73 determines to end the adjustment of the internal parameter value based on the angle ω 1 calculated by the linearity calculation unit 72 based on the position of the recalculated calibration index. Therefore, in the image obtained by capturing the calibration index 80, there are few that are arranged on a straight line. Also, the linearity of the three calibration indices is calculated, and the internal parameter values are adjusted in the direction in which the linearity in the image of the three calibration indices is increased based on the calculation results. The parameter value can be adjusted, whereby calibration can be easily performed in a short time. Further, since the internal parameter value can be adjusted without being affected by the external parameter value, the internal parameter value can be adjusted with the camera 20 attached to the vehicle 10, thereby enabling calibration. Can be performed efficiently.

また、本発明の車載カメラのキャリブレーション装置によれば、キャリブレーション指標80を、調整する内部パラメータの個数の増加に応じてより多くの本数が設定される直線上、もしくは、調整する内部パラメータの種類の増加に応じてより多くの本数が設定される直線上、に前記直線1本について少なくとも3個ずつ配置する構成としたため、調整が必要な内部パラメータのみを選択してキャリブレーションを行うことができ、これによって、キャリブレーション作業を効率的に行うことができる。   Further, according to the on-vehicle camera calibration device of the present invention, the calibration index 80 is set on a straight line in which a larger number is set in accordance with an increase in the number of internal parameters to be adjusted, or the internal parameters to be adjusted. Since at least three of the straight lines are arranged on a straight line in which more lines are set according to the increase in the number of types, it is possible to perform calibration by selecting only internal parameters that need to be adjusted. Thus, the calibration work can be performed efficiently.

さらに、本発明の車載カメラのキャリブレーション装置によれば、内部パラメータ値調整部74は、内部パラメータ値のうち少なくとも1つを所定量だけ所定の方向に調整したときに、直線性算出部72で算出された角度ωが内部パラメータ値の調整前よりも小さくなったときには、内部パラメータ値のうち少なくとも1つを、角度ωの変化量に応じた量だけ、さらに前記所定の方向に調整して、内部パラメータ値のうち少なくとも1つを所定量だけ所定の方向に調整したときに、直線性算出部72で算出された角度ωが内部パラメータ値の調整前よりも大きくなったときには、内部パラメータ値のうち少なくとも1つを、角度ωの変化量に応じた量だけ、所定の方向とは逆の方向に調整する構成としたため、内部パラメータ値を早期に収束させることができ、これによって、キャリブレーションを効率的に行うことができる。 Furthermore, according to the in-vehicle camera calibration device of the present invention, the internal parameter value adjustment unit 74 is configured to cause the linearity calculation unit 72 to adjust at least one of the internal parameter values by a predetermined amount in a predetermined direction. When the calculated angle ω 1 becomes smaller than before the adjustment of the internal parameter value, at least one of the internal parameter values is further adjusted in the predetermined direction by an amount corresponding to the change amount of the angle ω 1. Thus, when at least one of the internal parameter values is adjusted in a predetermined direction by a predetermined amount, when the angle ω 1 calculated by the linearity calculation unit 72 is larger than that before the internal parameter value is adjusted, at least one parameter value, by an amount corresponding to the amount of change in angle omega 1, since the predetermined direction and configured to adjust the reverse direction, early internal parameter value It is possible to converge, this makes it possible to perform calibration efficiently.

また、本発明の車載カメラのキャリブレーション装置によれば、キャリブレーション終了判断部73は、直線性算出部72で算出された角度ωが所定の値を下回ったとき、もしくは、内部パラメータ値調整部74において、内部パラメータ値の調整を所定回数行ったときに、内部パラメータ値の調整を終了する判断を行う構成としたため、キャリブレーションの終了判断を効率的に行うことができ、これによって、キャリブレーション作業をより短時間で行うことができる。 Further, according to the on-vehicle camera calibration device of the present invention, the calibration end determination unit 73 adjusts the internal parameter value when the angle ω 1 calculated by the linearity calculation unit 72 falls below a predetermined value. The unit 74 is configured to determine whether to end the adjustment of the internal parameter value when the internal parameter value is adjusted a predetermined number of times, so that the end determination of the calibration can be efficiently performed. Work can be done in a shorter time.

さらに、本発明の車載カメラのキャリブレーション装置によれば、内部パラメータ値は、カメラ20が備える光学系の焦点距離と、カメラ20が備える受光素子を構成する画素のサイズの縦横比と、光学系の光軸と前記受光素子との交点の位置と、光学系の歪と、のうち少なくとも1つとしたため、調整が必要な内部パラメータのみのキャリブレーションを行うことができ、これによって、キャリブレーション作業をより短時間かつ効率的に行うことができる。   Further, according to the on-vehicle camera calibration device of the present invention, the internal parameter values are the focal length of the optical system provided in the camera 20, the aspect ratio of the size of the pixels constituting the light receiving element provided in the camera 20, and the optical system. Since at least one of the position of the intersection of the optical axis and the light receiving element and the distortion of the optical system is set, it is possible to calibrate only the internal parameters that need to be adjusted. It can be performed in a shorter time and efficiently.

そして、本発明の車載カメラのキャリブレーション装置によれば、キャリブレーション指標位置算出部で算出されたキャリブレーション指標80の位置とカメラ20の外部パラメータ値に基づいて計算された画像内におけるキャリブレーション指標80の位置とのずれの大きさを算出する指標位置ずれ量算出部76と、指標位置ずれ量算出部76で算出されたずれの大きさに基づいて、外部パラメータ値を調整する外部パラメータ値調整部77と、を有し、キャリブレーション指標位置再計算部75は、さらに、外部パラメータ値調整部77によって調整された外部パラメータ値と調整を終了した内部パラメータ値とに基づいて、画像内におけるキャリブレーション指標80の位置を計算するものであり、キャリブレーション終了判断部73は、さらに、指標位置ずれ量算出部76で算出されたずれの大きさに基づいて、外部パラメータ値の調整を終了する判断を行う構成としたため、内部パラメータ値のキャリブレーションを行う際に撮像した画像を用いて外部パラメータ値のキャリブレーションも行うことができ、これによって、キャリブレーションに必要な画像が1枚で済むため、記憶量の小さい計算機環境においてキャリブレーションを行うことができる。また、内部パラメータ値のキャリブレーションと外部パラメータ値のキャリブレーションを、同じキャリブレーション指標と同じ装置を用いて行うことができるため、これによって、キャリブレーション作業を効率的に行うことができる。さらに、内部パラメータ値のキャリブレーションと外部パラメータ値のキャリブレーションを独立して行うことができるため、例えば、内部パラメータ値が既知であるときには、外部パラメータ値のみのキャリブレーションを行うことができ、これによって、キャリブレーション作業の効率化を図ることができる。   According to the on-vehicle camera calibration device of the present invention, the calibration index in the image calculated based on the position of the calibration index 80 calculated by the calibration index position calculation unit and the external parameter value of the camera 20 is obtained. An index position deviation amount calculation unit 76 that calculates the magnitude of deviation from the 80 position, and an external parameter value adjustment that adjusts the external parameter value based on the magnitude of deviation calculated by the index position deviation amount calculation unit 76 The calibration index position recalculation unit 75 is further calibrated in the image based on the external parameter value adjusted by the external parameter value adjustment unit 77 and the internal parameter value after the adjustment. The position of the calibration index 80 is calculated, and the calibration end determination unit 73 Furthermore, since the determination is made to end the adjustment of the external parameter value based on the magnitude of the deviation calculated by the index position deviation amount calculation unit 76, the image captured when the internal parameter value is calibrated. Can also be used to calibrate external parameter values, so that only one image is required for calibration, so that calibration can be performed in a computer environment with a small storage amount. Further, since the calibration of the internal parameter value and the calibration of the external parameter value can be performed using the same apparatus with the same calibration index, the calibration work can be performed efficiently. Furthermore, since internal parameter value calibration and external parameter value calibration can be performed independently, for example, when the internal parameter value is known, only the external parameter value can be calibrated. As a result, the efficiency of the calibration work can be improved.

なお、前記した実施例において、キャリブレーション指標80には黒い円形マーカを利用したが、キャリブレーション指標80の指標の形状はこれに限定されるものではない。すなわち、その他の形状、例えば矩形形状のマーカを用いてもよい。   In the above-described embodiment, a black circular marker is used as the calibration index 80, but the shape of the calibration index 80 is not limited thereto. That is, other shapes, for example, rectangular markers may be used.

以上、本発明の実施例を図面により詳述したが、実施例は本発明の例示にしか過ぎないものであるため、本発明は実施例の構成にのみ限定されるものではなく、本発明の要旨を逸脱しない範囲の設計の変更等があっても、本発明に含まれることは勿論である。   As mentioned above, although the Example of this invention was explained in full detail with drawing, since an Example is only an illustration of this invention, this invention is not limited only to the structure of an Example. Of course, changes in design and the like within a range not departing from the gist are included in the present invention.

5 車両周辺監視装置
10 車両
20 カメラ
21 第1カメラ
22 第2カメラ
23 第3カメラ
24 第4カメラ
30 画像入力部
40 画像制御部
50 データテーブル
60 画像表示部
70 キャリブレーション実行部
71 キャリブレーション指標位置算出部
72 直線性算出部
73 キャリブレーション終了判断部
74 内部パラメータ値調整部
75 キャリブレーション指標位置再計算部
76 指標位置ずれ量算出部
77 外部パラメータ値調整部
80 キャリブレーション指標
81 第1指標
82 第2指標
83 第3指標
84 第4指標
DESCRIPTION OF SYMBOLS 5 Vehicle periphery monitoring apparatus 10 Vehicle 20 Camera 21 1st camera 22 2nd camera 23 3rd camera 24 4th camera 30 Image input part 40 Image control part 50 Data table 60 Image display part 70 Calibration execution part 71 Calibration index position Calculation unit 72 Linearity calculation unit 73 Calibration end determination unit 74 Internal parameter value adjustment unit 75 Calibration index position recalculation unit 76 Index position deviation amount calculation unit 77 External parameter value adjustment unit 80 Calibration index 81 First index 82 2 index 83 3rd index 84 4th index

Claims (6)

光学系と受光素子とを備え、デフォルトの内部パラメータ値とデフォルトの外部パラメータ値を有するカメラと、
前記カメラの撮像範囲内に配置された、直線上に並ぶ少なくとも3個のキャリブレーション指標と、
前記カメラで前記キャリブレーション指標を撮像した画像の中から、少なくとも3個のキャリブレーション指標の前記画像内での位置を算出するキャリブレーション指標位置算出部と、
前記キャリブレーション指標位置算出部で算出された前記位置に基づいて、前記画像内において、前記少なくとも3個のキャリブレーション指標のうち、2個のキャリブレーション指標の位置を通る直線と、前記2個のキャリブレーション指標のうちの一方のキャリブレーション指標の位置と前記2個のキャリブレーション指標以外のキャリブレーション指標の位置を通る直線と、のなす角度を算出する直線性算出部と、
前記直線性算出部で算出された前記角度に基づいて、前記カメラの少なくとも1つの内部パラメータ値を調整する内部パラメータ値調整部と、
前記内部パラメータ値調整部によって調整された内部パラメータ値と前記デフォルトの外部パラメータ値とに基づいて、前記画像内におけるキャリブレーション指標の位置を計算するキャリブレーション指標位置再計算部と、
前記直線性算出部で算出された前記角度の値に基づいて、内部パラメータ値の調整を終了する判断を行うキャリブレーション終了判断部と、を有することを特徴とする車載カメラのキャリブレーション装置。
A camera comprising an optical system and a light receiving element, having a default internal parameter value and a default external parameter value;
At least three calibration indices arranged in a straight line, disposed within the imaging range of the camera;
A calibration index position calculation unit that calculates positions of at least three calibration indices in the image from images obtained by capturing the calibration indices with the camera;
Based on the position calculated by the calibration index position calculation unit, a straight line passing through the positions of two calibration indices among the at least three calibration indices in the image, and the two A linearity calculating unit that calculates an angle formed by the position of one of the calibration indices and a straight line passing through the positions of calibration indices other than the two calibration indices;
An internal parameter value adjusting unit that adjusts at least one internal parameter value of the camera based on the angle calculated by the linearity calculating unit;
A calibration index position recalculation unit that calculates the position of the calibration index in the image based on the internal parameter value adjusted by the internal parameter value adjustment unit and the default external parameter value;
An in-vehicle camera calibration apparatus comprising: a calibration end determination unit that determines to end adjustment of an internal parameter value based on the angle value calculated by the linearity calculation unit.
前記キャリブレーション指標は、調整する内部パラメータの個数の増加に応じてより多くの本数が設定される直線上、もしくは、調整する内部パラメータの種類の増加に応じてより多くの本数が設定される直線上、に前記直線1本について少なくとも3個ずつ配置されることを特徴とする請求項1に記載の車載カメラのキャリブレーション装置。   The calibration index is a straight line on which a larger number is set according to an increase in the number of internal parameters to be adjusted, or a straight line on which a larger number is set according to an increase in the types of internal parameters to be adjusted. The on-vehicle camera calibration device according to claim 1, wherein at least three of the straight lines are arranged on the top. 前記内部パラメータ値調整部は、前記内部パラメータ値のうち少なくとも1つを所定量だけ所定の方向に調整したときに、前記直線性算出部で算出された前記角度が前記内部パラメータ値の調整前よりも小さくなったときには、前記内部パラメータ値のうち少なくとも1つを、前記角度の変化量に応じた量だけ、さらに前記所定の方向に調整して、
前記内部パラメータ値のうち少なくとも1つを所定量だけ所定の方向に調整したときに、前記直線性算出部で算出された前記角度が前記内部パラメータ値の調整前よりも大きくなったときには、前記内部パラメータ値のうち少なくとも1つを、前記角度の変化量に応じた量だけ、前記所定の方向とは逆の方向に調整することを特徴とする請求項1または2に記載の車載カメラのキャリブレーション装置。
When the internal parameter value adjustment unit adjusts at least one of the internal parameter values by a predetermined amount in a predetermined direction, the angle calculated by the linearity calculation unit is greater than that before the adjustment of the internal parameter value. Is also reduced, at least one of the internal parameter values is further adjusted in the predetermined direction by an amount corresponding to the amount of change in the angle,
When at least one of the internal parameter values is adjusted by a predetermined amount in a predetermined direction, when the angle calculated by the linearity calculation unit is larger than before the internal parameter value is adjusted, The on-vehicle camera calibration according to claim 1, wherein at least one of the parameter values is adjusted in a direction opposite to the predetermined direction by an amount corresponding to the amount of change in the angle. apparatus.
前記キャリブレーション終了判断部は、前記直線性算出部で算出された前記角度が所定の値を下回ったとき、もしくは、前記内部パラメータ値調整部において、内部パラメータ値の調整を所定回数行ったときに、内部パラメータ値の調整を終了する判断を行うことを特徴とする請求項1から3のいずれか1項に記載の車載カメラのキャリブレーション装置。   The calibration end determination unit is configured when the angle calculated by the linearity calculation unit falls below a predetermined value, or when the internal parameter value adjustment unit performs internal parameter value adjustment a predetermined number of times. 4. The on-vehicle camera calibration apparatus according to claim 1, wherein the determination is made to end the adjustment of the internal parameter value. 前記内部パラメータ値は、前記カメラが備える光学系の焦点距離と、前記カメラが備える受光素子を構成する画素のサイズの縦横比と、前記光学系の光軸と前記受光素子との交点の位置と、前記光学系の歪と、のうち少なくとも1つであることを特徴とする請求項1から4のいずれか1項に記載の車載カメラのキャリブレーション装置。   The internal parameter value includes a focal length of an optical system provided in the camera, an aspect ratio of a size of a pixel constituting a light receiving element provided in the camera, and a position of an intersection between the optical axis of the optical system and the light receiving element. 5. The on-vehicle camera calibration device according to claim 1, wherein at least one of the distortion of the optical system is included. 前記キャリブレーション指標位置算出部で算出された前記キャリブレーション指標の位置と前記カメラの外部パラメータ値と前記内部パラメータ値調整部によって調整された内部パラメータ値とに基づいて計算された前記画像内における前記キャリブレーション指標の位置とのずれの大きさを算出する指標位置ずれ量算出部と、
前記指標位置ずれ量算出部で算出された前記ずれの大きさに基づいて、前記外部パラメータ値を調整する外部パラメータ値調整部と、を有し、
前記キャリブレーション指標位置再計算部は、さらに、前記外部パラメータ値調整部によって調整された外部パラメータ値と前記内部パラメータ値調整部によって調整された内部パラメータ値とに基づいて、前記画像内におけるキャリブレーション指標の位置を計算するものであり、
前記キャリブレーション終了判断部は、さらに、前記指標位置ずれ量算出部で算出された前記ずれの大きさに基づいて、外部パラメータ値の調整を終了する判断を行うものであることを特徴とする請求項1から5のいずれか1項に記載の車載カメラのキャリブレーション装置。
The position in the image calculated based on the position of the calibration index calculated by the calibration index position calculation unit, the external parameter value of the camera, and the internal parameter value adjusted by the internal parameter value adjustment unit. An index position deviation amount calculating unit for calculating the magnitude of deviation from the position of the calibration index;
An external parameter value adjustment unit that adjusts the external parameter value based on the magnitude of the deviation calculated by the index position deviation amount calculation unit,
The calibration index position recalculation unit is further configured to perform calibration in the image based on the external parameter value adjusted by the external parameter value adjustment unit and the internal parameter value adjusted by the internal parameter value adjustment unit. Which calculates the position of the indicator,
The calibration end determination unit further determines to end the adjustment of the external parameter value based on the magnitude of the shift calculated by the index position shift amount calculation unit. Item 6. The on-vehicle camera calibration device according to any one of Items 1 to 5.
JP2012111721A 2012-05-15 2012-05-15 Calibration apparatus for in-vehicle camera Pending JP2013239905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012111721A JP2013239905A (en) 2012-05-15 2012-05-15 Calibration apparatus for in-vehicle camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012111721A JP2013239905A (en) 2012-05-15 2012-05-15 Calibration apparatus for in-vehicle camera

Publications (1)

Publication Number Publication Date
JP2013239905A true JP2013239905A (en) 2013-11-28

Family

ID=49764582

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012111721A Pending JP2013239905A (en) 2012-05-15 2012-05-15 Calibration apparatus for in-vehicle camera

Country Status (1)

Country Link
JP (1) JP2013239905A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017076308A (en) * 2015-10-16 2017-04-20 セイコーエプソン株式会社 Image processing device, robot, and robot system
JP2018170666A (en) * 2017-03-30 2018-11-01 三菱電機株式会社 Camera system and camera calibration method
US20190244388A1 (en) * 2015-10-16 2019-08-08 Seiko Epson Corporation Image processing device, robot, robot system, and marker
JP2020051932A (en) * 2018-09-27 2020-04-02 京セラ株式会社 Calibration device, camera, mobile body, and method for adjusting calibration value

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08241411A (en) * 1995-01-17 1996-09-17 Eastman Kodak Co System and method for evaluation of document image
JP2006059270A (en) * 2004-08-23 2006-03-02 Medeikku Engineering:Kk Method for correcting distortion of image
JP2006250722A (en) * 2005-03-10 2006-09-21 Toshiba Corp Device, method and program for calibration
JP2008193188A (en) * 2007-02-01 2008-08-21 Sanyo Electric Co Ltd Camera calibration device and method, and vehicle
JP2012015576A (en) * 2010-06-29 2012-01-19 Clarion Co Ltd Image calibration method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08241411A (en) * 1995-01-17 1996-09-17 Eastman Kodak Co System and method for evaluation of document image
JP2006059270A (en) * 2004-08-23 2006-03-02 Medeikku Engineering:Kk Method for correcting distortion of image
JP2006250722A (en) * 2005-03-10 2006-09-21 Toshiba Corp Device, method and program for calibration
JP2008193188A (en) * 2007-02-01 2008-08-21 Sanyo Electric Co Ltd Camera calibration device and method, and vehicle
JP2012015576A (en) * 2010-06-29 2012-01-19 Clarion Co Ltd Image calibration method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017076308A (en) * 2015-10-16 2017-04-20 セイコーエプソン株式会社 Image processing device, robot, and robot system
US20190244388A1 (en) * 2015-10-16 2019-08-08 Seiko Epson Corporation Image processing device, robot, robot system, and marker
JP2018170666A (en) * 2017-03-30 2018-11-01 三菱電機株式会社 Camera system and camera calibration method
JP2020051932A (en) * 2018-09-27 2020-04-02 京セラ株式会社 Calibration device, camera, mobile body, and method for adjusting calibration value

Similar Documents

Publication Publication Date Title
JP6518952B2 (en) Position adjustment method of display device for vehicle
JP6458439B2 (en) On-vehicle camera calibration device, image generation device, on-vehicle camera calibration method, and image generation method
EP2660625B1 (en) A method for monitoring a traffic stream and a traffic monitoring device
CN102982526B (en) Demarcate the method and vehicle vision system of vehicle vision system
JP4861034B2 (en) Car camera calibration system
WO2017135081A1 (en) Vehicle-mounted camera calibration system
US20130002861A1 (en) Camera distance measurement device
US20050179801A1 (en) Camera corrector
JP6390032B2 (en) Head-up display distortion correction method and head-up display distortion correction apparatus using the same
CN112070845A (en) Calibration method and device of binocular camera and terminal equipment
JPWO2005010817A1 (en) Image processing device
JP2013239905A (en) Calibration apparatus for in-vehicle camera
JP5228614B2 (en) Parameter calculation apparatus, parameter calculation system and program
JP5240517B2 (en) Car camera calibration system
JPWO2014181581A1 (en) Calibration apparatus, calibration system, and imaging apparatus
KR20200118073A (en) System and method for dynamic three-dimensional calibration
JP6040782B2 (en) Image processing apparatus and program
KR20100104166A (en) Camera calibration method
US11403770B2 (en) Road surface area detection device
US8102516B2 (en) Test method for compound-eye distance measuring apparatus, test apparatus, and chart used for the same
JP7004971B2 (en) Calibration equipment, calibration method and calibration program
US20180182078A1 (en) Image processing apparatus and image processing method
JP2014127834A (en) Calibration system for on-vehicle camera
CN112465920A (en) Vision sensor calibration method and device
JP6890293B2 (en) Camera calibration device, camera calibration system, camera calibration method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150415

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160205

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160209

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20160802