JP2010002280A - Imaging device, distance measuring device, and parallax calculating method - Google Patents

Imaging device, distance measuring device, and parallax calculating method Download PDF

Info

Publication number
JP2010002280A
JP2010002280A JP2008160941A JP2008160941A JP2010002280A JP 2010002280 A JP2010002280 A JP 2010002280A JP 2008160941 A JP2008160941 A JP 2008160941A JP 2008160941 A JP2008160941 A JP 2008160941A JP 2010002280 A JP2010002280 A JP 2010002280A
Authority
JP
Japan
Prior art keywords
parallax
imaging system
optical axis
reference image
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008160941A
Other languages
Japanese (ja)
Inventor
Tomokuni Iijima
友邦 飯島
Ichiro Oyama
一朗 大山
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.)
Panasonic Corp
Original Assignee
Panasonic Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp filed Critical Panasonic Corp
Priority to JP2008160941A priority Critical patent/JP2010002280A/en
Publication of JP2010002280A publication Critical patent/JP2010002280A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an imaging device, etc. capable of calculating a minute parallax with high accuracy, and suppressing an increase in circuit scale for parallax calculation. <P>SOLUTION: This distance measuring device includes: an image cut-out section 141 which acquires the positions of optical axes respectively, concerning a standard image and a reference image created by a standard imaging system and a reference imaging system, and sets plane coordinates of the standard image and the reference image so that a position separated by a predetermined number of pixels from the position of the optical axis of the reference image in the direction of approaching to the center of the optical axis of a lens which the standard imaging system has, has the same coordinate values as those of the position of the optical axis of the standard image; a parallax calculation section 142 which calculates an evaluation value between the images of a partial region of the standard image and a partial region of the reference image on the basis of the set coordinates, and calculates a temporary parallax from the calculated evaluation value; and a parallax correction section 143 for calculating a parallax by subtracting the predetermined number of pixels from the calculated temporary parallax. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、複数の撮像系を有し、当該撮像系間において生じる視差を算出する撮像装置及び視差算出方法、並びに、算出された視差から被写体までの距離を測定する測距装置に関し、特に微小な視差を高精度に算出することができる撮像装置、視差算出方法、測距装置に関する。   The present invention relates to an imaging apparatus and a parallax calculation method that have a plurality of imaging systems, calculate parallax generated between the imaging systems, and a distance measuring apparatus that measures the distance from the calculated parallax to a subject. The present invention relates to an imaging device, a parallax calculation method, and a distance measuring device that can calculate accurate parallax with high accuracy.

複数の視点間の視差の計測が可能な従来の撮像装置として、特許文献1の撮像装置がある。特許文献1の撮像装置は、複数の視点の画像情報を用いて、視点間の視差を計測する。特許文献1の撮像装置は、1つの視点の画像情報を基準画像として扱い、他の視点の画像情報を参照画像として扱う。そして、特許文献1の撮像装置は、基準画像に対する参照画像の画像特徴の類似度を求める。そして、特許文献1の撮像装置は、この類似度を最小とするずらし量dの類似度h(d)と、前後のずらし量(d−1及びd+1)の類似度(h(d−1)及びh(d+1))とを利用して、下記式(1)のように、一画素より細かい分解能で視差d’を求める。   As a conventional imaging device capable of measuring parallax between a plurality of viewpoints, there is an imaging device disclosed in Patent Document 1. The imaging apparatus of Patent Literature 1 measures parallax between viewpoints using image information of a plurality of viewpoints. The imaging device of Patent Document 1 treats image information of one viewpoint as a reference image, and treats image information of another viewpoint as a reference image. And the imaging device of patent document 1 calculates | requires the similarity of the image feature of a reference image with respect to a base image. Then, the imaging apparatus of Patent Document 1 has a similarity h (d) of the shift amount d that minimizes the similarity and a similarity (h (d−1)) of the front and rear shift amounts (d−1 and d + 1). And h (d + 1)), the parallax d ′ is obtained with a resolution finer than one pixel as shown in the following formula (1).

Figure 2010002280
Figure 2010002280

ここで、0以上のずらし量の類似度のみを演算する一般的な撮像装置は、類似度が最小となるずらし量が0の場合、最小の類似度を与えるずらし量の前のずらし量d−1での類似度h(−1)を求めることができない。そのため、一般的な撮像装置は、式(1)の演算を実施できないため、一画素より細かい分解能で視差d’を求めることができない。   Here, in a general imaging apparatus that calculates only a similarity with a shift amount of 0 or more, when the shift amount that minimizes the similarity is 0, the shift amount d− before the shift amount that gives the minimum similarity is d−. The similarity h (-1) at 1 cannot be obtained. Therefore, since a general imaging device cannot perform the calculation of Expression (1), the parallax d ′ cannot be obtained with a resolution finer than one pixel.

そこで、特許文献1の撮像装置は、ずらし量を−1から予め設定された正値まで変化させ、変化させたずらし量のそれぞれにおける類似度を求める。これにより、特許文献1の撮像装置は、類似度を最小とするずらし量dが0の場合でも、最小の類似度を与えるずらし量の前のずらし量d−1での類似度h(−1)を求めることができる。そのため、特許文献1の撮像装置は、式(1)を用いて一画素より細かい分解能で視差d’を求めることができる。すなわち、特許文献1の撮像装置は、視差が0付近であっても細かい分解能で視差d’を求めることができる。
特開2003−346130号公報
Therefore, the imaging apparatus of Patent Document 1 changes the shift amount from −1 to a preset positive value, and obtains the similarity in each of the changed shift amounts. As a result, the imaging apparatus disclosed in Patent Document 1 has a similarity h (−1) at the shift amount d−1 before the shift amount that gives the minimum similarity even when the shift amount d that minimizes the similarity is 0. ). Therefore, the imaging apparatus of Patent Document 1 can obtain the parallax d ′ with a resolution finer than one pixel using Expression (1). That is, the imaging apparatus of Patent Document 1 can obtain the parallax d ′ with fine resolution even when the parallax is near zero.
JP 2003-346130 A

しかしながら、特許文献1に記載された従来の撮像装置は、負数(−1)のずらし量を用いて視差演算をする必要があるため、演算が複雑になるとともに、演算を実現するための回路規模が大きくなるという問題があった。   However, since the conventional imaging device described in Patent Document 1 needs to perform a parallax calculation using a shift amount of a negative number (−1), the calculation becomes complicated and the circuit scale for realizing the calculation There was a problem that became larger.

そこで、本発明は、上記問題に鑑みなされたもので、微小な視差を高精度で算出するとともに、視差演算のための回路規模の増大を抑制することができる撮像装置などを提供することを目的とする。   Therefore, the present invention has been made in view of the above problems, and an object thereof is to provide an imaging device and the like that can calculate a minute parallax with high accuracy and suppress an increase in circuit scale for parallax calculation. And

上記目的を達成するために、本発明に係る撮像装置は、レンズと前記レンズに対応する撮像領域とを有する、基準撮像系と一つ以上の参照撮像系とを備え、同一の被写体を撮像したときの前記基準撮像系と前記参照撮像系との間に生じる視差を算出する撮像装置であって、前記基準撮像系及び前記参照撮像系により生成された基準画像及び参照画像において、前記基準撮像系及び前記参照撮像系がそれぞれ有する前記レンズの光軸中心に対応する位置である光軸位置をそれぞれ取得する光軸位置取得手段と、前記基準撮像系及び前記参照撮像系がそれぞれ有する前記レンズの光軸中心を互いに結ぶ直線の方向である基線方向のうち前記基準撮像系が有するレンズの光軸中心に近づく向きへ前記参照画像の光軸位置から所定画素数移動した位置と、前記基準画像の光軸位置とが、同一の座標値となるように前記基準画像及び前記参照画像の平面座標を設定する座標設定手段と、前記座標設定手段により設定された座標に基づいて、前記基準画像の一部領域と前記参照画像の一部領域との画像の類似度合いを表す評価値を算出し、算出された評価値から仮視差を算出する仮視差演算手段と、前記仮視差演算手段により算出された仮視差から前記所定画素数を減算することにより、前記基準撮像系と前記参照撮像系との間に生じる視差を算出する視差算出手段とを備えることを特徴とする。具体的には、前記仮視差演算手段は、前記基準画像の一部の領域である基準ブロックを選択する基準ブロック選択手段と、前記基準ブロックを示す座標値と同一の座標値で示される前記参照画像の一部の領域から、前記基線方向のうち前記基準撮像系の有するレンズの光軸中心から遠ざかる方へ、所定のずらし量ごとにずらしていった領域を参照ブロックとして選択し、選択した参照ブロックごとに前記基準ブロックとの前記評価値を算出する評価値算出手段と、算出された前記評価値のうち複数の評価値に基づく補間式を用いて、類似度合いが最大となるずらし量を前記仮視差として算出する仮視差算出手段とを有することを特徴とする。   In order to achieve the above object, an imaging apparatus according to the present invention includes a standard imaging system and one or more reference imaging systems each having a lens and an imaging region corresponding to the lens, and images the same subject. An imaging apparatus for calculating a parallax generated between the reference imaging system and the reference imaging system when the reference imaging system generates a reference image and a reference image generated by the reference imaging system and the reference imaging system. And optical axis position acquisition means for acquiring an optical axis position that is a position corresponding to the optical axis center of the lens respectively included in the reference imaging system, and light of the lens included in each of the standard imaging system and the reference imaging system A position obtained by moving a predetermined number of pixels from the optical axis position of the reference image in a direction approaching the optical axis center of the lens included in the reference imaging system in a base line direction that is a direction of a straight line connecting the axial centers. The coordinate setting means for setting the plane coordinates of the reference image and the reference image so that the optical axis position of the reference image has the same coordinate value, and the coordinates set by the coordinate setting means, Temporary parallax calculation means for calculating an evaluation value representing a degree of similarity between the partial area of the reference image and the partial area of the reference image, and calculating temporary parallax from the calculated evaluation value; and the temporary parallax calculation And a parallax calculating unit that calculates a parallax generated between the reference imaging system and the reference imaging system by subtracting the predetermined number of pixels from the temporary parallax calculated by the unit. Specifically, the temporary parallax calculation means includes a reference block selection means for selecting a reference block that is a partial area of the reference image, and the reference indicated by the same coordinate value as the coordinate value indicating the reference block. Select an area that is shifted by a predetermined shift amount as a reference block from a partial area of the image to a direction away from the optical axis center of the lens of the reference imaging system in the baseline direction, and select the selected reference Using the evaluation value calculating means for calculating the evaluation value with the reference block for each block, and using an interpolation formula based on a plurality of evaluation values among the calculated evaluation values, the shift amount that maximizes the similarity is Temporary parallax calculation means for calculating as temporary parallax is provided.

これにより、負数のずらし量を用いることなく微小な視差を高精度に算出できるので、微小な視差を高精度に算出するとともに、視差演算のための回路規模の増大を抑制することが可能となる。   As a result, a minute parallax can be calculated with high accuracy without using a negative shift amount, so that it is possible to calculate a minute parallax with high accuracy and to suppress an increase in circuit scale for parallax calculation. .

また、前記座標設定手段は、前記基線方向のうち前記基準撮像系が有するレンズの光軸中心に近づく向きへ、前記参照画像の光軸位置から一画素移動した位置と、前記基準画像の光軸位置とが、同一の座標値となるように、前記平面座標を設定することが好ましい。   Further, the coordinate setting means includes a position moved by one pixel from the optical axis position of the reference image in a direction approaching the optical axis center of the lens of the reference imaging system in the baseline direction, and an optical axis of the reference image The plane coordinates are preferably set so that the position has the same coordinate value.

これにより、参照画像を一画素だけ大きくするだけでよいので、視差演算において使用する記憶領域などの増大による回路規模の増大を抑制することが可能となる。   As a result, since it is only necessary to enlarge the reference image by one pixel, it is possible to suppress an increase in circuit scale due to an increase in the storage area used in the parallax calculation.

また、前記参照画像は、前記基準画像と比べて、前記基線方向のうち前記基準撮像系の有するレンズの光軸中心に近づく向きへ、前記所定画素数だけ大きな画像であることが好ましい。   Further, it is preferable that the reference image is an image larger than the reference image by the predetermined number of pixels toward the direction closer to the optical axis center of the lens of the reference imaging system in the baseline direction.

これにより、参照ブロックを選択する際に、参照ブロックが選択可能か否かを確認する必要がないため、視差演算を簡易にすることができ、視差演算のための回路規模の増大を抑制することが可能となる。   As a result, when selecting a reference block, it is not necessary to check whether or not the reference block can be selected, so that the parallax calculation can be simplified and an increase in circuit scale for the parallax calculation is suppressed. Is possible.

また、本発明に係る測距装置は、レンズと前記レンズに対応する撮像領域とを有する、基準撮像系と一つ以上の参照撮像系とを備え、同一の被写体を撮像したときの前記基準撮像系と前記参照撮像系との間に生じる視差に基づいて、前記被写体までの距離を算出する測距装置であって、前記基準撮像系及び前記参照撮像系により生成された基準画像及び参照画像において、前記基準撮像系及び前記参照撮像系がそれぞれ有する前記レンズの光軸中心に対応する位置である光軸位置をそれぞれ取得する光軸位置取得手段と、前記基準撮像系及び前記参照撮像系がそれぞれ有する前記レンズの光軸中心を互いに結ぶ直線の方向である基線方向のうち前記基準撮像系が有するレンズの光軸中心に近づく向きへ前記参照画像の光軸位置から所定画素数移動した位置と、前記基準画像の光軸位置とが、同一の座標値となるように前記基準画像及び前記参照画像の平面座標を設定する座標設定手段と、前記座標設定手段により設定された座標に基づいて、前記基準画像の一部領域と前記参照画像の一部領域との画像の類似度合いを表す評価値を算出し、算出された評価値から仮視差を算出する仮視差演算手段と、前記仮視差演算手段により算出された仮視差から前記所定画素数を減算することにより、前記基準撮像系と前記参照撮像系との間に生じる視差を算出する視差算出手段と、前記視差算出手段により算出された視差を用いて、前記被写体までの距離を算出する距離算出手段とを備えることを特徴とする。   The distance measuring device according to the present invention includes a reference imaging system and one or more reference imaging systems each having a lens and an imaging region corresponding to the lens, and the reference imaging when imaging the same subject. A distance measuring device that calculates a distance to the subject based on a parallax generated between a system and the reference imaging system, wherein a reference image and a reference image generated by the standard imaging system and the reference imaging system An optical axis position acquisition unit that acquires an optical axis position that is a position corresponding to an optical axis center of the lens of each of the standard imaging system and the reference imaging system, and the standard imaging system and the reference imaging system, respectively. A predetermined number of pixels from the optical axis position of the reference image in a direction approaching the optical axis center of the lens of the reference imaging system in a base line direction that is a direction of a straight line connecting the optical axis centers of the lens with each other Coordinate setting means for setting the plane coordinates of the reference image and the reference image so that the moved position and the optical axis position of the reference image have the same coordinate value; and the coordinates set by the coordinate setting means A temporary parallax calculating means for calculating an evaluation value indicating a degree of similarity between the partial area of the reference image and the partial area of the reference image based on the calculated evaluation value; A parallax calculating unit that calculates a parallax generated between the reference imaging system and the reference imaging system by subtracting the predetermined number of pixels from the temporary parallax calculated by the temporary parallax calculating unit; and the parallax calculating unit And a distance calculating means for calculating a distance to the subject using the calculated parallax.

これにより、微小な視差の算出精度の向上に伴う遠方の距離の高精度化を実現するとともに、距離演算のための回路規模の増大を抑制することができる。   As a result, it is possible to increase the accuracy of the far distance accompanying the improvement of the calculation accuracy of the minute parallax, and to suppress an increase in the circuit scale for the distance calculation.

なお、本発明は、このような撮像装置として実現することができるだけでなく、このような撮像装置が備える特徴的な手段をステップとする視差算出方法として実現したり、それらのステップをコンピュータに実行させるプログラムとして実現したりすることもできる。そして、そのようなプログラムは、CD−ROM等の記録媒体やインターネット等の伝送媒体を介して配信することができる。   Note that the present invention can be realized not only as such an imaging apparatus, but also as a parallax calculation method using steps characteristic of the imaging apparatus, or by executing these steps on a computer. It can also be realized as a program to be executed. Such a program can be distributed via a recording medium such as a CD-ROM or a transmission medium such as the Internet.

本発明によれば、2つ以上撮像系を備え、同一の被写体を撮像したときの各撮像系間に生じる視差を算出する撮像装置などにおいて、負数のずらし量を用いた視差演算が不要となるので、微小な視差の算出を高精度で行うとともに、視差演算のための回路規模の増大を抑制することが可能となる。   According to the present invention, in an imaging apparatus that includes two or more imaging systems and calculates parallax generated between the imaging systems when the same subject is imaged, parallax calculation using a negative shift amount becomes unnecessary. Therefore, it is possible to calculate a minute parallax with high accuracy and to suppress an increase in circuit scale for parallax calculation.

以下、本発明の好ましい実施の形態を、図面を参照しながら説明する。   Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.

(実施の形態1)
図1は、本発明の実施の形態1に係る測距装置101の構成を示す断面図である。図1に示すように、測距装置101は、回路部120と、その回路部120の上方に設けられたレンズモジュール部110とを備えている。
(Embodiment 1)
FIG. 1 is a cross-sectional view showing a configuration of a distance measuring apparatus 101 according to Embodiment 1 of the present invention. As shown in FIG. 1, the distance measuring apparatus 101 includes a circuit unit 120 and a lens module unit 110 provided above the circuit unit 120.

レンズモジュール部110は、円筒状の鏡筒111と、その鏡筒111の開口を覆う上部カバーガラス112と、その上部カバーガラス112の下方であって鏡筒111の内部に設けられたレンズアレイ113とを有している。また、回路部120は、基板121と、その基板121上に設けられたパッケージ122と、撮像素子123と、パッケージカバーガラス124と、半導体回路素子であるシステムLSI(以下、SLSIと記す)125とを有している。   The lens module unit 110 includes a cylindrical lens barrel 111, an upper cover glass 112 that covers the opening of the lens barrel 111, and a lens array 113 that is provided below the upper cover glass 112 and inside the lens barrel 111. And have. The circuit unit 120 includes a substrate 121, a package 122 provided on the substrate 121, an image sensor 123, a package cover glass 124, and a system LSI (hereinafter referred to as SLSI) 125 that is a semiconductor circuit element. have.

鏡筒111は、上述のとおり円筒状であって、その内壁面は光の乱反射を防止するためにつやが消された黒で着色されている。また、鏡筒111は、樹脂を射出成形することにより形成される。   The lens barrel 111 has a cylindrical shape as described above, and its inner wall surface is colored with black that has been matted to prevent irregular reflection of light. The lens barrel 111 is formed by injection molding a resin.

上部カバーガラス112は、円盤状であり、光学ガラス材或いは透明樹脂などから形成され、鏡筒111の上部の内壁に接着剤などを用いて固着される。また、上部カバーガラス112の表面には、摩擦などによる損傷を防止するための保護膜と、入射光の反射を防止するための反射防止膜とが設けられている。   The upper cover glass 112 has a disc shape, is formed of an optical glass material or a transparent resin, and is fixed to the inner wall of the upper portion of the lens barrel 111 using an adhesive or the like. Further, a protective film for preventing damage due to friction and the like and an antireflection film for preventing reflection of incident light are provided on the surface of the upper cover glass 112.

図2は、本発明の実施の形態1に係る測距装置101のレンズアレイ113の構成を示す平面図である。図2に示すように、レンズアレイ113は、略円盤状であり、光学ガラス材、透明樹脂などから形成される。また、レンズアレイ113には、円形の第1のレンズ部113a、第2のレンズ部113b、第3のレンズ部113c、及び第4のレンズ部113dが、2行2列の碁盤目状に配設されている。   FIG. 2 is a plan view showing the configuration of the lens array 113 of the distance measuring apparatus 101 according to Embodiment 1 of the present invention. As shown in FIG. 2, the lens array 113 has a substantially disk shape and is formed of an optical glass material, a transparent resin, or the like. The lens array 113 includes a circular first lens portion 113a, a second lens portion 113b, a third lens portion 113c, and a fourth lens portion 113d arranged in a grid pattern of 2 rows and 2 columns. It is installed.

ここで、第1〜第4のレンズ部113a〜113dの配列方向に沿って、図2に示すようにx軸及びy軸を設定する。第1のレンズ部113a、第2のレンズ部113b、第3のレンズ部113c、及び第4のレンズ部113dにおいて、被写体側から入射した光は、撮像素子123側へ射出され、撮像素子123上に4つの像が結像される。   Here, along the arrangement direction of the first to fourth lens portions 113a to 113d, the x axis and the y axis are set as shown in FIG. In the first lens unit 113 a, the second lens unit 113 b, the third lens unit 113 c, and the fourth lens unit 113 d, light incident from the subject side is emitted to the image sensor 123 side, and then on the image sensor 123. Four images are formed.

また、図2に示すように、各レンズ部は、レンズ中心である、光軸中心114a、光軸中心114b、光軸中心114c及び光軸中心114dを有する。そして、光軸中心114aと、光軸中心114b、光軸中心114c及び光軸中心114dとをそれぞれ結ぶ直線の方向を各レンズ間における基線方向という。   As shown in FIG. 2, each lens unit has an optical axis center 114a, an optical axis center 114b, an optical axis center 114c, and an optical axis center 114d, which are lens centers. A direction of a straight line connecting the optical axis center 114a, the optical axis center 114b, the optical axis center 114c, and the optical axis center 114d is referred to as a baseline direction between the lenses.

なお、図2に示すように、第1のレンズ部113aの光軸中心114a及び第2のレンズ部113bの光軸中心114bは、x軸方向ではDxだけ離れており、かつ、y軸方向では一致する。第1のレンズ部113aの光軸中心114a及び第3のレンズ部113cの光軸中心114cは、x軸方向では一致しており、かつ、y軸方向ではDyだけ離れている。第3のレンズ部113cの光軸中心114c及び第4のレンズ部113dの光軸中心114dは、x軸方向ではDxだけ離れており、かつ、y軸方向は一致する。第4のレンズ部113dの光軸中心114d及び第1のレンズ部113aの光軸中心114aは、x軸方向ではDxだけ離れており、かつ、y軸方向ではDyだけ離れている。以下、実施の形態1の係る測距装置101において、DxとDyとは等しいものとする。   As shown in FIG. 2, the optical axis center 114a of the first lens unit 113a and the optical axis center 114b of the second lens unit 113b are separated by Dx in the x-axis direction and in the y-axis direction. Match. The optical axis center 114a of the first lens portion 113a and the optical axis center 114c of the third lens portion 113c coincide in the x-axis direction and are separated by Dy in the y-axis direction. The optical axis center 114c of the third lens portion 113c and the optical axis center 114d of the fourth lens portion 113d are separated by Dx in the x-axis direction, and the y-axis directions coincide. The optical axis center 114d of the fourth lens unit 113d and the optical axis center 114a of the first lens unit 113a are separated by Dx in the x-axis direction and separated by Dy in the y-axis direction. Hereinafter, it is assumed that Dx and Dy are equal in distance measuring apparatus 101 according to the first embodiment.

図1に示す測距装置101の各構成部の説明に戻る。
基板121は、樹脂基板から構成され、上面に鏡筒111がその底面を接して接着剤などを用いて固着される。このようにして、測距装置101では、レンズモジュール部110と回路部120とが固定される。
Returning to the description of each component of the distance measuring apparatus 101 shown in FIG.
The substrate 121 is formed of a resin substrate, and the lens barrel 111 is fixed to the upper surface with an adhesive or the like in contact with the bottom surface. In this manner, in the distance measuring device 101, the lens module unit 110 and the circuit unit 120 are fixed.

パッケージ122は、金属端子部を有する樹脂からなり、鏡筒111の内側において、基板121の上面にその金属端子部が半田づけ等されて固着される。   The package 122 is made of a resin having a metal terminal portion, and the metal terminal portion is soldered and fixed to the upper surface of the substrate 121 inside the lens barrel 111.

撮像素子123は、CCDセンサ或いはCMOSセンサのような固体撮像素子であり、その受光面が第1のレンズ部113a、第2のレンズ部113b、第3のレンズ部113c、及び第4のレンズ部113dの光軸と略垂直になるようにして配置される。撮像素子123の各端子は、パッケージ122の内側の底部の金属端子にワイヤーボンディングにより金線127で接続され、基板121を介して、SLSI125と電気的に接続される。撮像素子123の受光面に、第1のレンズ部113a、第2のレンズ部113b、第3のレンズ部113c、及び第4のレンズ部113dから射出された光がそれぞれ結像し、その光の情報がフォトダイオードにより電気信号へ変換される。そして、その電気信号がSLSI125に転送される。   The image pickup device 123 is a solid-state image pickup device such as a CCD sensor or a CMOS sensor, and its light receiving surface has a first lens portion 113a, a second lens portion 113b, a third lens portion 113c, and a fourth lens portion. It is arranged so as to be substantially perpendicular to the optical axis 113d. Each terminal of the image sensor 123 is connected to a metal terminal at the bottom inside the package 122 by wire bonding, and is electrically connected to the SLSI 125 through the substrate 121. Light emitted from the first lens unit 113a, the second lens unit 113b, the third lens unit 113c, and the fourth lens unit 113d forms an image on the light receiving surface of the image sensor 123, and the light Information is converted into an electrical signal by a photodiode. Then, the electric signal is transferred to the SLSI 125.

図3は、本発明の実施の形態1に係る測距装置101の回路部120の構成を示す平面図である。パッケージカバーガラス124は、平板状であり、透明樹脂により形成され、パッケージ122の上面に接着などにより固着される。なお、図3においては、便宜上、パッケージカバーガラス124を透して見える撮像素子123などの記載は省略する。   FIG. 3 is a plan view showing the configuration of the circuit unit 120 of the distance measuring apparatus 101 according to Embodiment 1 of the present invention. The package cover glass 124 has a flat plate shape, is formed of a transparent resin, and is fixed to the upper surface of the package 122 by adhesion or the like. In FIG. 3, for the sake of convenience, description of the image sensor 123 and the like seen through the package cover glass 124 is omitted.

SLSI125は、後述の方法により、撮像素子123から入力された電気信号を用いて、各種演算を行う。また、SLSI125は、上位CPUと通信を行い、外部に画像情報、距離情報などを出力する。なお、SLSI125は、電源(例えば3.3V)とグランド(例えば、0V)とに接続される。   The SLSI 125 performs various calculations using an electrical signal input from the image sensor 123 by a method described later. The SLSI 125 communicates with the host CPU and outputs image information, distance information, and the like to the outside. The SLSI 125 is connected to a power source (for example, 3.3V) and a ground (for example, 0V).

図4は、本発明の実施の形態1に係る測距装置101の撮像素子の構成を示す平面図である。図4に示すように、撮像素子123は、第1の撮像領域123a、第2の撮像領域123b、第3の撮像領域123c、及び第4の撮像領域123dを含んで構成されている。これらの第1〜第4の撮像領域123a〜123dは、それぞれの受光面が、第1〜第4のレンズ部113a〜113dの光軸と略垂直になるようにして2行2列で配置される。これらの第1〜第4の撮像領域123a〜123dにて撮像信号が生成される。   FIG. 4 is a plan view showing the configuration of the image sensor of distance measuring apparatus 101 according to Embodiment 1 of the present invention. As shown in FIG. 4, the imaging device 123 includes a first imaging region 123a, a second imaging region 123b, a third imaging region 123c, and a fourth imaging region 123d. These first to fourth imaging regions 123a to 123d are arranged in two rows and two columns so that the respective light receiving surfaces are substantially perpendicular to the optical axes of the first to fourth lens portions 113a to 113d. The An imaging signal is generated in the first to fourth imaging regions 123a to 123d.

なお、本実施の形態1においては、第1のレンズ部113a及び第1の撮像領域123aが基準撮像系である。また、第2のレンズ部113b及び第2の撮像領域123b、第3のレンズ部113c及び第3の撮像領域123c、並びに第4のレンズ部113d及び第4の撮像領域123dが参照撮像系である。   In the first embodiment, the first lens unit 113a and the first imaging region 123a are the reference imaging system. The second lens unit 113b and the second imaging region 123b, the third lens unit 113c and the third imaging region 123c, and the fourth lens unit 113d and the fourth imaging region 123d are reference imaging systems. .

次に、被写体距離と視差との関係を説明する。本発明の実施の形態1に係る測距装置101は、4つのレンズ部(第1のレンズ部113a、第2のレンズ部113b、第3のレンズ部113c、及び第4のレンズ部113d)を有するため、4つのレンズ部がそれぞれ形成する4つの物体像の相対的位置が、被写体距離に応じて変化する。   Next, the relationship between subject distance and parallax will be described. The distance measuring apparatus 101 according to the first embodiment of the present invention includes four lens units (a first lens unit 113a, a second lens unit 113b, a third lens unit 113c, and a fourth lens unit 113d). Therefore, the relative positions of the four object images formed by the four lens units change according to the subject distance.

図5は、本発明の実施の形態1に係る測距装置101において、無限遠にある物体を撮像したときの物体像の位置を説明するための図である。図5においては、簡単のため、レンズアレイ113において、第1のレンズ部113a、及び第2のレンズ部113bのみを記す。無限遠にある物体10からの光の第1のレンズ部113aへの代表的な入射光L1と、無限遠にある物体10からの光の第2のレンズ部113bへの代表的な入射光L2とは平行である(ここで、図5において、物体10は2つ描画されているが、単一の物体である。無限遠の物体10を有限な紙面上に描画できない。そのため、図5において、入射光L1と入射光L2とが平行であることを明示するために、2つの位置の無限遠にある物体10を描画している)。このため、第1のレンズ部113aの光軸中心114aと第2のレンズ部113bの光軸中心114bとの間の距離と、撮像素子123上の物体像11aが結像される位置と物体像11bが結像される位置との間の距離とは等しい。すなわち、視差はない。   FIG. 5 is a diagram for explaining the position of an object image when an object at infinity is imaged in distance measuring apparatus 101 according to Embodiment 1 of the present invention. In FIG. 5, only the first lens portion 113a and the second lens portion 113b are shown in the lens array 113 for simplicity. Typical incident light L1 from the object 10 at infinity to the first lens unit 113a and typical incident light L2 from the object 10 at infinity to the second lens unit 113b Are parallel to each other (where two objects 10 are drawn in FIG. 5 but are a single object. The object 10 at infinity cannot be drawn on a finite sheet of paper. In order to clearly indicate that the incident light L1 and the incident light L2 are parallel to each other, the object 10 at infinity at two positions is drawn. Therefore, the distance between the optical axis center 114a of the first lens unit 113a and the optical axis center 114b of the second lens unit 113b, the position where the object image 11a on the image sensor 123 is formed, and the object image The distance between the position at which 11b is imaged is equal. That is, there is no parallax.

図6は、本発明の実施の形態1に係る測距装置101において、有限距離の位置にある物体を撮像したときの物体像の位置を説明するための図である。図6において、簡単のため、レンズアレイ113において、第1のレンズ部113a、及び第2のレンズ部113bのみを記す。有限距離の位置にある物体12からの光の第1のレンズ部113aへの代表的な入射光L1と、有限距離の位置にある物体12からの光の第2のレンズ部113bへの代表的な入射光L2とは平行ではない。したがって、第1のレンズ部113aの光軸中心114aと第2のレンズ部113bの光軸中心114bとの間の距離に比べて、撮像素子123上の物体像13aが結像される位置と物体像13bが結像される位置との間の距離は長い。すなわち、視差がある。   FIG. 6 is a diagram for explaining the position of an object image when an object at a finite distance is imaged in distance measuring apparatus 101 according to Embodiment 1 of the present invention. In FIG. 6, only the first lens portion 113a and the second lens portion 113b are shown in the lens array 113 for simplicity. Representative incident light L1 from the object 12 at a finite distance to the first lens unit 113a and representative light from the object 12 at a finite distance to the second lens unit 113b Is not parallel to the incident light L2. Therefore, compared with the distance between the optical axis center 114a of the first lens unit 113a and the optical axis center 114b of the second lens unit 113b, the position and object on which the object image 13a is formed on the image sensor 123. The distance from the position where the image 13b is formed is long. That is, there is parallax.

ここで、第1のレンズ部113aの主点から物体像12までの距離(被写体距離)をA、第1のレンズ部113aと第2のレンズ部113bとの光軸間距離をD、レンズ部113a,113bの焦点距離をfとする。この場合、図6の直角を挟む2辺の長さがA、Dの直角三角形と、直角を挟む2辺の長さがf、Δの直角三角形とが相似である。したがって、視差値Δは、焦点距離f、光軸間距離D及び被写体距離Aを用いて、下記式(2)のように表される。   Here, the distance from the principal point of the first lens portion 113a to the object image 12 (subject distance) is A, the distance between the optical axes of the first lens portion 113a and the second lens portion 113b is D, and the lens portion. Let f be the focal length of 113a and 113b. In this case, a right-angled triangle with two sides A and D sandwiching a right angle in FIG. 6 is similar to a right-angled triangle with two sides f and Δ that sandwich a right angle. Therefore, the parallax value Δ is expressed by the following formula (2) using the focal length f, the optical axis distance D, and the subject distance A.

Figure 2010002280
Figure 2010002280

その他のレンズ部についても同様の関係が成立する。このように、被写体距離に応じて4つのレンズ部113a、113b、113c、113dがそれぞれ形成する4つの物体像の相対的位置が変化する。例えば、被写体距離Aが小さくなると、視差値Δが大きくなる。そこで、下記式(3)のように、式(2)を被写体距離Aについて解くことにより、視差値Δから被写体距離Aを求めることができる。   The same relationship is established for the other lens units. In this manner, the relative positions of the four object images formed by the four lens portions 113a, 113b, 113c, and 113d change according to the subject distance. For example, as the subject distance A decreases, the parallax value Δ increases. Therefore, the subject distance A can be obtained from the parallax value Δ by solving the equation (2) for the subject distance A as shown in the following equation (3).

Figure 2010002280
Figure 2010002280

次に、本発明の実施の形態1に係る測距装置101の機能構成を説明する。図7は、本発明の実施の形態1に係る測距装置101の機能構成を示すブロック図である。SLSI125は、システム制御部131、撮像素子駆動部132、撮像信号入力部133、入出力部134、画像切出部141、視差演算部142、視差補正部143、失敗検知部144、及び距離演算部145を有する。   Next, the functional configuration of the distance measuring apparatus 101 according to Embodiment 1 of the present invention will be described. FIG. 7 is a block diagram showing a functional configuration of the distance measuring apparatus 101 according to Embodiment 1 of the present invention. The SLSI 125 includes a system control unit 131, an image sensor driving unit 132, an imaging signal input unit 133, an input / output unit 134, an image cutout unit 141, a parallax calculation unit 142, a parallax correction unit 143, a failure detection unit 144, and a distance calculation unit. 145.

システム制御部131は、CPU(中央演算処理装置:Central Processing Unit)、ロジック回路などから構成され、SLSI125の全体を制御する。   The system control unit 131 includes a CPU (Central Processing Unit), a logic circuit, and the like, and controls the entire SLSI 125.

撮像素子駆動部132は、ロジック回路などから構成され、システム制御部131の命令により電子シャッター或いは撮像素子123を駆動するための信号を発生し、この信号に応じた電圧を撮像素子123に印加する。   The image sensor driving unit 132 includes a logic circuit and the like, generates a signal for driving the electronic shutter or the image sensor 123 according to a command from the system control unit 131, and applies a voltage corresponding to the signal to the image sensor 123. .

撮像信号入力部133は、直列に接続された、CDS回路(相関二重サンプリング回路:Correlated Double Sampling Circuit)、AGC(自動利得制御器:Automatic Gain Controller)、及びADC(アナログ/デジタル変換器:Analog Digital Converter)から構成される。   The imaging signal input unit 133 includes a CDS circuit (correlated double sampling circuit), AGC (automatic gain controller), and ADC (analog / digital converter: Analog) connected in series. (Digital Converter).

具体的には、撮像信号入力部133は、撮像素子123から電気信号を取得し、取得した電気信号の固定ノイズを、CDS回路により除去する。さらに、撮像信号入力部133は、固定ノイズが除去された電気信号のゲインを、AGCにより調整する。さらに、撮像信号入力部133は、ゲインが調整された電気信号を、ADCによりアナログ信号からデジタル信号に変換する。このように、撮像信号入力部133は、撮像素子123から取得した電気信号を用いて、デジタル信号である撮像信号I0を生成する。   Specifically, the imaging signal input unit 133 acquires an electrical signal from the imaging element 123 and removes fixed noise of the acquired electrical signal by the CDS circuit. Further, the imaging signal input unit 133 adjusts the gain of the electrical signal from which the fixed noise has been removed by AGC. Further, the imaging signal input unit 133 converts the electrical signal whose gain is adjusted from an analog signal to a digital signal by the ADC. As described above, the imaging signal input unit 133 generates the imaging signal I0, which is a digital signal, using the electrical signal acquired from the imaging element 123.

入出力部134は、外部機器からの入力の受付け、及び、距離演算部145が算出した距離情報などの外部機器への出力を行う。   The input / output unit 134 receives input from an external device and outputs the distance information calculated by the distance calculation unit 145 to the external device.

画像切出部141は、光軸位置取得手段の一例であり、撮像信号入力部133により生成された撮像信号I0における、基準画像である第1の撮像信号I1並びに参照画像である第2の撮像信号I2、第3の撮像信号I3、及び第4の撮像信号I4の光軸位置を取得する。   The image cutout unit 141 is an example of an optical axis position acquisition unit, and the first image pickup signal I1 that is a reference image and the second image pickup that is a reference image in the image pickup signal I0 generated by the image pickup signal input unit 133. The optical axis positions of the signal I2, the third imaging signal I3, and the fourth imaging signal I4 are acquired.

ここで、光軸位置とは、各レンズの光軸中心に対応する画像内の位置であり、レンズの光軸中心を通り撮像素子123の撮像面に垂直な線(光軸)が撮像面と交差する位置である。この光軸位置は、各撮像系をキャリブレーションすることにより、あらかじめ算出されている。そして、光軸位置を特定するための情報は、例えば、図示していない記憶部に格納されている。   Here, the optical axis position is a position in the image corresponding to the optical axis center of each lens, and a line (optical axis) that passes through the optical axis center of the lens and is perpendicular to the imaging surface of the image sensor 123 is the imaging surface. It is a crossing position. This optical axis position is calculated in advance by calibrating each imaging system. Information for specifying the optical axis position is stored, for example, in a storage unit (not shown).

また、画像切出部141は、取得した第1の撮像信号I1の光軸位置が画像の中心となるように、第1の撮像信号I1を撮像信号I0から切り出す。さらに、画像切出部141は、第1の撮像信号I1と比べて、光軸中心114aと光軸中心114bとを結ぶ直線の方向(基線方向)のうちレンズ部113aの光軸中心114aに近づく向きへ、第2の撮像信号I2の光軸位置からの距離が一画素だけ大きな画像となるように第2の撮像信号I2を、撮像信号I0から切り出す。また、画像切出部141は、第3の撮像信号I3及び第4の撮像信号I4も、第2の撮像信号I2と同様に、撮像信号I0から切り出す。   The image cutout unit 141 cuts out the first image pickup signal I1 from the image pickup signal I0 so that the optical axis position of the acquired first image pickup signal I1 is the center of the image. Furthermore, the image cutout unit 141 is closer to the optical axis center 114a of the lens unit 113a in the direction of the straight line (baseline direction) connecting the optical axis center 114a and the optical axis center 114b than the first imaging signal I1. The second imaging signal I2 is cut out from the imaging signal I0 in the direction so that the distance from the optical axis position of the second imaging signal I2 is a single pixel. The image cutout unit 141 also cuts out the third image pickup signal I3 and the fourth image pickup signal I4 from the image pickup signal I0 in the same manner as the second image pickup signal I2.

また、画像切出部141は、座標設定手段の一例でもあり、基線方向のうちレンズ部113aの光軸中心114aに近づく向きへ、第2の撮像信号I2の光軸位置から一画素移動した位置と、第1の撮像信号の光軸位置とが、同一の座標値となるように第1の撮像信号I1及び第2の撮像信号I2のxy座標を設定する。さらに、画像切出部141は、第3の撮像信号I3及び第4の撮像信号I4についても、第2の撮像信号I2と同様にxy座標を設定する。   The image cutout unit 141 is also an example of a coordinate setting unit, and is a position moved by one pixel from the optical axis position of the second imaging signal I2 in a direction closer to the optical axis center 114a of the lens unit 113a in the baseline direction. The xy coordinates of the first imaging signal I1 and the second imaging signal I2 are set so that the optical axis position of the first imaging signal has the same coordinate value. Further, the image cutout unit 141 sets xy coordinates for the third image pickup signal I3 and the fourth image pickup signal I4 as well as the second image pickup signal I2.

ここで、xy座標は、平面座標の一例であり、x座標及びy座標により平面上の位置が特定できる座標である。   Here, the xy coordinate is an example of a plane coordinate, and is a coordinate whose position on the plane can be specified by the x coordinate and the y coordinate.

なお、第2の撮像信号I2の光軸位置から移動させる画素数である一画素は一例であり、本発明に係る測距装置は、一画素より大きな画素数だけ移動した位置と基準画像の光軸位置とが対応するようにxy座標を設定してもよい。この場合、画像切出部141は、一画素より大きな画素数だけ大きな画像となるように、第2の撮像信号I2、第3の撮像信号I3及び第4の撮像信号I4を、撮像信号I0から切り出す。   Note that one pixel, which is the number of pixels to be moved from the optical axis position of the second imaging signal I2, is an example, and the distance measuring device according to the present invention has a position moved by a number of pixels larger than one pixel and light of the reference image. The xy coordinates may be set so as to correspond to the axis position. In this case, the image cutout unit 141 extracts the second image pickup signal I2, the third image pickup signal I3, and the fourth image pickup signal I4 from the image pickup signal I0 so that the image is larger by the number of pixels larger than one pixel. cut.

視差演算部142は、仮視差演算手段の一例であり、画像切出部141により設定された座標に基づいて、第1の撮像信号I1の一部領域と第2の撮像信号I2の一部領域との画像の類似度合いを表す評価値を算出し、算出された評価値から仮視差を算出する。   The parallax calculation unit 142 is an example of a temporary parallax calculation unit, and based on the coordinates set by the image cutout unit 141, a partial region of the first imaging signal I1 and a partial region of the second imaging signal I2 An evaluation value representing the degree of similarity between the images is calculated, and a temporary parallax is calculated from the calculated evaluation value.

詳細には、視差演算部142は、基準ブロック選択手段の一例であり、第1の撮像信号I1の一部の領域である基準ブロックを選択する。   Specifically, the parallax calculation unit 142 is an example of a reference block selection unit, and selects a reference block that is a partial region of the first imaging signal I1.

また、視差演算部142は、評価値算出手段の一例であり、基準ブロックを示す座標値と同一の座標値で示される第2の撮像信号I2の一部の領域から、基線方向のうち光軸中心114aから遠ざかる向きへ、所定のずらし量ごとにずらしていった領域を参照ブロックとして選択し、選択した参照ブロックごとに、基準ブロックとの評価値を算出する。   Further, the parallax calculation unit 142 is an example of an evaluation value calculation unit, and the optical axis in the base line direction from a partial region of the second imaging signal I2 indicated by the same coordinate value as the coordinate value indicating the reference block. An area shifted by a predetermined shift amount in a direction away from the center 114a is selected as a reference block, and an evaluation value with respect to the reference block is calculated for each selected reference block.

また、視差演算部142は、仮視差算出手段の一例であり、算出された前記評価値のうち複数の評価値に基づく補間式を用いて、類似度合いが最大となるずらし量を仮視差として算出する。   Further, the parallax calculation unit 142 is an example of a temporary parallax calculation unit, and calculates a shift amount that maximizes the degree of similarity as a temporary parallax using an interpolation formula based on a plurality of evaluation values among the calculated evaluation values. To do.

さらに、視差演算部142は、第3の撮像信号I3及び第4の撮像信号I4についても、第2の撮像信号I2と同様に類似度合いが最大となるずらし量を算出する。そして、視差演算部142は、算出されたずらし量の中で、最も評価値の類似度合いが最大となるずらし量を仮視差として特定する。   Further, the parallax calculation unit 142 also calculates a shift amount that maximizes the degree of similarity for the third imaging signal I3 and the fourth imaging signal I4, similarly to the second imaging signal I2. Then, the parallax calculation unit 142 specifies, as the temporary parallax, the shift amount that maximizes the degree of similarity of the evaluation values among the calculated shift amounts.

視差補正部143は、視差算出手段の一例であり、仮視差から一画素を減算することにより、第1の撮像信号I1と、第2の撮像信号I2、第3の撮像信号I3又は第4の撮像信号I4との間に生じている視差を算出する。   The parallax correction unit 143 is an example of a parallax calculation unit. By subtracting one pixel from the temporary parallax, the first imaging signal I1, the second imaging signal I2, the third imaging signal I3, or the fourth imaging signal is calculated. The parallax generated between the imaging signal I4 and the imaging signal I4 is calculated.

失敗検知部144は、視差判定手段の一例であり、視差補正部143により算出された視差が負数であるか否かを判定する。   The failure detection unit 144 is an example of a parallax determination unit, and determines whether or not the parallax calculated by the parallax correction unit 143 is a negative number.

また、失敗検知部144は、失敗情報出力手段の一例でもあり、視差判定手段において負数であると判定された場合、視差演算が失敗したことを示す失敗情報を出力する。   The failure detection unit 144 is also an example of a failure information output unit, and outputs failure information indicating that the parallax calculation has failed when the parallax determination unit determines that the number is negative.

距離演算部145は、距離算出手段の一例であり、視差補正部143により算出された視差を用いて、被写体までの距離を算出する。   The distance calculation unit 145 is an example of a distance calculation unit, and calculates the distance to the subject using the parallax calculated by the parallax correction unit 143.

次に、以上のように構成された本実施の形態における測距装置101の基本的な動作について説明する。   Next, the basic operation of the distance measuring apparatus 101 in the present embodiment configured as described above will be described.

図8は、本発明の実施の形態1に係る測距装置101の動作を示すフローチャートである。SLSI125のシステム制御部131により、測距装置101は、このフローチャートのとおりに動作される。   FIG. 8 is a flowchart showing the operation of the distance measuring apparatus 101 according to Embodiment 1 of the present invention. The distance measuring apparatus 101 is operated according to this flowchart by the system control unit 131 of the SLSI 125.

測距装置101は、例えば、上位CPU(図示せず)が、入出力部134を介し、測距装置101に動作の開始を命令することにより、動作を開始する。   The distance measuring device 101 starts its operation, for example, when a host CPU (not shown) commands the distance measuring device 101 to start the operation via the input / output unit 134.

動作を開始すると、撮像信号入力部133は、撮像素子123から入力された電気信号を、撮像信号I0へ変換する。そして、撮像信号入力部133は、撮像信号I0を画像切出部141及び入出力部134へ出力する(ステップS1020)。具体的には、撮像信号入力部133は、x方向の画素数がH0画素であり、y方向の画素数がV0画素である撮像信号I0(x,y)を、I0(0,0)((x,y)=(0,0))、I0(1,0)、I0(2,0)、・・・、I0(H0−2,V0−1)、I0(H0−1,V0−1)の順に出力する。   When the operation starts, the imaging signal input unit 133 converts the electrical signal input from the imaging element 123 into an imaging signal I0. Then, the imaging signal input unit 133 outputs the imaging signal I0 to the image cutout unit 141 and the input / output unit 134 (step S1020). Specifically, the imaging signal input unit 133 outputs an imaging signal I0 (x, y) in which the number of pixels in the x direction is H0 pixels and the number of pixels in the y direction is V0 pixels, to I0 (0, 0) ( (X, y) = (0, 0)), I0 (1, 0), I0 (2, 0),..., I0 (H0-2, V0-1), I0 (H0-1, V0−) Output in the order of 1).

次に、画像切出部141は、入力された撮像信号I0から基準画像及び参照画像を切り出す(ステップS1100)。具体的には、画像切出部141は、例えば記憶部に格納された光軸位置を特定するための情報を取得する。そして、画像切出部141は、取得した光軸位置を特定するため情報を用いて、撮像信号I0から、基準画像である第1の撮像信号I1並びに参照画像である、第2の撮像信号I2、第3の撮像信号I3、及び第4の撮像信号I4を作成する。   Next, the image cutout unit 141 cuts out the standard image and the reference image from the input imaging signal I0 (step S1100). Specifically, the image cutout unit 141 acquires information for specifying the optical axis position stored in the storage unit, for example. Then, the image cutout unit 141 uses the information for specifying the acquired optical axis position, from the image pickup signal I0, the first image pickup signal I1 that is a reference image and the second image pickup signal I2 that is a reference image. The third imaging signal I3 and the fourth imaging signal I4 are generated.

次に、画像切出部141は、基準画像及び参照画像に対してxy座標を設定する(ステップS1150)。このxy座標は、基線方向のうち基準撮像系が有するレンズの光軸中心に近づく向きへ、参照画像の光軸位置から所定画素数移動した位置と、基準画像の光軸位置とが、同一の座標値となるように設定された座標である。そして、画像切出部141は、基準画像である第1の撮像信号I1並びに参照画像である、第2の撮像信号I2、第3の撮像信号I3、及び第4の撮像信号I4を出力する。   Next, the image cutout unit 141 sets xy coordinates for the standard image and the reference image (step S1150). In this xy coordinate, the position where a predetermined number of pixels are moved from the optical axis position of the reference image in the direction of approaching the optical axis center of the lens included in the standard imaging system in the baseline direction, and the optical axis position of the standard image are the same. The coordinates are set to be coordinate values. Then, the image cutout unit 141 outputs the first imaging signal I1 that is a reference image and the second imaging signal I2, the third imaging signal I3, and the fourth imaging signal I4 that are reference images.

以下に、ステップS1100及びステップS1150における画像切出部141の処理を、図9を用いて、さらに詳しく説明する。   Hereinafter, the processing of the image cutout unit 141 in step S1100 and step S1150 will be described in more detail with reference to FIG.

図9は、本発明の実施の形態1に係る測距装置101の撮像信号の切り出し位置を説明するための図である。図9において、座標(xc1,yc1)、座標(xc2,yc2)、座標(xc3,yc3)、及び座標(xc4,yc4)は、それぞれ、撮像信号I0における第1のレンズ部113a、第2のレンズ部113b、第3のレンズ部113c、及び第4のレンズ部113dの光軸中心に対応する位置(光軸位置)の座標である。   FIG. 9 is a diagram for explaining the cutout position of the imaging signal of the distance measuring apparatus 101 according to Embodiment 1 of the present invention. In FIG. 9, the coordinates (xc1, yc1), coordinates (xc2, yc2), coordinates (xc3, yc3), and coordinates (xc4, yc4) are respectively the first lens unit 113a and the second lens in the imaging signal I0. It is the coordinate of the position (optical axis position) corresponding to the optical axis center of the lens part 113b, the 3rd lens part 113c, and the 4th lens part 113d.

画像切出部141は、中心が第1のレンズ部113aの光軸中心に対応する位置(光軸位置)の座標(xc1,yc1)となり、かつ、大きさがx方向の画素数がH1画素、y方向の画素数がV1画素となるように、第1の撮像信号I1を撮像信号I0から切り出す。すなわち、画像切出部141は、下記式(4)〜式(6)のように、x方向の画素数がH1画素、y方向の画素数がV1画素となる第1の撮像信号I1を切り出す。さらに、画像切出部141は、下記式(4)〜式(6)に示すように、切出した第1の撮像信号I1に対して、原点が座標(x01,y01)となるように、xy座標を設定する。   The image cut-out unit 141 has coordinates (xc1, yc1) at the position (optical axis position) corresponding to the optical axis center of the first lens unit 113a at the center, and the number of pixels in the x direction is H1 pixels. The first imaging signal I1 is cut out from the imaging signal I0 so that the number of pixels in the y direction is V1. That is, the image cutout unit 141 cuts out the first imaging signal I1 in which the number of pixels in the x direction is H1 pixels and the number of pixels in the y direction is V1 pixels as in the following formulas (4) to (6). . Furthermore, as shown in the following formulas (4) to (6), the image cutout unit 141 sets the origin to the coordinates (x01, y01) with respect to the cut out first imaging signal I1. Set the coordinates.

Figure 2010002280
Figure 2010002280

また、画像切出部141は、中心が第2のレンズ部113bの光軸中心114bに対応する位置(光軸位置)の座標(xc2,yc2)となり、かつ、その大きさがx方向の画素数がH1画素、y方向の画素数がV1画素となる領域より、x方向(基線方向)において、負の向き(レンズ部113aの光軸中心114aへ近づく向き)に一画素だけ、正の向きに(レンズ部113aの光軸中心114aから遠ざかる向き)にSB画素だけ大きい領域となるように、第2の撮像信号I2を撮像信号I0から切り出す。すなわち、画像切出部141は、下記式(7)〜式(11)のように、x方向の画素数がH2画素及びy方向の画素数がV2画素となる第2の撮像信号I2を切り出す。   Further, the image cutout portion 141 is a pixel whose center is a coordinate (xc2, yc2) of a position (optical axis position) corresponding to the optical axis center 114b of the second lens portion 113b and whose size is in the x direction. From the region where the number is H1 pixels and the number of pixels in the y direction is V1 pixels, in the x direction (baseline direction), only one pixel is positive in the negative direction (direction approaching the optical axis center 114a of the lens portion 113a). The second imaging signal I2 is cut out from the imaging signal I0 so as to be an area larger by SB pixels (in the direction away from the optical axis center 114a of the lens portion 113a). That is, the image cutout unit 141 cuts out the second imaging signal I2 in which the number of pixels in the x direction is H2 pixels and the number of pixels in the y direction is V2 pixels as in the following formulas (7) to (11). .

さらに、画像切出部141は、切り出した第2の撮像信号I2に対して、原点の座標が座標(x02,y02)となるように、xy座標を設定する。つまり、画像切出部141は、基線方向のうちレンズ部113aの光軸中心114aに近づく向きへ、第2の撮像信号I2の光軸位置(xc2,yc2)から一画素移動した位置(xc2−1,yc2)と、第1の撮像信号の光軸位置(xc1,yc1)とが、同一の座標値となるようにxy座標を設定する。   Further, the image cutout unit 141 sets the xy coordinates so that the coordinates of the origin are the coordinates (x02, y02) with respect to the cut out second imaging signal I2. That is, the image cutout unit 141 is moved by one pixel from the optical axis position (xc2, yc2) of the second imaging signal I2 toward the optical axis center 114a of the lens unit 113a in the baseline direction. 1, yc2) and the xy coordinates are set so that the optical axis position (xc1, yc1) of the first imaging signal has the same coordinate value.

Figure 2010002280
Figure 2010002280

また、画像切出部141は、中心が第3のレンズ部113cの光軸中心114cに対応する位置(光軸位置)の座標(xc3,yc3)となり、かつ、大きさがx方向の画素数がH1画素、y方向の画素数がV1画素となる領域より、y方向(基線方向)において、負の向き(レンズ部113aの光軸中心114aへ近づく向き)に一画素だけ、正の向き(レンズ部113aの光軸中心114aから遠ざかる向き)にSB画素だけ大きい領域となるように、第3の撮像信号I3を撮像信号I0から切り出す。すなわち、画像切出部141は、下記式(12)〜式(16)のように、x方向の画素数がH3画素及びy方向の画素数がV3画素となる第3の撮像信号I3を切り出す。   In addition, the image cutout unit 141 has coordinates (xc3, yc3) at the position (optical axis position) corresponding to the optical axis center 114c of the third lens unit 113c, and the size is the number of pixels in the x direction. Is a positive direction (only one pixel in the negative direction (direction approaching the optical axis center 114a of the lens portion 113a) in the y direction (baseline direction) from the region where the number of pixels in the y direction is V1 pixels. The third imaging signal I3 is cut out from the imaging signal I0 so as to be an area larger by the SB pixel in the direction away from the optical axis center 114a of the lens unit 113a. That is, the image cutout unit 141 cuts out the third imaging signal I3 in which the number of pixels in the x direction is H3 pixels and the number of pixels in the y direction is V3 pixels as in the following formulas (12) to (16). .

さらに、画像切出部141は、切り出した第3の撮像信号I3に対して、原点の座標が座標(x03,y03)となるように、xy座標を設定する。つまり、画像切出部141は、基線方向のうちレンズ部113aの光軸中心114aに近づく向きへ、第3の撮像信号I3の光軸位置(xc3,yc3)から一画素移動した位置(xc3,yc3−1)と、第1の撮像信号の光軸位置(xc1,yc1)とが、同一の座標値となるようにxy座標を設定する。   Further, the image cutout unit 141 sets the xy coordinates so that the coordinates of the origin are the coordinates (x03, y03) with respect to the cut out third imaging signal I3. That is, the image cutout unit 141 is moved by one pixel from the optical axis position (xc3, yc3) of the third imaging signal I3 toward the optical axis center 114a of the lens unit 113a in the base line direction. The xy coordinates are set so that yc3-1) and the optical axis position (xc1, yc1) of the first imaging signal have the same coordinate value.

Figure 2010002280
Figure 2010002280

また、画像切出部141は、中心が第4のレンズ部113dの光軸中心114dに対応する位置(光軸位置)の座標(xc4,yc4)となり、かつ、大きさがx方向の画素数がH1画素、y方向の画素数がV1画素となる領域より、x方向において、負の向きに一画素だけ、正の向きにSB画素だけ、y方向において、負の向きに一画素だけ、正の向きにSB画素だけ大きい領域となるように、第4の撮像信号I4を撮像信号I0から切り出す。すなわち、画像切出部141は、第1の撮像信号I1と比べて、x軸を−45度回転させた方向(基線方向)のレンズ部113aの光軸中心114aへ近づく向きに2の平方根の画素分だけ大きい領域となるように、第4の撮像信号I4を撮像信号I0から切り出す。つまり、下記式(17)〜式(21)のように、x方向の画素数がH4画素及びy方向の画素数がV4画素となる第4の撮像信号I4を切り出す。   Further, the image cutout part 141 has the coordinates (xc4, yc4) of the position (optical axis position) corresponding to the optical axis center 114d of the fourth lens part 113d, and the size is the number of pixels in the x direction. From the region where H1 pixel and the number of pixels in the y direction are V1 pixels, in the x direction, only one pixel in the negative direction, only SB pixels in the positive direction, and in the y direction, only one pixel in the negative direction, positive The fourth imaging signal I4 is cut out from the imaging signal I0 so as to be an area larger by SB pixels in the direction of. That is, the image cutout unit 141 has a square root of 2 in a direction closer to the optical axis center 114a of the lens unit 113a in the direction (baseline direction) in which the x axis is rotated by −45 degrees compared to the first imaging signal I1. The fourth imaging signal I4 is cut out from the imaging signal I0 so as to be an area larger by the pixel. That is, as in the following formulas (17) to (21), the fourth imaging signal I4 in which the number of pixels in the x direction is H4 pixels and the number of pixels in the y direction is V4 pixels is cut out.

さらに、画像切出部141は、切り出した第4の撮像信号I4に対して、原点の座標が座標(x04,y04)となるように、xy座標を設定する。つまり、画像切出部141は、基線方向のうちレンズ部113aの光軸中心114aに近づく向きへ、第4の撮像信号I4の光軸位置(xc4,yc4)から一画素移動した位置(xc4−1,yc4−1)と、第1の撮像信号の光軸位置(xc1,yc1)とが、同一の座標値となるようにxy座標を設定する。   Further, the image cutout unit 141 sets the xy coordinates so that the coordinates of the origin are the coordinates (x04, y04) with respect to the cut out fourth imaging signal I4. That is, the image cutout unit 141 is moved by one pixel from the optical axis position (xc4, yc4) of the fourth imaging signal I4 toward the optical axis center 114a of the lens unit 113a in the base line direction (xc4- 1, yc4-1) and xy coordinates are set so that the optical axis position (xc1, yc1) of the first imaging signal has the same coordinate value.

Figure 2010002280
Figure 2010002280

図8のフローチャートの説明に戻る。
次に、視差演算部142、視差補正部143及び距離演算部145は、距離の演算を実行する(ステップS1200)。
Returning to the flowchart of FIG.
Next, the parallax calculation unit 142, the parallax correction unit 143, and the distance calculation unit 145 perform distance calculation (step S1200).

以下に、図10を用いて、ステップS1200の処理の詳細について説明する。図10は、本発明の実施の形態1に係る測距装置101の距離演算に関する動作を示すフローチャートである。図10のフローチャートは、図8におけるステップS1200の処理の詳細を示す。   Hereinafter, the details of the process of step S1200 will be described with reference to FIG. FIG. 10 is a flowchart showing an operation related to the distance calculation of the distance measuring apparatus 101 according to the first embodiment of the present invention. The flowchart of FIG. 10 shows the details of the process of step S1200 in FIG.

まず、視差演算部142は、撮像信号I1の一部の画像領域である基準ブロックを選択する(ステップS1220)。   First, the parallax calculation unit 142 selects a reference block that is a partial image region of the imaging signal I1 (step S1220).

ここで、ステップS1220において、視差演算部142が選択する基準ブロックの詳細を、図11を用いて説明する。図11は、本発明の実施の形態1に係る測距装置101において、視差演算部142が選択する基準ブロックを説明するための図である。図11に示すように、視差演算部142により選択される基準ブロックは、第1の撮像信号I1上において、x方向の画素数がHB画素、y方向の画素数がVB画素となる画像である。ステップS1150(図8)が実行された後、初めてこのステップS1220を実行されるときは、視差演算部142は、ブロックの中心が(HB/2,VB/2)の基準ブロックを選択する。以後、このステップS1220が実行されるときは、視差演算部142は、ブロックの中心を右側に順に一画素ずつずらした基準ブロックを選択する。なお、図11において右端のブロック(中心が(H1−HB/2、0)、(H1−HB/2,1)、・・・のブロック)を視差演算部142が選択した場合、次は、一画素下の行の左端のブロック(中心が(HB/2,1)、(HB/2,2)、・・・のブロック)を視差演算部142は基準ブロックとして選択する。すなわち、視差演算部142は、インデックス(i,j)を設定し、中心が(i,j)、x方向の画素数がHB画素、y方向の画素数がVB画素のブロックを基準ブロックとして選択する。インデックス(i,j)において、ステップS1150(図8)が実行された後、視差演算部142が初めてこのステップS1220の処理を実行するときに、インデックス(i,j)を(HB/2,VB/2)に初期化する。そして、初期化以後、視差演算部142がステップS1220の処理を実行する度に、視差演算部142は、iを1ずつ大きくする。前回のiがH1−HB/2のとき、視差演算部142は、iを0にし、jを1だけ大きくする。   Here, details of the reference block selected by the parallax calculation unit 142 in step S1220 will be described with reference to FIG. FIG. 11 is a diagram for explaining a reference block selected by the parallax calculation unit 142 in the distance measuring apparatus 101 according to Embodiment 1 of the present invention. As illustrated in FIG. 11, the reference block selected by the parallax calculation unit 142 is an image in which the number of pixels in the x direction is HB pixels and the number of pixels in the y direction is VB pixels on the first imaging signal I1. . When step S1220 is executed for the first time after step S1150 (FIG. 8) is executed, the parallax calculation unit 142 selects a reference block whose block center is (HB / 2, VB / 2). Thereafter, when step S1220 is executed, the parallax calculation unit 142 selects a reference block in which the center of the block is shifted to the right by one pixel at a time. In addition, when the parallax calculation unit 142 selects the rightmost block (the block whose center is (H1-HB / 2, 0), (H1-HB / 2, 1),...) In FIG. The parallax calculation unit 142 selects the block at the left end of the row below one pixel (the block whose center is (HB / 2, 1), (HB / 2, 2),...) As the reference block. That is, the parallax calculation unit 142 sets an index (i, j), selects a block whose center is (i, j), the number of pixels in the x direction is HB pixels, and the number of pixels in the y direction is VB pixels as a reference block. To do. After the step S1150 (FIG. 8) is executed for the index (i, j), when the parallax calculation unit 142 executes the process of step S1220 for the first time, the index (i, j) is set to (HB / 2, VB). / 2). After the initialization, the parallax calculation unit 142 increases i by 1 each time the parallax calculation unit 142 executes the process of step S1220. When the previous i is H1-HB / 2, the parallax calculation unit 142 sets i to 0 and j to increase by 1.

図10のフローチャートの説明に戻る。
次に、視差演算部142は、基準画像である第1の撮像信号I1と、参照画像である第2の撮像信号I2、第3の撮像信号I3、及び第4の撮像信号I4と、を用いて、基準画像上の各画素における視差Δ(仮視差)を演算し、演算した視差Δ(仮視差)を出力する(ステップS1230)。この視差Δ(仮視差)の演算において、視差演算部142は、まず、第1の撮像信号I1と第2の撮像信号I2とにおける、視差(仮視差)と視差信頼度とを演算する。
Returning to the flowchart of FIG.
Next, the parallax calculation unit 142 uses the first imaging signal I1 that is a reference image, and the second imaging signal I2, the third imaging signal I3, and the fourth imaging signal I4 that are reference images. Thus, the parallax Δ (temporary parallax) in each pixel on the reference image is calculated, and the calculated parallax Δ (temporary parallax) is output (step S1230). In the calculation of the parallax Δ (temporary parallax), the parallax calculation unit 142 first calculates the parallax (temporary parallax) and the parallax reliability in the first imaging signal I1 and the second imaging signal I2.

以下に、第1の撮像信号I1と第2の撮像信号I2とにおける、視差(仮視差)と視差信頼度との演算について、詳細に説明する。視差演算部142は、最初に、第1の撮像信号I1と第2の撮像信号I2との視差評価値R12(kx)を演算する。ここで、kxは基準ブロックと同一の座標値となる参照画像の一部領域に対して、参照ブロックをどれだけずらして選択するかを示すずらし量である。視差演算部142は、kxを、kx=0、1、2、・・・、SB+1のように変化させる。   Hereinafter, the calculation of the parallax (temporary parallax) and the parallax reliability in the first imaging signal I1 and the second imaging signal I2 will be described in detail. First, the parallax calculation unit 142 calculates the parallax evaluation value R12 (kx) between the first imaging signal I1 and the second imaging signal I2. Here, kx is a shift amount indicating how much the reference block is shifted and selected with respect to a partial area of the reference image having the same coordinate value as that of the base block. The parallax calculation unit 142 changes kx as kx = 0, 1, 2,..., SB + 1.

図12は、本発明の実施の形態1に係る測距装置101において、第1の撮像信号I1と第2の撮像信号I2とを利用したときの視差演算における視差評価値の演算領域を説明するための図である。   FIG. 12 illustrates a calculation area of a parallax evaluation value in the parallax calculation when the first imaging signal I1 and the second imaging signal I2 are used in the distance measuring apparatus 101 according to Embodiment 1 of the present invention. FIG.

基準ブロックI1bで示される領域は、第1の撮像信号I1において、インデックス(i,j)で示されるブロックである。すなわち、基準ブロックI1bは、第1の撮像信号I1において、中心の座標が(i,j)、x方向の画素数がHB画素、y方向の画素数がVB画素であるブロックである。   The area indicated by the reference block I1b is a block indicated by the index (i, j) in the first imaging signal I1. That is, the reference block I1b is a block in the first imaging signal I1 whose center coordinates are (i, j), the number of pixels in the x direction is HB pixels, and the number of pixels in the y direction is VB pixels.

また、参照ブロックI2bで示される領域は、第2の撮像信号I2において、基準ブロックI1bの座標値と同一となる座標値のブロックから、x方向にkxだけずれた領域のブロックである。すなわち、参照ブロックI2bは、第2の撮像信号I2において、中心の座標が(i+kx,j)、x方向の画素数がHB画素、y方向の画素数がVB画素であるブロックである。   In addition, the area indicated by the reference block I2b is a block of an area that is shifted by kx in the x direction from the block having the same coordinate value as the coordinate value of the standard block I1b in the second imaging signal I2. That is, the reference block I2b is a block in which the center coordinates are (i + kx, j), the number of pixels in the x direction is HB pixels, and the number of pixels in the y direction is VB pixels in the second imaging signal I2.

ここで、視差演算部142は、ずらし量kxを0からSB+1まで変化させた場合(kx=0からSB+1)について、下記式(22)に示される絶対値差分総和(SAD:Sum of Absolute Differences)を演算する。ここで、視差演算部142は、演算したSADを視差評価値R12(kx)として扱う。すなわち、視差演算部142は、第1の撮像信号I1を基準画像とし、第2の撮像信号I2を参照画像として、視差評価値R12(kx)を演算する。   Here, when the shift amount kx is changed from 0 to SB + 1 (kx = 0 to SB + 1), the parallax calculation unit 142 calculates the sum of absolute value differences (SAD: Sum of Absolute Differences) shown in the following formula (22). Is calculated. Here, the parallax calculation unit 142 treats the calculated SAD as the parallax evaluation value R12 (kx). That is, the parallax calculation unit 142 calculates the parallax evaluation value R12 (kx) using the first imaging signal I1 as a reference image and the second imaging signal I2 as a reference image.

式(22)において、ΣΣは、インデックス(i,j)で示されるブロック内の各画素の総和を示す。つまり、式(22)において、xはi−HB/2からi+HB/2−1まで変化し、yはj−VB/2からj+VB/2−1まで変化する。   In Expression (22), ΣΣ represents the total sum of each pixel in the block indicated by the index (i, j). That is, in Expression (22), x changes from i−HB / 2 to i + HB / 2-1, and y changes from j−VB / 2 to j + VB / 2-1.

Figure 2010002280
Figure 2010002280

この視差評価値R12(kx)は、第1の撮像信号I1においてインデックス(i,j)で示される中心座標(i,j)の基準ブロックの画像と、第2の撮像信号I2においてインデックス(i,j)で示される中心座標(i,j)のブロックからx方向にkxだけずれた領域の参照ブロックの画像とが、どれだけ相関があるか(類似しているか)を示し、値が小さいほど相関が大きい(類似度合いが大きい)ことを示す。   The parallax evaluation value R12 (kx) is an image of the reference block at the center coordinates (i, j) indicated by the index (i, j) in the first imaging signal I1 and the index (i in the second imaging signal I2. , J) indicates how much the image of the reference block in the region shifted by kx in the x direction from the block of the central coordinates (i, j) indicated by (i, j) is correlated (similar), and the value is small The higher the correlation, the greater the degree of similarity.

図13は、本発明の実施の形態1に係る測距装置101の第1の撮像信号I1と第2の撮像信号I2を利用したときの視差演算における、ずらし量と視差評価値との関係を説明する図である。図13に示すように、視差評価値R12(kx)はずらし量kxの値によって変化し、ずらし量kx=Δのときに視差評価値R12(kx)は極小値となる。つまり、第1の撮像信号I1においてインデックス(i,j)で示される中心座標(i,j)の基準ブロックに対して、第2の撮像信号I2においてインデックス(i,j)で示される中心座標(i,j)のブロックからx方向にずらし量Δだけずれた領域の参照ブロックが最も相関が高い(最も類似度合いが大きい)ブロックである。そこで、視差演算部142は、インデックス(i,j)で示されるブロックにおける第1の撮像信号I1と第2の撮像信号I2との視差評価値R12(kx)が最小値となるずらし量をずらし量Δと特定する。   FIG. 13 shows the relationship between the shift amount and the parallax evaluation value in the parallax calculation when the first imaging signal I1 and the second imaging signal I2 of the distance measuring apparatus 101 according to Embodiment 1 of the present invention are used. It is a figure explaining. As shown in FIG. 13, the parallax evaluation value R12 (kx) varies depending on the value of the shift amount kx, and the parallax evaluation value R12 (kx) becomes a minimum value when the shift amount kx = Δ. That is, the central coordinates indicated by the index (i, j) in the second imaging signal I2 with respect to the reference block having the central coordinates (i, j) indicated by the index (i, j) in the first imaging signal I1. The reference block in the region shifted by the shift amount Δ in the x direction from the block (i, j) is the block having the highest correlation (the highest degree of similarity). Therefore, the parallax calculation unit 142 shifts the shift amount at which the parallax evaluation value R12 (kx) between the first imaging signal I1 and the second imaging signal I2 in the block indicated by the index (i, j) is the minimum value. The quantity Δ is specified.

さらに、視差演算部142は、下記式(23)のように、等角フィッティングの補間式を利用してxy座標における視差値Δ12(i,j)(仮視差)を算出する。その結果、視差演算部142は、ずらし量単位(一画素)未満の分解能で視差(仮視差)を求めることが可能となる。   Further, the parallax calculation unit 142 calculates a parallax value Δ12 (i, j) (provisional parallax) in the xy coordinates using an equiangular fitting interpolation formula as shown in the following formula (23). As a result, the parallax calculation unit 142 can obtain parallax (temporary parallax) with a resolution less than the shift amount unit (one pixel).

また、視差演算部142は、下記式(24)のように、視差評価値R12(Δ)を用いて、座標(i,j)における第1の撮像信号I1と第2の撮像信号I2との視差信頼度C12(i,j)を算出する。   Further, the parallax calculation unit 142 uses the parallax evaluation value R12 (Δ) as shown in the following formula (24) to calculate the first imaging signal I1 and the second imaging signal I2 at the coordinates (i, j). The parallax reliability C12 (i, j) is calculated.

Figure 2010002280
Figure 2010002280

次に、視差演算部142は、第1の撮像信号I1と第3の撮像信号I3との視差(仮視差)及び視差信頼度も上記と同様に求める。ただし、視差演算部142は、第3の撮像信号I3において参照ブロックをずらす方向を、第1のレンズ部113aの光軸中心と第3のレンズ部113cの光軸中心とを結ぶ直線の方向であるy方向に変更する。また、ずらし量はkyとする。   Next, the parallax calculation unit 142 obtains the parallax (temporary parallax) and the parallax reliability between the first imaging signal I1 and the third imaging signal I3 in the same manner as described above. However, the parallax calculator 142 shifts the reference block in the third imaging signal I3 in the direction of a straight line connecting the optical axis center of the first lens unit 113a and the optical axis center of the third lens unit 113c. Change to a certain y direction. The shift amount is ky.

具体的には、視差演算部142は、下記式(25)のように、インデックス(i,j)で示されるブロックにおける第1の撮像信号I1と第3の撮像信号I3との視差評価値R13(ky)を求める。すなわち、視差演算部142は、第1の撮像信号I1を基準画像として扱うとともに、第3の撮像信号I3を参照画像として扱うことにより、視差評価値R13(ky)を演算する。そして、視差演算部142は、視差評価値R13(ky)が最小値となるずらし量Δを特定する。さらに、視差演算部142は、下記式(26)のように、等角フィッティングの補間式を利用して、座標(i,j)における第1の撮像信号I1と第3の撮像信号I3とのxy座標における視差値Δ13(i,j)(仮視差)を算出する。また、視差演算部142は、下記式(27)のように、視差評価値R13(Δ)を用いて、座標(i,j)における第1の撮像信号I1と第3の撮像信号I3との視差信頼度C13(i,j)を算出する。   Specifically, the parallax calculation unit 142, as shown in the following formula (25), the parallax evaluation value R13 between the first imaging signal I1 and the third imaging signal I3 in the block indicated by the index (i, j). Find (ky). That is, the parallax calculation unit 142 calculates the parallax evaluation value R13 (ky) by handling the first imaging signal I1 as a reference image and handling the third imaging signal I3 as a reference image. Then, the parallax calculation unit 142 specifies the shift amount Δ at which the parallax evaluation value R13 (ky) is the minimum value. Further, the parallax calculation unit 142 uses an equiangular fitting interpolation formula as shown in the following formula (26) to calculate the first imaging signal I1 and the third imaging signal I3 at the coordinates (i, j). A parallax value Δ13 (i, j) (temporary parallax) in the xy coordinates is calculated. Further, the parallax calculation unit 142 uses the parallax evaluation value R13 (Δ) as in the following equation (27), and calculates the first imaging signal I1 and the third imaging signal I3 at the coordinates (i, j). The parallax reliability C13 (i, j) is calculated.

Figure 2010002280
Figure 2010002280

次に、視差演算部142は、第1の撮像信号I1と第4の撮像信号I4との視差(仮視差)及び視差信頼度も上記と同様に求める。ただし、視差演算部142は、第4の撮像信号I4において参照ブロックをずらす方向を斜め方向(第1のレンズ部113aの光軸中心114aと第4のレンズ部113dの光軸中心114dとを結ぶ直線の方向)に変更する。また、ずらし量はx方向にkx、y方向にkxとする。   Next, the parallax calculation unit 142 obtains the parallax (temporary parallax) and the parallax reliability between the first imaging signal I1 and the fourth imaging signal I4 in the same manner as described above. However, the parallax calculation unit 142 connects the reference block in the fourth imaging signal I4 in an oblique direction (connects the optical axis center 114a of the first lens unit 113a and the optical axis center 114d of the fourth lens unit 113d). Change to the direction of the straight line). The shift amount is kx in the x direction and kx in the y direction.

具体的には、視差演算部142は、下記式(28)のように、インデックス(i,j)で示されるブロックにおける第1の撮像信号I1と第4の撮像信号I4との視差評価値R14(kx)を求める。すなわち、視差演算部142は、第1の撮像信号I1を基準画像として扱うとともに、第4の撮像信号I4を参照画像として扱うことにより、視差評価値R14(kx)を演算する。そして、視差演算部142は、視差評価値R14(kx)が最小値を与えるずらし量Δを特定する。さらに、視差演算部142は、下記式(29)のように、等角フィッティングの補間式を利用して、座標(i,j)における第1の撮像信号I1と第4の撮像信号I4とのxy座標における視差値Δ14(i,j)(仮視差)を算出する。また、視差演算部142は、下記式(30)のように、視差評価値R14(Δ)を用いて、座標(i,j)における第1の撮像信号I1と第4の撮像信号I4との視差信頼度C14(i,j)を算出する。   Specifically, the parallax calculation unit 142, as shown in the following formula (28), the parallax evaluation value R14 between the first imaging signal I1 and the fourth imaging signal I4 in the block indicated by the index (i, j). Find (kx). That is, the parallax calculation unit 142 calculates the parallax evaluation value R14 (kx) by handling the first imaging signal I1 as a reference image and handling the fourth imaging signal I4 as a reference image. Then, the parallax calculation unit 142 specifies the shift amount Δ that the parallax evaluation value R14 (kx) gives the minimum value. Further, the parallax calculation unit 142 uses the equiangular fitting interpolation formula as in the following formula (29) to calculate the first imaging signal I1 and the fourth imaging signal I4 at the coordinates (i, j). A parallax value Δ14 (i, j) (temporary parallax) in the xy coordinates is calculated. Further, the parallax calculation unit 142 uses the parallax evaluation value R14 (Δ) as shown in the following equation (30) to calculate the first imaging signal I1 and the fourth imaging signal I4 at the coordinates (i, j). The parallax reliability C14 (i, j) is calculated.

Figure 2010002280
Figure 2010002280

そして、視差演算部142は、上記3つの視差信頼度を比較することにより、最も信頼できる視差値(仮視差)を選択する。すなわち、視差演算部142は、下記式(31)のように、3つの視差信頼度C12(i,j)、C13(i,j)、及びC14(i,j)を比較することにより、最も値が小さい視差信頼度に対応する視差値(仮視差)を選択する。例えば、視差信頼度C12(i,j)が最も小さな値であるとき、視差演算部142は、視差値Δ12(i,j)を座標(i,j)における視差値Δ(i,j)(仮視差)として選択する。また、例えば、視差信頼度C13(i,j)が最も小さな値であるとき、視差値Δ13(i,j)を座標(i,j)における視差値Δ(i,j)(仮視差)として選択する。また、例えば、視差信頼度C14(i,j)が最も小さな値であるとき、視差値Δ14(i,j)を座標(i,j)における視差値Δ(i,j)(仮視差)として選択する。   Then, the parallax calculation unit 142 selects the most reliable parallax value (temporary parallax) by comparing the three parallax reliability levels. That is, the parallax calculation unit 142 compares the three parallax reliability C12 (i, j), C13 (i, j), and C14 (i, j) as shown in the following formula (31), thereby obtaining the most A parallax value (temporary parallax) corresponding to a parallax reliability having a small value is selected. For example, when the parallax reliability C12 (i, j) is the smallest value, the parallax calculation unit 142 converts the parallax value Δ12 (i, j) into the parallax value Δ (i, j) ( Select as temporary parallax. For example, when the parallax reliability C13 (i, j) is the smallest value, the parallax value Δ13 (i, j) is set as the parallax value Δ (i, j) (provisional parallax) at the coordinates (i, j). select. For example, when the parallax reliability C14 (i, j) is the smallest value, the parallax value Δ14 (i, j) is set as the parallax value Δ (i, j) (provisional parallax) at the coordinates (i, j). select.

なお、本実施の形態1では、視差演算部142は、視差信頼度(C12、C13、C14)を、絶対値差分総和(式(22)、式(25)、式(28))を用いて算出したが、例えば、正規化相関係数を用いて算出してもよい。この場合、視差演算部142は、最も値が大きい視差信頼度が最も信頼できる視差信頼度となるので、最も値が大きい視差信頼度に対応する視差値(仮視差)を選択する。   In the first embodiment, the parallax calculation unit 142 uses the absolute value difference sum (Equation (22), Equation (25), Equation (28)) for the parallax reliability (C12, C13, C14). Although calculated, for example, it may be calculated using a normalized correlation coefficient. In this case, the parallax calculation unit 142 selects the parallax value (temporary parallax) corresponding to the parallax reliability having the largest value because the parallax reliability having the largest value is the most reliable parallax reliability.

Figure 2010002280
Figure 2010002280

図10のフローチャートの説明に戻る。
次に、視差補正部143は、視差演算部142が算出した視差値Δ(仮視差)の補正を行い、補正後の視差値である補正後視差値を出力する。
Returning to the flowchart of FIG.
Next, the parallax correction unit 143 corrects the parallax value Δ (temporary parallax) calculated by the parallax calculation unit 142, and outputs a corrected parallax value that is a corrected parallax value.

図9に示すように、基準画像である第1の撮像信号I1において、光軸中心114aに対応する位置(光軸位置)の座標(xc1,yc1)と原点の座標(x01,y01)との差は、(H1/2,V1/2)である。一方、参照画像である第2の撮像信号I2において、光軸中心114bに対応する位置(光軸位置)の座標(xc2,yc2)と原点の座標(x02,y02)との差は、(H1/2+1,V1/2)である。すなわち、第2の撮像信号I2(参照画像)における光軸位置の座標値は、第1の撮像信号I1(基準画像)における光軸位置の座標値に比べて、x方向(基準撮像系と参照撮像系の光軸中心を結ぶ直線の方向)の負の向き(基準撮像系の光軸中心へ近づく向き)に一画素だけ大きい。そのため、視差値Δ(i,j)(仮視差)は、本来の視差に対して一画素分だけ大きい。   As shown in FIG. 9, in the first imaging signal I1, which is the reference image, the coordinates (xc1, yc1) of the position (optical axis position) corresponding to the optical axis center 114a and the coordinates (x01, y01) of the origin The difference is (H1 / 2, V1 / 2). On the other hand, in the second imaging signal I2 that is the reference image, the difference between the coordinates (xc2, yc2) of the position (optical axis position) corresponding to the optical axis center 114b and the coordinates (x02, y02) of the origin is (H1 / 2 + 1, V1 / 2). That is, the coordinate value of the optical axis position in the second imaging signal I2 (reference image) is in the x direction (reference imaging system and reference) compared to the coordinate value of the optical axis position in the first imaging signal I1 (reference image). It is larger by one pixel in the negative direction (direction approaching the optical axis center of the reference imaging system) in the negative direction of the straight line connecting the optical axis centers of the imaging system. Therefore, the parallax value Δ (i, j) (temporary parallax) is larger by one pixel than the original parallax.

また、参照画像である第3の撮像信号I3において、光軸中心114cに対応する位置(光軸位置)の座標(xc3,yc3)と原点の座標(x03,y03)との差は、(H1/2,V1/2+1)である。すなわち、第3の撮像信号I3(参照画像)における光軸位置の座標値は、第1の撮像信号I1(基準画像)における光軸位置の座標値に比べて、y方向(基準撮像系と参照撮像系の光軸中心を結ぶ直線の方向)の負の向き(基準撮像系の光軸中心へ近づく向き)に一画素だけ大きい。そのため、視差値Δ(i,j)(仮視差)は、本来の視差に対して一画素分だけ大きい。   Further, in the third imaging signal I3 which is the reference image, the difference between the coordinates (xc3, yc3) of the position (optical axis position) corresponding to the optical axis center 114c and the coordinates (x03, y03) of the origin is (H1 / 2, V1 / 2 + 1). That is, the coordinate value of the optical axis position in the third imaging signal I3 (reference image) is in the y direction (reference imaging system and reference) compared to the coordinate value of the optical axis position in the first imaging signal I1 (reference image). It is larger by one pixel in the negative direction (direction approaching the optical axis center of the reference imaging system) in the negative direction of the straight line connecting the optical axis centers of the imaging system. Therefore, the parallax value Δ (i, j) (temporary parallax) is larger by one pixel than the original parallax.

また、参照画像である第4の撮像信号I4において、光軸中心114dに対応する位置(光軸位置)の座標(xc4,yc4)と原点の座標(x04,y04)との差は、(H1/2+1,V1/2+1)である。すなわち、第4の撮像信号I4(参照画像)における光軸位置の座標値は、第1の撮像信号I1(基準画像)における光軸位置の座標値に比べて、x軸を−45度回転させた方向(基準撮像系と参照撮像系の光軸中心を結ぶ直線の方向)の負の向き(基準撮像系の光軸中心へ近づく向き)に一画素だけ大きい。つまり、第4の撮像信号I4(参照画像)における光軸位置の座標値は、第1の撮像信号I1(基準画像)における光軸位置の座標値に比べて、x方向の負の向きに一画素だけ、y方向の負の向きに一画素だけ大きい。そのため、視差値Δ(i,j)(仮視差)は、本来の視差に対して、一画素分だけ大きい。   In the fourth imaging signal I4 as the reference image, the difference between the coordinates (xc4, yc4) of the position (optical axis position) corresponding to the optical axis center 114d and the coordinates (x04, y04) of the origin is (H1 / 2 + 1, V1 / 2 + 1). That is, the coordinate value of the optical axis position in the fourth imaging signal I4 (reference image) is rotated by −45 degrees relative to the coordinate value of the optical axis position in the first imaging signal I1 (reference image). Is larger by one pixel in the negative direction (direction approaching the optical axis center of the standard imaging system) in the negative direction (direction of a straight line connecting the optical axis centers of the standard imaging system and the reference imaging system). That is, the coordinate value of the optical axis position in the fourth imaging signal I4 (reference image) is one more negative in the x direction than the coordinate value of the optical axis position in the first imaging signal I1 (reference image). Only one pixel is larger by one pixel in the negative direction of the y direction. Therefore, the parallax value Δ (i, j) (temporary parallax) is larger by one pixel than the original parallax.

ここで、所定方向に一画素大きいとは、当該所定方向の直線上に、周期的に画素の中心が現れる場合の、一周期分の距離大きいことを意味する。   Here, “one pixel larger in a predetermined direction” means that the distance of one cycle is larger when the center of the pixel periodically appears on a straight line in the predetermined direction.

このように、視差演算部142が算出した視差値Δは、本来の視差に比べて大きくなるため、視差補正部143は、視差値Δ(仮視差)を補正することにより本来の視差を算出する。例えば、視差値Δ12(i,j)、視差値Δ13(i,j)、あるいは視差値Δ14(i,j)が視差値Δ(仮視差)として選択されている場合には、下記式(32)のように、視差補正部143は、座標(i,j)における視差値Δ(i,j)から一画素だけ減算することにより、座標(i,j)における本来の視差値である補正後視差値Δa(i,j)を算出する。   Thus, since the parallax value Δ calculated by the parallax calculation unit 142 is larger than the original parallax, the parallax correction unit 143 calculates the original parallax by correcting the parallax value Δ (temporary parallax). . For example, when the parallax value Δ12 (i, j), the parallax value Δ13 (i, j), or the parallax value Δ14 (i, j) is selected as the parallax value Δ (temporary parallax), the following equation (32) ), The parallax correction unit 143 subtracts one pixel from the parallax value Δ (i, j) at the coordinates (i, j), thereby correcting the original parallax value at the coordinates (i, j). A parallax value Δa (i, j) is calculated.

Figure 2010002280
Figure 2010002280

次に、失敗検知部144は、視差補正部143により補正された視差値を用いて、視差演算の失敗を検知する。そして、失敗が検知された場合、失敗検知部144は、失敗フラッグDDEの値を1としたうえで出力する。   Next, the failure detection unit 144 detects a failure in the parallax calculation using the parallax value corrected by the parallax correction unit 143. If a failure is detected, the failure detection unit 144 sets the value of the failure flag DDE to 1 and outputs the result.

図5に示すように、被写体距離が無限遠のときに視差は最も小さな値0となるので、視差値が負数となることはない。そのため、視差補正部143により補正された視差値が負数となるとき、失敗検知部144は、視差演算が失敗したと判断する。具体的には、下記式(33)のように、失敗検知部144は、座標(i,j)における補正後視差値Δa(i,j)が0以上のとき、失敗フラッグDDEを0(DDE=0)に設定する。一方、失敗検知部144は、座標(i,j)における補正後視差値Δa(i,j)が0より小さいとき、失敗フラッグDDEを1(DDE=1)に設定する。なお、この失敗の原因として、撮像信号へのノイズの重畳などが考えられる。   As shown in FIG. 5, since the parallax is the smallest value 0 when the subject distance is infinite, the parallax value does not become a negative number. Therefore, when the parallax value corrected by the parallax correction unit 143 becomes a negative number, the failure detection unit 144 determines that the parallax calculation has failed. Specifically, as shown in the following equation (33), the failure detection unit 144 sets the failure flag DDE to 0 (DDE) when the corrected parallax value Δa (i, j) at the coordinate (i, j) is 0 or more. = 0). On the other hand, the failure detection unit 144 sets the failure flag DDE to 1 (DDE = 1) when the corrected parallax value Δa (i, j) at the coordinates (i, j) is smaller than 0. Note that this failure may be caused by noise superimposed on the imaging signal.

Figure 2010002280
Figure 2010002280

次に、距離演算部145は、補正後視差値Δaと失敗フラッグDDEとを用いて距離の演算を行う。そして、距離演算部145は、演算した距離データDISを出力する(ステップS1260)。具体的には、距離演算部145は、式(3)へ、視差補正部143により算出された補正後視差値Δa(i,j)などを代入することにより、距離データDIS(i,j)を算出する。つまり、距離演算部145は、下記式(34)のように、距離データDIS(i,j)を算出する。   Next, the distance calculation unit 145 calculates a distance using the corrected parallax value Δa and the failure flag DDE. Then, the distance calculation unit 145 outputs the calculated distance data DIS (step S1260). Specifically, the distance calculation unit 145 substitutes the corrected parallax value Δa (i, j) calculated by the parallax correction unit 143 and the like into the equation (3), so that the distance data DIS (i, j) Is calculated. That is, the distance calculation unit 145 calculates the distance data DIS (i, j) as shown in the following formula (34).

なお、失敗フラッグDDE(i,j)が0のときは、視差が正しく求められているため、距離演算部145は上記演算を行う。一方、失敗フラッグDDE(i,j)が1のときは、視差が正しく求められていないため、距離演算部145は上記演算を行わない。例えば、距離演算部145は、距離データDIS(i,j)を0と設定する。   Note that when the failure flag DDE (i, j) is 0, since the parallax is correctly obtained, the distance calculation unit 145 performs the above calculation. On the other hand, when the failure flag DDE (i, j) is 1, since the parallax is not obtained correctly, the distance calculation unit 145 does not perform the above calculation. For example, the distance calculation unit 145 sets the distance data DIS (i, j) to 0.

式(34)において、fは焦点距離、Dxはx方向の光軸間距離、pは撮像素子123の受光素子の間隔である。また、式(34)では、補正後視差値Δaが画素単位であるため、補正後視差値Δaにpを乗ずることにより、補正後視差値Δaが焦点距離fなどと同一の単位系となるように変換されている。   In Expression (34), f is the focal length, Dx is the distance between the optical axes in the x direction, and p is the interval between the light receiving elements of the image sensor 123. Further, in Equation (34), since the corrected parallax value Δa is in units of pixels, the corrected parallax value Δa is multiplied by p so that the corrected parallax value Δa becomes the same unit system as the focal length f and the like. Has been converted.

Figure 2010002280
Figure 2010002280

次に、距離演算部145は、基準画像内のすべてのブロックが選択されたか否かを判定する(ステップS1270)。ここで、すべてのブロックが選択されていたとき(インデックス(i,j)が(H1−HB/2,V1−VB/2)であるとき)(ステップS1270のYes)、図8のステップS1910の処理が実行される。一方、すべてのブロックが選択されていないとき(インデックス(i,j)が(H1−HB/2,V1−VB/2)でないとき)(ステップS1270のNo)、再び、ステップS1220の処理が実行される。すなわち、ステップS1220において、インデックス(i,j)が(HB/2,VB/2)に初期化され、iをHB/2からH1−HB/2まで、jをVB/2からV1−VB/2まで変化させつつ、ステップS1230、ステップS1240、ステップS1250、及びステップS1260の動作が繰り返される。   Next, the distance calculation unit 145 determines whether or not all blocks in the reference image have been selected (step S1270). Here, when all the blocks have been selected (when index (i, j) is (H1-HB / 2, V1-VB / 2)) (Yes in step S1270), step S1910 in FIG. Processing is executed. On the other hand, when all the blocks are not selected (when the index (i, j) is not (H1-HB / 2, V1-VB / 2)) (No in step S1270), the process of step S1220 is executed again. Is done. That is, in step S1220, index (i, j) is initialized to (HB / 2, VB / 2), i is changed from HB / 2 to H1-HB / 2, and j is changed from VB / 2 to V1-VB /. While changing to 2, the operations of step S1230, step S1240, step S1250, and step S1260 are repeated.

図8のフローチャートの説明に戻る。
入出力部134は、画像データ、距離データ、及び失敗情報データを測距装置101の外部に出力する(ステップS1910)。具体的には、入出力部134は、画像データとして、撮像信号I0或いは第1の撮像信号I1を出力する。また、入出力部134は、距離データとして、距離データDISを出力する。また、入出力部134は、失敗情報データとして、失敗フラッグDDEを出力する。
Returning to the flowchart of FIG.
The input / output unit 134 outputs the image data, distance data, and failure information data to the outside of the distance measuring apparatus 101 (step S1910). Specifically, the input / output unit 134 outputs the imaging signal I0 or the first imaging signal I1 as image data. The input / output unit 134 outputs distance data DIS as distance data. Further, the input / output unit 134 outputs a failure flag DDE as failure information data.

システム制御部131は、動作を終了するかどうかを判断する(ステップS1920)。例えば、システム制御部131は、入出力部134を介し、上位CPU(図示せず)と通信することにより、動作を終了するかどうかの命令を要求する。そして、システム制御部131が上位CPUから終了命令を受信した場合(ステップS1920のYes)、処理を終了する。一方、システム制御部131が上位CPUから終了命令を受信しない場合(ステップS1920のNo)、ステップS1020の処理が実行される。すなわち、システム制御部131が上位CPUから終了命令を受信しない限り、ステップS1020、ステップS1100、ステップS1150、ステップS1200、及びステップS1910の処理が繰り返される。   The system control unit 131 determines whether to end the operation (step S1920). For example, the system control unit 131 requests an instruction to end the operation by communicating with a host CPU (not shown) via the input / output unit 134. When the system control unit 131 receives an end command from the host CPU (Yes in step S1920), the process ends. On the other hand, when the system control unit 131 does not receive an end command from the host CPU (No in step S1920), the process in step S1020 is executed. That is, unless the system control unit 131 receives an end command from the host CPU, the processes of step S1020, step S1100, step S1150, step S1200, and step S1910 are repeated.

実施の形態1に係る測距装置101は、以上のように構成されて動作することにより、以下の効果を奏する。   The distance measuring apparatus 101 according to Embodiment 1 has the following effects by being configured and operating as described above.

まず、図14(a)〜(d)を用いて、実施の形態1に係る測距装置101の効果を説明する。図14(a)〜(d)は、実施の形態1に係る測距装置101による効果を説明するための図である。   First, the effects of the distance measuring apparatus 101 according to the first embodiment will be described with reference to FIGS. 14A to 14D are diagrams for explaining the effect of the distance measuring apparatus 101 according to the first embodiment.

図14(a)及び図14(b)に示すように、基準画像である第1の撮像信号I1と参照画像である第2の撮像信号I2との視差が微小である場合に、一般的な測距装置は、基準ブロックと同一の位置(各光軸位置から同一の距離及び方向の位置)から選択する参照ブロックをずらしていくので、ずらし量の最小値(0)で視差評価値R12(kx)が最小となる。そのため、一般的な測距装置は、視差が微小である場合(視差評価値の最小となるずらし量が0である場合)、最小となる視差評価値のずらし量より小さなずらし量における視差評価値を利用した補間関数により、視差の分解能及び精度を高めることができない。   As shown in FIGS. 14A and 14B, when the parallax between the first imaging signal I1 that is the reference image and the second imaging signal I2 that is the reference image is very small, Since the distance measuring device shifts the reference block to be selected from the same position as the reference block (position of the same distance and direction from each optical axis position), the parallax evaluation value R12 (with a minimum shift amount (0)) kx) is minimized. For this reason, when the parallax is very small (when the shift amount that minimizes the parallax evaluation value is 0), a general distance measuring device has a parallax evaluation value at a shift amount that is smaller than the shift amount of the parallax evaluation value that is minimum. The resolution and accuracy of the parallax cannot be increased by the interpolation function using.

これに対し、図14(d)の点線の垂直軸で示すように、従来の測距装置(例えば、特許文献1の撮像装置)は、負数のずらし量まで視差評価値R12(kx)を演算することにより、補間関数を用いて視差の分解能及び精度を高めることができる。しかし、従来の測距装置は、ずらし量を負数とする必要があるため、視差演算を実行するための回路の規模が大きくなる。   On the other hand, as shown by the dotted vertical axis in FIG. 14D, the conventional distance measuring device (for example, the imaging device of Patent Document 1) calculates the parallax evaluation value R12 (kx) up to a negative shift amount. By doing so, the resolution and accuracy of the parallax can be increased using the interpolation function. However, since the conventional distance measuring device needs to set the shift amount to a negative number, the scale of the circuit for executing the parallax calculation increases.

そこで、図14(d)の実線の垂直軸で示すように、本実施の形態1に係る測距装置101は、基準ブロックより一画素小さな位置から選択する参照ブロックをずらしていく。その結果、本実施の形態1に係る測距装置101は、ずらし量が常に正数となるので、微小な視差における視差の分解能及び精度を高めるとともに、視差演算のための回路規模の増大を抑制することが可能となる。   Therefore, as shown by the solid vertical axis in FIG. 14D, the distance measuring apparatus 101 according to the first embodiment shifts the reference block to be selected from a position one pixel smaller than the reference block. As a result, the distance measuring apparatus 101 according to the first embodiment increases the resolution and accuracy of parallax in minute parallax, and suppresses an increase in circuit scale for parallax calculation because the shift amount is always a positive number. It becomes possible to do.

さらに、本実施の形態1に係る測距装置101は、基線方向のうち基準撮像系が有するレンズであるレンズ部113aの光軸中心114aに近づく向きへ、参照画像の光軸位置から一画素移動した位置と、基準画像の光軸位置とが同一の座標となるように、xy座標を設定する。したがって、測距装置101は、基準ブロックの座標値と同一の座標値から参照ブロックをずらしながら、視差評価値R12(kx)を演算するだけで、ずらし量を常に正数とすることが可能となる。そして、測距装置101は、一般的な測距装置による視差演算と同様の視差演算を行った後に、得られた視差(仮視差)から一画素減算するだけで、微小な視差における視差の分解能及び精度を高めることが可能となる。すなわち、測距装置101は、一般的な測距装置の視差演算をほとんどそのまま流用することができるので、視差演算のための回路規模の増大を抑制することが可能となる。   Further, the distance measuring device 101 according to the first embodiment moves one pixel from the optical axis position of the reference image in the direction of approaching the optical axis center 114a of the lens unit 113a that is a lens included in the reference imaging system in the baseline direction. The xy coordinates are set so that the position thus obtained is the same as the optical axis position of the reference image. Therefore, the distance measuring apparatus 101 can always set the shift amount to a positive number only by calculating the parallax evaluation value R12 (kx) while shifting the reference block from the same coordinate value as the coordinate value of the base block. Become. Then, the distance measuring apparatus 101 performs a parallax calculation similar to the parallax calculation performed by a general distance measuring apparatus, and then subtracts one pixel from the obtained parallax (temporary parallax), thereby reducing the resolution of the parallax in a minute parallax. In addition, the accuracy can be increased. That is, since the distance measuring apparatus 101 can use the parallax calculation of a general distance measuring apparatus almost as it is, it is possible to suppress an increase in circuit scale for the parallax calculation.

また、図14(c)に示すように、本実施の形態1に係る測距装置101では、参照画像は、基準画像と比べて、レンズ部113aの光軸中心114aに近づく向きへ一画素大きい。したがって、測距装置101では、基準画像のすべての画素に対して、同一の位置(各光軸位置から同一の距離及び方向の位置)より、基線方向のうちレンズ部113aの光軸中心114aに近づく向きへ一画素移動した位置の参照画像が存在する。したがって、測距装置101は、参照ブロックを選択する際に、参照ブロックが選択可能か否かを確認する必要がないため、視差演算を簡易にすることができ、視差演算のための回路規模の増大を抑制することが可能となる。また、測距装置101は、基準画像の全領域について、視差を高精度に算出することも可能となる。また、測距装置101は、参照画像を一画素だけ大きくするだけでよいので、視差演算において使用する記憶領域などの増大による回路規模の増大を抑えることができる。   As shown in FIG. 14C, in the distance measuring apparatus 101 according to the first embodiment, the reference image is one pixel larger in the direction closer to the optical axis center 114a of the lens unit 113a than the reference image. . Therefore, in the distance measuring device 101, the base line direction is set to the optical axis center 114a of the lens unit 113a from the same position (position of the same distance and direction from each optical axis position) with respect to all pixels of the reference image. There is a reference image at a position moved by one pixel in the approaching direction. Therefore, the distance measuring apparatus 101 does not need to confirm whether or not the reference block can be selected when selecting the reference block, so that the parallax calculation can be simplified and the circuit scale for the parallax calculation can be reduced. The increase can be suppressed. The distance measuring apparatus 101 can also calculate the parallax with high accuracy for the entire region of the reference image. In addition, since the distance measuring apparatus 101 only needs to enlarge the reference image by one pixel, an increase in circuit scale due to an increase in a storage area used in the parallax calculation can be suppressed.

なお、本実施の形態1に係る測距装置101は、上述のように視差演算が簡易になることから、視差演算の速度を向上させるという効果も期待できる。   In addition, since the distance measuring apparatus 101 according to the first embodiment can simplify the parallax calculation as described above, an effect of improving the speed of the parallax calculation can be expected.

以下に、上述の効果をさらに具体的に説明する。
一般的な撮像装置は、図14(a)及び図14(b)に示すように、基準画像である第1の撮像信号I1及び参照画像である第2の撮像信号I2において、光軸位置からx方向(基線方向)の負の向き(レンズ部113aの光軸中心114aに近づく向き)の画素数が同一のとき、視差評価値R12(kx)(SAD)を最小とするずらし量Δとその前後のずらし量(ずらし量Δ−1、ずらし量Δ+1)とにおける視差評価値R12(Δ−1)、R12(Δ)、及びR12(Δ+1)を用いて、分解能が一画素未満の視差Δ12(i,j)を求める。そして、一般的な撮像装置は、式(32)のような視差の補正を行わず、この視差Δ12(i,j)に基づき距離演算する。そのため、図14(a)及び図14(b)に示すように、一般的な撮像装置は、左端のブロック(図11において、インデックスが(HB/2,0)、(HB/2,1)、・・・、(HB/2,VB/2)で示されるブロック)において、視差が0付近で視差評価値R12(kx)(SAD)を最小とするずらし量Δが0のとき、ずらし量Δ−1の視差評価値R12(Δ−1)を演算することができない(ずらし量−1の視差評価値R12(−1)を演算することができない)。そのため、一般的な撮像装置は、基準画像の左端のブロックでは、式(23)を用いて一画素未満の分解能の視差を求めることができない。
Hereinafter, the above-described effects will be described more specifically.
As shown in FIG. 14A and FIG. 14B, a general image pickup apparatus uses a first image pickup signal I1 that is a reference image and a second image pickup signal I2 that is a reference image from an optical axis position. When the number of pixels in the negative direction in the x direction (baseline direction) (direction approaching the optical axis center 114a of the lens portion 113a) is the same, the shift amount Δ that minimizes the parallax evaluation value R12 (kx) (SAD) and Using the parallax evaluation values R12 (Δ−1), R12 (Δ), and R12 (Δ + 1) with the front and rear shift amounts (shift amount Δ−1, shift amount Δ + 1), the parallax Δ12 (resolution is less than one pixel) i, j). And a general imaging device does not correct | amend parallax like Formula (32), but calculates distance based on this parallax (DELTA) 12 (i, j). Therefore, as shown in FIGS. 14 (a) and 14 (b), a general imaging apparatus has a leftmost block (in FIG. 11, the indexes are (HB / 2, 0), (HB / 2, 1)). ,... (Block indicated by (HB / 2, VB / 2)), and when the shift amount Δ that minimizes the parallax evaluation value R12 (kx) (SAD) is 0 when the parallax is near 0, the shift amount The parallax evaluation value R12 (-1) of Δ-1 cannot be calculated (the parallax evaluation value R12 (-1) of the shift amount -1 cannot be calculated). Therefore, a general imaging device cannot obtain a parallax with a resolution of less than one pixel using Equation (23) in the leftmost block of the reference image.

一方、実施の形態1に係る測距装置101では、図14(c)に示すように、基準画像である第1の撮像信号I1と比較して、参照画像である第2の撮像信号I2は、光軸中心からx方向(基線方向)の負の向き(レンズ部113aの光軸中心114aに近づく向き)に一画素だけ大きい画素数を持つ。そして、測距装置101は、式(23)のように、視差評価値R12(kx)(SAD)を最小とするずらし量Δとその前後のずらし量(ずらし量Δ−1及びずらし量Δ+1)とにおける視差評価値R12(Δ−1)、R12(Δ)、及びR12(Δ+1)を用いて、分解能が一画素未満の視差Δ12(i,j)(仮視差)を求める。そして、測距装置101は、式(32)のように、求めた視差Δ12(i,j)(仮視差)から一画素を減算することにより、視差Δ12a(i,j)を求める。そして、測距装置101は、このようにして求めた視差Δ12a(i,j)に基づき距離演算する。そのため、測距装置101は、図14(c)及び図14(d)に示すように、左端のブロック(図11において、インデックスが(HB/2,0)、(HB/2,1)、・・・、(HB/2,VB/2)で示されるブロック)において、視差が0付近で視差評価値R12(kx)(SAD)を最小とするずらし量Δが1のとき、ずらし量Δ−1の視差評価値R12(Δ−1)を演算する(ずらし量0の視差評価値R12(0)を演算する)ことができる。それゆえ、測距装置101は、視差値Δ(i,j)を求めることができ、視差を1だけ減算する補正を行い視差値Δa(i,j)を求める。そして、このようにして求めた視差値Δa(i,j)は0付近である。すなわち、測距装置101は、基準画像の左端のブロック(図11において、インデックスが(HB/2,0)、(HB/2,1)、・・・、(HB/2,VB/2)で示されるブロック)においても、視差0付近で一画素未満の高分解能な視差を求めることができる。それゆえ、測距装置101は、遠方での高精度な測距を実現する。すなわち、測距装置101は、広い画像領域で、遠方での高精度な測距を実現する。   On the other hand, in the distance measuring apparatus 101 according to the first embodiment, as shown in FIG. 14C, the second imaging signal I2 that is the reference image is compared with the first imaging signal I1 that is the reference image. The number of pixels is larger by one pixel in the negative direction (direction approaching the optical axis center 114a of the lens portion 113a) in the x direction (baseline direction) from the optical axis center. Then, the distance measuring apparatus 101 has a shift amount Δ that minimizes the parallax evaluation value R12 (kx) (SAD) and a shift amount before and after the shift amount (shift amount Δ−1 and shift amount Δ + 1) as shown in Expression (23). The parallax Δ12 (i, j) (temporary parallax) having a resolution of less than one pixel is obtained using the parallax evaluation values R12 (Δ−1), R12 (Δ), and R12 (Δ + 1). Then, the distance measuring apparatus 101 obtains the parallax Δ12a (i, j) by subtracting one pixel from the obtained parallax Δ12 (i, j) (temporary parallax) as shown in Expression (32). Then, the distance measuring apparatus 101 calculates a distance based on the parallax Δ12a (i, j) thus obtained. Therefore, as shown in FIGS. 14 (c) and 14 (d), the distance measuring apparatus 101 has a leftmost block (in FIG. 11, the indexes are (HB / 2, 0), (HB / 2, 1), ... (Block indicated by (HB / 2, VB / 2)), and when the shift amount Δ that minimizes the parallax evaluation value R12 (kx) (SAD) is 1 when the parallax is near 0, the shift amount Δ -1 parallax evaluation value R12 (Δ-1) can be calculated (parallax evaluation value R12 (0) with a shift amount of 0 can be calculated). Therefore, the distance measuring apparatus 101 can obtain the parallax value Δ (i, j), performs correction for subtracting the parallax by 1, and obtains the parallax value Δa (i, j). The parallax value Δa (i, j) obtained in this way is near zero. That is, the distance measuring apparatus 101 has a block at the left end of the reference image (in FIG. 11, the indexes are (HB / 2, 0), (HB / 2, 1),..., (HB / 2, VB / 2). Also in the block indicated by (), it is possible to obtain a high-resolution parallax of less than one pixel near parallax 0. Therefore, the distance measuring apparatus 101 realizes highly accurate distance measurement at a distance. That is, the distance measuring apparatus 101 realizes distance measurement with high accuracy in a distant place with a wide image area.

また、実施の形態1に係る測距装置101において、0以上のずらし量のみが必要であり、負のずらし量が不要となる。そのため、測距装置101は、式(22)の参照画像の座標の計算において、負数を考慮する必要がなく、符号ビットを省略できる。つまり、測距装置101は、その省略可能な符号ビットの分だけ回路規模或いは処理時間を縮小できるので、低コストであり、かつ、遠方を高精度に測距することができる測距装置を実現する。   In the distance measuring apparatus 101 according to the first embodiment, only a shift amount of 0 or more is necessary, and a negative shift amount is not necessary. Therefore, the distance measuring apparatus 101 does not need to consider negative numbers in the calculation of the coordinates of the reference image in Expression (22), and can omit the sign bit. In other words, the distance measuring apparatus 101 can reduce the circuit scale or processing time by the number of code bits that can be omitted, so that it is possible to realize a distance measuring apparatus that is low-cost and capable of measuring distances with high accuracy. To do.

また、ずらし量に負数を導入すると、測距装置は、ずらし量が負数のとき、この負数に対応した参照画像があるかどうかを逐次検証する必要がある。その結果、その検証に要するロジックの分だけ回路規模或いは処理時間が増大する。実施の形態1に係る測距装置101は、ずらし量を0以上に限定するため、上記の検証が不要となり、その分だけ回路規模或いは処理時間を縮小でき、低コストに遠方を高精度に測距できる測距装置を実現する。   In addition, when a negative number is introduced into the shift amount, the distance measuring device needs to sequentially verify whether there is a reference image corresponding to the negative number when the shift amount is a negative number. As a result, the circuit scale or processing time increases by the amount of logic required for the verification. Since the distance measuring apparatus 101 according to the first embodiment limits the shift amount to 0 or more, the above-described verification is unnecessary, and the circuit scale or processing time can be reduced correspondingly, and the distance can be measured with high accuracy at low cost. A distance measuring device capable of providing a distance is realized.

また、実施の形態1に係る測距装置101では、図9に示すように、基準画像である第1の撮像信号I1と比較し、参照画像である第2の撮像信号I2は、光軸位置からx方向(基線方向)の負の向き(光軸中心114aに近づく向き)に一画素だけ大きい画素数を持つ。また、測距装置101では、第2の撮像信号I2は、光軸位置からx方向(光軸方向)の正の向き(光軸中心114aから遠ざかる向き)にSB画素だけ大きい画素数を持つ。すなわち、測距装置101は、基準画像の左端のブロック(図11において、インデックスが(HB/2,0)、(HB/2,1)、・・・、(HB/2,VB/2)で示されるブロック)、及び基準画像の右端のブロック(図11において、インデックスが(H1−HB/2,0)、(H1−HB/2,1)、・・・、(H1−HB/2,VB/2)で示されるブロック)においても、視差評価値R12(kx)(SAD)を演算することができる。仮に、ずらし量を−1或いはSB+2とすると、測距装置は参照画像にない座標を参照するため、視差評価値R12(kx)を演算できない。実施の形態1に係る測距装置101は、参照画像である第2の撮像信号I2用に、必要最小限の画素数を持ち、必要最小限の記憶容量のみを持つため、低コストであり、かつ、遠方を高精度に測距できる測距装置を実現する。また、ずらし量に対応した参照画像があるかどうかを逐次検証する必要ない。そのため、その分だけ回路規模或いは処理時間を縮小でき、低コストに遠方を高精度に測距できる測距装置を実現する。   In the distance measuring apparatus 101 according to the first embodiment, as illustrated in FIG. 9, the second image pickup signal I2 that is the reference image is compared with the first image pickup signal I1 that is the reference image. The number of pixels is larger by one pixel in the negative direction (direction approaching the optical axis center 114a) in the x direction (baseline direction). In the distance measuring apparatus 101, the second imaging signal I2 has a number of pixels that is larger by SB pixels in the positive direction (direction away from the optical axis center 114a) in the x direction (optical axis direction) from the optical axis position. That is, the distance measuring apparatus 101 has a block at the left end of the reference image (in FIG. 11, the indexes are (HB / 2, 0), (HB / 2, 1),..., (HB / 2, VB / 2). ) And the rightmost block of the reference image (in FIG. 11, the indexes are (H1-HB / 2, 0), (H1-HB / 2, 1),..., (H1-HB / 2). , VB / 2)), the parallax evaluation value R12 (kx) (SAD) can be calculated. If the shift amount is −1 or SB + 2, the distance measuring apparatus refers to coordinates that are not in the reference image, and thus cannot calculate the parallax evaluation value R12 (kx). The distance measuring apparatus 101 according to the first embodiment has a minimum necessary number of pixels and only a necessary minimum storage capacity for the second imaging signal I2 that is a reference image, so that the cost is low. In addition, a distance measuring device capable of measuring distances with high accuracy is realized. Further, it is not necessary to sequentially verify whether there is a reference image corresponding to the shift amount. Therefore, it is possible to reduce the circuit scale or processing time by that amount, and to realize a distance measuring device that can measure a distance with high accuracy at low cost.

なお、本発明は、本実施の形態1の測距装置101が備える、距離演算部145以外の構成部を備える撮像装置として実現することもできる。さらに、本発明は、このような撮像装置を備える、三次元位置測定装置或いは画像合成装置として実現することもできる。   Note that the present invention can also be realized as an imaging apparatus including components other than the distance calculator 145 included in the distance measuring apparatus 101 according to the first embodiment. Furthermore, the present invention can also be realized as a three-dimensional position measurement device or an image composition device including such an imaging device.

(実施の形態2)
次に、本発明の実施の形態2に係る撮像システムについて説明する。本発明の実施の形態2に係る撮像システムは、本発明の実施の形態1に係る測距装置101を利用したものである。以下、本発明の実施の形態2に係る撮像システムについて、図面を参照しながら説明する。
(Embodiment 2)
Next, an imaging system according to Embodiment 2 of the present invention will be described. The imaging system according to the second embodiment of the present invention uses the distance measuring apparatus 101 according to the first embodiment of the present invention. Hereinafter, an imaging system according to Embodiment 2 of the present invention will be described with reference to the drawings.

図15は、本発明の実施の形態2に係る撮像システム202の構成を示すブロック図である。本発明の実施の形態2に係る撮像システム202は、測距装置101、撮像システム制御部203、及び画像認識部204を有する。   FIG. 15 is a block diagram showing a configuration of the imaging system 202 according to Embodiment 2 of the present invention. An imaging system 202 according to Embodiment 2 of the present invention includes a distance measuring device 101, an imaging system control unit 203, and an image recognition unit 204.

撮像システム制御部203は、CPUなどから構成され、撮像システム202の全体を制御する。   The imaging system control unit 203 includes a CPU and the like, and controls the entire imaging system 202.

測距装置101は、本発明の実施の形態1に記述された測距装置であり、撮像システム制御部203の命令によって制御され、画像データI1(ここでは第1の撮像信号I1とする)、距離データDIS、及び失敗情報データDDEを出力する。   The distance measuring device 101 is the distance measuring device described in the first embodiment of the present invention, and is controlled by a command from the imaging system control unit 203, and image data I1 (here, the first imaging signal I1), The distance data DIS and failure information data DDE are output.

画像認識部204は、CPUなどから構成される。画像認識部204は、失敗情報データDDEに基づき、画像データI1と失敗でない箇所の距離データDISとを利用して各種画像認識を行う。例えば、画像認識部204は、顔面を撮影したとき、画像データI1と距離データDISとを用いて顔向きを判断するにあたり、失敗箇所の距離データは無視する。   The image recognition unit 204 includes a CPU and the like. Based on the failure information data DDE, the image recognition unit 204 performs various image recognition using the image data I1 and the distance data DIS of the part that is not failed. For example, when the image recognition unit 204 captures a face, it ignores the distance data of the failed part when determining the face orientation using the image data I1 and the distance data DIS.

このように、本発明の実施の形態2に係る撮像システムによれば、実施の形態1と同様に、広い画像領域で、遠方での高精度な測距を実現する。   As described above, according to the imaging system according to the second embodiment of the present invention, as in the first embodiment, high-precision distance measurement in a distant place is realized in a wide image area.

また、本発明の実施の形態2に係る撮像システムによれば、失敗情報データDDEに基づき、画像データI1と失敗でない箇所の距離データDISとを利用して各種画像認識を行うことにより、認識精度を向上できる。   Further, according to the imaging system according to the second embodiment of the present invention, recognition accuracy is achieved by performing various image recognition using the image data I1 and the distance data DIS of the part that has not failed based on the failure information data DDE. Can be improved.

以上、本発明に係る測距装置について、実施の形態に基づいて説明したが、本発明は、これらの実施の形態に限定されるものではない。本発明の趣旨を逸脱しない限り、当業者が思いつく各種変形を本実施の形態に施したもの、異なる実施の形態における構成要素を組み合わせて構築される形態なども、本発明の範囲内に含まれる。   Although the distance measuring apparatus according to the present invention has been described based on the embodiments, the present invention is not limited to these embodiments. Unless it deviates from the gist of the present invention, various modifications conceived by those skilled in the art have been made in the present embodiment, and forms constructed by combining components in different embodiments are also included in the scope of the present invention. .

例えば、実施の形態1に係る測距装置101は、式(22)、式(25)、及び式(28)のように視差評価値としてSADを用いたが、本発明に係る測距装置は、式(22)を下記式(35)のように変形した、二乗和(SSD:Sum of Squared Differences)を用いてもよい。なお、本発明に係る測距装置は、式(25)、式(28)の演算においても、同様に二乗和を用いてもよい。   For example, the distance measuring apparatus 101 according to the first embodiment uses SAD as the parallax evaluation value as in Expression (22), Expression (25), and Expression (28), but the distance measuring apparatus according to the present invention is The sum of squares (SSD) obtained by transforming Equation (22) into Equation (35) below may be used. Note that the distance measuring apparatus according to the present invention may use the sum of squares in the same way in the calculations of Expressions (25) and (28).

Figure 2010002280
Figure 2010002280

また、実施の形態1に係る測距装置101は、式(23)、式(26)、式(29)のように、等角フィッティングの補間式を利用することにより一画素未満の分解能の視差を求めたが、本発明に係る測距装置は、式(23)を下記式(36)のように変形した、パラボラフィッティングの補間式を用いて一画素未満の分解能の視差を求めてもよい。なお、本発明に係る測距装置は、式(26)、式(29)の演算においても、同様にパラボラフィッティングの補間式を用いてもよい。   In addition, the distance measuring apparatus 101 according to the first embodiment uses a equiangular fitting interpolation formula as shown in Expression (23), Expression (26), and Expression (29), so that the resolution is less than one pixel. However, the distance measuring apparatus according to the present invention may obtain a parallax with a resolution of less than one pixel using a parabolic fitting interpolation formula obtained by transforming the formula (23) into the following formula (36). . It should be noted that the distance measuring apparatus according to the present invention may similarly use the parabolic fitting interpolation formula in the calculations of formulas (26) and (29).

Figure 2010002280
Figure 2010002280

また、実施の形態1の係る測距装置101において、式(22)、式(25)、式(28)のように都度ブロック内の総和を演算したが、本発明に係る測距装置は、式(22)を下記式(37)のように変形し、再帰的に演算してもよい。なお、本発明に係る測距装置は、式(25)、式(28)の演算においても、同様に再帰的に演算してもよい。   Further, in the distance measuring apparatus 101 according to the first embodiment, the sum in the block is calculated each time as shown in Expression (22), Expression (25), and Expression (28), but the distance measuring apparatus according to the present invention is Expression (22) may be transformed into the following expression (37) and recursively calculated. The distance measuring apparatus according to the present invention may calculate recursively in the same way in the calculations of Expressions (25) and (28).

Figure 2010002280
Figure 2010002280

また、実施の形態1に係る測距装置101が備えるレンズアレイ113において、各レンズ部間の距離であるDxとDyは等しい。しかしながら、本発明に係る測距装置はこのようなレンズアレイを備える測距装置に限定されるわけではない。つまり、本発明に係る測距装置は、DxとDyとが異なっていてもよい。この場合、測距装置は、DxとDyとが異なることによる処理の変更が必要となる。例えば、測距装置は、中心が第4のレンズ部113dの光軸中心114dに対応する位置(光軸位置)の座標(xc4,yc4)となり、かつ、大きさがx方向の画素数がH1画素、y方向の画素数がV1画素となる領域より、x方向の負の向きに一画素だけ、正の向きにSB画素だけ、y方向の負の向きにDy/Dx画素だけ、正の向きにSB*Dy/Dx画素だけ大きい領域となるように、第4の撮像信号I4を撮像信号I0から切り出す。すなわち、測距装置は、下記式(38)及び式(39)のように、切り出した第4の撮像信号I4に対して原点の座標が座標(x04,y04)となるようにxy座標を設定する。その結果、測距装置において、第4の撮像信号I4の大きさは、下記式(40)及び式(41)のように、x方向の画素数がH4と、y方向の画素数V4となる。なお、測距装置は、式(41)において、V4を整数にするために、適宜切り上げなどの処理を行ってもよい。また、測距装置は、下記式(42)のように、ずらす方向を第1のレンズ部113aの光軸中心114aと第4のレンズ部113dの光軸中心114dとを結ぶ直線に一致させる。ここで、測距装置は、座標が小数点となる箇所のブロックについて、適宜、線形補間を用いて画像(例えば、輝度値)を求める。また、測距装置は、視差信頼度C13(i,j)が最も小さいとき、x方向の視差に合わせるために、下記式(43)のように、視差Δ13(i,j)にDx/Dyを乗じ、下記式(44)のように、視差Δ(i,j)にDy/Dxを乗じる。   In the lens array 113 provided in the distance measuring apparatus 101 according to the first embodiment, Dx and Dy, which are distances between the lens units, are equal. However, the distance measuring device according to the present invention is not limited to the distance measuring device including such a lens array. That is, in the distance measuring device according to the present invention, Dx and Dy may be different. In this case, the distance measuring device needs to be changed due to the difference between Dx and Dy. For example, the distance measuring device has coordinates (xc4, yc4) of the position (optical axis position) corresponding to the optical axis center 114d of the fourth lens unit 113d at the center, and the number of pixels in the x direction is H1. From the region where the number of pixels in the y direction is V1 pixels, only one pixel in the negative direction in the x direction, only SB pixels in the positive direction, only Dy / Dx pixels in the negative direction in the y direction, positive direction The fourth imaging signal I4 is cut out from the imaging signal I0 so as to be an area larger by SB * Dy / Dx pixels. That is, the distance measuring device sets the xy coordinates so that the coordinates of the origin are the coordinates (x04, y04) with respect to the cut out fourth imaging signal I4, as in the following formulas (38) and (39). To do. As a result, in the distance measuring device, the magnitude of the fourth imaging signal I4 is the number of pixels in the x direction as H4 and the number of pixels in the y direction as shown in the following equations (40) and (41). . Note that the distance measuring apparatus may appropriately perform processing such as rounding up in order to make V4 an integer in the equation (41). In addition, the distance measuring device matches the shifting direction with a straight line connecting the optical axis center 114a of the first lens portion 113a and the optical axis center 114d of the fourth lens portion 113d as shown in the following formula (42). Here, the distance measuring device obtains an image (for example, a luminance value) as appropriate using linear interpolation with respect to a block where the coordinates are decimal points. In addition, when the parallax reliability C13 (i, j) is the smallest, the distance measuring device sets Dx / Dy to parallax Δ13 (i, j) as shown in the following equation (43) in order to match the parallax in the x direction. And the parallax Δ (i, j) is multiplied by Dy / Dx as shown in the following formula (44).

Figure 2010002280
Figure 2010002280

また、実施の形態1に係る測距装置101において、レンズアレイ113は略円形に成型されているが、本発明に係る測距装置は、このようなレンズアレイを備える測距装置に限定されない。図16A及び図16Bは、実施の形態1の変形例に係る測距装置のレンズアレイの構成を示す平面図である。図16Aに示すレンズアレイ301のように、本発明に係る測距装置が備えるレンズアレイは長方形状に成型されてもよい。さらに、図16Bに示すレンズアレイ302のように、本発明に係る測距装置が備えるレンズアレイは、その端面等に平面方向に伸びる突起等が設けられていてもよい。このように、レンズアレイが略円形でなくても、レンズ部はほぼ等方に膨張するため、変形例に係る測距装置は、実施の形態1の測距装置101と同様の効果を得ることができる。   In the distance measuring apparatus 101 according to the first embodiment, the lens array 113 is formed in a substantially circular shape. However, the distance measuring apparatus according to the present invention is not limited to the distance measuring apparatus including such a lens array. 16A and 16B are plan views showing the configuration of the lens array of the distance measuring apparatus according to the modification of the first embodiment. Like the lens array 301 shown in FIG. 16A, the lens array included in the distance measuring apparatus according to the present invention may be molded into a rectangular shape. Furthermore, as in the lens array 302 shown in FIG. 16B, the lens array provided in the distance measuring apparatus according to the present invention may be provided with a protrusion or the like extending in the planar direction on the end face thereof. As described above, even if the lens array is not substantially circular, the lens unit expands almost isotropically, and thus the distance measuring device according to the modification can obtain the same effect as the distance measuring device 101 of the first embodiment. Can do.

また、実施の形態1に係る測距装置101において、レンズアレイ113は4つのレンズ部を有していたが、本発明に係る測距装置は、このようなレンズアレイを備える測距装置に限定されない。本発明に係る測距装置において、レンズアレイが有するレンズ部の数が異なっていてもよい。図17A及び図17Bは、実施の形態1の変形例に係る測距装置のレンズアレイの構成を示す平面図である。図17Aに示すレンズアレイ303のように、本発明に係る測距装置は、2つのレンズ部を持つものでもよい。また、図17Bに示すレンズアレイ304のように、本発明に係る測距装置は、9つのレンズ部を持つものでもよい。   In the distance measuring apparatus 101 according to the first embodiment, the lens array 113 includes four lens units. However, the distance measuring apparatus according to the present invention is limited to the distance measuring apparatus including such a lens array. Not. In the distance measuring apparatus according to the present invention, the number of lens portions included in the lens array may be different. 17A and 17B are plan views showing the configuration of the lens array of the distance measuring apparatus according to the modification of the first embodiment. Like the lens array 303 shown in FIG. 17A, the distance measuring device according to the present invention may have two lens portions. Further, like the lens array 304 shown in FIG. 17B, the distance measuring device according to the present invention may have nine lens portions.

さらに、本発明は、このような撮像装置或いは測距装置の特徴的な構成部が行う処理を実行する視差算出方法及び測距方法として実現したり、それらの方法をコンピュータに実行させるプログラムとして実現したりすることもできる。そして、そのようなプログラムは、CD−ROM等の記録媒体やインターネット等の伝送媒体を介して配信することができるのは言うまでもない。   Furthermore, the present invention is realized as a parallax calculation method and a distance measurement method for executing processing performed by the characteristic components of such an imaging device or a distance measurement device, or as a program for causing a computer to execute these methods. You can also do it. Needless to say, such a program can be distributed via a recording medium such as a CD-ROM or a transmission medium such as the Internet.

本発明に係る撮像装置及び測距装置は、微小な視差を高精度に算出するとともに、回路規模の増大を抑制した小型の撮像装置及び測距装置であるため、カメラ機能を備えた携帯型電話機、デジタルスチルカメラ、車載用カメラ、監視用カメラ、三次元計測器、及び立体画像入力カメラ等に有用である。   Since the imaging device and the distance measuring device according to the present invention are a small imaging device and a distance measuring device that calculate a minute parallax with high accuracy and suppress an increase in circuit scale, a mobile phone having a camera function It is useful for digital still cameras, in-vehicle cameras, surveillance cameras, three-dimensional measuring instruments, stereoscopic image input cameras, and the like.

本発明の実施の形態1に係る測距装置の構成を示す断面図である。It is sectional drawing which shows the structure of the distance measuring device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る測距装置のレンズアレイの構成を示す平面図である。It is a top view which shows the structure of the lens array of the distance measuring device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る測距装置の回路部の構成を示す平面図である。It is a top view which shows the structure of the circuit part of the ranging apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る測距装置の撮像素子の構成を示す平面図である。It is a top view which shows the structure of the image pick-up element of the distance measuring device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る測距装置において、無限遠にある物体を撮像したときの物体像の視差を説明するための図である。It is a figure for demonstrating the parallax of an object image when the object at infinite distance is imaged in the distance measuring device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る測距装置において、有限距離の位置にある物体を撮像したときの物体像の視差を説明するための図である。It is a figure for demonstrating the parallax of an object image when the object located in the position of a finite distance is imaged in the distance measuring device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る測距装置の構成を示すブロック図である。It is a block diagram which shows the structure of the ranging apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る測距装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the ranging apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る測距装置の撮像信号の切り出し位置を説明するための図である。It is a figure for demonstrating the cutout position of the imaging signal of the distance measuring device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る測距装置の距離演算の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the distance calculation of the distance measuring device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る測距装置において、ブロックを説明するための図である。It is a figure for demonstrating a block in the distance measuring device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る測距装置において、第1の撮像信号と第2の撮像信号を利用したときの視差演算における視差評価値の演算領域を説明するための図である。FIG. 6 is a diagram for describing a calculation area of a parallax evaluation value in a parallax calculation when the first imaging signal and the second imaging signal are used in the distance measuring device according to the first embodiment of the present invention. 本発明の実施の形態1に係る測距装置の第1の撮像信号と第2の撮像信号を利用したときの視差演算におけるずらし量と視差評価値との関係を説明するための図である。It is a figure for demonstrating the relationship between the shift amount and parallax evaluation value in a parallax calculation when the 1st imaging signal and 2nd imaging signal of the ranging apparatus which concern on Embodiment 1 of this invention are utilized. (a)〜(d)実施の形態1に係る測距装置による効果を説明するための図である。(A)-(d) It is a figure for demonstrating the effect by the ranging device which concerns on Embodiment 1. FIG. 本発明の実施の形態2に係る撮像システムの構成を示すブロック図である。It is a block diagram which shows the structure of the imaging system which concerns on Embodiment 2 of this invention. 実施の形態1の変形例に係る測距装置のレンズアレイの構成を示す平面図である。FIG. 6 is a plan view showing a configuration of a lens array of a distance measuring apparatus according to a modification of the first embodiment. 実施の形態1の変形例に係る測距装置のレンズアレイの構成を示す平面図である。FIG. 6 is a plan view showing a configuration of a lens array of a distance measuring apparatus according to a modification of the first embodiment. 実施の形態1の変形例に係る測距装置のレンズアレイの構成を示す平面図である。FIG. 6 is a plan view showing a configuration of a lens array of a distance measuring apparatus according to a modification of the first embodiment. 実施の形態1の変形例に係る測距装置のレンズアレイの構成を示す平面図である。FIG. 6 is a plan view showing a configuration of a lens array of a distance measuring apparatus according to a modification of the first embodiment.

符号の説明Explanation of symbols

101 測距装置
110 レンズモジュール部
111 鏡筒
112 カバーガラス
113 レンズアレイ
120 回路部
121 基板
122 パッケージ
123 撮像素子
124 パッケージカバーガラス
125 SLSI
127 金線
131 システム制御部
132 撮像素子駆動部
133 撮像信号入力部
134 入出力部
141 画像切出部
142 視差演算部
143 視差補正部
144 失敗検知部
145 距離演算部
202 撮像システム
203 撮像システム制御部
204 画像認識部
DESCRIPTION OF SYMBOLS 101 Distance measuring device 110 Lens module part 111 Lens tube 112 Cover glass 113 Lens array 120 Circuit part 121 Board | substrate 122 Package 123 Image pick-up element 124 Package cover glass 125 SLSI
127 Gold wire 131 System control unit 132 Image sensor drive unit 133 Imaging signal input unit 134 Input / output unit 141 Image cutout unit 142 Parallax calculation unit 143 Parallax correction unit 144 Failure detection unit 145 Distance calculation unit 202 Imaging system 203 Imaging system control unit 204 Image recognition unit

Claims (8)

レンズと前記レンズに対応する撮像領域とを有する、基準撮像系と一つ以上の参照撮像系とを備え、同一の被写体を撮像したときの前記基準撮像系と前記参照撮像系との間に生じる視差を算出する撮像装置であって、
前記基準撮像系及び前記参照撮像系により生成された基準画像及び参照画像において、前記基準撮像系及び前記参照撮像系がそれぞれ有する前記レンズの光軸中心に対応する位置である光軸位置をそれぞれ取得する光軸位置取得手段と、
前記基準撮像系及び前記参照撮像系がそれぞれ有する前記レンズの光軸中心を互いに結ぶ直線の方向である基線方向のうち前記基準撮像系が有するレンズの光軸中心に近づく向きへ前記参照画像の光軸位置から所定画素数移動した位置と、前記基準画像の光軸位置とが、同一の座標値となるように前記基準画像及び前記参照画像の平面座標を設定する座標設定手段と、
前記座標設定手段により設定された座標に基づいて、前記基準画像の一部領域と前記参照画像の一部領域との画像の類似度合いを表す評価値を算出し、算出された評価値から仮視差を算出する仮視差演算手段と、
前記仮視差演算手段により算出された仮視差から前記所定画素数を減算することにより、前記基準撮像系と前記参照撮像系との間に生じる視差を算出する視差算出手段とを備える
撮像装置。
A standard imaging system and one or more reference imaging systems, each having a lens and an imaging area corresponding to the lens, are generated between the standard imaging system and the reference imaging system when imaging the same subject. An imaging device for calculating parallax,
In the standard image and the reference image generated by the standard imaging system and the reference imaging system, the optical axis position that is a position corresponding to the optical axis center of the lens respectively included in the standard imaging system and the reference imaging system is acquired. Optical axis position acquisition means for
The light of the reference image in a direction approaching the optical axis center of the lens of the reference imaging system among the base line directions that are directions of straight lines connecting the optical axis centers of the lenses of the standard imaging system and the reference imaging system. Coordinate setting means for setting the plane coordinates of the reference image and the reference image so that the position moved by a predetermined number of pixels from the axis position and the optical axis position of the reference image have the same coordinate value;
Based on the coordinates set by the coordinate setting means, an evaluation value representing the degree of similarity between the partial area of the reference image and the partial area of the reference image is calculated, and temporary disparity is calculated from the calculated evaluation value. Temporary parallax calculation means for calculating
An imaging apparatus comprising: a parallax calculating unit that calculates a parallax generated between the reference imaging system and the reference imaging system by subtracting the predetermined number of pixels from the temporary parallax calculated by the temporary parallax calculating unit.
前記仮視差演算手段は、
前記基準画像の一部の領域である基準ブロックを選択する基準ブロック選択手段と、
前記基準ブロックを示す座標値と同一の座標値で示される前記参照画像の一部の領域から、前記基線方向のうち前記基準撮像系の有するレンズの光軸中心から遠ざかる方へ、所定のずらし量ごとにずらしていった領域を参照ブロックとして選択し、選択した参照ブロックごとに前記基準ブロックとの前記評価値を算出する評価値算出手段と、
算出された前記評価値のうち複数の評価値に基づく補間式を用いて、類似度合いが最大となるずらし量を前記仮視差として算出する仮視差算出手段とを有する
請求項1に記載の撮像装置。
The temporary parallax calculation means includes
A reference block selecting means for selecting a reference block which is a partial area of the reference image;
A predetermined shift amount from a partial area of the reference image indicated by the same coordinate value as the coordinate value indicating the reference block to a direction away from the optical axis center of the lens of the reference imaging system in the baseline direction An evaluation value calculating means for selecting an area shifted every time as a reference block, and calculating the evaluation value of the reference block for each selected reference block;
The imaging apparatus according to claim 1, further comprising: a temporary parallax calculation unit that calculates, as the temporary parallax, a shift amount that maximizes the degree of similarity using an interpolation formula based on a plurality of evaluation values among the calculated evaluation values. .
前記座標設定手段は、前記基線方向のうち前記基準撮像系が有するレンズの光軸中心に近づく向きへ、前記参照画像の光軸位置から一画素移動した位置と、前記基準画像の光軸位置とが、同一の座標値となるように、前記平面座標を設定する
請求項2に記載の撮像装置。
The coordinate setting means includes a position moved by one pixel from the optical axis position of the reference image in a direction closer to the optical axis center of the lens of the reference imaging system in the baseline direction, and an optical axis position of the reference image. The imaging apparatus according to claim 2, wherein the planar coordinates are set so that the two have the same coordinate value.
前記参照画像は、前記基準画像と比べて、前記基線方向のうち前記基準撮像系の有するレンズの光軸中心に近づく向きへ、前記所定画素数だけ大きな画像である
請求項1に記載の撮像装置。
The imaging apparatus according to claim 1, wherein the reference image is an image that is larger by the predetermined number of pixels toward the direction closer to the optical axis center of the lens of the standard imaging system in the baseline direction than the reference image. .
前記撮像装置は、さらに、
前記視差算出手段により算出された視差が負数であるか否かを判定する視差判定手段と、
前記視差判定手段により負数であると判定された場合、視差演算が失敗したことを示す失敗情報を出力する失敗情報出力手段とを備える
請求項1に記載の撮像装置。
The imaging device further includes:
Parallax determination means for determining whether or not the parallax calculated by the parallax calculation means is a negative number;
The imaging apparatus according to claim 1, further comprising failure information output means for outputting failure information indicating that the parallax calculation has failed when the parallax determination means determines that the number is negative.
レンズと前記レンズに対応する撮像領域とを有する、基準撮像系と一つ以上の参照撮像系とを備え、同一の被写体を撮像したときの前記基準撮像系と前記参照撮像系との間に生じる視差に基づいて、前記被写体までの距離を算出する測距装置であって、
前記基準撮像系及び前記参照撮像系により生成された基準画像及び参照画像において、前記基準撮像系及び前記参照撮像系がそれぞれ有する前記レンズの光軸中心に対応する位置である光軸位置をそれぞれ取得する光軸位置取得手段と、
前記基準撮像系及び前記参照撮像系がそれぞれ有する前記レンズの光軸中心を互いに結ぶ直線の方向である基線方向のうち前記基準撮像系が有するレンズの光軸中心に近づく向きへ前記参照画像の光軸位置から所定画素数移動した位置と、前記基準画像の光軸位置とが、同一の座標値となるように前記基準画像及び前記参照画像の平面座標を設定する座標設定手段と、
前記座標設定手段により設定された座標に基づいて、前記基準画像の一部領域と前記参照画像の一部領域との画像の類似度合いを表す評価値を算出し、算出された評価値から仮視差を算出する仮視差演算手段と、
前記仮視差演算手段により算出された仮視差から前記所定画素数を減算することにより、前記基準撮像系と前記参照撮像系との間に生じる視差を算出する視差算出手段と、
前記視差算出手段により算出された視差を用いて、前記被写体までの距離を算出する距離算出手段とを備える
測距装置。
A standard imaging system and one or more reference imaging systems, each having a lens and an imaging area corresponding to the lens, are generated between the standard imaging system and the reference imaging system when imaging the same subject. A distance measuring device that calculates a distance to the subject based on parallax,
In the standard image and the reference image generated by the standard imaging system and the reference imaging system, the optical axis position that is a position corresponding to the optical axis center of the lens respectively included in the standard imaging system and the reference imaging system is acquired. Optical axis position acquisition means for
The light of the reference image in a direction approaching the optical axis center of the lens of the reference imaging system among the base line directions that are directions of straight lines connecting the optical axis centers of the lenses of the standard imaging system and the reference imaging system. Coordinate setting means for setting the plane coordinates of the reference image and the reference image so that the position moved by a predetermined number of pixels from the axis position and the optical axis position of the reference image have the same coordinate value;
Based on the coordinates set by the coordinate setting means, an evaluation value representing the degree of similarity between the partial area of the reference image and the partial area of the reference image is calculated, and temporary disparity is calculated from the calculated evaluation value. Temporary parallax calculation means for calculating
Parallax calculating means for calculating a parallax generated between the reference imaging system and the reference imaging system by subtracting the predetermined number of pixels from the temporary parallax calculated by the temporary parallax calculating means;
A distance measuring device comprising: distance calculating means for calculating a distance to the subject using the parallax calculated by the parallax calculating means.
レンズと前記レンズに対応する撮像領域とを有する、基準撮像系と一つ以上の参照撮像系とを備える撮像装置において同一の被写体を撮像したときの、前記基準撮像系と前記参照撮像系との間に生じる視差を算出する視差算出方法であって、
前記基準撮像系及び前記参照撮像系により生成された基準画像及び参照画像において、前記基準撮像系及び前記参照撮像系がそれぞれ有する前記レンズの光軸中心に対応する位置である光軸位置をそれぞれ取得する光軸位置取得ステップと、
前記基準撮像系及び前記参照撮像系がそれぞれ有する前記レンズの光軸中心を互いに結ぶ直線の方向である基線方向のうち前記基準撮像系が有するレンズの光軸中心に近づく向きへ前記参照画像の光軸位置から所定画素数移動した位置と、前記基準画像の光軸位置とが、同一の座標値となるように前記基準画像及び前記参照画像の平面座標を設定する座標設定ステップと、
前記座標設定ステップにおいて設定された座標に基づいて、前記基準画像の一部領域と前記参照画像の一部領域との画像の類似度合いを表す評価値を算出し、算出された評価値から仮視差を算出する仮視差演算ステップと、
前記仮視差演算ステップにおいて算出された仮視差から前記所定画素数を減算することにより、前記基準撮像系と前記参照撮像系との間に生じる視差を算出する視差算出ステップとを含む
視差算出方法。
When the same subject is imaged in an imaging device having a lens and an imaging region corresponding to the lens and including a standard imaging system and one or more reference imaging systems, the standard imaging system and the reference imaging system A parallax calculation method for calculating a parallax that occurs in between,
In the standard image and the reference image generated by the standard imaging system and the reference imaging system, the optical axis position that is a position corresponding to the optical axis center of the lens respectively included in the standard imaging system and the reference imaging system is acquired. An optical axis position acquisition step to perform,
The light of the reference image in a direction approaching the optical axis center of the lens of the reference imaging system among the base line directions that are directions of straight lines connecting the optical axis centers of the lenses of the standard imaging system and the reference imaging system. A coordinate setting step of setting the plane coordinates of the reference image and the reference image so that the position moved by a predetermined number of pixels from the axis position and the optical axis position of the reference image have the same coordinate value;
Based on the coordinates set in the coordinate setting step, an evaluation value representing the degree of similarity between the partial area of the reference image and the partial area of the reference image is calculated, and temporary parallax is calculated from the calculated evaluation value. A temporary parallax calculation step for calculating
A parallax calculation method including a parallax calculation step of calculating a parallax generated between the reference imaging system and the reference imaging system by subtracting the predetermined number of pixels from the temporary parallax calculated in the temporary parallax calculation step.
レンズと前記レンズに対応する撮像領域とを有する、基準撮像系と一つ以上の参照撮像系とを備える撮像装置において同一の被写体を撮像したときの、前記基準撮像系と前記参照撮像系との間に生じる視差を算出するプログラムであって、
前記基準撮像系及び前記参照撮像系により生成された基準画像及び参照画像において、前記基準撮像系及び前記参照撮像系がそれぞれ有する前記レンズの光軸中心に対応する位置である光軸位置をそれぞれ取得する光軸位置取得ステップと、
前記基準撮像系及び前記参照撮像系がそれぞれ有する前記レンズの光軸中心を互いに結ぶ直線の方向である基線方向のうち前記基準撮像系が有するレンズの光軸中心に近づく向きへ前記参照画像の光軸位置から所定画素数移動した位置と、前記基準画像の光軸位置とが、同一の座標値となるように前記基準画像及び前記参照画像の平面座標を設定する座標設定ステップと、
前記座標設定ステップにおいて設定された座標に基づいて、前記基準画像の一部領域と前記参照画像の一部領域との画像の類似度合いを表す評価値を算出し、算出された評価値から仮視差を算出する仮視差演算ステップと、
前記仮視差演算ステップにおいて算出された仮視差から前記所定画素数を減算することにより、前記基準撮像系と前記参照撮像系との間に生じる視差を算出する視差算出ステップとをコンピュータに実行させる
プログラム。
When the same subject is imaged in an imaging device having a lens and an imaging region corresponding to the lens, the imaging device including a standard imaging system and one or more reference imaging systems, the standard imaging system and the reference imaging system A program for calculating parallax between
In the standard image and the reference image generated by the standard imaging system and the reference imaging system, the optical axis position that is a position corresponding to the optical axis center of the lens respectively included in the standard imaging system and the reference imaging system is acquired. An optical axis position acquisition step to perform,
The light of the reference image in a direction approaching the optical axis center of the lens of the reference imaging system among the base line directions that are directions of straight lines connecting the optical axis centers of the lenses of the standard imaging system and the reference imaging system. A coordinate setting step for setting the plane coordinates of the reference image and the reference image so that the position moved by a predetermined number of pixels from the axis position and the optical axis position of the reference image have the same coordinate value;
Based on the coordinates set in the coordinate setting step, an evaluation value representing the degree of similarity between the partial area of the reference image and the partial area of the reference image is calculated, and temporary parallax is calculated from the calculated evaluation value. A temporary parallax calculation step for calculating
A program for causing a computer to execute a parallax calculation step of calculating a parallax generated between the reference imaging system and the reference imaging system by subtracting the predetermined number of pixels from the temporary parallax calculated in the temporary parallax calculation step .
JP2008160941A 2008-06-19 2008-06-19 Imaging device, distance measuring device, and parallax calculating method Pending JP2010002280A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008160941A JP2010002280A (en) 2008-06-19 2008-06-19 Imaging device, distance measuring device, and parallax calculating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008160941A JP2010002280A (en) 2008-06-19 2008-06-19 Imaging device, distance measuring device, and parallax calculating method

Publications (1)

Publication Number Publication Date
JP2010002280A true JP2010002280A (en) 2010-01-07

Family

ID=41584131

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008160941A Pending JP2010002280A (en) 2008-06-19 2008-06-19 Imaging device, distance measuring device, and parallax calculating method

Country Status (1)

Country Link
JP (1) JP2010002280A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017067636A (en) * 2015-09-30 2017-04-06 キヤノン株式会社 Imaging apparatus
JP2018200722A (en) * 2018-08-29 2018-12-20 キヤノン株式会社 Image processing apparatus and control method therefor, program, and recording medium
CN112447537A (en) * 2019-09-03 2021-03-05 德律科技股份有限公司 Detection system and detection method
WO2022163216A1 (en) * 2021-01-27 2022-08-04 ソニーグループ株式会社 Moving body, information processing method, and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017067636A (en) * 2015-09-30 2017-04-06 キヤノン株式会社 Imaging apparatus
JP2018200722A (en) * 2018-08-29 2018-12-20 キヤノン株式会社 Image processing apparatus and control method therefor, program, and recording medium
CN112447537A (en) * 2019-09-03 2021-03-05 德律科技股份有限公司 Detection system and detection method
CN112447537B (en) * 2019-09-03 2024-04-12 德律科技股份有限公司 Detection system and detection method
WO2022163216A1 (en) * 2021-01-27 2022-08-04 ソニーグループ株式会社 Moving body, information processing method, and program

Similar Documents

Publication Publication Date Title
JP4510930B2 (en) Imaging device and semiconductor circuit element
US11652975B2 (en) Field calibration of stereo cameras with a projector
JP4264464B2 (en) Imaging device and semiconductor circuit element
US8405820B2 (en) Ranging device and ranging module and image-capturing device using the ranging device or the ranging module
JP6427900B2 (en) Calibration method, calibration system, program, and moving object
US9880055B2 (en) Spectroscopic imaging apparatus and spectroscopic imaging method
US8212912B2 (en) Imaging device, imaging system, and imaging method
KR102382871B1 (en) Electronic Device for controlling lens focus and the controlling Method thereof
US20140118516A1 (en) Solid state imaging module, solid state imaging device, and information processing device
KR20200100498A (en) An electronic device and method of controlling auto focusing thereof
WO2012147495A1 (en) Information acquisition device and object detection device
US12069394B2 (en) Depth map determination method and electronic device to which same method is applied
KR20180076307A (en) Method for Calibrating Driving Amount of Actuator Configured to Correct Blurring of Image Taken by Camera
JP2010002280A (en) Imaging device, distance measuring device, and parallax calculating method
KR20210071253A (en) Camera movement controlling method and apparatus
JP2019074535A (en) Calibration method, calibration device and program
JP5857712B2 (en) Stereo image generation apparatus, stereo image generation method, and computer program for stereo image generation
JP2011147079A (en) Image pickup device
JP6628678B2 (en) Distance measuring device, imaging device, and distance measuring method
JP7275941B2 (en) 3D information acquisition device and 3D information acquisition method
KR102606835B1 (en) Electronic device for generating depth map and method thereof
JP6680335B2 (en) Stereo camera, vehicle, calculation method and program
KR102551261B1 (en) Method for generating depth information by using structured light pattern projected to external object and Electronic device using the same
JP2020165968A (en) Calibration method, calibration device, and program
KR20200036264A (en) Method and electronic device for auto focusing