JP7532238B2 - GENERATION APPARATUS, GENERATION METHOD, AND PROGRAM - Google Patents
GENERATION APPARATUS, GENERATION METHOD, AND PROGRAM Download PDFInfo
- Publication number
- JP7532238B2 JP7532238B2 JP2020209189A JP2020209189A JP7532238B2 JP 7532238 B2 JP7532238 B2 JP 7532238B2 JP 2020209189 A JP2020209189 A JP 2020209189A JP 2020209189 A JP2020209189 A JP 2020209189A JP 7532238 B2 JP7532238 B2 JP 7532238B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- reliability
- distance
- distortion
- correction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Measurement Of Optical Distance (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Description
本発明は、被写体までの距離を算出する測距技術に関する。 The present invention relates to distance measurement technology that calculates the distance to a subject.
近年、自動運転やFA(Factory Automation)等、様々な用途で測距技術が使われており、様々な測距技術が存在する。測距技術として、例えばステレオカメラによる撮像画像を利用する技術がある。この方式では、ステレオカメラを使用して被写体を複数の撮像装置によって異なる方向から同時に撮像し、得られた複数の撮像画像の視差に基づいて被写体までの距離情報を算出する(特許文献1)。 In recent years, distance measurement technology has come to be used for a variety of purposes, such as autonomous driving and factory automation (FA), and there are a variety of distance measurement technologies. For example, one distance measurement technology uses images captured by a stereo camera. In this method, a stereo camera is used to simultaneously capture images of a subject from different directions using multiple image capture devices, and distance information to the subject is calculated based on the parallax of the multiple captured images (Patent Document 1).
また別の測距技術として、1つの撮像素子の一部または全部の画素に測距機能を有する画素(測距画素)を配置し、位相差方式を用いて被写体までの距離を算出する技術がある(特許文献2)。この方式では、1つの測距画素に対して複数のフォトダイオードを配置し、それぞれ別々の撮像画像(それぞれA画像、B画像と呼ぶ)を生成し、撮像画像の位置ズレ量に基づいて被写体までの距離を算出する。 Another distance measurement technology is one in which pixels with distance measurement capabilities (distance measurement pixels) are arranged in some or all of the pixels of an image sensor, and the distance to the subject is calculated using a phase difference method (Patent Document 2). In this method, multiple photodiodes are arranged for one distance measurement pixel, and separate captured images (referred to as image A and image B, respectively) are generated, and the distance to the subject is calculated based on the amount of positional deviation of the captured images.
また、撮像素子を使用しない測距方法もある。例えばTOF(Time Of Flight)方式では、被写体に対して光を照射し、光が反射して返ってくるまでの時間を検出することで被写体までの距離を測定する。 There are also distance measurement methods that do not use image sensors. For example, the Time Of Flight (TOF) method measures the distance to a subject by shining light on the subject and detecting the time it takes for the light to reflect back.
これら測距技術を使った測距装置では、光学的要因に伴う歪みが発生する。例えば撮像素子を使用した測距装置においては、レンズの歪曲収差によって撮像画像に歪みが発生し、その歪みを含む撮像画像を基に距離を算出して距離画像を生成すると、距離画像にも歪みが生じてしまう。そのため、撮像画像に対して歪み補正を施し、歪み補正後の画像を基に距離画像を生成するか、もしくは生成した距離画像に対して歪み補正を施すのが一般的である。 Distance measuring devices using these distance measuring technologies suffer from distortion due to optical factors. For example, in distance measuring devices that use an image sensor, lens distortion aberration causes distortion in the captured image, and if a distance image is generated by calculating the distance based on the captured image containing this distortion, the distance image will also be distorted. For this reason, it is common to either perform distortion correction on the captured image and generate a distance image based on the image after distortion correction, or to perform distortion correction on the generated distance image.
歪み補正には様々な方法があるが、いずれの方法でも補正後画像の各画素に対応する補正前画像の画素やその周囲の画素値を参照する必要がある。 There are various methods for distortion correction, but all of them require referencing the pixel values of the pre-correction image that correspond to each pixel in the post-correction image, as well as the surrounding pixels.
しかしながら、歪み補正のために補正前画像の画素値をメモリから読み出す際のメモリ帯域は、精度の高い補正方法ほど増大するため、高精度の距離情報を算出しようとすると必要とするメモリ帯域が増大し、メモリ帯域不足を引き起こすという課題がある。 However, the more accurate the correction method, the greater the memory bandwidth required to read pixel values of the pre-correction image from memory for distortion correction. This means that calculating highly accurate distance information requires a larger memory bandwidth, which can lead to memory bandwidth shortages.
本発明は、被写体までの距離を表す距離画像を生成する生成装置であって、視差を有する一対の撮像画像に基づき距離画像を生成する生成手段と、距離画像のうち、信頼度が所定の閾値以上である領域について、一対の撮像画像を生成した撮像手段の光学系に起因する距離画像における歪みを補正する補正手段と、を備えることを特徴とする。 The present invention is a generating device that generates a distance image that represents the distance to a subject, and is characterized by comprising: a generating means that generates the distance image based on a pair of captured images having parallax; and a correcting means that corrects distortion in the distance image caused by the optical system of the imaging means that generated the pair of captured images for areas of the distance image where the reliability is equal to or greater than a predetermined threshold value.
本発明は、距離情報を算出するために必要とするメモリ帯域を削減することができる。 The present invention can reduce the memory bandwidth required to calculate distance information.
以下では図面を使って本発明の測距装置の実施形態を説明する。以下の実施形態では測距方法として、1つの測距画素に対して複数のフォトダイオードを配置し、位相差方式を用い距離を算出する方法とステレオカメラを使った方法を例に説明するが、本発明を適用可能な測距方法は上記に限定されるものではない。TOFといった光学系に起因する歪みが発生する測距装置全てに適用可能である。また本実施形態では、撮像画像や距離画像の格納先をDRAM(Dynamic Random Access Memory)としたがその他のメモリであってもよい。その場合は、後述する各歪み補正で必要となるメモリ帯域の情報として、距離画像の格納先メモリに対応した帯域情報を与える必要がある。 Below, an embodiment of the distance measuring device of the present invention will be described with reference to the drawings. In the following embodiments, distance measuring methods will be described using a method in which multiple photodiodes are arranged for one distance measuring pixel and a method in which distance is calculated using a phase difference method and a method in which a stereo camera is used, but the distance measuring methods to which the present invention can be applied are not limited to the above. The present invention can be applied to all distance measuring devices in which distortion due to an optical system such as TOF occurs. In addition, in this embodiment, the captured image and distance image are stored in a DRAM (Dynamic Random Access Memory), but other memories may also be used. In that case, it is necessary to provide bandwidth information corresponding to the memory in which the distance image is stored as information on the memory bandwidth required for each distortion correction described later.
(実施形態1)
本発明の実施形態1に係る測距装置について説明する。実施形態1では、1つの測距画素に対して数μmの間隔で複数のフォトダイオードが配置され、少なくとも1つの共通する光学系を備えた撮像装置により生成された視差を有する一対の撮像画像に対して、位相差方式を用いて距離を算出する方法を適用する。このように1つの光学系から2つの対をなす撮像画像を取得する場合には、2つの撮像画像の歪み量は近くなるため、先に2つの撮像画像から距離画像を生成した後に歪み補正をする構成が好適である。こうすることで、歪み補正を1つの距離画像に対してだけ行えばよいため、一対の撮像画像に対してそれぞれ歪み補正を行う場合に比べ、歪み補正に伴う画素値の読み出しのためのDRAMのアクセス帯域(DRAM帯域)を減らすことができる。
(Embodiment 1)
A distance measuring device according to a first embodiment of the present invention will be described. In the first embodiment, a method is applied in which a plurality of photodiodes are arranged at intervals of several μm for one distance measuring pixel, and a method of calculating distance using a phase difference method is applied to a pair of captured images having parallax generated by an imaging device having at least one common optical system. When two pairs of captured images are obtained from one optical system in this way, the distortion amounts of the two captured images are close to each other, so it is preferable to first generate a distance image from the two captured images and then perform distortion correction. In this way, it is only necessary to perform distortion correction on one distance image, so that the access bandwidth (DRAM bandwidth) of the DRAM for reading pixel values associated with distortion correction can be reduced compared to the case where distortion correction is performed on each of a pair of captured images.
図1は、実施形態1に係る測距装置のハードウェア構成図である。100は本実施形態の測距装置であり、歪み補正を施した被写体の距離画像を生成する。101は撮像部であり、被写体を撮像して画像データを生成する。102は距離画像生成部であり、撮像部101から画像データを受け取って距離画像を生成する。
Figure 1 is a hardware configuration diagram of a distance measuring device according to the first embodiment.
次に撮像部101の内部構成を説明する。103はレンズであり、被写体から反射された光を集めて撮像素子104へ導き、撮像面上に像を形成する。104は撮像素子であり、CMOSセンサやCCDセンサといったイメージセンサである。撮像素子104はレンズ103を通して受け取った光を電気信号に変換する。105は画像送信部であり、撮像素子104によって生成された電気信号を画像データとして距離画像生成部102へ送信する。
Next, the internal configuration of the
次に距離画像生成部102の内部構成を説明する。106は画像受信部であり、撮像部101から送信された画像データを受信する。107は画像補正部であり距離画像を生成する前処理として、画像受信部106が受信した画像データに対して必要な補正処理を行うが、このとき撮像部101の光学系に起因する画像データにおける歪みを補正する歪み補正は含まれない。108は視差算出部であり、画像補正部107によって補正された補正後画像の画素ごとに視差を算出する。109は距離算出部であり、視差算出部108が算出した視差データを距離画像に変換する。110はDRAMであり、本実施形態では距離算出部109で生成された距離画像を格納する。ここで距離算出部109により生成され、DRAM110に格納される距離画像は、本実施形態では歪み補正前の距離画像である。また、DRAM110には、歪み補正において補正後画像における各画素に対応する補正前画像の座標値の情報(以下座標変換マップ情報)が予め格納されているものとする。111は信頼度算出部であり、画像補正部107によって補正された補正後画像における任意の画素単位毎に信頼度を算出する。図1では、信頼度算出部111がDRAM110を介して画像データを取得する構成としたが、DRAM110を介さず画像補正部107から直接画像データを取得する構成としてもよい。112はSRAMであり、本実施形態では1画素毎に算出された信頼度を格納する。信頼度は1画素毎でなく複数画素毎に算出してもよいし、信頼度の格納先は必ずしもSRAMである必要はなくその他のメモリであってもよい。113はメモリアクセス処理内容選択部であり、本実施形態では、信頼度算出部111で算出した信頼度と、予め設定されている各歪み補正方法で必要なメモリアクセス帯域に基づいて、歪み補正方法を選択する。本実施形態では、DRAM帯域に基づいて選択する。114は歪み補正要否判定部であり、歪み補正後画像の各画素に対応する補正前画像の画素の信頼度に応じて、歪み補正をするか否かを判定する。このとき予めDRAM110に格納された座標変換マップを参照して、歪み補正後画像の各画素に対応する補正前画像の画素の座標値を取得する。115は歪み補正部であり、歪み補正要否判定部114で歪み補正が必要と判断された画素の歪み補正を、メモリアクセス処理内容選択部113で選択された方法で実施し、補正後の画素値を出力する。116はマスク部であり、歪み補正要否判定部114で歪み補正が不要と判断された歪み補正後画像の画素に予め定められた値を設定して出力する。
Next, the internal configuration of the distance
次に、各部の詳細な説明をフローチャートに沿って説明する。図2は、本実施形態の測距装置100における距離画像生成部102の処理の流れを示すフローチャートである。なお距離画像生成部102は、情報処理装置により実現することができ、DRAM110、SRAM112以外の構成は、プログラムを1つ以上のプロセッサーがプログラムを実行することにより実現可能である。後述する他の実施形態の距離画像生成部も同様である。
Next, each part will be described in detail with reference to a flowchart. FIG. 2 is a flowchart showing the processing flow of the distance
S201では、画像受信部106によって、撮像部101から画像データを受け取る。本実施形態では図3(a)のような画像を受け取ったとする。
In S201, the
S202では、画像補正部107により、受け取った画像に対して歪み補正以外の必要な補正処理を行う。補正処理の例としては、センサにキズがある場合のキズ補正や、レンズの中心から離れるにしたがって明るさが低下することで発生する輝度ムラを補正するシェーディング補正などがある。但し、ここで行う補正としては上記に限定されるものではない。
In S202, the
S203では、視差算出部108により、S202で補正した画像の画素ごとに視差を算出する。ここではテンプレートマッチングと呼ばれる視差算出方法について説明する。撮像部101が1つの画素内に複数のフォトダイオードを備えた撮像素子104を有するものとし、1つの画素内の複数のフォトダイオードから得られる撮像画像(A像、B像)の片方を基準画像とし、もう一方を参照画像とする。そして、基準画像内に着目点を中心とする任意の大きさの領域(照合領域と呼ぶ)を設定し、照合領域の画像を参照画像内で順次移動させながら参照画像内で一番類似度の高い領域を特定する。基準画像における照合領域の着目点と、参照画像内で照合領域との類似度が最も高い領域の中心点との距離を視差として算出する。ここで、照合領域の大きさや参照画像内での照合領域の移動ステップ数(単位移動量)は任意の値を設定可能である。また画像同士の類似度を求める方法も任意の方法が適用可能である。例えば、画素値の差分の二乗和で類似度を評価するSSD(Sum of Squared Difference)や、画素値の差分の絶対値の和で類似度を評価するSAD(Sum of Absolute Difference)などが使用可能である。
In S203, the
S204では、距離算出部109により、S203で算出した視差を基に画素ごとの距離を算出する。視差から三角測量の原理により距離を算出し、歪み補正前の距離画像が生成される。
In S204, the
S205では、信頼度算出部111により、S202で補正した画像における所定の画素単位毎に信頼度を算出する。本実施形態では1画素単位で信頼度を算出するが、任意の画素単位で信頼度を算出してもよい。また、本実施形態では1ビットで信頼度を算出するが、任意のビット数で信頼度を算出してもよい。信頼度は、測距精度に影響を与える要因に基づいて算出するが、本実施形態における位相差方式を使った距離の算出では、コントラストの変化量に基づき信頼度を算出する。コントラストの変化量は、着目点及びその周囲の画素の画素値の分散から算出可能である。本実施形態では、図3(a)の入力画像に対して、図3(b)の領域300(空に相当する領域)が信頼度0、それ以外の領域が信頼度1として算出されるように信頼度算出アルゴリズムが調整されているものとする。ここでは閾値を1とし、閾値未満の0では信頼度が低く、閾値以上の1では信頼度が高いことを意味する。
In S205, the
また、算出された信頼度は、本実施形態では高速に読み出しができるようにSRAM(Static Random Access Memory)に座標値と対応付けて格納することとするが、その他のメモリに格納してもよい。また、本実施形態では信頼度が0である領域300は、画像全体の領域に対しておよそ14%である。
In this embodiment, the calculated reliability is stored in a static random access memory (SRAM) in association with the coordinate value so that it can be read out quickly, but it may be stored in other memory. In this embodiment, the
S206では、メモリアクセス処理内容選択部113により、S204で算出した信頼度と、予め設定されている各歪み補正方法で必要なDRAM帯域に基づいて、歪み補正方法を選択する。本実施形態では、歪み補正方法は、ニアレストネイバー、バイリニア、バイキュービックの3つの歪み補正方法の中から、信頼度の低い領域の割合に応じて選択されるものとする。ただし、歪み補正方法の種類としてはこれらに限定されるものではない。また、各歪み補正方法で必要なDRAM帯域の情報の与え方としては任意の方法で構わない。例えば、ユーザによる入力部を準備してもよいし、予めDRAMやSRAMといったメモリに格納しておいてもよい。本実施形態では図4に示す表のような帯域情報を与えるが、このフォーマットはあくまで一例であり、各歪み補正方法で必要な帯域がわかればどのようなフォーマットでもよい。図4に示す表の400の列は歪み補正方法の種類を表している。
In S206, the memory access process
ここで、ニアレストネイバー、バイリニア、バイキュービックの3つの歪み補正方法について説明する。図5(a)は歪み補正について説明した図である。 Here, we will explain three distortion correction methods: nearest neighbor, bilinear, and bicubic. Figure 5(a) is a diagram explaining distortion correction.
500は歪み補正後の画像を表しており、今、着目点503の画素について補正をしたいとする。そこでまず着目点503に対応する補正前画像の画素の座標値504(以下、補正前座標値と呼ぶ)を参照する。本実施形態では、補正前座標値504は、予め座標変換マップ502としてDRAM110に格納されているものから補正後座標値に対応する値を参照することによって取得するが、DRAM110以外のメモリに格納しておいてもよい。座標変換マップ502は、レンズ103の歪曲収差に応じた座標変換式に基づいて予め計算したものであるが、補正前座標値504の取得方法は上記の方法に限定されるものではない。補正前座標値504の取得方法は、補正前座標値504を、上記座標変換式により測距装置100内で逐一演算する方法であってもかまわない。
500 represents an image after distortion correction, and now, suppose that correction is to be performed on the pixel of the point of
501は補正前画像を表しており、着目点503に対応する補正前座標値504の座標位置を505(以下、補正前座標位置と呼ぶ)で表している。しかし一般的に座標変換式によって求められる補正前座標値504は小数点を含んでいる。そこでニアレストネイバーでは、図5(b)のように、補正前画像501における補正前座標位置505から最も近くにある画素である画素508の画素値を、着目点503における補正後画素値とする。一方、バイリニアでは、補正前画像501における補正前座標位置505の周囲4点の画素506、507、508、509の画素値から補間した値を、着目点503における補正後画素値とする。更にバイキュービックでは、補正前画像501における補正前座標位置505の周囲16個の画素値から補間した値を、着目点503の補正後画素値とする。よって、ニアレストネイバーでは1個の画素値だけをDRAM110から読めばよいが、バイリニアでは4個の画素値を読む必要があり、更にバイキュービックになると16個の画素値を読む必要があり、歪み補正方法の種類に応じてDRAM帯域が増加する。一方で、歪み補正の精度は、ニアレストネイバーよりもバイリニア、バイリニアよりもバイキュービックの方が高くなる。
501 represents the pre-correction image, and 505 (hereinafter referred to as the pre-correction coordinate position) represents the coordinate position of the pre-correction coordinate
次に、図4の401の列は各歪み補正方法のDRAM110の必要帯域の例を表している。上述したようにニアレストネイバーに対してバイリニアは4倍、バイキュービックは16倍の画素数の画素値を読む必要があるため、それら全ての画素値を毎回DRAM110から読む場合には、必要帯域もそれぞれ4倍、16倍になってしまう。しかし、例えばバイリニアにおいてある画素の歪み補正で使用した4つの補正前画像501の画素値の一部は、隣の画素の歪み補正でも参照する可能性が高い。そこで一般的にはDRAM110に対してキャッシュをもたせ、一度DRAM110から読んだ画素値を一時的に所定の期間キャッシュに格納している。これにより、一定期間内に再度同じ画素の画素値を読み出す際には、DRAM110にアクセスせずにキャッシュから読み出すことでDRAM帯域を減らしている。どれだけ帯域を減らせるかは、キャッシュのHit率に応じて変わる。本実施形態では、DRAM110に対してタイル単位(縦・横任意の画素数で構成された領域単位)でアクセスすることを想定し、更にレンズの歪曲収差や、各歪み補正方法で参照する画素の領域からキャッシュヒット率を推定している。図4に示すDRAM110の必要帯域401は、このような推定に基づき算出した値を例示している。
Next,
402の列はニアレストネイバーを基準とした時の各歪み補正方法の帯域上昇率を表す。402を見ると、バイリニアの帯域上昇率は12%であり、バイキュービックの帯域上昇率は40%となる。ここでメモリアクセス処理内容選択部113は、まずS204で算出した信頼度を参照して、画像全体に対する信頼度が0の領域の割合を求める。ここでは14%として求められたとする。詳細は後述するが信頼度が0の領域は後段のステップで歪み補正が不要の画素として判定される。そのため、信頼度が0の領域が14%ということは、歪み補正する画素数を14%削減でき、それに伴いDRAM110から画素値を読むための必要帯域を14%削減できることを意味する。すなわち、信頼度0の領域の割合が14%の場合のニアレストネイバー、バイリニア、バイキュービックの必要帯域は、それぞれ4.3MB/Frame、4.8MB/Frame、6.0MB/Frameとなる。
次に図4の各歪み補正方法の帯域上昇率を参照し、削減可能な帯域を使って、どの歪み補正方法が適用可能かを判定する。本実施形態では、全領域に歪み補正を行う場合のニアレストネイバーの必要帯域5.0MB/Frameを最大許容帯域とし、必要帯域が最大許容帯域以下(最大許容されるアクセス帯域以下)となる歪み補正方法を採用するものとする。上記のように帯域削減率が14%の場合、バイリニアが4.8MB/Frame、バイキュービックが6.0MB/Frameなので、必要帯域が5.0MB/Frame以下かつ最も精度の高い歪み補正方法であるバイリニアの歪み補正方法が選択される。例えば、帯域削減率が10%未満である場合は、バイリニアの必要帯域は5.0MB/Frameを超えるため、ニアレストネイバーの歪み補正方法を選択する。また、帯域削減率が28%以上である場合は、バイキュービックの必要帯域は5.0MB/Frame以下になるため、バイキュービックの歪み補正方法を選択することになる。 Next, the bandwidth increase rate of each distortion correction method in FIG. 4 is referenced, and a distortion correction method that can be applied is determined using the reducible bandwidth. In this embodiment, the nearest neighbor's required bandwidth of 5.0 MB/Frame when performing distortion correction on the entire region is set as the maximum allowable bandwidth, and a distortion correction method in which the required bandwidth is equal to or less than the maximum allowable bandwidth (equal to or less than the maximum allowable access bandwidth) is adopted. As described above, when the bandwidth reduction rate is 14%, bilinear is 4.8 MB/Frame and bicubic is 6.0 MB/Frame, so the bilinear distortion correction method, which has the required bandwidth of 5.0 MB/Frame or less and is the most accurate distortion correction method, is selected. For example, when the bandwidth reduction rate is less than 10%, the required bandwidth of bilinear exceeds 5.0 MB/Frame, so the nearest neighbor distortion correction method is selected. Furthermore, if the bandwidth reduction rate is 28% or more, the required bandwidth for bicubic will be 5.0 MB/Frame or less, so the bicubic distortion correction method will be selected.
このように本実施形態では、上述のように信頼度の低い領域を除く領域に各歪み補正方法で必要になるDRAM帯域と所定の最大許容帯域とに基づいて歪み補正方法を選択する。 In this manner, in this embodiment, a distortion correction method is selected based on the DRAM bandwidth required by each distortion correction method and a predetermined maximum allowable bandwidth in areas excluding areas with low reliability as described above.
S207では、歪み補正要否判定部114により、S204で生成した距離画像の各画素に対して歪み補正を行う必要があるかどうかを判定する。S207では、まず前述した信頼度の算出時と同様に、補正後画像における着目画素に対する補正前座標値504をDRAM110から読み出す。次に、読み出した着目画素に対応する補正前座標位置505から最も近くにある画素に対応する信頼度をSRAM112から読み出す。そして信頼度が0であれば歪み補正は不要と判定されS209に進み、信頼度が1であれば歪み補正は必要と判定されS208に進む。
In S207, the distortion correction
次にS208では、歪み補正部115によって、S207で歪み補正が必要と判定された着目画素に対して、S206で選択された歪み補正方法によって、歪み補正が行われる。本実施形態では、バイリニアの歪み補正方法が選択されているためバイリニアで歪み補正がなされる。このとき、歪み補正要否判定部114がDRAM110から読み出した補正前座標値504を歪み補正部115が受け取ることで、歪み補正部115はDRAM110から補正前座標値504を読み出す必要がなくなる。
Next, in S208, the
一方、S209では、マスク部116によって、S207で歪み補正が不要と判定された画素に対して、歪み補正を行わずに所定の値を付与する。歪み補正が不要と判定された画素に対して歪み補正をしないため、歪み補正のためにDRAM110から補正前画素値を読み出す処理が不要になり、DRAM帯域を削減することができる。また、許容するDRAM帯域、本実施形態の場合では5.0MB/Frameから削減された分のDRAM帯域は、S208における歪み補正で使用することができる。
On the other hand, in S209, the
次にS210では、歪み補正部115又はマスク部116により、歪み補正された画素値又は所定の値でマスクされた画素値が出力される。本実施形態では、歪み補正部115とマスク部116は測距装置100の外部に歪み補正された画素値もしくはマスクされた画素値を出力する構成としたが、測距装置100内部のメモリ、例えばDRAM110に格納する形態でも構わない。
Next, in S210, the
このようにS207からS210までで、距離画像における1つの画素についての画素値を生成して出力することができる。 In this way, steps S207 to S210 can generate and output a pixel value for one pixel in the distance image.
S211では、距離画像の全ての画素で歪み補正もしくはマスクが行われたかを判定し、まだ残っていればS207に戻る。このようなステップを全ての画素に対して繰り返し実施することで、歪み補正後の距離画像を出力できる。 In S211, it is determined whether distortion correction or masking has been performed on all pixels in the distance image, and if not, the process returns to S207. By repeating these steps for all pixels, the distance image after distortion correction can be output.
次にS212では、例えばユーザ入力に基づき、画像の受信が停止されていなければ、S201に戻り次の画像を受信する。以上のような処理を、画像受信が停止されるまで常に実行し続ける。 Next, in S212, if image reception has not been stopped, for example based on user input, the process returns to S201 to receive the next image. The above process continues until image reception is stopped.
このように1つの光学系から2つの撮像画像を取得する場合には、先に2つの撮像画像から距離画像を生成した後に歪み補正をする構成で本実施形態を適用するのが好適である。こうすることで、歪み補正を2つの撮像画像でなく、1つの距離画像に対してだけ行うことで、歪み補正のために読み出す画素値が半減するため、DRAM帯域を減らすことができる。これに加えて、信頼度が低い領域については歪み補正処理を行わないため、DRAM帯域をさらに削減することができる。その結果、帯域削減量に応じて歪み補正すべき領域の歪み補正方法を選択することができる。これにより削減した帯域を歪み補正すべき領域の歪み補正に割り当てることができ、より精度の高い歪み補正が可能となる。 When two captured images are obtained from one optical system in this way, it is preferable to apply this embodiment to a configuration in which a distance image is first generated from the two captured images and then distortion correction is performed. In this way, by performing distortion correction only on one distance image instead of two captured images, the pixel values read out for distortion correction are halved, thereby reducing the DRAM bandwidth. In addition, since distortion correction processing is not performed on areas with low reliability, the DRAM bandwidth can be further reduced. As a result, the distortion correction method for the area to be corrected can be selected depending on the amount of bandwidth reduction. This allows the reduced bandwidth to be allocated to distortion correction in the area to be corrected, enabling more accurate distortion correction.
また、本実施形態では、信頼度は0又は1の2値としたが、3値以上の値を持たせてもよい。例えば、信頼度として、0、1、2の3値を有する場合、信頼度0の場合は歪み補正を行わず、信頼度1、2の場合はそれぞれ異なる歪み補正方法で歪み補正を行うようにしてもよい。 In addition, in this embodiment, the reliability has two values, 0 and 1, but it may have three or more values. For example, if the reliability has three values, 0, 1, and 2, distortion correction may not be performed for reliability 0, and distortion correction may be performed using different distortion correction methods for reliability 1 and 2.
(実施形態2)
実施形態1では、歪み補正をする前に距離画像を生成し、その後距離画像に対して歪み補正を行うが、実施形態2では、距離画像を生成する前に歪み補正を行い、その後距離画像を生成する。実施形態2では、撮像装置としてステレオカメラを使った測距装置について説明する。ステレオカメラのように数センチ~十数センチほど離間して配置された複数の別々の光学系を使用して撮像画像を取得する場合は、光学系ごとに撮像画像の歪み量が異なる為、複数の撮像画像に対して歪み補正を行ってから距離画像を生成する構成が好適である。歪み量の異なる撮像画像同士で視差を算出すると誤差が大きくなってしまうため、先に撮像画像の歪み補正を行ってから視差を算出して距離画像を生成することで、精度の高い距離画像が得られる。
(Embodiment 2)
In the first embodiment, a distance image is generated before distortion correction, and then distortion correction is performed on the distance image, whereas in the second embodiment, distortion correction is performed before generating the distance image, and then the distance image is generated. In the second embodiment, a distance measuring device using a stereo camera as an imaging device will be described. When capturing images using multiple separate optical systems arranged at intervals of several centimeters to several tens of centimeters, as in a stereo camera, the amount of distortion of the captured images differs for each optical system, so that a configuration in which distortion correction is performed on the multiple captured images before generating a distance image is preferable. Calculating parallax between captured images with different amounts of distortion results in a large error, so a highly accurate distance image can be obtained by first correcting the distortion of the captured images, then calculating the parallax and generating a distance image.
図6は、実施形態2の実施形態を示す測距装置の構成図である。600は本実施形態の測距装置であり、被写体の距離画像を生成する。測距装置600は2つの撮像部601aと601b及び、距離画像生成部602を含む。なお、撮像部601a、601bの処理は実施形態1の撮像部101と同じであるため詳細は省略する。
Figure 6 is a configuration diagram of a distance measuring device according to the second embodiment.
距離画像生成部602は、2つの撮像部から所定の視差を有する画像データaと画像データbとからなる一対の撮像画像を受け取る。受け取った撮像画像データは、2つの画像受信部606a、606bで受信され、その後2つの画像補正部607a、607で歪み補正は含まない各種画像補正が行われる。画像受信部606a、606bと画像補正部607a、607の処理は実施形態1と同じであるため詳細は省略する。
The distance
2つの画像補正部607a、607により、歪み補正前撮像画像aと歪み補正前撮像画像bが得られ、これらの歪み補正前撮像画像はDRAM610及び、信頼度算出部611に渡される。DRAM610に渡された2つの歪み補正前撮像画像a、bは、歪み補正時に参照される。また、DRAM610には、歪み補正における座標変換マップ情報が予め格納されているものとする。ここで、2つの撮像部で得られた各撮像画像の歪み量は異なる為、各撮像画像の歪み量に対応した2つの座標変換マップが格納されている。
The two
一方、信頼度算出部611は、受け取った2つの歪み補正前撮像画像それぞれに対して信頼度を算出する。なお、信頼度算出部611は実施形態1の信頼度算出部111と同じであるため詳細は省略する。算出された各信頼度のデータはSRAM612に格納される。
On the other hand, the
これ以降の、メモリアクセス処理内容選択部613、歪み補正要否判定部614、歪み補正部615、及びマスク部616の処理は、2つの撮像画像に対して処理をする。これらによる各撮像画像に対する処理は、実施形態1のメモリアクセス処理内容選択部113、歪み補正要否判定部114、歪み補正部115、マスク部116と同じであるため詳細は省略する。
The subsequent processing by the memory access processing
次に、各部の詳細な説明をフローチャートに沿って説明する。図7は、本実施形態の測距装置600における距離画像生成部602の処理の流れを示すフローチャートである。
Next, a detailed description of each unit will be given with reference to a flowchart. Figure 7 is a flowchart showing the processing flow of the distance
S710以外の他の各ステップは、図2のフローチャートと並び順が異なるが、それぞれ対応する各ステップと同じ処理を行う。S701、S702は、S201、S202に対応し、S703~S709は、S205~S211に対応し、S711、S712は、S203、S204に対応し、S713はS212に対応する。S710は、本実施形態では歪み補正前撮像画像aと歪み補正前撮像画像bに対して歪み補正を行うため追加されている。 The steps other than S710 are arranged in a different order than in the flowchart of FIG. 2, but each step performs the same processing as the corresponding step. S701 and S702 correspond to S201 and S202, S703 to S709 correspond to S205 to S211, S711 and S712 correspond to S203 and S204, and S713 corresponds to S212. In this embodiment, S710 is added in order to perform distortion correction on the pre-distortion-corrected captured image a and the pre-distortion-corrected captured image b.
これらの処理の中で実施形態1と同様に信頼度が低い領域の歪み補正を行わないことで、読み出す画素値を減らしてDRAM帯域を削減し、限られた最大許容帯域内でより精度の高い歪み補正を行うことが可能となる。 As in the first embodiment, by not performing distortion correction in areas with low reliability during these processes, it is possible to reduce the number of pixel values read out and the DRAM bandwidth, thereby enabling more accurate distortion correction within the limited maximum allowable bandwidth.
このようにして、2つの撮像部から得られた撮像画像に対して、歪み補正が施された2つの歪み補正後画像が得られ、これらの歪み補正後画像から視差算出部617により視差が得られ、更に距離算出部618により距離画像が得られる。視差算出部617、距離算出部618の処理内容は、実施形態1の視差算出部108、距離算出部109と同じであるため詳細は省略する。
In this way, two distortion-corrected images are obtained by performing distortion correction on the captured images obtained from the two imaging units, and the parallax is obtained from these distortion-corrected images by the
このように、ステレオカメラのような複数の別々の光学系を使用して複数の撮像画像を取得して距離画像を生成する測距装置では、光学系毎に撮像画像の歪み量が異なるため、本実施形態のように距離画像を生成する前に歪み補正を行うのが好適である。こうすることで、正しく歪み補正された撮像画像同士で視差を算出することができ精度の高い距離画像が得られる。加えて、信頼度が低い領域の歪み補正を行わないことでDRAM帯域を削減することができ、帯域削減量に応じて歪み補正すべき領域に適用する歪み補正方法を選択することができる。これにより削減した帯域を歪み補正すべき領域の歪み補正に割り当てることができ、より精度の高い歪み補正が可能となる。 In this way, in a distance measuring device that uses multiple separate optical systems such as a stereo camera to acquire multiple captured images and generate a distance image, the amount of distortion in the captured images differs for each optical system, so it is preferable to perform distortion correction before generating the distance image as in this embodiment. In this way, parallax can be calculated between captured images that have been correctly distortion corrected, and a highly accurate distance image can be obtained. In addition, by not performing distortion correction in areas with low reliability, the DRAM bandwidth can be reduced, and the distortion correction method to be applied to the area to be corrected can be selected depending on the amount of bandwidth reduction. This allows the reduced bandwidth to be allocated to distortion correction in the area to be corrected, enabling more accurate distortion correction.
(実施形態3)
実施形態1では画素毎に信頼度を算出していたが、実施形態3ではキャッシュサイズに応じて複数画素毎に1つの信頼度を生成する。このようにすることで、キャッシュのHit率を向上させ、DRAM帯域を削減することができる。また、信頼度を格納するSRAMのサイズも減らすことができる。実施形態3では、実施形態1と同様に1つの測距画素に対して複数のフォトダイオードを配置し、位相差方式を用い距離を算出する方法を適用するものとする。そのため、距離画像を生成してから歪み補正をする構成とする。しかし、実施形態2のように歪み補正をしてから距離画像を生成する構成においても、キャッシュサイズに応じて複数画素毎に1つの信頼度を生成することができる。
(Embodiment 3)
In the first embodiment, the reliability is calculated for each pixel, but in the third embodiment, one reliability is generated for each set of pixels according to the cache size. In this way, the cache hit rate can be improved and the DRAM bandwidth can be reduced. In addition, the size of the SRAM that stores the reliability can be reduced. In the third embodiment, similarly to the first embodiment, multiple photodiodes are arranged for one ranging pixel, and a method of calculating the distance using a phase difference method is applied. Therefore, a configuration is adopted in which distortion correction is performed after a distance image is generated. However, even in the configuration in which distortion correction is performed before a distance image is generated as in the second embodiment, one reliability can be generated for each set of pixels according to the cache size.
図8は、実施形態3の構成図である。構成図上は図1の構成に対してキャッシュ817が追加されている。キャッシュ817の構造例を、図9を使って説明する。キャッシュ817は、タイル状のバッファ900(以下タイルバッファと呼ぶ)を複数個分もつ構成になっている。また1つのタイルバッファは、縦4画素、横4画素の合計16画素分のデータを持つことができ、キャッシュの入れ替えはタイルバッファ単位で行われる。901は1つの画素を意味している。なお、縦4画素、横4画素というサイズは一例であり、縦横のサイズおよびタイルバッファの数は任意の数が設定可能である。 Figure 8 is a configuration diagram of the third embodiment. In the configuration diagram, a cache 817 has been added to the configuration of Figure 1. An example of the structure of the cache 817 will be explained using Figure 9. The cache 817 is configured to have multiple tile-shaped buffers 900 (hereinafter referred to as tile buffers). One tile buffer can hold data for a total of 16 pixels, 4 pixels vertically and 4 pixels horizontally, and cache replacement is performed in tile buffer units. 901 represents one pixel. Note that the size of 4 pixels vertically and 4 pixels horizontally is just an example, and the vertical and horizontal sizes and the number of tile buffers can be set to any number.
次に本実施形態の処理の流れを図2のフロー図を使って説明をする。 Next, the processing flow of this embodiment will be explained using the flow diagram in Figure 2.
S201からS204までは実施形態1と同じであるため詳細は省略する。 Steps S201 to S204 are the same as in embodiment 1, so details are omitted.
次にS205では、信頼度算出部111によって、キャッシュ817における1つのタイルバッファの画素サイズ(タイルバッファサイズと呼ぶ)領域ごとの信頼度を算出する。本実施形態では縦4画素、横4画素の領域で1つの信頼度を算出する。タイルバッファサイズ領域ごとに信頼度を算出する方法は様々な方法があるが、本実施形態では、一旦1画素毎に全ての信頼度を算出した後、タイルバッファサイズ領域内に1つでも信頼度が1の画素がある場合は、その領域の信頼度は1とする。入力画像が、図3(a)とした場合に生成される信頼度のイメージを図10に示す。図10中の1つの小さな四角い領域1000が、1つのタイルバッファサイズ領域であり、これらの領域ごとに1つの信頼度が生成される。本実施形態では1001のように太線で囲まれている領域が信頼度0の領域となる。ここで、信頼度をタイルバッファサイズ毎に算出することで信頼度のデータ量が減り、信頼度を格納するのに必要なSRAMサイズを減らすことができる。
Next, in S205, the
S206は実施形態1と同じであるため詳細は省略する。 S206 is the same as in embodiment 1, so details are omitted.
次にS207~S209について、図11を使ってまとめて説明する。1100は歪み補正後画像であり、まず着目点1(1101)の歪み補正を行う。着目点1における補正前座標値1104を座標変換マップ1103から読み出す。そして、補正前座標値1104に対応するタイルバッファサイズ領域の信頼度を読む。ここで信頼度は1であるとする。もし歪み補正方法としてニアレストネイバーが選択されている場合は、補正前座標値1104に対応する歪み補正前座標位置1107に最も近い歪み補正前画像1106上の画素値をDRAM110から読みだそうとする。このとき、キャッシュ817に該当画素値が入っていなければ、該当画素値を含むタイルバッファサイズ領域1109のデータが、キャッシュ817のタイルバッファに格納され、キャッシュ817のタイルバッファから必要な画素値を読み出す。
Next, steps S207 to S209 will be explained together with reference to FIG. 11. 1100 is a post-distortion correction image, and first, distortion correction is performed on the focus point 1 (1101). The pre-correction coordinate value 1104 at the focus point 1 is read from the coordinate
次に着目点2(1102)についての歪み補正を行う。ここで、着目点2における補正前座標値1105に対応するタイルバッファサイズ領域の信頼度を読むが、着目点2は着目点1の隣であるため、着目点1と着目点2とに対応するタイルバッファサイズ領域が同じである場合がある。ここでは、着目点1と着目点2とに対応するタイルバッファサイズ領域が同じあるとし、着目点2についても着目点1と同じタイルバッファサイズ領域1109における信頼度を読んで、信頼度として1を得る。信頼度が1であるため、歪み補正部115は歪み補正を行うために補正前座標値1105に対応する補正前座標位置1108に最も近い画素値を読み出そうとする。ここで着目点1と同じタイルバッファサイズ領域1109における信頼度を参照しているため、読みだそうとする画素値も着目点と同じタイルバッファサイズ領域1109にある。すると、タイルバッファサイズ領域1109は既にキャッシュ817のタイルバッファに入っているため、DRAM110にアクセスすることなくキャッシュ817から画素値を読み出すことができる(キャッシュヒットする)。
Next, distortion correction is performed for the focus point 2 (1102). Here, the reliability of the tile buffer size area corresponding to the pre-correction coordinate
上記ではニアレストネイバーの歪み補正方法で説明したが、バイリニアやバイキュービクでも補正前座標位置近傍の画素値をまとめてキャッシュ817に読み出すため、同様にキャッシュヒットする可能性が高くなる。このように、信頼度をキャッシュのタイルバッファサイズ領域ごとに生成することでキャッシュヒット率が上がり、効率的にDRAMのデータを読み出すことができる。また、信頼度をタイルバッファサイズ毎に算出することで信頼度のデータ量が減り、信頼度を格納するのに必要なSRAMサイズを減らすことができる。 The nearest neighbor distortion correction method was explained above, but bilinear and bicubic also increase the likelihood of a cache hit because pixel values near the pre-correction coordinate position are read together into the cache 817. In this way, by generating reliability for each tile buffer size area of the cache, the cache hit rate increases, and DRAM data can be read efficiently. In addition, by calculating reliability for each tile buffer size, the amount of reliability data is reduced, and the SRAM size required to store the reliability can be reduced.
なお図8では、信頼度算出部111がDRAM110を介して画像データを取得する構成としたが、DRAM110を介さず画像補正部107から直接画像データを取得する構成としてもよい。
In FIG. 8, the
(実施形態4)
実施形態1~3では、信頼度が0の画素については歪み補正を行わないことで、歪み補正に伴うDRAM帯域を削減し、削減した帯域を信頼度の高い画素の歪み補正で使えるようにした。実施形態4では、削減した帯域を使って測距装置の付加価値を高めるための追加処理を行う例を説明する。
(Embodiment 4)
In the first to third embodiments, the DRAM bandwidth required for distortion correction is reduced by not performing distortion correction on pixels with a reliability of 0, and the reduced bandwidth can be used for distortion correction on pixels with high reliability. In the fourth embodiment, an example will be described in which the reduced bandwidth is used to perform additional processing to increase the added value of the distance measuring device.
図12は、実施形態4の実施形態を示す測距装置の構成図である。図1(実施形態1)では、メモリアクセス処理内容選択部113によって歪み補正方法を選択していたため、選択結果を歪み補正部115に渡していた。一方、図12(実施形態4)ではメモリアクセス処理内容選択部1213は、歪み補正とは別の追加処理の選択をするため、歪み補正部115と接続されている必要はない。代わりに、あらかじめ設定された歪み補正に必要なDRAM帯域、メモリアクセス処理内容選択部1213によって選択される追加処理に必要なDRAM帯域、及び信頼度が0の領域の割合によって、実行する追加処理を選択する。
Figure 12 is a configuration diagram of a distance measuring device showing the fourth embodiment. In Figure 1 (first embodiment), the distortion correction method was selected by the memory access processing
図13(a)は、使用される歪み補正方法で必要な帯域情報であり、本実施形態ではバイリニアの歪み補正方法を使うとするが、それ以外の歪み補正方法であっても構わない。次に、SRAMに格納された信頼度0の領域の割合を算出する。ここでは23%が信頼度0の領域であると仮定する。すると、バイリニアの歪み補正におけるDRAMの必要帯域(1301)である5.6MB/Frameの23%、すなわち1.3MB/Frameの帯域削減が可能である。 Figure 13(a) shows bandwidth information required for the distortion correction method used. In this embodiment, a bilinear distortion correction method is used, but other distortion correction methods may be used. Next, the percentage of the area stored in the SRAM with a reliability of 0 is calculated. Here, it is assumed that the area with a reliability of 0 is 23%. This makes it possible to reduce the bandwidth by 23% of the DRAM required bandwidth (1301) of 5.6 MB/Frame for bilinear distortion correction, i.e., 1.3 MB/Frame.
次に、メモリアクセス処理内容選択部1213によって選択される追加処理の情報を図13(b)に示す。ここでは追加処理1302として、物体認識処理と物体追尾処理の2種類が書かれており、それらのDRAMの必要帯域1303は、それぞれ1MB/Frame、3MB/Frameである。
Next, information on the additional processes selected by the memory access process
次に、削減可能な帯域で実行可能な追加処理を選択する。本実施形態では、1.3MB/Frameの帯域が削減可能であるため、物体認識だけが選択される。仮に4MB/Frame以上の帯域削減が可能であれば、物体認識と物体追尾の両方が選択される。 Next, additional processing that can be performed with the reducible bandwidth is selected. In this embodiment, since a bandwidth reduction of 1.3 MB/Frame is possible, only object recognition is selected. If a bandwidth reduction of 4 MB/Frame or more is possible, both object recognition and object tracking are selected.
本実施形態では、選択される候補の追加処理は2種類しかないが3種類以上であってもよい。また、どの追加処理を選択するかを決めるアルゴリズムは任意の方法で構わない。また、歪み補正方法や追加処理で必要なDRAM帯域情報の与え方としては任意の方法で構わない。例えば、それらの情報をユーザ入力から取得できるようにユーザによる入力部を準備してもよいし、予めDRAMやSRAMといったメモリに格納しておいてもよい。本実施形態では図13(a)、(b)に示すようなフォーマットで帯域情報を与えるが、このフォーマットはあくまで一例であり、別のフォーマットでもよい。 In this embodiment, there are only two types of candidate additional processes to select, but there may be three or more types. Any algorithm may be used to determine which additional process to select. Any method may be used to provide the distortion correction method and DRAM bandwidth information required for the additional process. For example, a user input unit may be provided so that such information can be obtained from user input, or the information may be stored in advance in a memory such as a DRAM or SRAM. In this embodiment, the bandwidth information is provided in the format shown in Figures 13(a) and (b), but this format is merely an example and another format may be used.
このようにして、帯域削減量に応じて選択された物体認識処理が実行される。物体認識した結果と生成した距離画像を組み合わせることで、特定の対象物(人、動物、車両など)とその対象物までの距離情報を結び付けることができる。また、取得した距離情報や認識結果を複数のフレーム間で時系列に取り扱うことで対象物の軌跡や、速度を算出することができる。 In this way, the object recognition process is selected according to the amount of bandwidth reduction. By combining the object recognition results with the generated distance image, it is possible to link a specific object (person, animal, vehicle, etc.) with information about the distance to that object. In addition, by handling the acquired distance information and recognition results in chronological order across multiple frames, it is possible to calculate the trajectory and speed of the object.
以上説明したように、信頼度が低い領域の歪み補正を行わないことでDRAM帯域を削減でき、削減した帯域を使って測距装置の付加価値を高めるための追加処理を実行することができる。 As explained above, by not performing distortion correction in areas with low reliability, DRAM bandwidth can be reduced, and the reduced bandwidth can be used to perform additional processing to increase the added value of the ranging device.
なお図12では、信頼度算出部111がDRAM110を介して画像データを取得する構成としたが、DRAM110を介さず画像補正部107から直接画像データを取得する構成としてもよい。
In FIG. 12, the
(実施形態5)
これまでの実施形態1~4では、信頼度が0の画素、または信頼度が多値である場合において信頼度が低い画素について、歪み補正を行わないことで歪み補正に伴うDRAM帯域を削減する。
(Embodiment 5)
In the first to fourth embodiments described above, the DRAM bandwidth required for distortion correction is reduced by not performing distortion correction on pixels with a reliability of 0 or pixels with a low reliability when the reliability is multi-valued.
これに対し実施形態5では、表示領域の拡大縮小や一部領域の切り出し、複数領域を指定した多画面表示など、歪み補正以外のDRAMアクセスを伴う処理においても、信頼度を用いた制御を行うことで使用するDRAM帯域を削減する。 In contrast, in the fifth embodiment, the DRAM bandwidth used is reduced by using reliability-based control even in processes that involve DRAM access other than distortion correction, such as enlarging or reducing the display area, cropping out a partial area, and displaying multiple areas on a multi-screen.
図14は、実施形態5に係る測距装置の構成を示す図である。前述の実施形態と重複する機能については同一符号を付している。 Figure 14 is a diagram showing the configuration of a distance measuring device according to embodiment 5. Functions that overlap with the previous embodiment are given the same reference numerals.
1400は、本実施形態に係る測距装置であり、指定した画像領域を表示するとともに、歪み補正を施した被写体の距離画像を生成する。1401は、距離画像生成部であり、撮像部101から画像データを受け取って距離画像を生成する。距離画像生成部1401は、距離画像の所定の画像領域が出力されるように、距離画像に対して、歪み補正だけでなく、切り出しや拡大縮小などの処理を行なった画像(以下表示画像)を出力することができる。
距離画像生成部1401の内部構成を説明する。画像補正部107は、画像受信部106が受信した画像データに対して必要な補正処理を行なう。例えば、レンズ103を通すと生じる周辺光量落ちによる輝度むら補正処理や、撮像素子104の画素毎の感度むらといった特性ばらつきを補正する処理を行なう。視差算出部であり、画像補正部107によって補正された補正後画像の画素ごとに視差を算出する。109は距離算出部であり、視差算出部108が算出した視差データを距離画像に変換する。110はDRAMであり、距離算出部109で生成された距離画像を格納する。
The internal configuration of the distance
1402は、信頼度算出部であり、画像補正部107からの画像における任意の画素単位毎に信頼度を算出する。112はSRAMであり、本実施形態では1画素毎に算出された信頼度を格納する。信頼度は1画素毎でなく複数画素毎に算出してもよいし、信頼度の格納先は必ずしもSRAMである必要はなくその他のメモリであってもよい。
1402 is a reliability calculation unit that calculates reliability for each arbitrary pixel unit in the image from the
1403は、距離画像読み出し判定部である。表示画像に対応した距離画像の切り出し位置や拡大縮小度合に関する情報(以下表示領域情報)を参照し、表示画像の各画素に対応する距離画像の座標値を生成する。また、表示領域情報と、距離画像の画素毎の信頼度とに応じて、DRAM110から距離画像を読み出すか否かを判定する。歪み補正を行う場合は、距離画像読み出し判定部1403は、上述の他の実施形態と同様に、歪み補正前後の画像の座標値を対応付ける座標変換マップを参照して、歪み補正後画像の各画素に対応する歪み補正前画像の座標値を生成する。
1403 is a distance image readout determination unit. It references information relating to the cropping position and the degree of magnification/reduction of the distance image corresponding to the display image (hereinafter referred to as display area information) and generates coordinate values of the distance image corresponding to each pixel of the display image. It also determines whether to read the distance image from the
1404は、画像形状変形部であり、距離画像読み出し判定部1403で距離画像の読み出しが必要と判断された画素に対して、画像形状変形処理を実施し、画像形状変形後の画素値を出力する。画像形状変形処理は、距離画像読み出し判定部1403からの座標値を参照して、対応する距離画像の画素値をDRAM110から読み出す。画素値の算出方法は、周辺画素値を用いたバイリニアやバイキュービックに代表する補間方式を用いるとよいが、拡大縮小を行なわない、画像切り出しの場合は、座標値に従って距離画像をそのまま読み出してもよい。なお、画像形状変形部1404が行う画像形状変形処理には、切り出しや拡大縮小などに加え、歪み補正も含まれる。
1404 is an image shape transformation unit, which performs image shape transformation processing on pixels for which the distance image read determination unit 1403 has determined that distance image reading is necessary, and outputs the pixel value after image shape transformation. The image shape transformation processing refers to the coordinate values from the distance image read determination unit 1403 and reads the corresponding pixel value of the distance image from the
1405は、マスク部であり、距離画像読み出し判定部1403で距離画像の読み出しが不要と判断された場合、表示画像の画素に予め定められた値を設定して出力する。 1405 is a mask unit that sets a predetermined value to the pixels of the display image and outputs it when the distance image readout determination unit 1403 determines that reading of the distance image is unnecessary.
以上、図14を用いて、実施形態5に係る測距装置のハードウェア構成を説明した。 The hardware configuration of the distance measuring device according to embodiment 5 has been described above using FIG. 14.
なお、前述の実施形態のように歪み補正を行う場合についても、同様の構成で実現することができる。この場合、歪み補正前後の座標を対応付ける座標変換マップを予めDRAM110に格納しておき、座標変換マップに基づき歪み補正後画像の各画素に対応する歪み補正前画像の画素の座標値を生成する。以下、座標変換マップと表示領域情報を用いて、歪み補正を含む画像形状変形処理を行う場合の処理フローをフローチャートに沿って説明する。
The same configuration can be used to perform distortion correction as in the above-described embodiment. In this case, a coordinate transformation map that associates coordinates before and after distortion correction is stored in advance in the
図15は、本実施形態の測距装置1400における距離画像生成部1401の処理の流れを示すフローチャートの一例である。前述の実施形態と重複する機能については同一符号を付している。
Figure 15 is an example of a flowchart showing the processing flow of the distance
S201からS204は前述の実施形態のとおりであるため、説明を省略する。 Steps S201 to S204 are the same as in the embodiment described above, so the explanation is omitted.
S1501では、信頼度算出部1402により、S202で補正した画像における所定の画素単位毎に信頼度を算出する。本実施形態では1画素単位で信頼度を算出するが、任意の画素単位で信頼度を算出してもよい。また、本実施形態では1ビットで信頼度を算出するが、任意のビット数で信頼度を算出してもよい。信頼度は、測距精度に影響を与える要因に基づいて算出するが、本実施形態における位相差方式を使った距離の算出では、コントラストの変化量に基づき信頼度を算出する。コントラストの変化量は、着目点及びその周囲の画素の画素値の分散から算出可能である。算出した信頼度は歪み補正前画像の座標と対応付けてSRAMなどに格納する。S1501とS203からS204の処理は独立しており並行して処理してもよいし、S1501をS203の処理前に実施し、算出した信頼度を予めSRAMに格納しておいてもよい。
In S1501, the
S1502では、距離画像読み出し判定部1403により、表示領域情報を参照し、表示画像の各画素に対応する歪み補正後画像の座標値を生成する。 In S1502, the distance image readout determination unit 1403 references the display area information and generates coordinate values of the distortion-corrected image corresponding to each pixel of the display image.
S1503では、距離画像読み出し判定部1403により、座標変換マップを参照し、S1502で生成した歪み補正後画像の座標値に対応する、歪み補正前画像の座標値をDRAM110から読み出す。
In S1503, the distance image read determination unit 1403 refers to the coordinate transformation map and reads from the
ここでS1502、S1503について図16を用いて説明する。図16は、実施形態5における画像形状変形処理のS1502、S1503において、歪み補正後画像1601を介して表示画像1600の座標値から歪み補正前画像の座標値を取得する方法を説明する図である。表示画像1600は、歪み補正後画像1601における、2つの画像領域(画像切り出し領域A1603と画像切り出し領域B1604)を切り出して表示している。
Here, steps S1502 and S1503 will be described with reference to FIG. 16. FIG. 16 is a diagram for explaining a method for acquiring the coordinate values of the pre-distortion-corrected image from the coordinate values of the display image 1600 via the post-distortion-corrected
表示領域情報は、表示画像1600における、歪み補正後画像1601の各切り出し領域の座標値を指定した情報であり、表示画像1600の画素毎に座標値を持っていてもよいし、矩形領域を示す情報であってもよい。例えば、矩形領域が長方形である場合、長方形の左上頂点の開始座標(X1,Y1)と右下頂点の終了座標(X2,Y2)を持つ構成とすればよい。
The display area information is information that specifies the coordinate values of each cut-out area of the distortion-corrected
距離画像読み出し判定部1403は、まずS1502で表示領域情報を参照し、表示画像1600の着目画素1605に対応する歪み補正後座標位置1606を取得する。次に距離画像読み出し判定部1403は、S1503で座標変換マップを参照し、歪み補正後座標位置1606に対応する、歪み補正前座標位置1607を生成する。このようにして距離画像読み出し判定部1403は、表示画像1600の注目画素1605に対応する歪み補正前座標位置1607、すなわち歪み補正前画像の座標値を取得することができる。
The distance image read determination unit 1403 first refers to the display area information in S1502 and obtains a post-distortion-corrected coordinate
S1504では、読み出した歪み補正前座標位置1607から最も近くにある画素に対応する信頼度をSRAM112から読み出す。そして信頼度が0であれば距離画像の読み出しが不要と判定されS1506に進む。信頼度が1であれば、距離画像の読み出しが必要と判定されS1505に進む。
In S1504, the reliability corresponding to the pixel closest to the read pre-distortion-correction coordinate
次にS1505では、画像形状変形部1404によって、S1504で距離画像の読み出しが必要と判定された歪み補正前画像上の歪み補正前座標位置1607の画素値を読み出す。そして、画像形状変形部1404によって読み出した画素値を表示画像上の着目点1605の画素値とする画像形状変形処理を行う。
Next, in S1505, the image
一方、S1506では、画像形状変形部1404によって、S1504で距離画像の読み出しが不要と判定された歪み補正前画像上の歪み補正前座標位置1607の画素値の読み出しと画像形状変形処理とを行わない。代わりにマスク部1405によって所定の値を表示画像上の着目点1605の画素に付与するマスク処理を行う。
On the other hand, in S1506, the image
S211では、表示画像1600の全ての画素で画像形状変形処理もしくはマスク処理により画素値の付与が行われたかを判定し、画素値が付与されていない画素があればS1502に戻る。 In S211, it is determined whether pixel values have been assigned to all pixels in the display image 1600 through image shape transformation processing or mask processing, and if there are any pixels to which no pixel value has been assigned, the process returns to S1502.
このようなステップを表示画像の全ての画素に対して繰り返し実施することで、歪み補正及び画像切り出しや拡大縮小の処理が施された表示画像を出力できる。 By repeating these steps for all pixels of the display image, a display image can be output that has been subjected to distortion correction, image cropping, and enlargement/reduction processing.
S212では、例えばユーザ入力に基づき、画像の受信が停止されていなければ、S201に戻り次の画像を受信し、S202以降の処理を実行する。 In S212, if image reception has not been stopped, for example based on user input, the process returns to S201 to receive the next image and executes the processes from S202 onward.
以上、本実施形態によれば、歪み補正処理に加え、表示領域の拡大縮小や一部領域の切り出し、複数領域を指定した多画面表示などのDRAMアクセスを伴う処理においても、信頼度を用いた制御を行うことで、使用するDRAM帯域を削減することができる。 As described above, according to this embodiment, in addition to distortion correction processing, it is possible to reduce the DRAM bandwidth used by controlling using reliability even in processing that involves DRAM access, such as enlarging or reducing the display area, cutting out a partial area, and displaying multiple areas on a multi-screen.
(実施形態6)
実施形態6では、撮像した画像から所定の被写体を検出して、その被写体までの距離画像を出力する処理において、使用するDRAM帯域を削減する。
(Embodiment 6)
In the sixth embodiment, the DRAM bandwidth used is reduced in the process of detecting a predetermined subject from a captured image and outputting a distance image to the subject.
図17は、実施形態6に係る測距装置の構成を示す図である。前述の実施形態と重複する機能については同一符号を付し、説明を省略する。 Figure 17 is a diagram showing the configuration of a distance measuring device according to embodiment 6. Functions that overlap with those in the previous embodiment are given the same reference numerals and will not be described.
1702は物体検出処理部であり、画像補正部107から出力される一対の撮像画像のうちのいずれか一方を入力として、車番や標識の文字認識や、部品の形状識別といった被写体の認識、識別処理を行ない、物体位置情報を取得する。認識、識別処理には様々な手法がある。予め記憶した対象物とのパターンを比較して類似度を算出する手法でもよいし、多くのデータから関連性を見つけ出して推定する機械学習や、ニューラルネットワークなどの多層構造アルゴリズムを用いて対象物の推定を行なってもよい。
1702 denotes an object detection processing unit, which receives as input one of a pair of captured images output from the
物体検出処理部1702で生成する物体位置情報は、認識、識別対象の被写体に対応する画像領域を示す座標に関する情報である。1703はSRAMであり、本実施形態では1画素毎に算出された物体位置情報を格納する。物体位置情報は1画素毎でなく、被写体を含む矩形領域を示す情報であってもよい。例えば、矩形領域が長方形である場合、長方形の左上頂点の開始座標(X1,Y1)と右下頂点の終了座標(X2,Y2)を矩形領域毎に保持すればよい。物体位置情報の格納先は必ずしもSRAMである必要はなくその他のメモリであってもよい。
The object position information generated by the object
1704は距離画像読み出し判定部である。前述の表示領域情報と、識別対象の被写体についての物体位置情報と、信頼度とに応じて、表示領域内に、認識、識別対象の被写体に対応する画像領域が有り、かつ、信頼度が1である場合、距離画像における表示領域の読み出しが必要と判定する。表示領域内に被写体に対応する画像領域が無い、または信頼度が0の場合は、距離画像の読み出しが不要と判定する。 1704 is a distance image readout determination unit. Depending on the above-mentioned display area information, object position information for the subject to be identified, and the reliability, if there is an image area in the display area that corresponds to the subject to be recognized and identified, and the reliability is 1, it is determined that reading of the display area in the distance image is necessary. If there is no image area in the display area that corresponds to the subject, or if the reliability is 0, it is determined that reading of the distance image is not necessary.
次に、本実施形態の別例として、歪み補正後画像を用いて物体検出を行ない、検出した被写体に対応する画像領域部分の距離画像を出力する構成を示す。図18は、実施形態6に係る測距装置の別構成を示す図であり、画像形状変形部1404とは別に、物体検出処理部の前段に歪み補正用の画像形状変形部を追加している。前述の図17に示す実施形態と重複する機能については同一符号を付し、説明を省略する。
Next, as another example of this embodiment, a configuration is shown in which object detection is performed using the distortion-corrected image, and a distance image of the image area portion corresponding to the detected subject is output. Figure 18 shows another configuration of a distance measuring device according to embodiment 6, in which an image shape transformation unit for distortion correction is added in front of the object detection processing unit, separate from the image
1803はDRAMであり、画像補正部107から出力される一対の撮像画像のうちのいずれか一方の画像データを格納する。本実施形態では、視差を有する画像データaと画像データbのうち、画像データaを用いることとし、画像データaに対して、画像補正部107によって補正した補正後画像を画像データAと呼ぶこととする。
1803 is a DRAM that stores image data of one of a pair of captured images output from the
1804は画像形状変形部であり、予めDRAM1803に格納された座標変換マップを参照して、歪み補正後画像の各画素に対応する補正前画像の画素の座標値を生成する。画像形状変形部1804は、座標変換マップに従って画像データAの歪みを補正して、歪み補正後の画像データA’を生成する。
1804 is an image shape transformation unit that references a coordinate transformation map stored in advance in
1802は、物体検出処理部であり、歪み補正後の画像データA’を用いて、車番や標識の文字認識や、部品の形状識別といった被写体の認識、識別処理を行ない、物体位置情報を取得する。認識、識別処理の手法は前述で説明した通りである。物体位置情報は図示しないSRAMに格納しておいてもよい。 1802 is an object detection processing unit, which uses image data A' after distortion correction to perform subject recognition and identification processing, such as character recognition of vehicle numbers and signs, and part shape identification, to obtain object position information. The recognition and identification processing methods are as described above. The object position information may be stored in an SRAM (not shown).
なお、歪み補正前の画像データAを格納するDRAM1803と、距離画像を格納するDRAM110は同一のDRAMを用いてもよい。この場合、同一の座標変換マップを参照することができる。また、物体検出処理部1802で扱う画像データサイズに予めリサイズするよう座標値を設定した座標変換マップ情報をDRAM1803に格納しておいてもよい。
The same DRAM may be used for the
1805は距離画像読み出し判定部である。物体検出処理部1802で生成した物体位置情報と、信頼度算出部1402で算出した信頼度とを参照して、認識、識別対象の被写体に対応する画像領域で、かつ、信頼度が1であれば、距離画像上の物体位置情報が示す座標の画素値の読み出しが必要と判定する。
1805 is a distance image readout determination unit. It refers to the object position information generated by the object
図19は、本実施形態の測距装置1800における距離画像読み出し判定部1805による距離画像読み出し判定から距離画像の画像形状変形処理までの一例を示すフローチャートである。
Figure 19 is a flowchart showing an example of the process from distance image read determination by the distance image read
S1901では、物体検出処理部1802で生成した物体位置情報を取得する。物体位置情報は、被写体に対応する画像領域の座標を示す情報である。物体位置情報は、画素毎に被写体の有無を1ビット(被写体が有る場合は1、無い場合は0)で図示しないSRAMから読み出してもよいし、被写体に対応する画像領域を含む矩形領域を示す情報であってもよい。例えば、矩形領域が長方形である場合、長方形の左上頂点の開始座標(X1,Y1)と右下頂点の終了座標(X2,Y2)を持つ情報である。
In S1901, the object position information generated by the object
S1902では、DARM110から距離画像の座標変換マップを参照し、物体位置情報が示す座標に対応する画素の中から着目画素を選択し、選択した着目画素に対応する歪み補正前座標位置を生成する。 In S1902, the coordinate transformation map of the distance image is referenced from DARM110, a pixel of interest is selected from among the pixels corresponding to the coordinates indicated by the object position information, and a pre-distortion-corrected coordinate position corresponding to the selected pixel of interest is generated.
S1903では、読み出した歪み補正前座標位置から最も近くにある画素に対応する信頼度をSRAM112から読み出す。そして信頼度が0であれば距離画像の読み出しが不要と判定されS1907に進む。信頼度が1であれば、距離画像上の着目画素の画素値の読み出しが必要と判定されS1906に進む。
In S1903, the reliability corresponding to the pixel closest to the read pre-distortion correction coordinate position is read from the
次にS1906では、S1903で読み出しが必要と判定された距離画像上の着目画素に対して、画像形状変形部1404によって、対応する歪み補正前画像上の画素値の読出しと画像形状変形処理を行う。一方、S1905では、S1903で距離画像の読み出しが不要と判定された画素に対して、歪み補正前画像の読み出しと画像形状変形処理を行わずに、マスク部1405によって所定の値を付与するマスク処理を行う。
Next, in S1906, for a pixel of interest in the distance image that was determined in S1903 to require reading, the image
S1908では、S1906またはS1907で処理した距離画像の画素値を出力する。以上、図19を用いて説明した処理フローを物体位置情報が示す座標全てに対して繰り返し実施することで、識別対象の被写体のみについての距離画像を出力する。 In S1908, the pixel values of the distance image processed in S1906 or S1907 are output. By repeatedly performing the processing flow described above using FIG. 19 for all coordinates indicated by the object position information, a distance image is output for only the subject to be identified.
以上、本実施形態によれば、所定の表示領域内の被写体に対応する画像領域を検出し、その被写体のみについての距離画像を出力する処理において、使用するDRAM帯域を削減することができる。これは本実施形態が、被写体の物体位置情報と信頼度を用いることで、DRAMから読み出す距離画像の画素値を限定することができるためである。 As described above, according to this embodiment, it is possible to reduce the DRAM bandwidth used in the process of detecting an image area corresponding to a subject within a specified display area and outputting a distance image for only that subject. This is because this embodiment can limit the pixel values of the distance image read from the DRAM by using the object position information and reliability of the subject.
なお、被写体の物体位置情報を測距装置の外部から取得しても、前述の説明と同様に被写体の物体位置情報と画素ごとの信頼度を用いることで、DRAMから読み出す距離画像の画素値を限定することができる。本実施形態では物体位置情報の生成を行う構成としたが、物体位置情報の生成を外部装置で行うようにしてもよい。例えば、画像送信部105、または画像補正部107から撮像画像を外部装置(GPUなど)に出力し、外部装置で撮像画像上の被写体に対応する画像領域の検出結果を、物体位置情報として距離画像読み出し判定部1705、1805が取得してもよい。
Even if the object position information of the subject is obtained from outside the distance measuring device, the pixel values of the distance image read from the DRAM can be limited by using the object position information of the subject and the reliability of each pixel as described above. In this embodiment, the object position information is generated, but the object position information may be generated by an external device. For example, the captured image may be output from the
(実施形態7)
実施形態7では、2つの測距装置で生成された測距領域が重複する2つの距離画像、すなわち撮像領域が重複した撮像画像に基づき生成された2つの距離画像を合成して1つの合成距離画像を出力する処理において、使用するDRAM帯域を削減する。
(Embodiment 7)
In embodiment 7, the DRAM bandwidth used is reduced in the process of synthesizing two distance images generated by two ranging devices, in which the ranging areas overlap, i.e., two distance images generated based on captured images in which the imaging areas overlap, and outputting a single synthetic distance image.
図20は、実施形態7に係る測距装置の構成を示す図である。 Figure 20 is a diagram showing the configuration of a distance measuring device according to embodiment 7.
2001は、レンズおよび撮像素子を備えた第1撮像部であり、撮像素子で生成された画像データを出力する。 2001 is a first imaging unit equipped with a lens and an image sensor, and outputs image data generated by the image sensor.
2002は、第1撮像画像処理部であり、第1撮像部2001から画像データを受信して処理する、画像補正部、視差算出部、距離算出部を有する。第1撮像画像処理部2002は、撮像した画像データを用いて、距離画像(距離画像1)を生成し、DRAM2007へ距離画像1を書き出す。
2002 is a first captured image processing unit, which receives and processes image data from the
2003は、第1信頼度算出部であり、第1撮像画像処理部から画像補正後の画像データに基づいて、距離の信頼度(信頼度1)を算出する。信頼度の算出方法は前述の実施形態で説明したとおりである。 2003 is a first reliability calculation unit, which calculates the reliability of the distance (reliability 1) based on the image data after image correction from the first captured image processing unit. The method of calculating the reliability is as described in the above embodiment.
2004は、レンズおよび撮像素子を備えた第2撮像部であり、撮像素子で生成された画像データを出力する。 2004 is a second imaging unit equipped with a lens and an image sensor, which outputs image data generated by the image sensor.
2005は、第2撮像画像処理部であり、第2撮像部2004から画像データを受信して処理する、画像補正部、視差算出部、距離算出部を有する。第2撮像画像処理部2005は、撮像した画像データを用いて、距離画像(距離画像2)を生成し、DRAM2007へ距離画像2を書き出す。
2005 is a second captured image processing unit, which receives and processes image data from the
2006は、第2信頼度算出部であり、第2撮像画像処理部から画像補正後の画像データに基づいて、距離の信頼度(信頼度2)を算出する。信頼度の算出方法は前述の実施形態で説明したとおりである。 2006 is a second reliability calculation unit, which calculates the reliability of the distance (reliability 2) based on the image data after image correction from the second captured image processing unit. The method of calculating the reliability is as described in the above embodiment.
2008は、距離画像読み出し判定部である。表示画像の各画素に対応する、距離画像1、距離画像2の座標値を生成する。具体的には、DRAM2007に予め格納された距離画像1、距離画像2それぞれに対応した歪み補正前後の距離画像の座標を対応付ける座標変換マップを参照し、各画素の座標値を生成する。距離画像読み出し判定部2006は、生成した座標値の最も近くにある画素に対応する信頼度を、第1信頼度算出部と第2信頼度算出部のそれぞれから取得する。
2008 is a distance image readout determination unit. It generates coordinate values of distance image 1 and distance image 2 corresponding to each pixel of the display image. Specifically, it generates coordinate values of each pixel by referring to a coordinate transformation map that associates coordinates of distance images before and after distortion correction corresponding to distance image 1 and distance image 2, which are stored in advance in
距離画像読み出し判定部2008は、距離画像1と距離画像2とに重複した領域が存在する場合、各信頼度の大小(信頼度の高い、低い)を判定し、信頼度の高い方の距離画像の画素値を読み出すよう距離情報合成部2009へ指示する。いずれの信頼度も0である場合は、距離画像の読み出しは不要と判定し、マスク部2010でマスク処理(表示画像の画素に予め定められた値を設定して出力)を行う。なお、各信頼度が0以外の同一値である場合は、どちらの距離画像の画素値を読み出すよう指示してもよい。但し、このよう場合、信頼度が算出された画素の座標値が第1撮像部2001又は第2撮像部2004の光軸中心から近い方の距離画像の画素値を読み出すことで、光学歪の影響を低減することができる。
If there is an overlapping area between distance image 1 and distance image 2, the distance image read
距離情報合成部2009は、距離画像読み出し判定部2008からの指示に応じて、第1撮像部2001および第1撮像画像処理部2002、第2撮像部2004および第2撮像画像処理部2005のいずれか一方が生成した距離画像の読出しを行なう。なお、距離情報合成部2009は、前述の実施形態のとおり画質改善のための補間処理を行ってもよい。
The distance
以上、実施形態7に係る測距装置のハードウェア構成として、図20に示すような2つの撮像部2001、2004を備えた構成を例示したが、3つ以上の撮像部を用いた場合も同様に適用である。
As described above, a hardware configuration of a distance measuring device according to embodiment 7 has been illustrated as having two
以上、本実施形態によれば、複数の測距可能なカメラからの距離画像を合成して表示する際に、画素ごとの信頼度に基づきDRAMから読み出す距離画像の画素値を限定することで、使用するDRAM帯域を削減することができる。距離画像を合成する際に、光学歪みを補正する歪み補正を行うことも可能であり、同様に使用するDRAM帯域を削減することができる。なお、合成する複数の距離画像の重複した領域に対する歪み補正は、信頼度が最も高い距離画像に対してのみ行うことで、全ての距離画像に対して歪み補正を行う場合に比べ、使用するDRAM帯域を削減することができる。 As described above, according to this embodiment, when distance images from multiple distance-measuring cameras are synthesized and displayed, the pixel values of the distance images read from the DRAM are limited based on the reliability of each pixel, thereby reducing the DRAM bandwidth used. When synthesizing distance images, it is also possible to perform distortion correction to correct optical distortion, which similarly reduces the DRAM bandwidth used. Note that by performing distortion correction on overlapping areas of multiple distance images to be synthesized only on the distance image with the highest reliability, the DRAM bandwidth used can be reduced compared to when distortion correction is performed on all distance images.
(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
Other Examples
The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.
また、前述の実施形態では、測距方法として、1つの測距画素に対して複数のフォトダイオードを配置し、位相差方式を用い距離を算出する方法とステレオカメラを使った方法を説明した。しかし本発明は、これら測距方法に限定されず、TOFやミリ波レーダやLiDAR(Light Detection and Ranging)などで取得した距離情報を可視化して表示する際の形状変形処理にも適用できる。 In the above embodiment, the distance measurement methods described are a method in which multiple photodiodes are arranged for one distance measurement pixel and the distance is calculated using a phase difference method, and a method using a stereo camera. However, the present invention is not limited to these distance measurement methods, and can also be applied to shape deformation processing when visualizing and displaying distance information obtained by TOF, millimeter wave radar, LiDAR (Light Detection and Ranging), etc.
100 測距装置
101 撮像部
102 距離画像生成部
110 DRAM
111 信頼度算出部
115 歪み補正部
1404 画像形状変形部
1702 物体検出処理部
100
111
Claims (19)
視差を有する一対の撮像画像に基づき前記距離画像を生成する生成手段と、
前記距離画像のうち、信頼度が所定の閾値以上である領域について、前記一対の撮像画像を生成した撮像手段の光学系に起因する前記距離画像における歪みを補正する補正手段と、
を備えることを特徴とする生成装置。 A generating device for generating a distance image representing a distance to a subject,
a generating means for generating the distance image based on a pair of captured images having parallax;
a correction means for correcting distortion in the distance image caused by an optical system of an imaging means that generated the pair of captured images, for an area in the distance image where the reliability is equal to or greater than a predetermined threshold value;
A generating device comprising:
視差を有する一対の撮像画像のうち、信頼度が所定の閾値以上である領域について、前記一対の撮像画像を生成した撮像手段の光学系に起因する前記一対の撮像画像における歪みを補正する補正手段と、
前記補正手段により歪みを補正された一対の撮像画像に基づき距離画像を生成する生成手段と、
を備えることを特徴とする生成装置。 A generating device for generating a distance image representing a distance to a subject,
a correction means for correcting distortion in a pair of captured images having parallax, the distortion being caused by an optical system of an imaging means that generated the pair of captured images, for an area in which the reliability is equal to or greater than a predetermined threshold value;
a generating means for generating a distance image based on the pair of captured images whose distortion has been corrected by the correcting means;
A generating device comprising:
ことを特徴とする請求項1又は2に記載の生成装置。 3. The generating device according to claim 1, wherein the correction means calculates the reliability based on pixel values of a pixel of interest and pixels surrounding the pixel of interest.
ことを特徴と得る請求項1乃至3のいずれか1項に記載の生成装置。 The generating device according to claim 1 , wherein the reliability is a change in contrast calculated based on a variance of pixel values of a pixel of interest and pixels surrounding the pixel of interest.
ことを特徴とする請求項1乃至4のいずれか1項に記載の生成装置。 The generating device according to claim 1 , wherein the correction means applies different predetermined distortion correction methods depending on the proportion of the area in which the reliability is less than the predetermined threshold.
をさらに備えることを特徴とする請求項1乃至5のいずれか1項に記載の生成装置。 The generating device according to claim 1 , further comprising a masking unit that sets a predetermined value to pixels in an area in which the reliability is less than the predetermined threshold value.
をさらに備えることを特徴とする請求項1乃至6のいずれか1項に記載の生成装置。 A generating device as described in any one of claims 1 to 6, characterized in that it further comprises a selection means for selecting a process that involves access to the storage means that is below a predetermined access bandwidth, based at least on a predetermined access bandwidth to the storage means that stores the distance image and the proportion of areas where the reliability is above a predetermined threshold.
前記補正手段は、前記選択手段により選択された歪み補正方法を適用する
ことを特徴とする請求項7に記載の生成装置。 the selection means selects one distortion correction method based on a ratio of an area in which the reliability is less than a predetermined threshold and an access bandwidth to the storage means required for each of a plurality of predetermined distortion correction methods;
The generating device according to claim 7 , wherein the correction means applies the distortion correction method selected by the selection means.
ことを特徴とする請求項8記載の生成装置。 The generating device described in claim 8, characterized in that the selection means selects one from the plurality of specified additional processes based on the specified access bandwidth, the percentage of the area where the reliability is below a specified threshold, the access bandwidth to the storage means required by the selected distortion correction method, and the access bandwidth to the storage means required by the plurality of specified additional processes.
ことを特徴とする請求項8又は9に記載の生成装置。 The generating device according to claim 8 or 9, characterized in that the selection means selects one distortion correction method from the plurality of predetermined distortion correction methods in which different pixels are referenced when interpolating pixel values in distortion correction.
前記補正手段は、前記バッファに対応する画素単位で信頼度を算出し、前記キャッシュ手段から歪み補正を行う画素値を取得する
ことを特徴とする請求項7乃至9のいずれか1項に記載の生成装置。 the storage means includes a buffer capable of storing pixel values of a predetermined number of pixels, and a cache means for replacing pixel values in units of the buffer;
10. The generating device according to claim 7, wherein the correction means calculates a reliability for each pixel corresponding to the buffer, and acquires pixel values for which distortion correction is performed from the cache means.
前記補正手段は、前記切り出し領域と、前記信頼度が所定の閾値以上である領域とに基づいて、歪みを補正することを特徴とする請求項1に記載の生成装置。 a designation unit for designating a part of the distance image as a cut-out region,
The generating device according to claim 1 , wherein the correction means corrects the distortion based on the cut-out region and a region in which the reliability is equal to or higher than a predetermined threshold value.
前記合成手段は、前記合成距離画像の前記重複した領域に対応する領域の画素値に、前記重複した領域における複数の前記距離画像の画素値のうち、前記重複した領域の前記信頼度が最も高い前記距離画像の画素値を使用する、
ことを特徴とする請求項1乃至13のいずれか1項に記載の生成装置。 a synthesis unit for synthesizing a plurality of distance images having overlapping areas, the distance images being generated based on a plurality of pairs of captured images having overlapping imaging areas, to generate a synthetic distance image,
the synthesis means uses, as a pixel value of an area of the synthetic distance image corresponding to the overlapped area, a pixel value of the distance image having the highest reliability of the overlapped area among pixel values of the plurality of distance images in the overlapped area.
A generating device according to any one of claims 1 to 13.
ことを特徴とする請求項14に記載の生成装置。 the correction means corrects distortion of the distance image having the highest reliability in the overlapping region among the regions in each of the plurality of distance images in which the reliability is equal to or greater than a threshold value;
15. The generating device according to claim 14.
視差を有する一対の撮像画像に基づき前記距離画像を生成する生成ステップと、
前記距離画像のうち、信頼度が所定の閾値以上である領域について、前記一対の撮像画像を生成した撮像手段の光学系に起因する前記距離画像における歪みを補正する補正ステップと、
を有することを特徴とする生成方法。 A method for generating a distance image representing a distance to a subject, comprising the steps of:
a generating step of generating the distance image based on a pair of captured images having parallax;
a correction step of correcting distortion in the distance image caused by an optical system of an imaging means that generated the pair of captured images, for an area in the distance image where the reliability is equal to or greater than a predetermined threshold value;
A method for generating a product comprising the steps of:
視差を有する一対の撮像画像のうち、信頼度が所定の閾値以上である領域について、前記一対の撮像画像を生成した撮像手段の光学系に起因する前記一対の撮像画像における歪みを補正する補正ステップと、
前記補正ステップにより歪みを補正された一対の撮像画像に基づき距離画像を生成する生成ステップと、
を有することを特徴とする生成方法。 A method for generating a distance image representing a distance to a subject, comprising the steps of:
a correction step of correcting distortion in a pair of captured images having parallax, the distortion being caused by an optical system of an imaging unit that generated the pair of captured images, for an area in which the reliability is equal to or greater than a predetermined threshold value;
a generating step of generating a distance image based on the pair of captured images whose distortion has been corrected by the correcting step;
A method for generating a product comprising the steps of:
被写体までの距離を表す距離画像を生成する生成方法であって、
視差を有する一対の撮像画像に基づき前記距離画像を生成する生成ステップと、
前記距離画像のうち、信頼度が所定の閾値以上である領域について、前記一対の撮像画像を生成した撮像手段の光学系に起因する前記距離画像における歪みを補正する補正ステップと、
を有する方法の各ステップを実行させることを特徴とするプログラム。 On the computer,
A method for generating a distance image representing a distance to a subject, comprising the steps of:
a generating step of generating the distance image based on a pair of captured images having parallax;
a correction step of correcting distortion in the distance image caused by an optical system of an imaging means that generated the pair of captured images, for an area in the distance image where the reliability is equal to or greater than a predetermined threshold value;
A program for executing each step of the method.
被写体までの距離を表す距離画像を生成する生成方法であって、
視差を有する一対の撮像画像のうち、信頼度が所定の閾値以上である領域について、前記一対の撮像画像を生成した撮像手段の光学系に起因する前記一対の撮像画像における歪みを補正する補正ステップと、
前記補正ステップにより歪みを補正された一対の撮像画像に基づき距離画像を生成する生成ステップと、
を有する方法の各ステップを実行させることを特徴とするプログラム。 On the computer,
A method for generating a distance image representing a distance to a subject, comprising the steps of:
a correction step of correcting distortion in a pair of captured images having parallax, the distortion being caused by an optical system of an imaging unit that generated the pair of captured images, for an area in which the reliability is equal to or greater than a predetermined threshold value;
a generating step of generating a distance image based on the pair of captured images whose distortion has been corrected by the correcting step;
A program for executing each step of the method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US17/168,292 US20210256665A1 (en) | 2020-02-18 | 2021-02-05 | Generation apparatus, generation method, and storage medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020025037 | 2020-02-18 | ||
| JP2020025037 | 2020-02-18 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2021131377A JP2021131377A (en) | 2021-09-09 |
| JP7532238B2 true JP7532238B2 (en) | 2024-08-13 |
Family
ID=77550814
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2020209189A Active JP7532238B2 (en) | 2020-02-18 | 2020-12-17 | GENERATION APPARATUS, GENERATION METHOD, AND PROGRAM |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7532238B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2024042995A1 (en) * | 2022-08-24 | 2024-02-29 | ソニーセミコンダクタソリューションズ株式会社 | Light detection device and light detection system |
| CN117217996A (en) * | 2023-08-30 | 2023-12-12 | 大连海事大学 | Deep image stitching method based on Transformer |
| WO2025253596A1 (en) * | 2024-06-06 | 2025-12-11 | Ntt株式会社 | Object detection device, method, and program |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2012147281A (en) | 2011-01-13 | 2012-08-02 | Ricoh Co Ltd | Image processing apparatus |
| JP2013109416A (en) | 2011-11-17 | 2013-06-06 | Ricoh Co Ltd | Camera calibration device, occupant support device and distortion coefficient generating method for camera calibration |
| WO2017212686A1 (en) | 2016-06-08 | 2017-12-14 | 株式会社ソニー・インタラクティブエンタテインメント | Image generation device and image generation method |
| JP2018195079A (en) | 2017-05-17 | 2018-12-06 | キヤノン株式会社 | Image processing apparatus and image processing method |
| JP2019045249A (en) | 2017-08-31 | 2019-03-22 | オリンパス株式会社 | Measuring device and method for operating measuring device |
-
2020
- 2020-12-17 JP JP2020209189A patent/JP7532238B2/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2012147281A (en) | 2011-01-13 | 2012-08-02 | Ricoh Co Ltd | Image processing apparatus |
| JP2013109416A (en) | 2011-11-17 | 2013-06-06 | Ricoh Co Ltd | Camera calibration device, occupant support device and distortion coefficient generating method for camera calibration |
| WO2017212686A1 (en) | 2016-06-08 | 2017-12-14 | 株式会社ソニー・インタラクティブエンタテインメント | Image generation device and image generation method |
| JP2018195079A (en) | 2017-05-17 | 2018-12-06 | キヤノン株式会社 | Image processing apparatus and image processing method |
| JP2019045249A (en) | 2017-08-31 | 2019-03-22 | オリンパス株式会社 | Measuring device and method for operating measuring device |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2021131377A (en) | 2021-09-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9262807B2 (en) | Method and system for correcting a distorted input image | |
| US9280810B2 (en) | Method and system for correcting a distorted input image | |
| JP5580164B2 (en) | Optical information processing apparatus, optical information processing method, optical information processing system, and optical information processing program | |
| JP7532238B2 (en) | GENERATION APPARATUS, GENERATION METHOD, AND PROGRAM | |
| CN113052907B (en) | Positioning method of mobile robot in dynamic environment | |
| US20140125771A1 (en) | Systems, methods, and computer program products for runtime adjustment of image warping parameters in a multi-camera system | |
| JP7082713B2 (en) | Rolling Shutter Correction for images / videos using convolutional neural networks in applications for image / video SFM / SLAM | |
| EP3633606B1 (en) | Information processing device, information processing method, and program | |
| JP2011008687A (en) | Image processor | |
| WO2022267444A1 (en) | Method and device for camera calibration | |
| US10846837B2 (en) | Image processing apparatus, image processing method, and storage medium | |
| US9998725B2 (en) | Apparatus and method for generating depth information | |
| CN111507132A (en) | A positioning method, device and equipment | |
| US10600202B2 (en) | Information processing device and method, and program | |
| US20230319429A1 (en) | Object distance estimation with camera lens focus calibration | |
| US20210256665A1 (en) | Generation apparatus, generation method, and storage medium | |
| US10255657B2 (en) | Image perspective conversion method by converting coordinates of polygonal sub-regions and system thereof | |
| US11270412B2 (en) | Image signal processor, method, and system for environmental mapping | |
| JP2016527574A (en) | A method for registering data using a set of primitives | |
| JP2004062103A (en) | Image processing apparatus and method, information processing apparatus and method, recording medium, and program | |
| US10346680B2 (en) | Imaging apparatus and control method for determining a posture of an object | |
| JP2013009082A (en) | Video composing apparatus, video composing method, and video composing program | |
| US12593019B2 (en) | Information processing apparatus using parallax in images captured from a plurality of directions, method and storage medium | |
| US20260011117A1 (en) | Image processing apparatus, image processing method, and storage medium | |
| US20250265726A1 (en) | Information processing device, processing method for information processing device, and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20231213 |
|
| TRDD | Decision of grant or rejection written | ||
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20240626 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240702 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240731 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7532238 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |