[go: up one dir, main page]

JP5760558B2 - Camera simulation apparatus, camera simulation method, and camera simulation program - Google Patents

Camera simulation apparatus, camera simulation method, and camera simulation program Download PDF

Info

Publication number
JP5760558B2
JP5760558B2 JP2011061728A JP2011061728A JP5760558B2 JP 5760558 B2 JP5760558 B2 JP 5760558B2 JP 2011061728 A JP2011061728 A JP 2011061728A JP 2011061728 A JP2011061728 A JP 2011061728A JP 5760558 B2 JP5760558 B2 JP 5760558B2
Authority
JP
Japan
Prior art keywords
camera
image
camera system
simulated
value
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.)
Expired - Fee Related
Application number
JP2011061728A
Other languages
Japanese (ja)
Other versions
JP2012198076A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2011061728A priority Critical patent/JP5760558B2/en
Publication of JP2012198076A publication Critical patent/JP2012198076A/en
Application granted granted Critical
Publication of JP5760558B2 publication Critical patent/JP5760558B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement Of Optical Distance (AREA)

Description

本発明は、カメラシミュレーション装置、カメラシミュレーション方法、及びカメラシミュレーションプログラムに係り、特に、効率的にカメラパラメータのキャリブレーションを行うためのカメラシミュレーション装置、カメラシミュレーション方法、及びカメラシミュレーションプログラムに関する。   The present invention relates to a camera simulation device, a camera simulation method, and a camera simulation program, and more particularly to a camera simulation device, a camera simulation method, and a camera simulation program for efficiently calibrating camera parameters.

従来、ステレオカメラを用いた車載用距離測定装置等では、遠距離まで精度よく距離測定ができることや、測定できる視野が広いことが要求される。この要求を実現するためには、カメラの外部パラメータと内部パラメータのキャリブレーションを精度よく行う必要がある。   Conventionally, an in-vehicle distance measuring device using a stereo camera is required to be able to accurately measure a distance up to a long distance and to have a wide field of view. In order to realize this requirement, it is necessary to accurately calibrate the external parameters and internal parameters of the camera.

また従来では、カメラのキャリブレーション方法に関する研究は広く行われており、様々な方法が既に知られている。ステレオカメラを用いた距離測定では、カメラの内部パラメータをカメラのキャリブレーションによって同定し、その内部パラメータを用いて計算機上で模擬されたカメラモデルを使用している。なお、このカメラモデルの左右の差は、距離測定の精度を悪化させる原因となる。また、現実のカメラには、製造誤差が存在するため、各カメラの内部パラメータをカメラのキャリブレーションによって同定し、左右のカメラの計算機上のカメラモデルが等しくなるように補正を行っている。このような補正は、ステレオカメラを用いた距離測定では必須の処理である。カメラの製造誤差が小さいほど、補正後の左右のカメラモデルの差は小さくなるので望ましいが、製造誤差を小さくすることは歩留まりの減少によるコスト増を招くことになる。   Conventionally, research on camera calibration methods has been widely performed, and various methods are already known. In distance measurement using a stereo camera, camera internal parameters are identified by camera calibration, and a camera model simulated on a computer using the internal parameters is used. Note that the difference between the left and right camera models causes the accuracy of distance measurement to deteriorate. In addition, since actual cameras have manufacturing errors, internal parameters of each camera are identified by camera calibration, and correction is performed so that the camera models on the left and right camera computers are equal. Such correction is an essential process for distance measurement using a stereo camera. The smaller the manufacturing error of the camera, the smaller the difference between the corrected left and right camera models, which is desirable. However, reducing the manufacturing error causes an increase in cost due to a decrease in yield.

また従来では、カメラの光学部材と機構部材の公差を設定する方法として、モンテカルロシミュレーションによるものが既に知られている。これは、光学系の設計値に公差と製造分布を与えた光学系のデータを多数作成し、各々についての光学性能を調べた上で、全データについての光学性能の分布を求めるものである。この結果が所望の分布の範囲内に収まっていれば、公差の設定値が最適だと判断される。   Conventionally, a method based on Monte Carlo simulation is already known as a method for setting a tolerance between an optical member and a mechanism member of a camera. In this method, a large number of data of an optical system in which tolerances and manufacturing distributions are given to the design values of the optical system are created, and after checking the optical performance of each, the distribution of the optical performance of all data is obtained. If this result falls within the desired distribution range, it is determined that the tolerance set value is optimum.

なお従来では、製造に適切な光学ユニットとなるように、設計パラメータに設定した公差や製造分布が光学性能にどの程度の影響を与えるのかを解析する手法を提供し、更にこの解析結果に基づいて公差を変更するパラメータを選定し、設計パラメータの公差を最適にするための光学ユニット設定支援方法が開示されている(例えば、特許文献1参照)。   Conventionally, a method for analyzing how much the tolerance and manufacturing distribution set in the design parameters affect the optical performance is provided so that an optical unit suitable for manufacturing is provided. An optical unit setting support method for selecting a parameter for changing the tolerance and optimizing the tolerance of the design parameter is disclosed (for example, see Patent Document 1).

特許文献1に示される技術は、複数のレンズ群からなり、各レンズ群が少なくとも1つの光学部材と少なくとも1つの機構部材とからなる光学ユニットに関して、光学的設計パラメータの公差と製造分布とを基に、製造誤差のある多数のレンズデータを生成し、また多数のレンズデータを基に光学性能の分布を算出し、その光学性能の分布を基に寄与度解析により光学性能の変動に対する光学的設計パラメータの第一の寄与度を算出する光学ユニット設計支援手法が示されている。   The technique disclosed in Patent Document 1 is based on tolerances of optical design parameters and manufacturing distributions for an optical unit that includes a plurality of lens groups, and each lens group includes at least one optical member and at least one mechanism member. In addition, a large number of lens data with manufacturing errors is generated, and the optical performance distribution is calculated based on the large number of lens data, and the optical design against the fluctuation of the optical performance by the contribution analysis based on the distribution of the optical performance. An optical unit design support method for calculating a first contribution of parameters is shown.

しかしながら、上述した従来のステレオカメラのキャリブレーション方法の開発においては、内部パラメータの補正後の距離測定精度の誤差の実測によって、キャリブレーション方法の良否を判断するしかなかったため、距離測定精度の誤差がカメラの製造誤差の大きさに起因するのか、又は、キャリブレーション方法(特にアルゴリズム)に起因するのかを切り分けて考えることができなかった。   However, in the development of the calibration method for the conventional stereo camera described above, the accuracy of the distance measurement accuracy must be judged by measuring the error of the distance measurement accuracy after correcting the internal parameters. It has not been possible to consider whether it is caused by the size of the camera manufacturing error or the calibration method (particularly the algorithm).

また従来では、距離測定精度の誤差の実測のための実験を屋外で行う必要があるため、天候によって距離測定精度が変動し、実験の再現性がないという問題があった。   Conventionally, since it is necessary to perform an experiment for actually measuring an error in distance measurement accuracy outdoors, there is a problem that the distance measurement accuracy varies depending on the weather and the experiment is not reproducible.

また、従来のモンテカルロシミュレーションによる公差の設定方法では、光学性能、主にMTF(Modulation Transfer Function)を基準にして良品率を定義して公差の最適な設定値を定めていたため、そのままではステレオカメラの距離測定精度を基準に公差の設定ができないという問題があった。   In addition, in the conventional tolerance setting method based on Monte Carlo simulation, the non-defective product rate is defined based on the optical performance, mainly based on MTF (Modulation Transfer Function), and the optimum setting value of the tolerance is determined. There was a problem that tolerance could not be set based on distance measurement accuracy.

また、特許文献1に示された手法においても、キャリブレーション方法の開発をシミュレーション上でできないという問題と、距離測定精度を基準にした公差設定ができないという問題があった。   Further, the method disclosed in Patent Document 1 also has a problem that a calibration method cannot be developed on a simulation, and a tolerance cannot be set based on distance measurement accuracy.

つまり、上述した各従来手法では、例えば量産等に適した効率的なカメラパラメータのキャリブレーション方法が存在していなかった。   That is, in each of the conventional methods described above, there is no efficient camera parameter calibration method suitable for, for example, mass production.

本発明は、上記の課題に鑑みてなされたものであり、効率的にカメラパラメータのキャリブレーションを行うためのカメラシミュレーション装置、カメラシミュレーション方法、及びカメラシミュレーションプログラムを提供することを目的とする。   The present invention has been made in view of the above problems, and an object thereof is to provide a camera simulation apparatus, a camera simulation method, and a camera simulation program for efficiently calibrating camera parameters.

上述した課題を解決するために、本件発明は、以下の特徴を有する課題を解決するための手段を採用している。   In order to solve the above-described problems, the present invention employs means for solving the problems having the following characteristics.

本発明は、レンズシステムを模擬した模擬カメラ系をシミュレートし、シミュレートした該模擬カメラ系所定の物体を撮像したときの第1の画像を取得する模擬カメラ系画像取得手段と、前記レンズシステムの設計値での焦点距離を用いたピンホールカメラ系をシミュレートし、シミュレートした該ピンホールカメラ系前記所定の物体を前記第1の画像を撮影した位置と同一位置から撮像したときの第2の画像を取得するピンホールカメラ系画像取得手段と、模擬カメラ系画像取得手段により得られる前記第1の画像と、前記ピンホールカメラ系画像取得手段により得られる前記第2の画像とから前記所定の物体の画像上の位置のずれを差分値として出力し、前記ピンホールカメラを用いた三角測距の視差に対して、前記差分値を用いて視差誤差の予測値を出力する視差誤差出力手段とを有することを特徴とするカメラシミュレーション装置である。 The present invention simulates a simulated camera system simulating the lens system, a first image to obtain the simulated camera system image acquisition means when capturing a predetermined object in simulated the simulated camera system, the lens simulates a pinhole camera system using the focal length of the system design values, when the predetermined object captured from the same position taken the first image in simulated the pin-hole camera system a pinhole camera system image acquiring means for acquiring a second image of, and the obtained first image by simulating a camera system image acquiring unit, the second image obtained by the pinhole camera system image acquiring means wherein the deviation of the position of the predetermined object image is outputted as a difference value for the parallax triangulation using the pinhole camera, by using the difference value from A camera simulation apparatus characterized by having a parallax error output means for outputting a prediction value of the difference error.

また本発明は、レンズシステムを模擬した模擬カメラ系をシミュレートし、シミュレートした該模擬カメラ系所定の物体を撮像したときの第1の画像を取得する模擬カメラ系画像取得工程と、前記レンズシステムの設計値での焦点距離を用いたピンホールカメラ系をシミュレートし、シミュレートした該ピンホールカメラ系前記所定の物体を前記第1の画像を撮影した位置と同一位置から撮像したときの第2の画像を取得するピンホールカメラ系画像取得工程と、模擬カメラ系画像取得工程により得られる前記第1の画像と、前記ピンホールカメラ系画像取得工程により得られる前記第2の画像とから前記所定の物体の画像上の位置のずれを差分値として出力し、前記ピンホールカメラを用いた三角測距の視差に対して、前記差分値を用いて視差誤差の予測値を出力する視差誤差出力工程とを有することを特徴とするカメラシミュレーション方法である。
The present invention simulates a simulated camera system simulating the lens system, the simulated camera system image acquisition step of acquiring a first image obtained by imaging a predetermined object in simulated the simulated camera system, wherein A pinhole camera system using a focal length at the design value of the lens system was simulated, and the predetermined object was captured from the same position as the position where the first image was captured by the simulated pinhole camera system . the second pin hole camera system image acquisition step of acquiring an image of a first image obtained by the simulated camera system image acquisition step, the second image obtained by the pinhole camera system image acquisition process when use the deviation of the position of the predetermined object image is outputted as a difference value for the parallax triangulation using the pinhole camera, the difference value from the A camera simulation method characterized by having a parallax error output step of outputting the predicted value of the parallax error Te.

また本発明は、コンピュータを、上述したカメラシミュレーション装置として機能させることを特徴とするカメラシミュレーションプログラムである。   The present invention is also a camera simulation program that causes a computer to function as the above-described camera simulation apparatus.

本発明によれば、効率的にカメラパラメータのキャリブレーションを行うことができる。   According to the present invention, it is possible to efficiently calibrate camera parameters.

第1の実施形態におけるカメラシミュレーション装置の機能構成例を示す図である。It is a figure which shows the function structural example of the camera simulation apparatus in 1st Embodiment. 本実施形態におけるカメラシミュレーション処理が実現可能なハードウェア構成の一例を示す図であるIt is a figure which shows an example of the hardware constitutions which can implement | achieve the camera simulation process in this embodiment 第1の実施形態におけるカメラシミュレーション処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the camera simulation process sequence in 1st Embodiment. 第2の実施形態におけるカメラシミュレーション装置の機能構成例を示す図である。It is a figure which shows the function structural example of the camera simulation apparatus in 2nd Embodiment. 第2の実施形態におけるカメラシミュレーション処理手順の一例を示すフローチャートであるIt is a flowchart which shows an example of the camera simulation process sequence in 2nd Embodiment. 第3の実施形態におけるカメラシミュレーション装置の機能構成例を示す図である。It is a figure which shows the function structural example of the camera simulation apparatus in 3rd Embodiment. 第3の実施形態における距離測定誤差の最大値の分布の一例を示す図である。It is a figure which shows an example of distribution of the maximum value of the distance measurement error in 3rd Embodiment. 第3の実施形態におけるカメラシミュレーション処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the camera simulation process sequence in 3rd Embodiment.

<本発明について>
本発明は、例えば現実のレンズシステムを模擬したカメラ系(模擬カメラ系)で撮像した画像(第1の画像)と、レンズシステムの設計値の焦点距離を用いたピンホールカメラ系で撮像した画像(第2の画像)との差分値を出力し、理想ピンホールカメラを用いた三角測距の視差に対して、上述した両画像の差分値を用いて調整した視差の予測値を出力する。なお、差分値とは、例えば上述した2つのカメラ系で同一の物体(例えば、被写体等)を同一位置から撮影し、その2つの画像を比較したときの画像上の位置等の違い(ずれ)等を示している。したがって、本実施形態における差分値は、例えば模擬カメラ系とピンホールカメラ系でのチャートの格子点の像の座標の差(像のX軸方向とY軸方向の座標の差)等を示すが本発明においてはこれに限定されるものではなく、画像から得られる他の要素の差であってもよい。
<About the present invention>
The present invention, for example, an image (first image) captured by a camera system (simulated camera system) simulating an actual lens system, and an image captured by a pinhole camera system using the focal length of the design value of the lens system A difference value from the (second image) is output, and a predicted parallax value adjusted using the above-described difference value between both images is output with respect to the parallax of triangulation using an ideal pinhole camera. The difference value is, for example, the difference (deviation) in the position on the image when the same object (for example, the subject) is photographed from the same position with the two camera systems described above and the two images are compared. Etc. Therefore, the difference value in the present embodiment indicates, for example, the difference in image coordinates of the lattice points of the chart in the simulated camera system and the pinhole camera system (difference in coordinates between the X-axis direction and the Y-axis direction of the image). In the present invention, the present invention is not limited to this, and may be a difference between other elements obtained from an image.

以下に、本発明におけるカメラシミュレーション装置、カメラシミュレーション方法、及びカメラシミュレーションプログラムを好適に実施した形態について、図面を用いて説明する。   Hereinafter, embodiments in which a camera simulation apparatus, a camera simulation method, and a camera simulation program according to the present invention are suitably implemented will be described with reference to the drawings.

<第1の実施形態:カメラシミュレーション装置:機能構成例>
図1は、第1の実施形態におけるカメラシミュレーション装置の機能構成例を示す図である。第1の実施形態では、現実のレンズシステムを模擬したカメラ系に対する視差誤差を取得するためのカメラシミュレーション装置を示すものである。
<First Embodiment: Camera Simulation Device: Functional Configuration Example>
FIG. 1 is a diagram illustrating a functional configuration example of the camera simulation apparatus according to the first embodiment. In the first embodiment, a camera simulation apparatus for acquiring a parallax error with respect to a camera system simulating an actual lens system is shown.

図1に示すカメラシミュレーション装置10は、入力手段11と、出力手段12と、蓄積手段13と、模擬カメラ系画像取得手段14と、ピンホールカメラ系画像取得手段15と、視差誤差出力手段16と、送受信手段17と、制御手段18とを有するように構成されている。   The camera simulation apparatus 10 shown in FIG. 1 includes an input unit 11, an output unit 12, a storage unit 13, a simulated camera system image acquisition unit 14, a pinhole camera system image acquisition unit 15, and a parallax error output unit 16. The transmission / reception means 17 and the control means 18 are provided.

入力手段11は、ユーザ等からの模擬カメラ系画像取得指示や、ピンホール系画像取得指示、視差誤差出力指示、送受信指示等の各種指示の開始/終了等の入力、本実施形態の実施に必要な各種データの入力等を受け付ける。なお、入力手段21は、例えばPC(Personal Computer)等の汎用のコンピュータであれば、キーボードやマウス等のポインティングデバイスからなり、携帯端末やスマートフォン等であればタッチパネルや各操作ボタン群等からなる。   The input means 11 is necessary for input of a simulated camera system image acquisition instruction, a pinhole system image acquisition instruction, a parallax error output instruction, a transmission / reception instruction, and other instructions such as start / end from a user, etc. Accepts various data input. The input means 21 is composed of a pointing device such as a keyboard and a mouse if it is a general-purpose computer such as a PC (Personal Computer), and is composed of a touch panel or a group of operation buttons if it is a portable terminal or smartphone.

出力手段12は、入力手段11により入力された内容や、入力内容に基づいて実行された内容等の出力を行う。具体的には、例えば模擬カメラ系画像取得手段14により得られた取得画像や、ピンホールカメラ系画像により得られた取得画像、視差誤差出力手段16により得られた視差誤差結果等、各構成における処理の結果等の画面表示や音声出力等を行う。なお、出力手段12は、ディスプレイやスピーカ等からなる。   The output unit 12 outputs the content input by the input unit 11 and the content executed based on the input content. Specifically, for example, the acquired image obtained by the simulated camera system image acquisition unit 14, the acquired image obtained by the pinhole camera system image, the parallax error result obtained by the parallax error output unit 16, etc. Performs screen display of results of processing, audio output, etc. The output unit 12 includes a display, a speaker, and the like.

更に、出力手段12は、プリンタ等の印刷機能を有していてもよく、上述の各出力内容を、例えば紙等の各種印刷媒体等に印刷することができる。また、入力手段11及び出力手段12は、例えばタッチパネルのような入出力一体型の構成であってもよい。   Furthermore, the output unit 12 may have a printing function such as a printer, and can print the above-described output contents on various printing media such as paper. In addition, the input unit 11 and the output unit 12 may have an input / output integrated configuration such as a touch panel.

蓄積手段13は、本実施形態において必要となる各種情報や各種処理の実行時、又は実行後の各種データを蓄積する。具体的には、蓄積手段13は、模擬カメラ系画像取得手段14により得られる画像や、ピンホールカメラ系画像取得手段15により得られる画像、視差誤差出力手段16により得られる視差誤差出力結果等の各種データを蓄積する。また、蓄積手段13は、必要に応じて蓄積されている各種データを読み出すことができる。   The accumulation unit 13 accumulates various information required in the present embodiment and various data at the time of execution of various processes or after execution. Specifically, the accumulating unit 13 includes an image obtained by the simulated camera system image obtaining unit 14, an image obtained by the pinhole camera system image obtaining unit 15, a parallax error output result obtained by the parallax error output unit 16, and the like. Accumulate various data. Further, the storage means 13 can read out various data stored as required.

模擬カメラ系画像取得手段14は、現実に撮影で使用される望遠や拡大等の各種レンズシステムを模擬したカメラ系をシミュレートし、そのカメラ系で撮像した画像を出力する。なお、本実施形態におけるレンズシステムとしては、例えばレンズと2次元のイメージセンサとを有するカメラ系で用いられる一般的なレンズシステムを使用することができる。   The simulated camera system image acquisition unit 14 simulates a camera system that simulates various lens systems such as telephoto and magnification that are actually used for shooting, and outputs an image captured by the camera system. As the lens system in the present embodiment, for example, a general lens system used in a camera system having a lens and a two-dimensional image sensor can be used.

なお、上述したように、レンズシステムを模擬したカメラ系で仮想的に撮影された画像を取得する技術については、例えばCAD(Computer Aided Design)ソフト等の市販のソフトウェア等により提供されている手法を用いることができる。なお、上述したソフトウェアの具体例としては、例えばCodeV(Optical Research Associates製)や、ZEMAX(ZEMAX Development Corporation製)等があるが、本発明においてはこれに限定されるものではない。   As described above, for a technique for acquiring an image virtually captured by a camera system simulating a lens system, a technique provided by commercially available software such as CAD (Computer Aided Design) software is used. Can be used. Specific examples of the software described above include CodeV (manufactured by Optical Research Associates) and ZEMAX (manufactured by ZEMAX Development Corporation), but are not limited to this.

また、カメラ系とは、例えば、ステレオカメラ等の撮像手段を用いることができるが、本発明においてはこれに限定されるものではない。   The camera system may be an imaging means such as a stereo camera, but is not limited to this in the present invention.

また、模擬カメラ系画像取得手段14は、レンズシステムの設計値に対して、例えば製造誤差をランダムに付加したカメラ系を作成し、その作成された設計値に基づくカメラ系で撮像した画像(第1の画像)を取得する。   The simulated camera system image acquisition unit 14 creates a camera system in which, for example, manufacturing errors are randomly added to the design value of the lens system, and an image (first image) captured by the camera system based on the created design value. 1 image).

ピンホールカメラ系画像取得手段15は、上述した模擬カメラ系画像取得手段14におけるレンズシステムの設計値の焦点距離を用いたピンホールカメラ系をシミュレートし、そのピンホールカメラ系で撮像した画像(第2の画像)を取得する。   The pinhole camera system image acquisition means 15 simulates a pinhole camera system using the focal length of the design value of the lens system in the simulated camera system image acquisition means 14 described above, and an image captured by the pinhole camera system ( 2nd image) is acquired.

ここで、模擬カメラ系画像取得手段14とピンホールカメラ系画像取得手段15とで取得される両画像は、同一の撮影対象に対して撮影された画像であり、両画像ともシミュレーションにより取得された画像である。   Here, both images acquired by the simulated camera system image acquisition means 14 and the pinhole camera system image acquisition means 15 are images taken with respect to the same imaging object, and both images were acquired by simulation. It is an image.

視差誤差出力手段16は、上述したレンズシステムと同様のレンズシステムの理想値からなる理想ピンホールカメラを用いた三角測距の視差を計算する。また、視差誤差出力手段16は、模擬カメラ系画像取得手段14及びピンホールカメラ系画像取得手段15で取得される両画像の差分値を抽出する。   The parallax error output means 16 calculates the parallax of triangulation using an ideal pinhole camera composed of ideal values of a lens system similar to the lens system described above. Further, the parallax error output unit 16 extracts a difference value between both images acquired by the simulated camera system image acquisition unit 14 and the pinhole camera system image acquisition unit 15.

更に、視差誤差出力手段16は、理想ピンホールカメラを用いた三角測距の視差に対して、両画像の差分値を用いて調整し、調整した視差の予測値を出力する。具体的には、視差誤差出力手段16は、例えば、理想ピンホールカメラを用いた三角測距の視差に対して、両画像の差分値を視差誤差として付加することで、視差の予測値を出力する。なお、本発明における調整内容については、これに限定されるものではなく、両画像を用いて得られた値に基づいて他の調整を行うこともできる。   Further, the parallax error output means 16 adjusts the parallax of the triangulation using the ideal pinhole camera using the difference value of both images, and outputs the adjusted predicted parallax value. Specifically, the parallax error output unit 16 outputs a predicted value of parallax by adding, as a parallax error, a difference value between both images to, for example, a triangulation parallax using an ideal pinhole camera. To do. The adjustment content in the present invention is not limited to this, and other adjustments can be made based on values obtained using both images.

送受信手段17は、通信ネットワーク等を介して接続可能な外部装置から所望する外部画像や、本発明における各処理を実現するための実行プログラム等を取得するためのインタフェースである。また、送受信手段17は、カメラシミュレーション装置10内で得られる各種情報を外部装置等に送信することができる。   The transmission / reception means 17 is an interface for acquiring a desired external image, an execution program for realizing each processing in the present invention, and the like from an external device connectable via a communication network or the like. The transmission / reception means 17 can transmit various information obtained in the camera simulation device 10 to an external device or the like.

制御手段18は、カメラシミュレーション装置10の各構成部全体の制御を行う。具体的には、制御手段18は、例えばユーザ等による入力手段11からの指示等に基づいて、各種画像の取得や視差誤差出力等の各処理における制御等を行う。   The control means 18 controls the entire components of the camera simulation device 10. Specifically, the control unit 18 performs control in each process such as acquisition of various images, parallax error output, and the like based on, for example, an instruction from the input unit 11 by a user or the like.

ここで、上述した、カメラシミュレーション装置10においては、各機能をコンピュータに実行させることができる実行プログラム(カメラシミュレーションプログラム)を生成し、例えば汎用のPC、サーバ等にその実行プログラムをインストールすることにより、本発明におけるカメラシミュレーション処理等を実現することができる。   Here, in the camera simulation apparatus 10 described above, an execution program (camera simulation program) that can cause a computer to execute each function is generated, and the execution program is installed in, for example, a general-purpose PC or server. The camera simulation processing and the like in the present invention can be realized.

ここで、本実施形態におけるカメラシミュレーション処理が実現可能なコンピュータのハードウェア構成例について図を用いて説明する。図2は、本実施形態におけるカメラシミュレーション処理が実現可能なハードウェア構成の一例を示す図である。   Here, an example of a hardware configuration of a computer capable of realizing the camera simulation process in the present embodiment will be described with reference to the drawings. FIG. 2 is a diagram illustrating an example of a hardware configuration capable of realizing the camera simulation process according to the present embodiment.

図2におけるコンピュータ本体には、入力装置21と、出力装置22と、ドライブ装置23と、補助記憶装置24と、メモリ装置25と、各種制御を行うCPU(Central Processing Unit)26と、ネットワーク接続装置27とを有するように構成されており、これらはシステムバスBで相互に接続されている。   2 includes an input device 21, an output device 22, a drive device 23, an auxiliary storage device 24, a memory device 25, a CPU (Central Processing Unit) 26 for performing various controls, and a network connection device. 27, and these are connected to each other by a system bus B.

入力装置21は、ユーザ等が操作するキーボード及びマウス等のポインティングデバイスを有しており、ユーザ等からのプログラムの実行等、各種操作信号を入力する。また、入力装置21は、模擬カメラ系画像取得手段14により得られた取得画像や、ピンホールカメラ系画像により得られた取得画像等を入力する画像入力ユニットを有していてもよい。   The input device 21 has a pointing device such as a keyboard and a mouse operated by a user or the like, and inputs various operation signals such as execution of a program from the user or the like. The input device 21 may include an image input unit that inputs an acquired image obtained by the simulated camera system image acquisition unit 14, an acquired image obtained by a pinhole camera system image, and the like.

出力装置22は、本実施形態における処理を行うためのコンピュータ本体を操作するのに必要な各種ウィンドウやデータ等を表示するディスプレイを有し、CPU26が有する制御プログラムによりプログラムの実行経過や結果等を表示することができる。   The output device 22 has a display for displaying various windows and data necessary for operating the computer main body for performing the processing in the present embodiment. Can be displayed.

ここで、本発明においてコンピュータ本体にインストールされる実行プログラムは、例えばCD−ROMやUSB(Universal Serial Bus)メモリ等の可搬型の記録媒体28等により提供される。プログラムを記録した記録媒体28は、例えばドライブ装置23等にセット可能であり、記録媒体28に含まれる実行プログラムが、記録媒体28からドライブ装置23を介して補助記憶装置24にインストールされる。   Here, the execution program installed in the computer main body in the present invention is provided by a portable recording medium 28 such as a CD-ROM or a USB (Universal Serial Bus) memory. The recording medium 28 on which the program is recorded can be set, for example, in the drive device 23 or the like, and the execution program included in the recording medium 28 is installed in the auxiliary storage device 24 from the recording medium 28 via the drive device 23.

補助記憶装置24は、ハードディスク等のストレージ手段であり、本発明における実行プログラムやコンピュータに設けられた制御プログラム等を蓄積し、必要に応じて入出力を行うことができる。   The auxiliary storage device 24 is a storage means such as a hard disk, and can store an execution program according to the present invention, a control program provided in a computer, and the like, and can perform input / output as necessary.

メモリ装置25は、CPU26により補助記憶装置24から読み出された実行プログラムや処理中のデータ等を一時的に格納する。なお、メモリ装置25は、ROM(Read Only Memory)やRAM(Random Access Memory)等からなる。   The memory device 25 temporarily stores an execution program read from the auxiliary storage device 24 by the CPU 26 and data being processed. The memory device 25 includes a ROM (Read Only Memory), a RAM (Random Access Memory), and the like.

CPU26は、OS(Operating System)等の制御プログラム、及びメモリ装置25に格納されている実行プログラムに基づいて、各種演算や各ハードウェア構成部とのデータの入出力等、コンピュータ全体の処理を制御して、本実施形態における各処理を実現することができる。なお、プログラムの実行中に必要な各種情報等は、補助記憶装置24から取得することができ、また実行結果等を格納することもできる。   The CPU 26 controls processing of the entire computer, such as various operations and input / output of data with each hardware component, based on a control program such as an OS (Operating System) and an execution program stored in the memory device 25. Thus, each process in the present embodiment can be realized. Various information necessary during the execution of the program can be acquired from the auxiliary storage device 24, and an execution result or the like can be stored.

ネットワーク接続装置27は、通信ネットワーク等と接続することにより、実行プログラムを通信ネットワークに接続されている他の端末等から取得したり、プログラムを実行することで得られた実行結果又は本発明における実行プログラム自体を他の端末等に提供することができる。   The network connection device 27 acquires an execution program from another terminal connected to the communication network by connecting to a communication network or the like, or an execution result obtained by executing the program or an execution in the present invention The program itself can be provided to other terminals.

上述したようなハードウェア構成により、特別な装置構成を必要とせず、低コストで効率的に本実施形態におけるカメラシミュレーション処理を実行することができる。また、プログラムをインストールすることにより、汎用のPC等で本発明におけるカメラシミュレーション処理を容易に実現することができる。   With the hardware configuration as described above, the camera simulation process in the present embodiment can be executed efficiently at low cost without requiring a special device configuration. Also, by installing the program, the camera simulation process according to the present invention can be easily realized on a general-purpose PC or the like.

次に、上述したカメラシミュレーションプログラム等におけるカメラシミュレーション処理手順について、フローチャートを用いて説明する。   Next, a camera simulation processing procedure in the above-described camera simulation program or the like will be described using a flowchart.

<第1の実施形態におけるカメラシミュレーション処理手順>
図3は、第1の実施形態におけるカメラシミュレーション処理手順の一例を示すフローチャートである。図3に示す処理では、まず模擬カメラ系で撮像した画像を取得する(S01)。次に、理想ピンホールカメラ系で撮像した画像を取得する(S02)。なお、S01及びS02の処理で得られる画像は、シミュレーションにより得られる画像である。また、S01及びS02の処理は、逆の順序でもよく、また同時に行われてもよい。
<Camera Simulation Processing Procedure in First Embodiment>
FIG. 3 is a flowchart illustrating an example of a camera simulation processing procedure according to the first embodiment. In the process shown in FIG. 3, first, an image captured by a simulated camera system is acquired (S01). Next, an image captured by the ideal pinhole camera system is acquired (S02). Note that the images obtained by the processes of S01 and S02 are images obtained by simulation. Further, the processes of S01 and S02 may be performed in the reverse order or may be performed simultaneously.

次に、S01及びS02の処理により得られる両画像の差分値を視差誤差として出力する(S03)。更に、理想ピンホールカメラを用いた三角測距の視差に、S03で得られた視差誤差を付加して視差の予測値を出力する(S04)。なお、上述したように誤差を付加する場合には、例えば視差画像の画素毎に誤差の値を加算する等の処理を行うことができるが、本発明においてはこれに限定されるものではない。   Next, the difference value between the two images obtained by the processing of S01 and S02 is output as a parallax error (S03). Further, the parallax error obtained in S03 is added to the parallax of the triangulation using the ideal pinhole camera, and the predicted value of the parallax is output (S04). When adding an error as described above, for example, processing such as adding an error value for each pixel of a parallax image can be performed. However, the present invention is not limited to this.

上述した第1の実施形態により、例えば種々の製造誤差が付与されたカメラについてカメラパラメータのキャリブレーションを行った後の距離測定誤差等を効率的にシミュレーションすることができる。これにより、量産に適したカメラパラメータのキャリブレーション方法の開発を迅速に行うことができ、更にステレオカメラに最適なカメラの公差等を決定することができる。   According to the first embodiment described above, it is possible to efficiently simulate, for example, a distance measurement error after calibrating camera parameters for a camera with various manufacturing errors. As a result, it is possible to quickly develop a camera parameter calibration method suitable for mass production, and to determine a camera tolerance optimal for a stereo camera.

<第2の実施形態:カメラシミュレーション装置:機能構成例>
次に、第2の実施形態におけるカメラシミュレーション装置の機能構成例について図を用いて説明する。図4は、第2の実施形態におけるカメラシミュレーション装置の機能構成例を示す図である。なお、以下に示す説明において、第1の実施形態とほぼ同様の処理を行う構成については、同一の符号番号を付するものとし、ここでの具体的な説明は省略する。また、ハードウェア構成についても上述した第1の実施形態と同様に汎用のコンピュータ等で行うことができるため、ここでの説明は省略する。
<Second Embodiment: Camera Simulation Device: Functional Configuration Example>
Next, a functional configuration example of the camera simulation apparatus according to the second embodiment will be described with reference to the drawings. FIG. 4 is a diagram illustrating a functional configuration example of the camera simulation apparatus according to the second embodiment. In the following description, the same reference numerals are assigned to configurations that perform substantially the same processing as in the first embodiment, and a specific description thereof is omitted here. Also, the hardware configuration can be performed by a general-purpose computer or the like as in the first embodiment described above, and thus description thereof is omitted here.

図4に示すカメラシミュレーション装置30は、入力手段11と、出力手段12と、蓄積手段13と、模擬カメラ系画像取得手段14と、ピンホールカメラ系画像取得手段15と、視差誤差出力手段16と、送受信手段17と、制御手段18と、内部パラメータ同定手段31と、画像補正手段32と、距離誤差出力手段33とを有するように構成されている。   The camera simulation apparatus 30 shown in FIG. 4 includes an input unit 11, an output unit 12, a storage unit 13, a simulated camera system image acquisition unit 14, a pinhole camera system image acquisition unit 15, and a parallax error output unit 16. The transmission / reception means 17, the control means 18, the internal parameter identification means 31, the image correction means 32, and the distance error output means 33 are configured.

ここで、上述した第1の実施形態と第2の実施形態とを比較すると、第2の実施形態には、内部パラメータ同定手段31と、画像補正手段32と、距離誤差出力手段33とが新たに設けられている。   Here, when the first embodiment and the second embodiment described above are compared, the internal parameter identification unit 31, the image correction unit 32, and the distance error output unit 33 are newly added to the second embodiment. Is provided.

第2の実施形態において、模擬カメラ系画像取得手段14は、上述した第1の実施形態に示す処理に加えて、予め設定されたレンズシステムに対する設計値に製造誤差をランダムに付加したカメラ系を作成し、そのカメラ系で撮像した画像を取得する。なお、製造誤差は、上述したようにランダムに与えるだけでなく、例えば予め設定された誤差入力テーブル等を参照して所定の順序の製造誤差を加えてもよい。なお、上述した誤差入力テーブルは、例えば蓄積手段13等に蓄積され、必要時に読み出して使用することができる。   In the second embodiment, the simulated camera system image acquisition unit 14 adds a camera system in which a manufacturing error is randomly added to a design value for a preset lens system in addition to the processing shown in the first embodiment. Create and acquire an image captured by the camera system. The manufacturing error is not only randomly given as described above, but a manufacturing error in a predetermined order may be added with reference to, for example, a preset error input table. The error input table described above is accumulated in, for example, the accumulation means 13 and can be read and used when necessary.

内部パラメータ同定手段31は、上述したように模擬カメラ系画像取得手段14から得られる製造誤差等を設けた画像に対して、キャリブレーションにより内部パラメータを同定する。ここで、内部パラメータとは、カメラとレンズとの組み合わせによって決まるパラメータであり、例えば焦点距離fやレンズ歪み係数k1,k2、レンズ中心Cx,Cy、アスペクト比α、せん断歪み係数β、及び画像の角度係数等のうち、少なくとも1つのパラメータを示すが、本発明においてはこれに限定されるものではない。   As described above, the internal parameter identification unit 31 identifies the internal parameter by calibration with respect to the image provided with the manufacturing error and the like obtained from the simulated camera system image acquisition unit 14. Here, the internal parameters are parameters determined by the combination of the camera and the lens. For example, the focal length f, the lens distortion coefficients k1 and k2, the lens centers Cx and Cy, the aspect ratio α, the shear distortion coefficient β, and the image Of the angle coefficient and the like, at least one parameter is shown, but the present invention is not limited to this.

また、カメラキャリブレーションとは、調整対象のカメラで何らかの物体(例えば、被写体等)を撮影し、その2次元画像から投影モデルに従ってカメラの内部パラメータ(例えば、焦点距離、レンズ中心、レンズ歪等)等を推定する処理等を示す。ここで、本実施形態では、主に内部パラメータに対するカメラキャリブレーションを行うこととするが、本発明においてはこれに限定されるものではなく、例えば内部パラメータの他にも外部パラメータ(例えば、姿勢、位置等)も用いることができ、これらを組み合わせることもできる。   In addition, camera calibration refers to taking an image of an object (for example, a subject) with a camera to be adjusted, and using the two-dimensional image, the camera's internal parameters (for example, focal length, lens center, lens distortion, etc.) The process etc. which estimate etc. are shown. Here, in this embodiment, camera calibration is mainly performed on internal parameters. However, the present invention is not limited to this. For example, in addition to internal parameters, external parameters (for example, posture, Position etc.) can also be used, and these can also be combined.

なお、第2の実施形態におけるキャリブレーション方法としては、様々な手法を用いることができるが、例えばチャート等を用いてキャリブレーションする手法(例えば、特許第4234059号公報、又は、非特許文献「Z.Zhang,"A flexible new technique for camera calibration",IEEE Transactions on Pattern Analysis and Machine Intelligence,22:1330−1334,2000.」等を参照)や、チャート以外に、例えばレーザ等を用いてキャリブレーションする手法(例えば、「佐川立昌,八木康史,"2つの平行光の観測による内部カメラパラメータの安定なキャリブレーション",画像の認識・理解シンポジウム(MIRU2007)予稿集,pp.615−620」等を参照)等を用いることができる。また、第2の実施形態では、複数のキャリブレーション方法のうち、処理精度(誤差)や処理時間、装置性能等に基づいて適宜選択して処理を行わせることができる。   Various methods can be used as the calibration method in the second embodiment. For example, a calibration method using a chart or the like (for example, Japanese Patent No. 4234059 or the non-patent document “Z Zhang, using “A flexible new technique for camera calibration”, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22: 1330-1334, 2000, etc. Techniques (for example, “Rachimasa Sagawa, Yasushi Yagi,“ Stable calibration of internal camera parameters by observation of two parallel lights ”, Image recognition / Symposium (MIRU2007) Proceedings, pp.615-620 "or the like can be used for reference), and the like. In the second embodiment, among the plurality of calibration methods, processing can be performed by appropriately selecting based on processing accuracy (error), processing time, apparatus performance, and the like.

画像補正手段32は、内部パラメータ同定手段31におけるキャリブレーションで同定された内部パラメータを用いて模擬カメラ系画像取得手段14で取得した画像に対して画像処理による補正を行い、その補正した後の画像(第3の画像)を出力する。なお、補正内容としては、例えば、歪曲収差や画像の倍率等を補正する。また、本発明においてはこれに限定されるものではなく、その他にも例えば倍率色収差等を補正してもよい。   The image correction unit 32 performs correction by image processing on the image acquired by the simulated camera system image acquisition unit 14 using the internal parameter identified by the calibration in the internal parameter identification unit 31, and the image after the correction (Third image) is output. As correction contents, for example, distortion, image magnification, and the like are corrected. In the present invention, the present invention is not limited to this. For example, lateral chromatic aberration may be corrected.

つまり、第2の実施形態における補正は、模擬カメラ系画像取得手段14で取得した画像が、レンズシステムの設計値の焦点距離を用いたピンホールカメラ系(理想ピンホールカメラ系)で撮像した画像に近づくように補正を行う。   That is, in the correction in the second embodiment, the image acquired by the simulated camera system image acquisition unit 14 is an image captured by a pinhole camera system (ideal pinhole camera system) using the focal length of the design value of the lens system. Make corrections so that

なお、第2の実施形態における視差誤差出力手段16は、画像補正手段32により得られる第3の画像と、上述したピンホールカメラ系画像取得手段15により得られる画像(第2の画像)との差分値を出力し、ピンホールカメラを用いた三角測距の視差に対し、差分値を付加して視差誤差の予測値を出力する。   In addition, the parallax error output means 16 in 2nd Embodiment is the 3rd image obtained by the image correction means 32, and the image (2nd image) obtained by the pinhole camera system image acquisition means 15 mentioned above. A difference value is output, and a predicted value of the parallax error is output by adding the difference value to the parallax of triangulation using a pinhole camera.

距離誤差出力手段33は、視差誤差出力手段16により得られた視差誤差の予測値に対する距離を計算し、その距離の誤差を出力する。   The distance error output means 33 calculates the distance with respect to the predicted value of the parallax error obtained by the parallax error output means 16 and outputs the error of the distance.

ここで、第2の実施形態では、例えば視差誤差出力手段16や距離誤差出力手段33における誤差算出の際には、ランダム値や予め設定された複数の異なる条件等により複数回(所定回数分)処理を行い、その平均値や最大誤差、最小誤差等を出力する処理を行うことができる。なお、所定回数分の処理を行う場合には、例えば上述した模擬カメラ系を複数設けることにより実現することができるが、本発明においてはこれに限定されるものではない。   Here, in the second embodiment, for example, when calculating an error in the parallax error output unit 16 or the distance error output unit 33, a plurality of times (for a predetermined number of times) depending on a random value or a plurality of preset different conditions. It is possible to perform processing and output the average value, maximum error, minimum error, and the like. Note that the processing for a predetermined number of times can be realized by providing a plurality of the above-described simulated camera systems, for example, but the present invention is not limited to this.

更に、距離誤差出力手段33は、例えば多数のカメラ系で距離誤差を取得した場合には、その距離誤差の最大値の分布を作成して出力してもよい。このとき、距離誤差出力手段33は、視差の予測値を用いて距離を計算して誤差を出力し、多数のカメラの距離測定誤差の最大値の分布を出力した後、距離測定誤差の最大値の分布が所望の範囲に入っているか否かを判断する。そして、距離誤差出力手段33は、最大値の分布が所望の範囲に入っていない場合に、所定の範囲内に入るように制御を行う。   Further, the distance error output means 33 may create and output the distribution of the maximum value of the distance error when the distance error is acquired by a large number of camera systems, for example. At this time, the distance error output means 33 calculates the distance using the predicted value of the parallax, outputs the error, outputs the distribution of the maximum values of the distance measurement errors of many cameras, and then outputs the maximum value of the distance measurement error. It is determined whether or not the distribution of is within a desired range. Then, the distance error output means 33 performs control so that the maximum value distribution falls within a predetermined range when the maximum value distribution does not fall within the desired range.

<第2の実施形態におけるカメラシミュレーション処理手順>
次に、第2の実施形態におけるカメラシミュレーション処理手順について、フローチャートを用いて説明する。図5は、第2の実施形態におけるカメラシミュレーション処理手順の一例を示すフローチャートである。図5に示す処理では、まず設計値に製造誤差をランダムに付加した模擬カメラ系(リアルカメラ系)を作成する(S11)。なお、S11の処理では、模擬カメラ系として、例えば、各光学要素と機構部品に公差幅と製造誤差の発生のし易さを表す製造分布を与え、モンテカルロシミュレーション等により光学系の設計値に製造誤差を付加した光学系のデータを複数(例えば、100〜1000通り等)作成する。
<Camera Simulation Processing Procedure in Second Embodiment>
Next, a camera simulation processing procedure in the second embodiment will be described using a flowchart. FIG. 5 is a flowchart illustrating an example of a camera simulation processing procedure according to the second embodiment. In the process shown in FIG. 5, first, a simulated camera system (real camera system) in which manufacturing errors are randomly added to design values is created (S11). In the process of S11, as a simulated camera system, for example, each optical element and mechanism component is given a manufacturing distribution indicating tolerance width and ease of occurrence of manufacturing error, and manufactured to the design value of the optical system by Monte Carlo simulation or the like. A plurality (for example, 100 to 1000) of optical system data to which an error is added is created.

次に、模擬カメラ系で撮像した画像を取得する(S12)。ここで、S12の処理では、例えば視差計算に用いる基準画像等を模擬カメラ系で撮像した画像を出力する。また、上述した基準画像としては、例えば格子状のチャートを用いることができる。格子状のチャートを用いた場合には、幾何光学的な計算だけで撮像のシミュレーションが可能であり、チャートの像のセンサ上での座標が出力される。   Next, an image captured by the simulated camera system is acquired (S12). Here, in the process of S12, for example, an image obtained by capturing a reference image or the like used for parallax calculation with a simulated camera system is output. In addition, as the above-described reference image, for example, a lattice chart can be used. When a grid-like chart is used, imaging simulation can be performed only by geometric optical calculation, and the coordinates of the chart image on the sensor are output.

次に、キャリブレーションで内部パラメータを同定する(S13)。具体的には、内部パラメータとして、例えば焦点距離fやレンズ歪み係数k1,k2、レンズ中心Cx,Cy、アスペクト比α、及びせん断歪み係数β等を取得する。次に、キャリブレーションで同定された内部パラメータを用いた画像処理で補正を行い、補正した後の画像を出力する(S14)。ここでの補正は、上述したように、例えばレンズシステムの設計値の焦点距離を用いたピンホールカメラ系(理想ピンホールカメラ系)で得られた画像に近づけるような補正を行う。   Next, internal parameters are identified by calibration (S13). Specifically, for example, the focal length f, lens distortion coefficients k1, k2, lens centers Cx, Cy, aspect ratio α, shear distortion coefficient β, and the like are acquired as internal parameters. Next, correction is performed by image processing using the internal parameters identified by calibration, and the corrected image is output (S14). For example, as described above, the correction here is performed so as to be close to an image obtained by a pinhole camera system (ideal pinhole camera system) using the focal length of the design value of the lens system.

次に、レンズシステムの設計値の焦点距離を用いたピンホールカメラ系(理想ピンホールカメラ系)で撮像した画像を取得する(S15)。ここで、S15の処理では、例えば視差計算に用いる基準画像を理想ピンホールカメラ系で撮像した画像を出力する。なお、基準画像は、上述したS12で使用したものと同じものを用いる。これは、リアルカメラ系で撮像した画像と、理想ピンホールカメラ系で撮像した画像との差分値を比較するためである。   Next, an image captured by a pinhole camera system (ideal pinhole camera system) using the focal length of the design value of the lens system is acquired (S15). Here, in the process of S15, for example, an image obtained by capturing the reference image used for parallax calculation with the ideal pinhole camera system is output. The reference image is the same as that used in S12 described above. This is because the difference value between the image captured by the real camera system and the image captured by the ideal pinhole camera system is compared.

次に、両画像の差分値を視差誤差として出力する(S16)。S16の処理では、例えば、基準画像上の特定の点の理想ピンホールカメラ系での結像位置と、リアルカメラ系での結像位置との差をセンサ上での水平方向(u軸方向)と垂直方向(v軸方向)について計算し、その計算結果を視差誤差として出力する。なお、上述した基準画像上の特定の点の例としては、例えば格子状のチャートの格子点がある。この場合、チャートの各格子点について理想ピンホールカメラ系での結像位置と、リアルカメラ系での結像位置との差を出力する。また、第2の実施形態では、像の大きさがセンササイズと等しくなるようなチャートを選択することで、センサ全体での視差誤差の分布をシミュレーションすることができる。   Next, the difference value between the two images is output as a parallax error (S16). In the process of S16, for example, the difference between the imaging position of the ideal pinhole camera system at a specific point on the reference image and the imaging position of the real camera system is determined in the horizontal direction (u-axis direction) on the sensor. And the vertical direction (v-axis direction), and the calculation result is output as a parallax error. In addition, as an example of the specific point on the reference | standard image mentioned above, there exists a lattice point of a grid | lattice-like chart, for example. In this case, the difference between the imaging position in the ideal pinhole camera system and the imaging position in the real camera system is output for each lattice point of the chart. In the second embodiment, the distribution of parallax errors in the entire sensor can be simulated by selecting a chart in which the image size is equal to the sensor size.

次に、理想ピンホールカメラを用いた三角測距の視差に、S16の処理にて得られた両画像の差分値を付加して視差の予測値を出力する(S17)。なお、理想ピンホールカメラでの三角測距の視差の値dは、例えば、以下に示す式(1)で計算される。
d=B*f/Z ・・・(1)
ここで、上述した式(1)において、Bはステレオカメラにおける両カメラ間の基線長を示し、fはレンズ系の焦点距離の設計値を示し、Zはカメラから物体(例えば、被写体等)への距離を示している。
Next, the difference value between the two images obtained in the process of S16 is added to the parallax of the triangulation using the ideal pinhole camera, and the predicted value of the parallax is output (S17). Note that the parallax value d for triangulation with an ideal pinhole camera is calculated by, for example, the following equation (1).
d = B * f / Z (1)
Here, in the above-described equation (1), B represents the baseline length between the two cameras in the stereo camera, f represents the design value of the focal length of the lens system, and Z represents from the camera to an object (for example, a subject). Shows the distance.

次に、S17の処理で得られた視差の予測値を用いて距離を計算して誤差を出力する(S18)。なお、S18の処理において、視差の予測値を用いて距離Zを計算する場合には、例えば、以下に示す式(2)等を用いることができる。
Z=B*f/(d+△d) ・・・(2)
ここで、上述した式(2)において、Bはステレオカメラにおける両カメラ間の基線長を示し、fはレンズ系の焦点距離の設計値を示し、d+△dは視差誤差を付加した視差の予測値を示している。
Next, a distance is calculated using the predicted parallax value obtained in the process of S17, and an error is output (S18). In the process of S18, when the distance Z is calculated using the predicted value of parallax, for example, the following equation (2) can be used.
Z = B * f / (d + Δd) (2)
Here, in the above-described equation (2), B represents the baseline length between the two cameras in the stereo camera, f represents the design value of the focal length of the lens system, and d + Δd represents the parallax prediction with the parallax error added. The value is shown.

なお、基準画像として格子状のチャートを用いた場合は、チャートの各格子点について視差の予測値を用いて計算した距離と、予め定めた距離の真値との差を格子点毎に出力する。   When a grid chart is used as the reference image, the difference between the distance calculated using the predicted parallax value for each grid point of the chart and the true value of the predetermined distance is output for each grid point. .

ここで、ランダム値等により予め設定された回数分(所定回数分)の処理を行ったか否かを判断し(S19)。所定回数分の処理を行っていない場合(S19において、NO)、S11に戻り、設計値に付加する製造誤差をランダムに変更してS11以降の処理を行う。   Here, it is determined whether or not processing for a preset number of times (a predetermined number of times) has been performed by a random value or the like (S19). If the predetermined number of times of processing has not been performed (NO in S19), the process returns to S11, and the manufacturing error added to the design value is randomly changed, and the processes after S11 are performed.

また、S19の処理において、所定回数分の処理を行った場合(S19において、YES)、複数の模擬カメラ系から得られる距離測定誤差に基づいて距離誤差を出力する(S20)。なお、S20の処理では、例えば複数の模擬カメラ系から得られる距離測定誤差の平均値を出力したり、最大の距離測定誤差を出力したり、最小の距離測定誤差を出力したり、標準偏差に基づく距離測定誤差を出力することができる。なお、本発明においては上述した出力手法に限定されるものではなく、例えば上述した出力手法の複数を組み合わせてもよい。   Further, in the process of S19, when a predetermined number of processes have been performed (YES in S19), a distance error is output based on distance measurement errors obtained from a plurality of simulated camera systems (S20). In the process of S20, for example, an average value of distance measurement errors obtained from a plurality of simulated camera systems, a maximum distance measurement error, a minimum distance measurement error, or a standard deviation is output. Based on the distance measurement error can be output. In the present invention, the output method is not limited to the above-described output method. For example, a plurality of the output methods described above may be combined.

上述したように、第2の実施形態によれば、種々の製造誤差が付与されたカメラについてカメラパラメータのキャリブレーションを行った後の距離測定誤差をシミュレーションすることで、量産に適したカメラパラメータのキャリブレーション方法の開発を迅速に行うことができる。また、第2の実施形態によれば、距離測定誤差をシミュレーションすることで、ステレオカメラに最適なカメラの公差を決定することができる。   As described above, according to the second embodiment, a camera parameter suitable for mass production is simulated by simulating a distance measurement error after calibrating the camera parameter for a camera with various manufacturing errors. It is possible to quickly develop a calibration method. Further, according to the second embodiment, it is possible to determine a camera tolerance that is optimal for a stereo camera by simulating a distance measurement error.

<第3の実施形態:カメラシミュレーション装置:機能構成例>
次に、第3の実施形態におけるカメラシミュレーション装置の機能構成例について図を用いて説明する。図6は、第3の実施形態におけるカメラシミュレーション装置の機能構成例を示す図である。なお、以下に示す説明では、第1及び第2の実施形態とほぼ同様の処理を行う構成については、同一の符号番号を付するものとし、ここでの具体的な説明は省略する。また、ハードウェア構成についても上述した第1の実施形態と同様に汎用のコンピュータ等で行うことができるため、ここでの説明は省略する。
<Third Embodiment: Camera Simulation Device: Functional Configuration Example>
Next, a functional configuration example of the camera simulation apparatus according to the third embodiment will be described with reference to the drawings. FIG. 6 is a diagram illustrating a functional configuration example of the camera simulation apparatus according to the third embodiment. In the following description, the same reference numerals are assigned to configurations that perform substantially the same processing as in the first and second embodiments, and a specific description thereof is omitted here. Also, the hardware configuration can be performed by a general-purpose computer or the like as in the first embodiment described above, and thus description thereof is omitted here.

図6に示すカメラシミュレーション装置40は、入力手段11と、出力手段12と、蓄積手段13と、模擬カメラ系画像取得手段14と、ピンホールカメラ系画像取得手段15と、視差誤差出力手段16と、送受信手段17と、制御手段18と、内部パラメータ同定手段31と、画像補正手段32と、距離誤差出力手段33と、キャリブレーション・公差設定手段41とを有するように構成されている。   The camera simulation apparatus 40 shown in FIG. 6 includes an input unit 11, an output unit 12, a storage unit 13, a simulated camera system image acquisition unit 14, a pinhole camera system image acquisition unit 15, and a parallax error output unit 16. The transmission / reception means 17, the control means 18, the internal parameter identification means 31, the image correction means 32, the distance error output means 33, and the calibration / tolerance setting means 41 are configured.

ここで、上述した第2の実施形態と第3の実施形態とを比較すると、第3の実施形態には、キャリブレーション・公差設定手段41が新たに設けられている。   Here, when the second embodiment and the third embodiment described above are compared, a calibration / tolerance setting means 41 is newly provided in the third embodiment.

第3の実施形態において、キャリブレーション・公差設定手段41は、距離誤差出力手段33により得られる距離測定誤差の最大値の分布が、予め設定された範囲に入っているか否かを判断し、その判断結果を出力する。また、キャリブレーション・公差設定手段41は、判断結果において、距離測定誤差の最大値の分布が予め設定された範囲内に入っていない場合には、再度、設計値に与える製造誤差の公差値等を修正し、新たな設定値を設定する。なお、キャリブレーション・公差設定手段41は、公差値を再設定するだけでなく、例えばキャリブレーション方法を変更してもよく、またキャリブレーション方法及び公差値の両方を再設定してもよい。また、キャリブレーション・公差設定手段41は、新たな設定値によりカメラシミュレーションを再度行うように制御手段18等に指示を行う。   In the third embodiment, the calibration / tolerance setting unit 41 determines whether or not the distribution of the maximum value of the distance measurement error obtained by the distance error output unit 33 is within a preset range. The judgment result is output. In addition, the calibration / tolerance setting means 41, when the distribution of the maximum value of the distance measurement error is not within the preset range in the determination result, the tolerance value of the manufacturing error given to the design value again. Is corrected and a new set value is set. Note that the calibration / tolerance setting unit 41 not only resets the tolerance value, but also may change the calibration method, for example, or reset both the calibration method and the tolerance value. The calibration / tolerance setting unit 41 instructs the control unit 18 and the like to perform the camera simulation again with the new set value.

<距離測定誤差の最大値の分布例>
ここで、第3の実施形態における多数のカメラの距離測定誤差の最大値の分布を出力した結果の例について、図を用いて説明する。図7は、第3の実施形態における距離測定誤差の最大値の分布の一例を示す図である。なお、図7において、横軸は100mからの誤差(m)を示し、縦軸は頻度(回数)を示している。
<Distribution example of maximum distance measurement error>
Here, an example of the result of outputting the maximum value distribution of distance measurement errors of a large number of cameras in the third embodiment will be described with reference to the drawings. FIG. 7 is a diagram illustrating an example of the distribution of the maximum value of distance measurement errors in the third embodiment. In FIG. 7, the horizontal axis represents an error (m) from 100 m, and the vertical axis represents the frequency (number of times).

つまり、図7の例では、カメラから100m前方にある物体を測距計算した際の誤差の画像上での最大値を横軸に取り、1000個(パターン)のレンズシステムについて試行した際の出現頻度を縦軸に取ったヒストグラムを示している。   That is, in the example of FIG. 7, the maximum value on the image of the error when the object 100 meters ahead from the camera is calculated is taken on the horizontal axis, and the appearance when 1000 (pattern) lens systems are tried. A histogram is shown with the frequency on the vertical axis.

第3の実施形態におけるキャリブレーション・公差設定手段41は、この距離測定誤差の最大値の分布が予め設定された範囲に入っているか否か、言い換えれば、この距離測定誤差の分布のうち、所望の範囲内に収まるレンズの割合が、基準値を満たすか否かにより、キャリブレーション方法及び/又は公差設定の良否を判断する。   The calibration / tolerance setting means 41 in the third embodiment determines whether or not the distribution of the maximum value of the distance measurement error is within a preset range, in other words, the desired distribution measurement error distribution is a desired value. The quality of the calibration method and / or tolerance setting is determined based on whether or not the ratio of lenses that fall within the range satisfies the reference value.

なお、図7に示す横軸の値としては、所定距離からの誤差に限定されるものではなく、例えば距離測定誤差の平均値や分散、標準偏差等を用いることができる。また、本発明において、設定を変更して距離測定誤差を取得するためのレンズシステムの数についてもこれに限定されるものではなく、例えば100以上の所定の個数であってもよい。   Note that the value on the horizontal axis shown in FIG. 7 is not limited to an error from a predetermined distance, and for example, an average value, variance, standard deviation, or the like of a distance measurement error can be used. In the present invention, the number of lens systems for changing the setting and acquiring the distance measurement error is not limited to this, and may be a predetermined number of 100 or more, for example.

<第3の実施形態におけるカメラシミュレーション処理手順>
次に、第3の実施形態におけるカメラシミュレーション処理手順について、フローチャートを用いて説明する。図8は、第3の実施形態におけるカメラシミュレーション処理手順の一例を示すフローチャートである。
<Camera Simulation Processing Procedure in Third Embodiment>
Next, a camera simulation processing procedure in the third embodiment will be described using a flowchart. FIG. 8 is a flowchart illustrating an example of a camera simulation processing procedure according to the third embodiment.

なお、図8に示す処理において、S21〜S29における処理は、上述した第2の実施形態におけるカメラシミュレーション処理のS11〜S19と同様であるため、ここでの説明は省略する。   In the process shown in FIG. 8, the processes in S21 to S29 are the same as S11 to S19 in the camera simulation process in the second embodiment described above, and a description thereof will be omitted here.

第3の実施形態におけるS29の処理において、所定回数分の処理を行った場合(S29において、YES)、複数の模擬カメラ系から得られる距離測定誤差の最大値の分布を出力する(S30)。なお、S30の処理は、例えば、予め設定された複数のカメラの距離測定誤差の最大値の分布を出力する工程であり、キャリブレーション方法の良否の判断に用いる指標としては、例えば、その他に距離測定誤差の平均値や標準偏差等を用いることもでき、それらを組み合わせることもできる。   In the process of S29 in the third embodiment, when a predetermined number of processes have been performed (YES in S29), the distribution of the maximum value of distance measurement errors obtained from a plurality of simulated camera systems is output (S30). Note that the processing of S30 is, for example, a step of outputting a preset distribution of maximum values of distance measurement errors of a plurality of cameras. As an index used for determining the quality of the calibration method, for example, other distances may be used. An average value of measurement errors, a standard deviation, or the like can be used, or they can be combined.

次に、S30の処理終了後、最大値の分布が所定の範囲内にあるか否かを判断する(S31)。ここで、S31の処理において、最大値の分布が所定の範囲内にない場合(S31において、NO)、キャリブレーション方法又は公差設定の良否判定を「否」と判定し(S32)、設計値に与える製造誤差の公差値を修正し(S33)、新たな設定値を用いて、上述したS21の処理に戻り、後続の処理を再度行う。なお、上述したS33の処理においては、キャリブレーション方法を変更してもよく、また、キャリブレーション方法及び公差値を変更(再設定)してもよい。   Next, after the process of S30 is completed, it is determined whether or not the maximum value distribution is within a predetermined range (S31). Here, in the process of S31, when the distribution of the maximum value is not within the predetermined range (NO in S31), the quality determination of the calibration method or the tolerance setting is determined as “No” (S32), and the design value is set. The tolerance value of the given manufacturing error is corrected (S33), and the process returns to the above-described process of S21 using the new set value, and the subsequent process is performed again. In the process of S33 described above, the calibration method may be changed, and the calibration method and the tolerance value may be changed (reset).

また、S31の処理において、最大の分布が所定の範囲内にある場合(S31において、YES)、キャリブレーション方法又は公差設定の良否判定を「良」と判定し(S34)、処理を終了する。   In the process of S31, if the maximum distribution is within a predetermined range (YES in S31), the quality determination of the calibration method or tolerance setting is determined as “good” (S34), and the process is terminated.

つまり、上述したS31〜S34の処理では、距離測定誤差の分布が所望の範囲内にあるかでキャリブレーション方法又は公差設定の良否を判断する工程であり、距離測定誤差の分布が所望の範囲内にない場合はキャリブレーション方法又は公差設定を変更して、最初から繰り返す。   That is, in the above-described processing of S31 to S34, it is a step of determining whether the calibration method or tolerance setting is good or not based on whether the distance measurement error distribution is within a desired range, and the distance measurement error distribution is within the desired range. If not, change the calibration method or tolerance setting and repeat from the beginning.

上述したように、第3の実施形態によれば、種々の製造誤差が付与されたカメラについてカメラパラメータのキャリブレーションを行った後の距離測定誤差をシミュレーションすることで、量産に適したカメラパラメータのキャリブレーション方法の開発を迅速に行うことができる。また、第3の実施形態によれば、ステレオカメラに最適なカメラの公差を決定することができる。なお、上述した第1〜第3の実施形態は、各構成の一部を適宜組み合わせて適用することができる。   As described above, according to the third embodiment, a camera parameter suitable for mass production is simulated by simulating a distance measurement error after calibrating the camera parameter for a camera with various manufacturing errors. It is possible to quickly develop a calibration method. Further, according to the third embodiment, it is possible to determine a camera tolerance that is optimal for a stereo camera. The first to third embodiments described above can be applied by appropriately combining a part of each configuration.

上述したように、本実施形態によれば、効率的にカメラパラメータのキャリブレーションを行うことができる。具体的には、本発明によれば、種々の製造誤差が付与されたカメラについてカメラパラメータのキャリブレーションを行った後の距離測定誤差を、実際のカメラを使用せずにシミュレーションにより求めることができる。つまり、現実のレンズシステムを模擬した模擬カメラ系による画像と、ステレオ法による距離計算に用いる理想のカメラ系による画像との比較がシミュレーション上で実現することで、量産に適したカメラパラメータのキャリブレーション方法の開発を迅速に行うことができる。   As described above, according to the present embodiment, camera parameter calibration can be performed efficiently. Specifically, according to the present invention, a distance measurement error after calibrating camera parameters for a camera with various manufacturing errors can be obtained by simulation without using an actual camera. . In other words, the simulation of a camera parameter that is suitable for mass production is achieved through a simulation that compares an image from a simulated camera system simulating an actual lens system with an image from an ideal camera system used for distance calculation by the stereo method. The method can be developed quickly.

更に、本発明によれば、例えば、ある公差値を入力してシミュレーションを行い、出力された測距誤差が所望の範囲外であれば、公差値を再設定した後に再度シミュレーションを行い、測距誤差が所望の範囲内になるまでシミュレーションを繰り返し行う。これにより、本発明は、距離測定精度を基準にして公差設定を行うことができ、ステレオカメラに最適なカメラの公差を決定することができる。   Furthermore, according to the present invention, for example, a certain tolerance value is input and a simulation is performed. If the output ranging error is outside the desired range, the tolerance value is reset and then the simulation is performed again. The simulation is repeated until the error is within a desired range. As a result, the present invention can set the tolerance with reference to the distance measurement accuracy, and can determine the optimum camera tolerance for the stereo camera.

なお、本発明に係るカメラシミュレーション装置、カメラシミュレーション方法、及びカメラシミュレーションプログラムは、例えばステレオカメラ等における各種カメラのレンズシステムの開発、或いはステレオカメラ等を用いた測距装置や3次元形状認識装置等に適用したり、例えば車載用のステレオカメラ等において、本発明におけるシミュレーション結果に基づいて適切なレンズシステムを採用する等といった広い分野に適用することができる。   The camera simulation device, the camera simulation method, and the camera simulation program according to the present invention include, for example, development of a lens system for various cameras in a stereo camera, a distance measuring device using a stereo camera, a three-dimensional shape recognition device, and the like. The present invention can be applied to a wide range of fields, such as adopting an appropriate lens system based on the simulation result in the present invention, for example, in an in-vehicle stereo camera.

以上本発明の好ましい実施形態について詳述したが、本発明は係る特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形、変更が可能である。   Although the preferred embodiment of the present invention has been described in detail above, the present invention is not limited to the specific embodiment, and various modifications, within the scope of the gist of the present invention described in the claims, It can be changed.

10,30,40 カメラシミュレーション装置
11 入力手段
12 出力手段
13 蓄積手段
14 模擬カメラ系画像取得手段
15 ピンホールカメラ系画像取得手段
16 視差誤差出力手段
17 送受信手段
18 制御手段
21 入力装置
22 出力装置
23 ドライブ装置
24 補助記憶装置
25 メモリ装置
26 CPU(Central Processing Unit)
27 ネットワーク接続装置
28 記録媒体
31 内部パラメータ同定手段
32 画像補正手段
33 距離誤差出力手段
41 キャリブレーション・公差設定手段
DESCRIPTION OF SYMBOLS 10, 30, 40 Camera simulation apparatus 11 Input means 12 Output means 13 Accumulation means 14 Simulated camera system image acquisition means 15 Pinhole camera system image acquisition means 16 Parallax error output means 17 Transmission / reception means 18 Control means 21 Input device 22 Output device 23 Drive device 24 Auxiliary storage device 25 Memory device 26 CPU (Central Processing Unit)
27 Network connection device 28 Recording medium 31 Internal parameter identification means 32 Image correction means 33 Distance error output means 41 Calibration / tolerance setting means

特開2006−98558号公報JP 2006-98558 A

Claims (15)

レンズシステムを模擬した模擬カメラ系をシミュレートし、シミュレートした該模擬カメラ系所定の物体を撮像したときの第1の画像を取得する模擬カメラ系画像取得手段と、
前記レンズシステムの設計値での焦点距離を用いたピンホールカメラ系をシミュレートし、シミュレートした該ピンホールカメラ系前記所定の物体を前記第1の画像を撮影した位置と同一位置から撮像したときの第2の画像を取得するピンホールカメラ系画像取得手段と、
模擬カメラ系画像取得手段により得られる前記第1の画像と、前記ピンホールカメラ系画像取得手段により得られる前記第2の画像とから前記所定の物体の画像上の位置のずれを差分値として出力し、前記ピンホールカメラを用いた三角測距の視差に対して、前記差分値を用いて視差誤差の予測値を出力する視差誤差出力手段とを有することを特徴とするカメラシミュレーション装置。
The lens system to simulate a simulated camera system that simulates a first image to obtain the simulated camera system image acquisition means when capturing a predetermined object in simulated the simulated camera system,
A pinhole camera system using a focal length at the design value of the lens system is simulated, and the predetermined object is picked up from the same position as the position where the first image was taken with the simulated pinhole camera system. Pinhole camera system image acquisition means for acquiring a second image when
Said first image obtained by the simulated camera system image acquiring means, the output deviation of the position on the image of the predetermined object from said obtained second image by the pinhole camera system image acquiring means as the difference value And a parallax error output means for outputting a predicted value of the parallax error using the difference value with respect to the parallax of the triangulation using the pinhole camera system .
前記模擬カメラ系に対するキャリブレーションにより内部パラメータを同定する内部パラメータ同定手段と、
前記前記内部パラメータ同定手段により同定された内部パラメータを用いて前記模擬カメラ系画像取得手段から得られる画像に対して補正を行う画像補正手段とを有し、
前記視差誤差出力手段は、前記画像補正手段により得られる第3の画像と、前記第2の画像との差分値を出力し、前記ピンホールカメラを用いた三角測距の視差に対し、前記差分値を用いて視差誤差の予測値を出力することを特徴とする請求項1に記載のカメラシミュレーション装置。
Internal parameter identification means for identifying internal parameters by calibration with respect to the simulated camera system;
Image correction means for correcting an image obtained from the simulated camera system image acquisition means using the internal parameters identified by the internal parameter identification means;
The parallax error output means outputs a difference value between the third image obtained by the image correction means and the second image, and for the parallax of triangulation using the pinhole camera system , the parallax error output means The camera simulation apparatus according to claim 1, wherein the prediction value of the parallax error is output using the difference value.
前記視差誤差出力手段から得られる前記予測値を用いて距離を計算して誤差を出力する距離誤差出力手段を有することを特徴とする請求項1又は2に記載のカメラシミュレーション装置。   The camera simulation apparatus according to claim 1, further comprising a distance error output unit that calculates a distance using the predicted value obtained from the parallax error output unit and outputs an error. 前記模擬カメラ系画像取得手段は、
前記設計値に対して設定される製造誤差をランダムに付加した複数の模擬カメラ系を生成し、生成したカメラ系により撮像した画像を取得することを特徴とする請求項に記載のカメラシミュレーション装置。
The simulated camera system image acquisition means includes:
The camera simulation apparatus according to claim 3 , wherein a plurality of simulated camera systems in which manufacturing errors set for the design values are randomly added are generated, and images captured by the generated camera systems are acquired. .
前記距離誤差出力手段は、
前記複数の模擬カメラ系から得られる距離測定誤差を用いて、前記模擬カメラ系の距離測定誤差の最大値の分布を出力することを特徴とする請求項4に記載のカメラシミュレーション装置。
The distance error output means includes
5. The camera simulation apparatus according to claim 4, wherein a distribution of maximum values of distance measurement errors of the simulated camera system is output using distance measurement errors obtained from the plurality of simulated camera systems.
前記複数の模擬カメラ系の距離測定誤差の最大値の分布が予め設定された範囲に含まれているか否かにより、前記模擬カメラ系に対するキャリブレーション又は公差設定に対する良否を判定するキャリブレーション・公差設定手段を有することを特徴とする請求項の何れか1項に記載のカメラシミュレーション装置。 Calibration / tolerance setting for determining whether the simulation camera system is calibrated or tolerated for tolerance setting based on whether or not the distribution of maximum values of distance measurement errors of the plurality of simulated camera systems is included in a preset range The camera simulation apparatus according to claim 5 , further comprising: means. 前記キャリブレーション・公差設定手段は、
前記最大値の分布が予め設定された範囲に含まれていないと判断された場合に、前記設計値に与える製造誤差の公差値を再設定することを特徴とする請求項6に記載のカメラシミュレーション装置。
The calibration / tolerance setting means includes:
The camera simulation according to claim 6, wherein when it is determined that the distribution of the maximum value is not included in a preset range, a tolerance value of a manufacturing error given to the design value is reset. apparatus.
レンズシステムを模擬した模擬カメラ系をシミュレートし、シミュレートした該模擬カメラ系所定の物体を撮像したときの第1の画像を取得する模擬カメラ系画像取得工程と、
前記レンズシステムの設計値での焦点距離を用いたピンホールカメラ系をシミュレートし、シミュレートした該ピンホールカメラ系前記所定の物体を前記第1の画像を撮影した位置と同一位置から撮像したときの第2の画像を取得するピンホールカメラ系画像取得工程と、
模擬カメラ系画像取得工程により得られる前記第1の画像と、前記ピンホールカメラ系画像取得工程により得られる前記第2の画像とから前記所定の物体の画像上の位置のずれを差分値として出力し、前記ピンホールカメラを用いた三角測距の視差に対して、前記差分値を用いて視差誤差の予測値を出力する視差誤差出力工程とを有することを特徴とするカメラシミュレーション方法。
Simulating a simulated camera system simulating the lens system, the simulated camera system image acquisition step of acquiring a first image obtained by imaging a predetermined object in simulated the simulated camera system,
A pinhole camera system using a focal length at the design value of the lens system is simulated, and the predetermined object is picked up from the same position as the position where the first image was taken with the simulated pinhole camera system. A pinhole camera system image acquisition step of acquiring a second image when
Said first image obtained by the simulated camera system image acquiring step, the output deviation of the position on the image of the predetermined object from said obtained second image by the pinhole camera system image acquisition step as the difference value And a parallax error output step of outputting a predicted value of the parallax error using the difference value with respect to the parallax of the triangulation using the pinhole camera system .
前記模擬カメラ系に対するキャリブレーションにより内部パラメータを同定する内部パラメータ同定工程と、
前記内部パラメータ同定工程により同定された内部パラメータを用いて前記模擬カメラ系画像取得工程から得られる画像に対して補正を行う画像補正工程とを有し、
前記視差誤差出力工程は、前記画像補正工程により得られる第3の画像と、前記第2の画像との差分値を出力し、前記ピンホールカメラを用いた三角測距の視差に対し、前記差分値を用いて視差誤差の予測値を出力することを特徴とする請求項8に記載のカメラシミュレーション方法。
An internal parameter identification step of identifying internal parameters by calibration with respect to the simulated camera system;
An image correction step of correcting the image obtained from the simulated camera system image acquisition step using the internal parameter identified by the internal parameter identification step;
The parallax error output step outputs a difference value between the third image obtained by the image correction step and the second image, and for the parallax of triangulation using the pinhole camera system , 9. The camera simulation method according to claim 8, wherein a predicted value of the parallax error is output using the difference value.
前記視差誤差出力工程から得られる前記予測値を用いて距離を計算して誤差を出力する距離誤差出力工程を有することを特徴とする請求項8又は9に記載のカメラシミュレーション方法。   10. The camera simulation method according to claim 8, further comprising a distance error output step of calculating a distance using the predicted value obtained from the parallax error output step and outputting an error. 前記模擬カメラ系画像取得工程は、
前記設計値に対して設定される製造誤差をランダムに付加した複数の模擬カメラ系を生成し、生成したカメラ系により撮像した画像を取得することを特徴とする請求項10に記載のカメラシミュレーション方法。
The simulated camera system image acquisition step includes:
The camera simulation method according to claim 10 , wherein a plurality of simulated camera systems in which manufacturing errors set for the design values are randomly added are generated, and images captured by the generated camera systems are acquired. .
前記距離誤差出力工程は、
前記複数の模擬カメラ系から得られる距離測定誤差を用いて、前記模擬カメラ系の距離測定誤差の最大値の分布を出力することを特徴とする請求項11に記載のカメラシミュレーション方法。
The distance error output step includes
The camera simulation method according to claim 11, wherein a distribution of maximum values of distance measurement errors of the simulated camera system is output using distance measurement errors obtained from the plurality of simulated camera systems.
前記複数の模擬カメラ系の距離測定誤差の最大値の分布が予め設定された範囲に含まれているか否かにより、前記模擬カメラ系に対するキャリブレーション又は公差設定に対する良否を判定するキャリブレーション・公差設定工程を有することを特徴とする請求項12に記載のカメラシミュレーション方法。 Calibration / tolerance setting for determining whether the simulation camera system is calibrated or tolerated for tolerance setting based on whether or not the distribution of maximum values of distance measurement errors of the plurality of simulated camera systems is included in a preset range The camera simulation method according to claim 12 , further comprising a step. 前記キャリブレーション・公差設定工程は、
前記最大値の分布が予め設定された範囲に含まれていないと判断された場合に、前記設計値に与える製造誤差の公差値を再設定することを特徴とする請求項13に記載のカメラシミュレーション方法。
The calibration / tolerance setting process includes:
14. The camera simulation according to claim 13, wherein when it is determined that the maximum value distribution is not included in a preset range, a tolerance value of a manufacturing error given to the design value is reset. Method.
コンピュータを、請求項1乃至7の何れか1項に記載されたカメラシミュレーション装置として機能させることを特徴とするカメラシミュレーションプログラム。   A camera simulation program for causing a computer to function as the camera simulation apparatus according to any one of claims 1 to 7.
JP2011061728A 2011-03-18 2011-03-18 Camera simulation apparatus, camera simulation method, and camera simulation program Expired - Fee Related JP5760558B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011061728A JP5760558B2 (en) 2011-03-18 2011-03-18 Camera simulation apparatus, camera simulation method, and camera simulation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011061728A JP5760558B2 (en) 2011-03-18 2011-03-18 Camera simulation apparatus, camera simulation method, and camera simulation program

Publications (2)

Publication Number Publication Date
JP2012198076A JP2012198076A (en) 2012-10-18
JP5760558B2 true JP5760558B2 (en) 2015-08-12

Family

ID=47180457

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011061728A Expired - Fee Related JP5760558B2 (en) 2011-03-18 2011-03-18 Camera simulation apparatus, camera simulation method, and camera simulation program

Country Status (1)

Country Link
JP (1) JP5760558B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7225433B2 (en) * 2019-12-17 2023-02-20 株式会社Fuji work machine
CN111985116B (en) * 2020-08-31 2024-11-19 杭州涂鸦信息技术有限公司 A lens interference detection method, system and related equipment based on optical simulation software
CN112326202B (en) * 2020-10-23 2022-12-09 歌尔光学科技有限公司 Binocular parallax testing method, device and tool of virtual reality equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3006611B2 (en) * 1998-03-03 2000-02-07 住友電気工業株式会社 Design method of lens and optical system
JP3913901B2 (en) * 1998-06-04 2007-05-09 本田技研工業株式会社 Camera internal parameter determination device
JP2003279853A (en) * 2002-03-25 2003-10-02 Olympus Optical Co Ltd Design method for optical system
JP2004325880A (en) * 2003-04-25 2004-11-18 Olympus Corp Design method of optical system
JP4095491B2 (en) * 2003-05-19 2008-06-04 本田技研工業株式会社 Distance measuring device, distance measuring method, and distance measuring program

Also Published As

Publication number Publication date
JP2012198076A (en) 2012-10-18

Similar Documents

Publication Publication Date Title
CN104581136B (en) Image calibration system and calibration method for stereo cameras
US9392153B2 (en) Plenoptic camera resolution
CN109313814B (en) Camera calibration system
CN109074773B (en) Perspective correction for curved display screens
US20150124059A1 (en) Multi-frame image calibrator
CN107633536A (en) A kind of camera calibration method and system based on two-dimensional planar template
JP5291758B2 (en) Image processing method and apparatus therefor
CN107911680B (en) Projection equipment correction method and device and projection equipment
CN109544643B (en) Video camera image correction method and device
JP5901447B2 (en) Image processing apparatus, imaging apparatus including the same, image processing method, and image processing program
CN106570907B (en) Camera calibration method and device
JP5599849B2 (en) Lens inspection apparatus and method
JP4743538B2 (en) Camera calibration device
JP5760558B2 (en) Camera simulation apparatus, camera simulation method, and camera simulation program
CN116051634A (en) Visual positioning method, terminal and storage medium
WO2022252873A1 (en) Calibration and verification method and apparatus for intrinsic camera parameter, device, and medium
US8750641B2 (en) Apparatus and method for correcting distortion of image
CN114494448A (en) Calibration error evaluation method, device, computer equipment and storage medium
JP2011047739A (en) Calibration device for camera parameter and program
US20200364933A1 (en) Image processing apparatus, image processing method and storage medium
CN108519215B (en) Pupil distance adaptability test system and method and test host
CN112907462B (en) Distortion correction method and system for ultra-wide-angle camera device and shooting device comprising distortion correction method and system
US9582887B2 (en) Methods and apparatus for determining field of view dependent depth map correction values
KR20120133529A (en) Dmethod for deciding of lens distortion correction parameters
CN112330726A (en) Image processing method and device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141003

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141021

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141205

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150525

R151 Written notification of patent or utility model registration

Ref document number: 5760558

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees