JP2008216126A - Distance image generating device, distance image generation method, and program - Google Patents

Distance image generating device, distance image generation method, and program Download PDF

Info

Publication number
JP2008216126A
JP2008216126A JP2007055827A JP2007055827A JP2008216126A JP 2008216126 A JP2008216126 A JP 2008216126A JP 2007055827 A JP2007055827 A JP 2007055827A JP 2007055827 A JP2007055827 A JP 2007055827A JP 2008216126 A JP2008216126 A JP 2008216126A
Authority
JP
Japan
Prior art keywords
image
resolution
search
corresponding point
hierarchical
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.)
Granted
Application number
JP2007055827A
Other languages
Japanese (ja)
Other versions
JP5098369B2 (en
Inventor
Yasushi Kawabe
恭 河邊
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.)
Konica Minolta Inc
Original Assignee
Konica Minolta Inc
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 Konica Minolta Inc filed Critical Konica Minolta Inc
Priority to JP2007055827A priority Critical patent/JP5098369B2/en
Publication of JP2008216126A publication Critical patent/JP2008216126A/en
Application granted granted Critical
Publication of JP5098369B2 publication Critical patent/JP5098369B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a distance image generating device, a distance image generation method, and a program capable of precisely generating a distance image, at a high speed. <P>SOLUTION: The distance image generation device includes imaging devices 2a, 2b for acquiring a standard image and a reference image; multiple resolution image generating part 13 generating a plurality of hierarchical images with different resolution about the standard image and the reference image; a corresponding point search part 15, which includes an SAD calculation part 6 performing corresponding point search for at least the hierarchical image having the lowest resolution and a POC calculation part 7 for performing, corresponding point search for at least the hierarchical image having the highest resolution, which starts the corresponding point search from the hierarchical image having the low resolution, sequentially performs the corresponding point search for the hierarchical image having the high resolution, and sequentially repeats the corresponding point search, until the hierarchical image having the highest resolution is reached; a search area setting part 14 for setting a search area of the hierarchical image of the next hierarchy, on the basis of the search result about the immediately preceding hierarchy; and a distance image generation part 16 generating the distance image on the basis of the search result. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は距離画像生成装置、距離画像生成方法及びプログラムに係り、特に、同一対象物について複数の画像を撮影することにより距離画像を生成する距離画像生成装置、距離画像生成方法及びプログラムに関する。   The present invention relates to a distance image generation device, a distance image generation method, and a program, and more particularly, to a distance image generation device, a distance image generation method, and a program that generate a distance image by capturing a plurality of images of the same object.

従来、複数の撮像手段により同一対象物(被写体)を異なる位置から撮像して複数の画像情報を得て、SAD(Sum of Absolute Difference)演算法、SSD(Sum of Squared Difference)演算法等による相関演算を行うことによりこの画像情報の相関度を算出し、相関度に基づいて同一対象物に対する視差値を求め、視差値から対象物の位置(距離値)を求めて距離画像を生成する装置が知られている。   Conventionally, the same object (subject) is imaged from different positions by a plurality of imaging means to obtain a plurality of pieces of image information, and correlation by an SAD (Sum of Absolute Difference) calculation method, an SSD (Sum of Squared Difference) calculation method, or the like. An apparatus for calculating a correlation degree of the image information by performing an operation, obtaining a parallax value for the same object based on the degree of correlation, obtaining a position (distance value) of the object from the parallax value, and generating a distance image Are known.

また、このような装置において、解像度の異なる複数の画像を生成して、解像度別に階層構造とし、低解像度の上位層から高解像度の下位層に向かって逐次SAD演算法、SSD演算法等による相関演算を繰り返すことにより距離画像を生成する技術が知られている(例えば、特許文献1参照)。   Further, in such an apparatus, a plurality of images having different resolutions are generated, and a hierarchical structure is formed for each resolution. Correlation by a sequential SAD calculation method, SSD calculation method, or the like from a lower resolution upper layer to a higher resolution lower layer A technique for generating a distance image by repeating the calculation is known (for example, see Patent Document 1).

特許文献1に開示されている技術では、演算手法として、高速で処理が可能なSAD演算法、SSD演算法等を用いるとともに、低解像度の上位層から高解像度の下位層に向かって演算を繰り返す際に、低解像度の上位層で得られた視差値に基づいて次の階層における探索領域の設定を行うため、最下層(最高解像度の層)まで演算処理を行う時間を短縮することができる。   In the technique disclosed in Patent Document 1, an SAD calculation method, an SSD calculation method, or the like that can be processed at high speed is used as a calculation method, and the calculation is repeated from a lower resolution upper layer to a higher resolution lower layer. At this time, since the search area in the next layer is set based on the parallax value obtained in the lower resolution upper layer, the time for performing the arithmetic processing up to the lowest layer (the highest resolution layer) can be reduced.

また、近年では、より高精度に3次元位置情報を得られる手法として、POC(Phase-Only Correlation;位相限定相関)演算法を用いて基準画像と参照画像との対応点を探索し、両画像の位置ずれ量に基づいて対象物の距離画像を生成することが提案されている(例えば、非特許文献1参照)。   In recent years, as a method for obtaining three-dimensional position information with higher accuracy, a corresponding point between a reference image and a reference image is searched using a POC (Phase-Only Correlation) calculation method. It has been proposed to generate a distance image of an object based on the amount of positional deviation (see, for example, Non-Patent Document 1).

POC演算法は、もとになる画像のデータとこれと照合すべき画像のデータとをフーリエ変換で数学的に処理して、振幅(濃淡データ)と位相(像の輪郭データ)とに分解し、このうち位相情報のみを用いて、両画像の相関を求めるアルゴリズムであり、SAD演算法、SSD演算法等、従来の振幅情報を用いた相関演算法と異なって、外乱に強く、高精度な演算結果を得られるとの特色がある。   In the POC calculation method, the original image data and the image data to be collated are mathematically processed by Fourier transformation to be decomposed into amplitude (grayscale data) and phase (image contour data). This is an algorithm for obtaining the correlation between both images using only the phase information. Unlike conventional correlation calculation methods using amplitude information, such as SAD calculation method and SSD calculation method, the algorithm is resistant to disturbance and has high accuracy. There is a feature that the calculation result can be obtained.

さらに、非特許文献1に開示されている技術では、解像度別に階層構造に形成された画像に対して、低解像度の上位層から高解像度の下位層に向かって順次POC演算を行うことにより、より高精度な対応点探索が可能となり、正確な距離画像の生成が可能である。
特開2001−319229号公報 A Sub-Pixel Correspondence Search Technique for Computer Vision Applications(東北大学)
Furthermore, in the technique disclosed in Non-Patent Document 1, the POC operation is sequentially performed on the image formed in the hierarchical structure according to the resolution from the lower resolution upper layer to the higher resolution lower layer. It is possible to search for corresponding points with high accuracy and to generate an accurate distance image.
JP 2001-319229 A A Sub-Pixel Correspondence Search Technique for Computer Vision Applications (Tohoku University)

しかしながら、特許文献1に開示されているように、SAD演算法、SSD演算法を用いる場合には、高速な処理が可能な反面、高精度に視差値を算出することは難しく、正確な距離画像を得ることができないとの問題があった。   However, as disclosed in Patent Document 1, when the SAD calculation method and the SSD calculation method are used, high-speed processing is possible, but it is difficult to calculate the parallax value with high accuracy. There was a problem with not being able to get.

また、非特許文献1に開示されているPOC演算法は、高精度な演算結果が得られる半面、演算処理に時間を要する。このため、例えば非特許文献1に開示されている技術のように、最低解像度から順にすべての階層についてPOC演算法で処理を行うとすると、処理時間がかかって作業効率が低下するとの問題がある。   In addition, the POC calculation method disclosed in Non-Patent Document 1 can obtain a high-precision calculation result, but requires a long time for calculation processing. For this reason, for example, as in the technique disclosed in Non-Patent Document 1, if processing is performed for all hierarchies in order from the lowest resolution, there is a problem that the processing efficiency is reduced and the work efficiency is lowered. .

そこで、本発明は以上のような課題を解決するためになされたものであり、高速かつ高精度に距離画像を生成することのできる距離画像生成装置、距離画像生成方法及びプログラムを提供することを目的とするものである。   Therefore, the present invention has been made to solve the above-described problems, and provides a distance image generation device, a distance image generation method, and a program that can generate a distance image at high speed and with high accuracy. It is the purpose.

上記課題を解決するために、請求項1に記載の距離画像生成装置は、
第1画像情報と比較対象となる第2画像情報とを取得する画像取得手段と、
前記画像取得手段により取得された前記第1画像情報及び前記第2画像情報について解像度の異なる複数の階層画像が低解像度から高解像度まで順に階層構造をなす多重解像度画像を生成する多重解像度画像生成手段と、
前記第1画像情報と前記第2画像情報とを照合して所定の探索領域について対応点を探索するものであって、前記多重解像度画像のうち、少なくとも最低解像度の階層画像に対して第1の演算手法により対応点探索を行う第1の演算手段と、少なくとも最高解像度の階層画像に対して前記第1の演算手法よりも精度の高い第2の演算手法により対応点探索を行う第2の演算手段と、を備え、前記多重解像度画像のうち、低解像度の階層画像から前記対応点探索を開始し、順次解像度の高い階層画像について前記対応点探索を行い、最高解像度の階層画像に至るまで順に前記対応点探索を繰り返す対応点探索手段と、
前記対応点探索手段により一つの階層画像についての探索が終了すると当該階層画像についての探索結果に基づいて次の階層の階層画像の探索領域を設定する探索領域設定手段と、
前記対応点探索手段による探索結果に基づいて距離画像を生成する距離画像生成手段と、
を備えていることを特徴としている。
In order to solve the above-described problem, a distance image generation device according to claim 1 is provided.
Image acquisition means for acquiring first image information and second image information to be compared;
Multi-resolution image generation means for generating a multi-resolution image in which a plurality of hierarchical images having different resolutions form a hierarchical structure in order from low resolution to high resolution for the first image information and the second image information acquired by the image acquisition means When,
The first image information and the second image information are collated to search for a corresponding point in a predetermined search area, and at least a first resolution layer image of the lowest resolution among the multi-resolution images A first calculation means for searching for corresponding points by a calculation method; and a second calculation for searching for corresponding points by a second calculation method that is more accurate than the first calculation method for at least the highest resolution hierarchical image. And starting the corresponding point search from a low-resolution hierarchical image among the multi-resolution images, sequentially performing the corresponding point search for a high-resolution hierarchical image, and sequentially reaching the highest-resolution hierarchical image. Corresponding point search means for repeating the corresponding point search;
Search area setting means for setting a search area for a next hierarchical image based on a search result for the hierarchical image when the search for one hierarchical image is completed by the corresponding point search means;
A distance image generating means for generating a distance image based on a search result by the corresponding point searching means;
It is characterized by having.

請求項2に記載の発明は、請求項1に記載の距離画像生成装置であって、
前記第2の演算手段による対応点探索が行われた後は、以降の階層画像について前記第1の演算手段による対応点探索を行わないことを特徴としている。
The invention according to claim 2 is the distance image generation device according to claim 1,
After the corresponding point search by the second calculation means is performed, the corresponding point search by the first calculation means is not performed for the subsequent hierarchical images.

請求項3に記載の発明は、請求項1又は請求項2に記載の距離画像生成装置であって、
前記第1の演算手段により行われる第1の演算手法は、SAD演算法、SSD演算法、NCC演算法のうちのいずれかであることを特徴としている。
The invention according to claim 3 is the distance image generation device according to claim 1 or 2, wherein
The first calculation method performed by the first calculation means is any one of an SAD calculation method, an SSD calculation method, and an NCC calculation method.

請求項4に記載の発明は、請求項1から請求項3のいずれか一項に記載の距離画像生成装置であって、
前記第2の演算手段により行われる第2の演算手法は、POC演算法であることを特徴としている。
The invention according to claim 4 is the distance image generation device according to any one of claims 1 to 3,
The second calculation method performed by the second calculation means is a POC calculation method.

請求項5に記載の距離画像生成方法は、
第1画像情報と比較対象となる第2画像情報とを取得する画像取得工程と、
前記画像取得工程において取得された前記第1画像情報及び前記第2画像情報について解像度の異なる複数の階層画像が低解像度から高解像度まで順に階層構造をなす多重解像度画像を生成する多重解像度画像生成工程と、
前記第1画像情報と前記第2画像情報とを照合して所定の探索領域について対応点を探索するものであって、前記多重解像度画像のうち、少なくとも最低解像度の階層画像に対して第1の演算手法により対応点探索を行う第1の演算工程と、少なくとも最高解像度の階層画像に対して前記第1の演算手法よりも精度の高い第2の演算手法により対応点探索を行う第2の演算工程と、を含み、前記多重解像度画像のうち、低解像度の階層画像から前記対応点探索を開始し、順次解像度の高い階層画像について前記対応点探索を行い、最高解像度の階層画像に至るまで順に前記対応点探索を繰り返す対応点探索工程と、
前記対応点探索工程において一つの階層画像についての探索が終了すると当該階層画像についての探索結果に基づいて次の階層の階層画像の探索領域を設定する探索領域設定工程と、
前記対応点探索工程における探索結果に基づいて距離画像を生成する距離画像生成工程と、
を備えていることを特徴としている。
The distance image generation method according to claim 5,
An image acquisition step of acquiring first image information and second image information to be compared;
A multi-resolution image generation step of generating a multi-resolution image in which a plurality of hierarchical images having different resolutions form a hierarchical structure in order from a low resolution to a high resolution with respect to the first image information and the second image information acquired in the image acquisition step When,
The first image information and the second image information are collated to search for a corresponding point in a predetermined search area, and at least a first resolution layer image of the lowest resolution among the multi-resolution images A first calculation step of searching for corresponding points by a calculation method, and a second calculation of searching for corresponding points by a second calculation method having higher accuracy than the first calculation method for at least the highest resolution hierarchical image And starting the corresponding point search from a low-resolution hierarchical image among the multi-resolution images, sequentially performing the corresponding point search for a high-resolution hierarchical image, and sequentially reaching the highest-resolution hierarchical image. A corresponding point search step for repeating the corresponding point search;
A search region setting step of setting a search region for a hierarchical image of the next layer based on a search result for the hierarchical image when the search for one hierarchical image is completed in the corresponding point search step;
A distance image generation step of generating a distance image based on a search result in the corresponding point search step;
It is characterized by having.

請求項6に記載の発明は、請求項5に記載の距離画像生成方法であって、
前記第2の演算工程による対応点探索が行われた後は、以降の階層画像について前記第1の演算工程による対応点探索を行わないことを特徴とする。
Invention of Claim 6 is the distance image generation method of Claim 5, Comprising:
After the corresponding point search by the second calculation step is performed, the corresponding point search by the first calculation step is not performed for the subsequent hierarchical images.

請求項7に記載の発明は、請求項5又は請求項6に記載の距離画像生成方法であって、
前記第1の演算工程により行われる第1の演算手法は、SAD演算法、SSD演算法、NCC演算法のうちのいずれかであることを特徴とする。
Invention of Claim 7 is the distance image generation method of Claim 5 or Claim 6, Comprising:
The first calculation method performed in the first calculation step is any one of an SAD calculation method, an SSD calculation method, and an NCC calculation method.

請求項8に記載の発明は、請求項5から請求項7のいずれか一項に記載の距離画像生成方法であって、
前記第2の演算工程により行われる第2の演算手法は、POC演算法であることを特徴とする。
Invention of Claim 8 is the distance image generation method as described in any one of Claim 5-7, Comprising:
The second calculation method performed in the second calculation step is a POC calculation method.

請求項9に記載の発明は、コンピュータ読取可能なプログラムであって、
第1画像情報と比較対象となる第2画像情報とについて解像度の異なる複数の階層画像が低解像度から高解像度まで順に階層構造をなす多重解像度画像を生成する多重解像度画像生成機能と、
前記第1画像情報と前記第2画像情報とを照合して所定の探索領域について対応点を探索するものであって、前記多重解像度画像のうち、少なくとも最低解像度の階層画像に対して第1の演算手法により対応点探索を行う第1の演算機能と、少なくとも最高解像度の階層画像に対して前記第1の演算手法よりも精度の高い第2の演算手法により対応点探索を行う第2の演算機能と、を含み、前記多重解像度画像のうち、低解像度の階層画像から前記対応点探索を開始して順次解像度の高い階層画像について前記対応点探索を行い、最高解像度の階層画像に至るまで順に前記対応点探索を繰り返す対応点探索機能と、
前記対応点探索機能により一つの階層画像についての探索が終了すると当該階層画像についての探索結果に基づいて次の階層の階層画像の探索領域を設定する探索領域設定機能と、
前記対応点探索機能による探索結果に基づいて距離画像を生成する距離画像生成機能と、
をコンピュータに実現させることを特徴とする。
The invention according to claim 9 is a computer-readable program,
A multi-resolution image generation function for generating a multi-resolution image in which a plurality of hierarchical images having different resolutions form a hierarchical structure in order from a low resolution to a high resolution for the first image information and the second image information to be compared;
The first image information and the second image information are collated to search for a corresponding point in a predetermined search area, and at least a first resolution layer image of the lowest resolution among the multi-resolution images A first calculation function for searching for corresponding points by a calculation method, and a second calculation for searching for corresponding points by a second calculation method that is more accurate than the first calculation method for at least the highest resolution hierarchical image Among the multi-resolution images, the corresponding point search is started from a low-resolution hierarchical image, and the corresponding point search is sequentially performed for a hierarchical image with a high resolution, and the hierarchical image with the highest resolution is sequentially reached. A corresponding point search function for repeating the corresponding point search;
A search area setting function for setting a search area for the next hierarchical image based on a search result for the hierarchical image when the search for the hierarchical image is completed by the corresponding point search function;
A distance image generation function for generating a distance image based on a search result by the corresponding point search function;
Is realized by a computer.

請求項10に記載の発明は、請求項9に記載のプログラムであって、
前記第2の演算手法による対応点探索が行われた後は、以降の階層画像について前記第1の演算手法による対応点探索を行わないことを特徴とする。
Invention of Claim 10 is a program of Claim 9, Comprising:
After the corresponding point search by the second calculation method is performed, the corresponding point search by the first calculation method is not performed for the subsequent hierarchical images.

請求項11に記載の発明は、請求項9又は請求項10に記載のプログラムであって、
前記第1の演算手法は、SAD演算法、SSD演算法、NCC演算法のうちのいずれかであることを特徴とする。
Invention of Claim 11 is a program of Claim 9 or Claim 10, Comprising:
The first calculation method is any one of an SAD calculation method, an SSD calculation method, and an NCC calculation method.

請求項12に記載の発明は、請求項9から請求項11のいずれか一項に記載のプログラムであって、
前記第2の演算手法は、POC演算法であることを特徴とする。
The invention according to claim 12 is the program according to any one of claims 9 to 11,
The second calculation method is a POC calculation method.

請求項1、請求項5又は請求項9に記載の発明によれば、解像度の異なる複数の階層画像からなる多重解像度画像を生成して、低解像度の階層画像から高解像度の階層画像に向かって順次対応点の探索処理を繰り返すとともに、低解像度の階層画像について得られた探索結果に基づいて次階層の階層画像の探索領域を設定するので、高速かつ高精度の対応点探索を行うことができ、その結果に基づいて対象物の正確な距離画像を生成することが可能となるとの効果を奏する。   According to the first, fifth, or ninth aspect of the invention, a multi-resolution image composed of a plurality of hierarchical images having different resolutions is generated, and the low-resolution hierarchical image is directed to the high-resolution hierarchical image. The corresponding point search process is repeated sequentially, and the search area of the next hierarchical image is set based on the search result obtained for the low resolution hierarchical image, enabling high-speed and high-accuracy corresponding point search. Thus, it is possible to generate an accurate distance image of the object based on the result.

また、対応点探索手段は、少なくとも最低解像度の階層画像に対して第1の演算手法により対応点探索を行う第1の演算手段と、少なくとも最高解像度の階層画像に対して第2の演算手法により対応点探索を行う第2の演算手段とを備えているので、例えば低解像度の階層画像に対しては高速で演算処理を行う演算手段を用い、高解像度の階層画像に対しては高精度の演算処理を行う演算手段を用いることにより、対応点探索を効率的に行って、相関演算の総処理時間の短縮を図るとともに、高精度な処理を行うことができる。   The corresponding point search means includes a first calculation means for searching corresponding points for at least the lowest resolution hierarchical image by the first calculation technique, and a second calculation technique for at least the highest resolution hierarchy image. And a second computing means for searching for corresponding points. For example, a computing means that performs computing processing at high speed is used for a low-resolution hierarchical image, and a high-precision hierarchical image is used for a high-resolution hierarchical image. By using the calculation means for performing the calculation process, it is possible to efficiently perform the corresponding point search, reduce the total processing time of the correlation calculation, and perform high-precision processing.

請求項2、請求項6又は請求項10に記載の発明によれば、一旦前記第1の演算手法よりも精度の高い第2の演算手法により対応点探索を行う第2の演算手段による演算を行った後は第1の演算手段による演算を行わないとするので、高解像度の階層画像に対しては高精度の演算処理を行うことができ、信頼性の高い演算結果を得ることができるとの効果を奏する。   According to the invention described in claim 2, claim 6 or claim 10, the calculation by the second calculation means for performing the corresponding point search once by the second calculation method having higher accuracy than the first calculation method. Since the first calculation means does not perform the calculation after it has been performed, the high-resolution hierarchical image can be subjected to high-precision calculation processing, and a highly reliable calculation result can be obtained. The effect of.

請求項3、請求項7又は請求項11に記載の発明によれば、高速で処理を行うことのできるSAD演算法、SSD演算法、NCC演算法のうちのいずれかにより低解像度の階層画像に対する対応点探索を行うので、低解像度での対応点探索を効率的に行うことができ、相関演算の総処理時間の短縮を図ることができるとの効果を奏する。   According to the invention of claim 3, claim 7 or claim 11, a low-resolution hierarchical image can be processed by any one of the SAD operation method, SSD operation method, and NCC operation method capable of performing high-speed processing. Since the corresponding point search is performed, the corresponding point search at a low resolution can be efficiently performed, and the total processing time of the correlation calculation can be shortened.

請求項4、請求項8又は請求項12に記載の発明によれば、高精度、かつ、外乱に強くロバストな演算手法であるPOC演算法により高解像度の階層画像に対する対応点探索を行うので、高解像度での対応点探索において信頼性の高い高精度の演算結果を得ることができるとの効果を奏する。   According to the invention of claim 4, claim 8 or claim 12, the corresponding point search for the high-resolution hierarchical image is performed by the POC calculation method which is a high-accuracy, robust and robust calculation method. In the corresponding point search at high resolution, there is an effect that a highly reliable calculation result with high reliability can be obtained.

以下、図1から図10を参照しつつ、本発明に係る距離画像生成装置の一実施形態について説明する。ただし、発明の範囲を図示例に限定するものではない。   Hereinafter, an embodiment of a distance image generating apparatus according to the present invention will be described with reference to FIGS. 1 to 10. However, the scope of the invention is not limited to the illustrated examples.

本実施形態に係る距離画像生成装置1は、2つの画像を照合して位置ずれ量を算出し、算出した位置ずれ量に基づいて対象物までの距離情報を得て距離画像を生成するものである。   The distance image generation apparatus 1 according to the present embodiment calculates a positional deviation amount by collating two images, obtains distance information to an object based on the calculated positional deviation amount, and generates a distance image. is there.

図1に示すように、距離画像生成装置1は、被写体(対象物)を撮像する2つの撮像装置2a,2bを備えている。
撮像装置2a,2bは、それぞれ撮像手段として撮像素子(光電変換素子)3とこの撮像素子3の結像面(図示せず)に被写体光像を結像させるレンズ4とを備えている。撮像素子3は、例えばCCD(Charge Coupled Device)、CMOS(Complementary Metal-Oxide Semiconductor)等のイメージセンサであり、撮像素子3は、レンズ4を透過した入射光を電気信号に光電変換して取り込むことにより、被写体光像をアナログ画像信号に変換するようになっている。また、距離画像生成装置1は、撮像素子3によって得られたアナログ画像信号をデジタル画像信号に変換するA/D変換部5を備えている。
As shown in FIG. 1, the distance image generating device 1 includes two imaging devices 2a and 2b that capture an image of a subject (target object).
The imaging devices 2a and 2b each include an imaging element (photoelectric conversion element) 3 and a lens 4 that forms a subject light image on an imaging surface (not shown) of the imaging element 3 as imaging means. The image pickup device 3 is an image sensor such as a charge coupled device (CCD) or a complementary metal-oxide semiconductor (CMOS). The image pickup device 3 photoelectrically converts incident light transmitted through the lens 4 into an electric signal and takes it in. Thus, the subject light image is converted into an analog image signal. The distance image generation device 1 includes an A / D conversion unit 5 that converts an analog image signal obtained by the image sensor 3 into a digital image signal.

2つの撮像装置2a,2bは、同一対象物を異なる視点から撮像して画像情報としての画像データを取得するものであり、一方が基準となる基準画像に基づく基準画像データ(第1画像情報)を取得し、他方が比較対象となる画像(以下、「参照画像」とする)に基づく参照画像データ(第2画像情報)を取得する。このように、2つの撮像装置2a,2bは、基準画像及び参照画像の画像データを取得する画像取得手段として機能する。   The two imaging devices 2a and 2b capture the same object from different viewpoints and acquire image data as image information, one of which is reference image data (first image information) based on a reference image. , And the other acquires reference image data (second image information) based on an image to be compared (hereinafter referred to as “reference image”). Thus, the two imaging devices 2a and 2b function as an image acquisition unit that acquires image data of the standard image and the reference image.

また、距離画像生成装置1は、各撮像装置2a,2bによって取得された画像データについて、画像処理を行い、視差値を算出して距離画像を生成する画像処理部10を備えている。   In addition, the distance image generation device 1 includes an image processing unit 10 that performs image processing on the image data acquired by each of the imaging devices 2a and 2b, calculates a parallax value, and generates a distance image.

画像処理部10は、CPU(Central Processing Unit)、MPU(Micro Processing Unit)、DSP(Digital Signal Processor)等の処理装置と、システムプログラム、後述する距離画像生成処理を行うための距離画像生成処理プログラム等、各種の制御プログラム等を格納するROM(Read Only Memory)と、各種データを一時記憶するRAM(Random Access Memory)と(いずれも図示せず)、等により構成されるコンピュータであり、画像のレンズ歪みを補正するレンズ歪み補正部11、各撮像装置2a,2bによって取得された画像の平行化処理を行う画像平行化処理部12、撮像装置2a,2bにより取得された画像データから解像度の異なる複数の階層画像(後述)を生成する多重解像度画像生成部13、対応点探索を行う探索領域を設定する探索領域設定部14、対応点探索処理を行う対応点探索部15、距離画像を生成する距離画像生成部16等を備えている。   The image processing unit 10 includes a processing device such as a CPU (Central Processing Unit), an MPU (Micro Processing Unit), and a DSP (Digital Signal Processor), a system program, and a distance image generation processing program for performing distance image generation processing described later. Is a computer composed of a ROM (Read Only Memory) for storing various control programs and the like, a RAM (Random Access Memory) for temporarily storing various data (all not shown), etc. The lens distortion correction unit 11 that corrects the lens distortion, the image parallelization processing unit 12 that performs parallelization processing of the images acquired by the imaging devices 2a and 2b, and the image data acquired by the imaging devices 2a and 2b have different resolutions. A multi-resolution image generation unit 13 that generates a plurality of hierarchical images (described later), and a search region setting unit 1 that sets a search region for searching for corresponding points , And a corresponding point search section 15, distance image generation unit 16 generates a distance image or the like for the corresponding point search process.

レンズ歪み補正部11は、レンズ4を用いて結像させる場合に発生する歪み(レンズ歪み)を補正するものである。レンズ4には歪みがあるため、正しく画像を生成することができず、特に端部において画像が歪んでしまう。レンズ歪み補正部11は、このようなレンズ歪みの補正を行うものであり、例えば、予めレンズ歪み補正用のパラメータを作成、記憶しておき、これに基づいて画像を補正する処理等を行う。なお、レンズ歪み補正部11による補正の手法はここに例示したものに限定されず、各種公知の手段を用いることができる。   The lens distortion correction unit 11 corrects distortion (lens distortion) that occurs when an image is formed using the lens 4. Since the lens 4 is distorted, an image cannot be generated correctly, and the image is distorted particularly at the end portion. The lens distortion correction unit 11 performs such lens distortion correction. For example, a lens distortion correction parameter is created and stored in advance, and an image is corrected based on the parameter. The correction method by the lens distortion correction unit 11 is not limited to the one exemplified here, and various known means can be used.

画像平行化処理部12は、各撮像装置2a,2bによって取得された2つの画像について、あたかも平行移動したカメラから撮影したかのように変換してエピ極線が平行になるようにする画像の平行化処理を行うものである。画像の平行化処理は、2つの撮像装置2a,2bを厳密に正しく設置することは困難であるため、2つの撮像装置2a,2bの設置位置ずれ等により生じる画像の歪みを補正するために行われる。   The image collimation processing unit 12 converts the two images acquired by the respective imaging devices 2a and 2b as if they were taken from a camera moved in parallel so that the epipolar lines become parallel. A parallelization process is performed. Since it is difficult to accurately install the two imaging devices 2a and 2b, the image parallelization process is performed in order to correct image distortion caused by an installation position shift of the two imaging devices 2a and 2b. Is called.

画像について平行化処理を施すことにより、2つの画像は、縦方向(図3におけるY軸方向)においてずれのないものとなり、後述する相関演算処理を行う場合に、横方向(図3におけるX軸方向)のずれのみを検出すれば足りることとなる。なお、画像平行化処理部12による画像平行化処理の手法はここに例示したものに限定されず、各種公知の手段を用いることができる。   By performing the parallelization processing on the images, the two images are not shifted in the vertical direction (Y-axis direction in FIG. 3), and when performing correlation calculation processing described later, the horizontal direction (X-axis in FIG. 3). It is sufficient to detect only the deviation in the direction. Note that the method of image collimation processing by the image collimation processing unit 12 is not limited to the one exemplified here, and various known means can be used.

多重解像度画像生成部13は、前記撮像装置2a,2bにより取得された基準画像データ(第1画像情報)と参照画像データ(第2画像情報)について、解像度の異なる複数の画像が、解像度の低いものから解像度の高いものに順に階層構造となった多重解像度画像を生成するものである。なお、各階層における画像を、以下「階層画像」と称する。   The multi-resolution image generation unit 13 has a plurality of images with different resolutions of the reference image data (first image information) and the reference image data (second image information) acquired by the imaging devices 2a and 2b. A multi-resolution image having a hierarchical structure is generated in order from high to low resolution. An image in each layer is hereinafter referred to as a “layer image”.

図2は、多重解像度画像生成部13が生成する多重解像度画像の画像データの例を模式的に示したものである。図2では、もとの画像データの解像度(最高解像度)が1280×960の解像度であり、最低解像度がもとの画像データの1/32の解像度である40×30の解像度である場合の多重解像度画像の画像データの階層構造を示している。この場合、最高解像度の階層である第0層目が1280×960の解像度の階層画像、最低解像度の階層である第n層目が40×30の解像度の階層画像であり、第0層目から第n層目までの間に、解像度の異なる複数の階層画像が生成されて、多くの階層を有する多重解像度画像が生成される。   FIG. 2 schematically shows an example of the image data of the multi-resolution image generated by the multi-resolution image generation unit 13. In FIG. 2, multiplexing is performed when the resolution (maximum resolution) of the original image data is 1280 × 960 and the minimum resolution is 40 × 30, which is 1/32 of the resolution of the original image data. 2 shows a hierarchical structure of image data of a resolution image. In this case, the 0th layer which is the highest resolution layer is a 1280 × 960 resolution layered image, the nth layer which is the lowest resolution layer is a 40 × 30 resolution layered image, from the 0th layer. Up to the nth layer, a plurality of hierarchical images having different resolutions are generated, and a multi-resolution image having many layers is generated.

なお、多重解像度画像生成部13が何層構造の多重解像度画像を生成するか、最低解像度をどの程度の解像度とするかは特に限定されない。例えば、もとの画像データが80×60程度の低解像度の画像であれば、第0層目が80×60の解像度の階層画像、第1層目が40×30の解像度の階層画像というように2層から3層程度の少ない階層構造となる。
なお、多重解像度画像生成部13により生成される多重解像度画像の構造は、もとの画像データの解像度等に応じて予めデフォルトで設定されていてもよいし、ユーザが任意に設定できるようにしてもよい。
Note that the number of layers of the multi-resolution image generated by the multi-resolution image generation unit 13 and the resolution of the minimum resolution are not particularly limited. For example, if the original image data is a low-resolution image of about 80 × 60, the 0th layer is a hierarchical image having a resolution of 80 × 60, and the first layer is a hierarchical image having a resolution of 40 × 30. In addition, the hierarchical structure is as few as two to three layers.
The structure of the multi-resolution image generated by the multi-resolution image generation unit 13 may be set in advance as a default according to the resolution of the original image data or the user can arbitrarily set the structure. Also good.

探索領域設定部14は、対応点探索部15により対応点探索を行う領域を設定するものであり、基準画像内に測距点を設定し、この測距点を中心とした所定の領域を探索領域として設定する。
また、本実施形態において、後述するように、対応点探索部15により一つの階層画像についての探索が終了すると当該階層画像についての探索結果が探索領域設定部14に出力されるようになっており、探索領域設定部14は、2回目以降の対応点探索処理においては、この探索結果に基づいて基準画像について次の階層の階層画像の探索領域を設定する。
The search area setting unit 14 sets an area in which the corresponding point search unit 15 performs the corresponding point search, sets a distance measuring point in the reference image, and searches for a predetermined area centered on the distance measuring point. Set as area.
In the present embodiment, as described later, when the search for one hierarchical image is completed by the corresponding point search unit 15, the search result for the hierarchical image is output to the search region setting unit 14. In the second and subsequent corresponding point search processing, the search area setting unit 14 sets a search area for the next hierarchical image for the reference image based on the search result.

すなわち、2回目以降の対応点探索処理の際には、探索領域設定部14は、その直前の対応点探索処理で得られた候補座標(x0,y0)及びその周辺の領域を、次の階層画像における対応点探索処理の探索領域として設定する。本実施形態においては、例えば、探索領域設定部14は、(x0,y0)を中心として5画素×5画素分の領域を抽出し探索領域として設定するようになっている。なお、探索領域設定部14により設定される探索領域の範囲はここに例示したものに限定されない。   That is, in the second and subsequent corresponding point search processing, the search region setting unit 14 uses the candidate coordinates (x0, y0) obtained in the immediately preceding corresponding point search processing and the surrounding region as the next hierarchy. It is set as a search area for the corresponding point search process in the image. In the present embodiment, for example, the search area setting unit 14 extracts an area corresponding to 5 pixels × 5 pixels around (x0, y0) and sets it as a search area. Note that the range of the search area set by the search area setting unit 14 is not limited to that exemplified here.

対応点探索部15は、基準画像データと参照画像データのそれぞれから抽出、設定された探索領域について両画像データの対応点を探索し、位置ずれ量を算出して相関値を得る対応点探索手段である。
対応点探索部15は、SAD演算法(第1の演算手法)により対応点探索を行う第1の演算手段としてのSAD演算部6と、SAD演算法(第1の演算手法)よりも精度の高い演算法であるPOC演算法(第2の演算手法)により対応点探索を行う第2の演算手段としてのPOC演算部7とを備えている。対応点探索部15は、多重解像度画像のうち、低解像度の階層画像から対応点探索を開始し、直前の階層における探索結果を次の対応点探索に反映させながら、順次解像度の高い階層画像についてSAD演算部6又はPOC演算部7による対応点探索を行い、もとの画像の解像度(最高解像度)の階層画像(本実施形態では、図2に示す第0層目の階層画像)に至るまで順に対応点探索を繰り返すようになっている。
Corresponding point search unit 15 searches for corresponding points of both image data in the search area extracted and set from each of the base image data and the reference image data, and calculates the amount of displacement and obtains a correlation value. It is.
The corresponding point search unit 15 includes a SAD calculation unit 6 as a first calculation unit that searches for a corresponding point by the SAD calculation method (first calculation method), and more accurate than the SAD calculation method (first calculation method). And a POC calculation unit 7 as second calculation means for searching for corresponding points by a high calculation method POC calculation method (second calculation method). The corresponding point search unit 15 starts the corresponding point search from the low-resolution hierarchical image among the multi-resolution images, and sequentially reflects the search result in the previous hierarchy on the hierarchical image with the higher resolution sequentially. Corresponding point search is performed by the SAD computing unit 6 or the POC computing unit 7 until the hierarchical image of the original image resolution (maximum resolution) (in this embodiment, the 0th hierarchical image shown in FIG. 2) is reached. The corresponding point search is repeated in order.

具体的には、対応点探索部15は、まずSAD演算部6により最低解像度の階層画像から対応点探索を開始し、当該階層画像についての探索が終了すると当該階層画像についての対応点探索処理で得られた相関値の頂点を候補座標として算出し、探索結果として探索領域設定部14に出力する。そして、探索領域設定部14が当該階層画像についての探索結果に基づいて次の階層の階層画像の探索領域を設定すると、対応点探索部15は、次の階層画像について、設定された探索領域内の対応点探索を行う。   Specifically, the corresponding point search unit 15 first starts the corresponding point search from the lowest resolution hierarchical image by the SAD calculation unit 6, and when the search for the hierarchical image is finished, the corresponding point search processing for the hierarchical image is performed. The vertex of the obtained correlation value is calculated as a candidate coordinate, and is output to the search area setting unit 14 as a search result. Then, when the search area setting unit 14 sets the search area of the hierarchical image of the next hierarchy based on the search result for the hierarchical image, the corresponding point search unit 15 sets the search area within the set search area for the next hierarchical image. Search for corresponding points.

また、対応点探索部15は、対応点探索をSAD演算部6によって行うか、POC演算部7によって行うかを判断するようになっている。すなわち、対応点探索部15は、多重解像度画像生成部13により生成された多重解像度画像のうち、少なくとも最低解像度の階層画像に対してはSAD演算部6により対応点探索を行い、少なくとも最高解像度の階層画像に対してはPOC演算部7により対応点探索を行うようになっており、中間の階層の階層画像については、対応点探索部15において、SAD演算部6、POC演算部7のいずれによって対応点探索を行うかを判断する。そして、当該階層画像に応じた演算手法により対応点探索を行うようになっている。   The corresponding point search unit 15 determines whether the corresponding point search is performed by the SAD calculation unit 6 or the POC calculation unit 7. That is, the corresponding point search unit 15 searches the corresponding point for at least the lowest resolution hierarchical image among the multi-resolution images generated by the multi-resolution image generation unit 13, and searches for the corresponding point at least with the highest resolution. Corresponding point search is performed on the hierarchical image by the POC calculation unit 7, and the intermediate point hierarchical image is searched by the corresponding point search unit 15 by either the SAD calculation unit 6 or the POC calculation unit 7. It is determined whether a corresponding point search is performed. And corresponding point search is performed by the calculation method according to the said hierarchy image.

本実施形態では、以下、もとの画像の解像度の1/2の解像度の階層画像からPOC演算部7による対応点探索を行う場合を例として説明する。
すなわち、図2のようにもとの画像データが1280×960の解像度であり、最低解像度が40×30の解像度である場合には、40×30の解像度である第n層目からSAD演算部6による対応点探索が開始され、1280×960の1/2の解像度である640×480の解像度の階層以降、最高解像度の第0層目の階層まではPOC演算部7によって対応点探索が行われる。
In the present embodiment, a case where the corresponding point search is performed by the POC calculation unit 7 from a hierarchical image having a resolution half that of the original image will be described below as an example.
That is, when the original image data has a resolution of 1280 × 960 and the minimum resolution is 40 × 30, as shown in FIG. 2, the SAD calculation unit starts from the nth layer having the resolution of 40 × 30. 6 is started, and the corresponding point search is performed by the POC calculation unit 7 from the resolution layer of 640 × 480, which is 1/2 resolution of 1280 × 960, up to the 0th layer of the highest resolution. Is called.

なお、何階層目からPOC演算部7による演算を行うと判断するかは、特に限定されず、もとの画像データの解像度、多重解像度画像の階層数等に応じて予めデフォルトで設定されていてもよいし、ユーザが任意に設定できるようにしてもよい。
ただし、一旦POC演算部7による対応点探索が行われた後は、以降の階層画像についてSAD演算部6による対応点探索を行わず、最高解像度の階層画像に至るまでPOC演算部7による対応点探索を行うようになっている。
Note that the number of hierarchies from which the calculation by the POC calculation unit 7 is determined is not particularly limited, and is preset by default according to the resolution of the original image data, the number of hierarchies of the multi-resolution image, and the like. Alternatively, it may be arbitrarily set by the user.
However, once the corresponding point search by the POC calculation unit 7 is performed, the corresponding point search by the SAD calculation unit 6 is not performed on the subsequent hierarchical images, and the corresponding points by the POC calculation unit 7 until the highest resolution hierarchical image is reached. Search is to be performed.

以下、SAD演算部6及びPOC演算部7による対応点探索について具体的に説明する。   Hereinafter, the corresponding point search by the SAD calculation unit 6 and the POC calculation unit 7 will be specifically described.

まず、SAD演算部6は、画像取得手段2によって取得された画像データのうち、いずれか一方を基準画像とし、他方を参照画像とした場合に、基準画像と参照画像との相関度をSAD(Sum of Absolute Differences:絶対誤差合計)演算法により相関演算して対応点を探索し、参照画像中、基準画像の探索領域と相関度の最も高かった領域について、基準画像と参照画像とのずれ量(視差値)を求める対応点探索処理を行う。   First, when one of the image data acquired by the image acquisition unit 2 is a standard image and the other is a reference image, the SAD calculation unit 6 calculates the correlation between the standard image and the reference image as SAD ( Sum of Absolute Differences (corresponding to the sum of absolute errors). Corresponding points are searched by searching for the corresponding points, and in the reference image, the difference between the reference image and the reference image in the reference image search region and the region having the highest degree of correlation. Corresponding point search processing for obtaining (parallax value) is performed.

基準画像と参照画像との相関演算について図3を参照しつつ説明する。図3(a)は基準画像を表し、図3(b)は参照画像を表している。図3において、各マスは1画素を表しており、基準画像及び参照画像の全画面は、ともに、X軸方向(横方向)が26画素、Y軸方向(縦方向)が20画素で構成されている場合を例としている。   The correlation calculation between the reference image and the reference image will be described with reference to FIG. FIG. 3A represents a standard image, and FIG. 3B represents a reference image. In FIG. 3, each square represents one pixel, and the entire screen of the base image and the reference image is composed of 26 pixels in the X-axis direction (horizontal direction) and 20 pixels in the Y-axis direction (vertical direction). Take the case as an example.

相関演算を行う場合には、SAD演算部6は、基準画像を所定の単位面積に分割し、基準画像中のある領域を視差値を算出する位置(探索領域)として設定する。探索領域の設定は、例えば図3(a)の左上(X=1,Y=20)を基点として所定の範囲の領域が順次設定される。   When performing the correlation calculation, the SAD calculation unit 6 divides the reference image into predetermined unit areas, and sets a certain area in the reference image as a position (search area) for calculating the parallax value. For setting the search area, for example, areas in a predetermined range are sequentially set with the upper left (X = 1, Y = 20) in FIG.

すなわち、ある領域(例えばX=1〜5,Y=16〜20の25画素)が探索領域として設定され、当該探索領域についての相関演算が完了すると、例えばX軸方向(画像の水平方向)に1画素ずつ順次ずらして次の探索領域(例えばX=2〜6,Y=16〜20の25画素)が設定され、相関演算が行われる。X軸方向の全画素(図3(a)において26画素)についてすべての相関演算が完了すると、Y軸方向に1画素ずらして次の探索領域(例えばX=1〜5,Y=15〜19の25画素)が設定され、相関演算が行われる。当該探索領域について相関演算が完了すると、さらに、探索領域をX軸方向に1画素ずつ順次ずらして次の探索領域(例えばX=2〜6,Y=15〜19の25画素)が設定され、相関演算が行われる。
このように、画面の左上から右下にかけて、X軸方向、Y軸方向それぞれ1画素ずつずらして順次探索領域が設定され、全画面の全画素について相関演算が完了するまで、各探索領域についての相関演算が繰り返される。なお、相関演算を行う順序(探索領域の設定の仕方)は、ここに例示したものに限定されない。
That is, a certain region (for example, 25 pixels of X = 1 to 5, Y = 16 to 20) is set as the search region, and when the correlation calculation for the search region is completed, for example, in the X-axis direction (the horizontal direction of the image) The next search region (for example, 25 pixels of X = 2 to 6, Y = 16 to 20) is set by sequentially shifting one pixel at a time, and correlation calculation is performed. When all the correlation calculations are completed for all the pixels in the X-axis direction (26 pixels in FIG. 3A), the next search area (for example, X = 1 to 5, Y = 15 to 19) is shifted by one pixel in the Y-axis direction. 25 pixels) is set, and correlation calculation is performed. When the correlation calculation is completed for the search region, the search region is sequentially shifted by one pixel in the X-axis direction to set the next search region (for example, 25 pixels of X = 2 to 6, Y = 15 to 19), Correlation is performed.
In this way, the search areas are sequentially set by shifting one pixel each in the X-axis direction and the Y-axis direction from the upper left to the lower right of the screen, and until the correlation calculation is completed for all the pixels on the entire screen, The correlation operation is repeated. Note that the order in which the correlation calculation is performed (how to set the search area) is not limited to the example illustrated here.

次に、相関演算の具体的手法について説明する。
例えば、図3(a)に示すように、基準画像中の破線で囲んだ範囲(X=9〜13,Y=9〜13の25画素)が探索領域として設定され、相関演算が行われる場合、SAD演算部6は、参照画像中、探索領域と同じY軸範囲(Y=9〜13)についてX軸方向(画像の水平方向)に順次比較対照領域を設定し、順次相関演算を行うことにより、探索領域と各比較対照領域との相関度を算出する。これにより参照画像中、探索領域と最も相関度の高い領域、対応点を探索する。
Next, a specific method of correlation calculation will be described.
For example, as shown in FIG. 3A, a range surrounded by a broken line in the reference image (25 pixels of X = 9 to 13, Y = 9 to 13) is set as a search region, and correlation calculation is performed. The SAD calculation unit 6 sequentially sets a comparison reference region in the X-axis direction (horizontal direction of the image) for the same Y-axis range (Y = 9 to 13) as the search region in the reference image, and sequentially performs correlation calculation. Thus, the degree of correlation between the search area and each comparison area is calculated. As a result, an area and a corresponding point having the highest correlation with the search area are searched for in the reference image.

すなわち、SAD演算部6は、まず、探索領域を構成する各画素(図3(a)中のX=9,Y=13、X=10,Y=13・・・の全25画素)の画像データ値を算出する。また、参照画像の中で探索領域に対照させるものとして設定した比較対照領域内の各画素(例えば、図3(b)中の破線で囲んだ範囲(X=9,Y=13、X=10,Y=13・・・の全25画素))の画像データ値を算出する。そして、探索領域を構成する各画素の画像データ値から、比較対照領域を構成する各画素の画像データ値を減算して、その絶対値を算出する。
例えば、探索領域内のある画素(図3(a)中のX=9,Y=10)の画像データ値が100であり、これに対応する比較対照領域内の画素が図3(b)におけるX=9,Y=10の画像データ値が50である場合には、100−50=50となり、絶対値50となる。
また例えば、探索領域内のある画素(図3(a)中のX=13,Y=10)の画像データ値が50であり、これに対応する比較対照領域内の画素が図3(b)におけるX=13,Y=10の画像データ値が90である場合には、50−90=−40となり、絶対値40となる。
このような画像データ値の減算及び絶対値の算出を探索領域及び比較対照領域を構成する25画素全てについて行う。なお、この演算は、各画素について順次行われてもよいし、当該領域内の全画素について同時進行的に行われてもよい。
That is, the SAD calculation unit 6 firstly has an image of each pixel constituting the search area (25 pixels in total in FIG. 3A, X = 9, Y = 13, X = 10, Y = 13...). Calculate the data value. In addition, each pixel (for example, a range surrounded by a broken line in FIG. 3B (X = 9, Y = 13, X = 10) in the comparison reference region set to be compared with the search region in the reference image. , Y = 13... For all 25 pixels))). Then, the absolute value is calculated by subtracting the image data value of each pixel constituting the comparison area from the image data value of each pixel constituting the search area.
For example, the image data value of a certain pixel in the search region (X = 9, Y = 10 in FIG. 3A) is 100, and the corresponding pixel in the comparison region in FIG. When the image data value of X = 9 and Y = 10 is 50, 100−50 = 50 and the absolute value is 50.
Further, for example, the image data value of a certain pixel in the search area (X = 13, Y = 10 in FIG. 3A) is 50, and the corresponding pixel in the comparison area is shown in FIG. In the case where the image data value of X = 13 and Y = 10 is 90, 50−90 = −40 and the absolute value is 40.
Such subtraction of the image data value and calculation of the absolute value are performed for all 25 pixels constituting the search area and the comparison area. This calculation may be performed sequentially for each pixel, or may be performed simultaneously for all the pixels in the region.

さらに、SAD演算部6は、算出された結果(絶対値)を全て加算する。そして加算後の値が小さければ小さいほど相関度が高く、同じ画像である場合には、限りなく0に近づく。例えば、図3の場合、図3(a)中の破線で囲んだ範囲(X=9〜13,Y=9〜13の25画素)と、図3(b)中の一点鎖線で囲んだ範囲(X=12〜16,Y=9〜13の25画素)とは同じ画像であり、前者を構成する各画素の画像データ値から後者を構成する各画素のうち対応するものの画像データ値をそれぞれ減算して絶対値を求め、算出結果を加算すると、限りなく0に近づく。   Further, the SAD computing unit 6 adds all the calculated results (absolute values). The smaller the value after addition is, the higher the degree of correlation is. When the images are the same, the value approaches 0 as much as possible. For example, in the case of FIG. 3, a range surrounded by a broken line in FIG. 3A (25 pixels of X = 9 to 13 and Y = 9 to 13) and a range surrounded by an alternate long and short dash line in FIG. (25 pixels of X = 12 to 16, Y = 9 to 13) is the same image, and the image data value of the corresponding one of the pixels constituting the latter from the image data value of each pixel constituting the former, respectively. When the absolute value is obtained by subtraction and the calculation results are added, the value approaches 0 as much as possible.

このようにして、参照画像中、基準画像の探索領域と相関度の最も高い領域(相関演算により相関度の極値が得られた領域)を検索すると、SAD演算部6は、当該相関度の最も高い領域が、基準画像の探索領域とどの程度ずれているかのずれ量(視差値)を算出し、図4に示すように、相関度の最も高い領域がどの視差値に対応するかを求める。
すなわち、図3の例によれば、探索領域(図3(a)中のX=9〜13,Y=9〜13の25画素)と、相関度の最も高い領域である図3(b)中の一点鎖線で囲んだ範囲(X=12〜16,Y=9〜13の25画素)とは、X軸方向に3画素ずれている。したがって、この場合の視差値は3となる。
In this way, when the reference image is searched for the region having the highest correlation with the search region of the reference image (the region where the extreme value of the correlation is obtained by the correlation calculation), the SAD calculation unit 6 A deviation amount (parallax value) indicating how much the highest area is deviated from the search area of the reference image is calculated, and as shown in FIG. 4, which parallax value corresponds to the area with the highest degree of correlation. .
That is, according to the example of FIG. 3, the search region (25 pixels of X = 9 to 13 and Y = 9 to 13 in FIG. 3A) and the region having the highest degree of correlation are illustrated in FIG. The range surrounded by the one-dot chain line (25 pixels of X = 12 to 16, Y = 9 to 13) is shifted by 3 pixels in the X-axis direction. Therefore, the parallax value in this case is 3.

なお、視差値と距離値との関係は、距離値=定数/視差値であり、距離値は視差値の逆数に比例するとの関係にある。すなわち、視差値が小さくなるほど距離は遠くなり、視差値が大きくなるほど距離が近くなるという関係にある。このため、SAD演算部6は、前記相関演算により視差値を求め、視差値の逆数を求めることにより、距離値を取得することができる。   Note that the relationship between the parallax value and the distance value is distance value = constant / parallax value, and the distance value is proportional to the reciprocal of the parallax value. In other words, the distance becomes longer as the parallax value becomes smaller, and the distance becomes closer as the parallax value becomes larger. For this reason, the SAD calculating part 6 can acquire a distance value by calculating | requiring a parallax value by the said correlation calculation, and calculating | requiring the reciprocal number of a parallax value.

また、POC演算部7は、POC(Phase-Only Correlation;位相限定相関)演算法により、基準画像データと参照画像データのそれぞれから抽出、設定された探索領域について両画像データの対応点を探索し、位置ずれ量を算出して相関値を得るものである。   In addition, the POC calculation unit 7 searches for corresponding points of both image data in a search area extracted and set from each of the standard image data and the reference image data by a POC (Phase-Only Correlation) calculation method. The correlation value is obtained by calculating the amount of positional deviation.

POC演算部7には、図5に示すように、窓関数部71a,71b、FFT(Fast Fourier Transform:高速フーリエ変換)部72a,72b、位相情報抽出部73a,73b、合成部74、IFFT(Inverse Fast Fourier Transform:逆高速フーリエ変換)部75、及び相関値演算部76が備えられている。   As shown in FIG. 5, the POC calculation unit 7 includes window function units 71a and 71b, FFT (Fast Fourier Transform) units 72a and 72b, phase information extraction units 73a and 73b, a synthesis unit 74, IFFT ( An Inverse Fast Fourier Transform (Inverse Fast Fourier Transform) unit 75 and a correlation value calculation unit 76 are provided.

窓関数部71a,71bは、基準画像データと参照画像データの探索領域に対応する信号に窓関数をかけるものである。窓関数の種類に特に制限はなく適宜変更可能である。ここで、基準画像データに基づく信号に対して窓関数をかけたものをf1、参照画像データに基づく信号に対して窓関数をかけたものをf2とする。窓関数部71a,71bは、窓関数をかけた信号f1、f2をそれぞれFFT部72a,72bに出力するようになっている。   The window function units 71a and 71b apply a window function to signals corresponding to the search areas for the standard image data and the reference image data. The type of window function is not particularly limited and can be changed as appropriate. Here, a signal obtained by applying a window function to the signal based on the standard image data is denoted by f1, and a signal obtained by applying the window function to the signal based on the reference image data is denoted by f2. The window function units 71a and 71b output the signals f1 and f2 multiplied by the window function to the FFT units 72a and 72b, respectively.

FFT部72a,72bは、信号f1、f2に対してフーリエ変換処理を施して位相情報抽出部73a,73bに出力するものである。詳しくは、FFT部72aは、信号f1に対して2次元離散的フーリエ変換を施し、基準画像に基づくフーリエ画像データF1を得る。また、FFT部72bは、信号f2に対して2次元離散的フーリエ変換を施して参照画像に基づくフーリエ画像データF2を得るようになっている。なお、フーリエ変換処理に特に制限は無く、2次元離散的フーリエ変換については、「コンピュータ画像処理入門、日本工業技術センター編、総研出版(株)発行、P44〜45」を参照した。   The FFT units 72a and 72b perform a Fourier transform process on the signals f1 and f2 and output them to the phase information extraction units 73a and 73b. Specifically, the FFT unit 72a performs a two-dimensional discrete Fourier transform on the signal f1 to obtain Fourier image data F1 based on the reference image. Further, the FFT unit 72b performs a two-dimensional discrete Fourier transform on the signal f2 to obtain Fourier image data F2 based on the reference image. In addition, there is no restriction | limiting in particular in a Fourier-transform process, For the two-dimensional discrete Fourier transform, the "Introduction to computer image processing, the Japan Industrial Technology Center edition, issue of Soken publication, P44-45" was referred.

位相情報抽出部73a,73bは、FFT部72a,72bから出力された信号に対して振幅成分を除去して位相情報を抽出するものである。つまり、位相情報抽出部73a,73bは、フーリエ変換された信号F1、F2に対して位相限定処理を行ない、フーリエ画像データF3,F4を得るものである。位相情報抽出部73a,73bは、得られたフーリエ画像データF3,F4を合成部74に出力する。
なお、位相情報抽出部73a,73bが位相情報のみを抽出する手法は特に限定されず、振幅を1として位相のみを抽出するものであってもよいし、log処理や√処理等によって振幅成分を除去することとしてもよい。
The phase information extraction units 73a and 73b are for extracting phase information by removing amplitude components from the signals output from the FFT units 72a and 72b. That is, the phase information extraction units 73a and 73b perform the phase limiting process on the Fourier-transformed signals F1 and F2 to obtain Fourier image data F3 and F4. The phase information extraction units 73a and 73b output the obtained Fourier image data F3 and F4 to the synthesis unit 74.
Note that the method by which the phase information extraction units 73a and 73b extract only the phase information is not particularly limited, and the phase information extraction unit 73a and 73b may extract only the phase by setting the amplitude to 1, or the amplitude component may be extracted by log processing or √ processing. It is good also as removing.

合成部74は、フーリエ変換された信号F1、F2から位相情報のみを抽出して得られたフーリエ画像データF3,F4を合成し、合成フーリエ画像データF5(u,v)=F3(u,v)・F4(u,v)を得るものである。なお、式中「*」は複素共役を表し、(u,v)はフーリエ空間の座標を示す。合成部74は、得られた合成フーリエ画像データF5をIFFT部75に出力するようになっている。 The synthesizer 74 synthesizes Fourier image data F3 and F4 obtained by extracting only phase information from the Fourier-transformed signals F1 and F2, and synthesizes Fourier image data F5 (u, v) = F3 * (u, v) F4 (u, v) is obtained. In the formula, “*” represents a complex conjugate, and (u, v) represents a coordinate in Fourier space. The synthesizer 74 outputs the obtained synthesized Fourier image data F5 to the IFFT unit 75.

IFFT部75は、合成部74で得られた合成フーリエ画像データF5に対して逆フーリエ変換を施し合成逆フーリエ画像データf5を得るものである。IFFT部75は、合成逆フーリエ画像データf5を相関値演算部76に出力するようになっている。   The IFFT unit 75 performs inverse Fourier transform on the synthesized Fourier image data F5 obtained by the synthesizing unit 74 to obtain synthesized inverse Fourier image data f5. The IFFT unit 75 outputs the synthesized inverse Fourier image data f5 to the correlation value calculation unit 76.

相関値演算部76は、合成逆フーリエ画像データf5より、各画像間の相関演算を行い、相関値(POC値)を得るものである。
図6に、POC演算法によって各画像間の相関演算を実施することにより得られる結果の例を示す。図6は、基準画像上及び参照画像上にN1×N2画素の探索領域及び比較対象領域を設定した場合の例であり、N1×N2画素の領域内で相関が高い箇所の相関値(POC値)が大きくなっている。このPOC値のピーク(図6においてJc)に対応する参照画像上の比較対象領域内の位置が、基準画像上の探索領域における中心点に対応した参照画像上の対応点(候補座標)に相当することとなる。
The correlation value calculation unit 76 performs a correlation calculation between the images from the synthesized inverse Fourier image data f5 to obtain a correlation value (POC value).
FIG. 6 shows an example of a result obtained by performing correlation calculation between each image by the POC calculation method. FIG. 6 shows an example in which a search area and a comparison target area of N 1 × N 2 pixels are set on the standard image and the reference image, and the correlation of a portion having a high correlation in the N 1 × N 2 pixel area. The value (POC value) is large. The position in the comparison target region on the reference image corresponding to this POC value peak (Jc in FIG. 6) corresponds to the corresponding point (candidate coordinates) on the reference image corresponding to the center point in the search region on the standard image. Will be.

以上のようなPOC演算法を用いた演算処理によれば、画像の振幅成分を除去し画像の位相成分のみで相関演算が行われるため、輝度変動やノイズの影響を抑制して参照画像上の対応点を精度良く探索できる。   According to the calculation processing using the POC calculation method as described above, the correlation calculation is performed using only the phase component of the image by removing the amplitude component of the image. Corresponding points can be searched with high accuracy.

相関値演算部76は、候補座標を算出すると、これを探索領域設定部14に出力する。当該対応点探索を行った階層画像が最高解像度画像でない場合には、探索領域設定部14により、この候補座標に基づいて次の階層の対応点探索における探索領域が決定される。また、当該対応点探索を行った階層画像が最高解像度画像である場合には、演算結果が相関値演算部76から距離画像生成部16に出力される。   After calculating the candidate coordinates, the correlation value calculating unit 76 outputs the candidate coordinates to the search region setting unit 14. If the hierarchical image on which the corresponding point search is performed is not the highest resolution image, the search region setting unit 14 determines a search region in the corresponding point search of the next layer based on the candidate coordinates. Further, when the hierarchical image subjected to the corresponding point search is the highest resolution image, the calculation result is output from the correlation value calculation unit 76 to the distance image generation unit 16.

距離画像生成部16は、POC演算部7による最高解像度の階層画像についての対応点探索が終了すると、当該対応点探索における基準画像データと参照画像データとの位置ずれ量の演算結果に基づいて距離画像データを生成する。   When the POC calculation unit 7 finishes the corresponding point search for the highest resolution hierarchical image, the distance image generation unit 16 determines the distance based on the calculation result of the positional deviation amount between the reference image data and the reference image data in the corresponding point search. Generate image data.

また、距離画像生成装置1には、距離画像生成部16によって生成された距離画像を出力する出力部20が設けられている。出力部20は、例えば、CRT(Cathode Ray Tube)やLCD(Liquid Crystal Display)等のモニタ(表示手段)であり、距離画像を表示させるようになっている。なお、出力部20は、モニタに限定されず、例えば、プリンタ等の外部機器(出力手段)と接続するための通信部であり、生成された距離画像を外部機器に送信して出力可能に構成されていてもよい。   In addition, the distance image generation device 1 is provided with an output unit 20 that outputs a distance image generated by the distance image generation unit 16. The output unit 20 is a monitor (display means) such as a CRT (Cathode Ray Tube) or LCD (Liquid Crystal Display), for example, and displays a distance image. Note that the output unit 20 is not limited to a monitor, and is, for example, a communication unit for connecting to an external device (output unit) such as a printer, and configured to transmit the generated distance image to the external device and output it. May be.

次に、図7から図10を参照して本実施形態における距離画像生成装置1によって行われる距離画像生成方法について説明する。なお、距離画像生成処理は、コンピュータである画像処理部10と前記距離画像生成処理プログラムとの協働により実現されるものである。   Next, a distance image generation method performed by the distance image generation apparatus 1 according to this embodiment will be described with reference to FIGS. The distance image generation process is realized by the cooperation of the image processing unit 10 which is a computer and the distance image generation process program.

図7に示すように、距離画像生成装置1によって3次元位置情報を得るための相関演算を行う場合には、まず、撮像装置2a,2bは、2つの撮像手段2a,2bにより対象物を撮像し、基準画像、参照画像の画像データを取得する(ステップS1)。   As shown in FIG. 7, when performing correlation calculation for obtaining three-dimensional position information by the distance image generating device 1, first, the imaging devices 2 a and 2 b capture an object using two imaging units 2 a and 2 b. Then, the image data of the standard image and the reference image is acquired (step S1).

撮像手段2a,2bにより取得された基準画像、参照画像の画像データは、A/D変換部5によりA/D変換され、画像処理部10に送られる。基準画像、参照画像の画像データが画像処理部10に送られると、各画像データについて、レンズ歪み補正部11による歪み補正及び画像平行化処理部12による画像平行化処理が施される(ステップS2)。   Image data of the standard image and the reference image acquired by the imaging units 2 a and 2 b are A / D converted by the A / D conversion unit 5 and sent to the image processing unit 10. When the image data of the reference image and the reference image is sent to the image processing unit 10, distortion correction by the lens distortion correction unit 11 and image parallelization processing by the image parallelization processing unit 12 are performed on each image data (step S2). ).

さらに、多重解像度画像生成部13において、基準画像、参照画像の画像データについて、最低解像度画像からもとの画像と同じ解像度の最高解像度画像までの複数の階層画像が順に階層構造となった多重解像度画像が生成される(ステップS3)。生成された多重解像度画像は対応点探索部15に送られて、基準画像データと参照画像データとの対応点を探索する対応点探索処理が行われる(ステップS4)。   Further, in the multi-resolution image generation unit 13, for the image data of the standard image and the reference image, a multi-resolution in which a plurality of hierarchical images from the lowest resolution image to the highest resolution image having the same resolution as the original image have a hierarchical structure in order. An image is generated (step S3). The generated multi-resolution image is sent to the corresponding point search unit 15 to perform corresponding point search processing for searching for a corresponding point between the base image data and the reference image data (step S4).

ここで、図8から図10を参照しつつ、対応点探索部15に対応点探索処理(図7のステップS4)について、具体的に説明する。なお、以下においては、画像の全画面を測距の対象とし(すなわち、全画素を測距点とし)、1つの探索領域について、X軸方向のすべての画素について対応点探索を行う場合を例として説明する。   Here, the corresponding point search process (step S4 in FIG. 7) is specifically described in the corresponding point search unit 15 with reference to FIGS. In the following, an example in which the entire screen of an image is a distance measurement target (that is, all pixels are set as distance measurement points) and corresponding point search is performed for all pixels in the X-axis direction for one search region. Will be described.

図8に示すように、多重解像度画像が対応点探索部15に送られると、まず、SAD演算部6によりSAD演算を行うことにより、1回目の対応点探索処理(第n層目の階層画像についての対応点探索処理)が行われる(ステップS11)。   As shown in FIG. 8, when the multi-resolution image is sent to the corresponding point search unit 15, first, the SAD calculation unit 6 performs the SAD calculation to perform the first corresponding point search process (the nth layer hierarchical image). (Corresponding point search process) is performed (step S11).

図9は、この1回目の対応点探索処理を示すフローチャートである。図9に示すように、対応点探索部15は、最低解像度の階層画像(図2において第n層目の階層画像)を演算対象として設定するとともに、当該基準画像内に測距点を設定し(ステップS21)、この測距点を中心とした所定の探索領域を設定する(ステップS22)。
探索領域が設定されると、対応点探索部15は参照画像内に探索領域と同じサイズの比較対象領域を設定し(ステップS23)、SAD演算部6によるSAD演算法により対応点探索を行うことにより、探索領域と比較対象領域との相関度が算出される(ステップS24)。
FIG. 9 is a flowchart showing the first corresponding point search process. As shown in FIG. 9, the corresponding point search unit 15 sets the lowest resolution hierarchical image (the nth layer hierarchical image in FIG. 2) as a calculation target, and sets a distance measuring point in the reference image. (Step S21), a predetermined search area centered on the distance measuring point is set (Step S22).
When the search region is set, the corresponding point search unit 15 sets a comparison target region having the same size as the search region in the reference image (step S23), and performs the corresponding point search by the SAD calculation method by the SAD calculation unit 6. Thus, the correlation degree between the search area and the comparison target area is calculated (step S24).

SAD演算部6は当該探索領域について、比較対象画像のX軸方向のすべての画素について対応点探索処理が終了したかを判断する(ステップS25)。終了していない場合(ステップS25;NO)には、参照画像内の比較対象領域をX軸方向に1画素ずらして(ステップS26)、ステップ24に戻り、SAD演算部6による対応点探索処理を繰り返す。X軸方向のすべての画素について対応点探索処理が終了した場合(ステップS25;YES)には、当該対応点探索処理において最も相関度の高い画素を検索して、視差値を算出する(ステップS27)。   The SAD computing unit 6 determines whether or not the corresponding point search processing has been completed for all pixels in the X-axis direction of the comparison target image for the search region (step S25). If not completed (step S25; NO), the comparison target area in the reference image is shifted by one pixel in the X-axis direction (step S26), the process returns to step 24, and the corresponding point search process by the SAD computing unit 6 is performed. repeat. When the corresponding point search process has been completed for all the pixels in the X-axis direction (step S25; YES), the pixel having the highest degree of correlation is searched for in the corresponding point search process, and the parallax value is calculated (step S27). ).

SAD演算部6は当該探索領域について視差値を算出すると、さらに、基準画像内の全測距点(測距を行うべきすべての画素)についての対応点探索処理が終了したかを判断する(ステップS28)。本実施形態では、画像の全画素について対応点探索処理を行うので、全画素について処理が終了したかを判断する。
そして、画像中に、測距を行うべき画素であって未処理のものがある場合(ステップS28;NO)には、当該未処理の画素を新たな測距点として設定し(ステップS29)、この測距点を中心とした探索領域を設定して(ステップS22)以下ステップS23からステップS27の処理を繰り返す。他方、画像中に未処理の測距点がない場合(ステップS28;YES)には、1回目の対応点探索処理(第n層目の階層画像についての対応点探索処理)を終了する。
When the SAD calculation unit 6 calculates the parallax value for the search region, it further determines whether the corresponding point search processing for all the distance measurement points (all pixels to be subjected to distance measurement) in the reference image has been completed (step). S28). In the present embodiment, since the corresponding point search process is performed for all the pixels of the image, it is determined whether the process has been completed for all the pixels.
If there are unprocessed pixels that should be measured in the image (step S28; NO), the unprocessed pixels are set as new ranging points (step S29). A search area centered on the distance measuring point is set (step S22), and the processing from step S23 to step S27 is repeated. On the other hand, if there is no unprocessed distance measuring point in the image (step S28; YES), the first corresponding point search process (corresponding point search process for the nth layer image) is terminated.

図8に戻って、1回目の対応点探索処理が終了すると、対応点探索部15は、当該対応点探索処理において得られた相関値に基づいて候補座標を算出し、これを探索結果として探索領域設定部14に出力する(ステップS12)。また、対応点探索部15は、次階層の階層画像を演算対象として設定する(ステップS13)。
探索領域設定部14は、対応点探索部15から探索結果が送られると、この探索結果に基づいて次階層についての探索領域を設定する(ステップS14)。さらに、対応点探索部15は、次階層がSAD演算部6による演算対象の対象となる階層か否かを判断し(ステップS15)、SAD演算部6の対象である場合(ステップS15;YES)には、ステップS11に戻ってSAD演算部6による対応点探索処理を行い、以下ステップS12からステップS14の処理を繰り返す。
Returning to FIG. 8, when the first corresponding point search process is completed, the corresponding point search unit 15 calculates candidate coordinates based on the correlation value obtained in the corresponding point search process, and searches this as a search result. It outputs to the area | region setting part 14 (step S12). In addition, the corresponding point search unit 15 sets a hierarchical image of the next layer as a calculation target (step S13).
When the search result is sent from the corresponding point search unit 15, the search region setting unit 14 sets a search region for the next layer based on the search result (step S14). Furthermore, the corresponding point search unit 15 determines whether or not the next layer is a layer that is a target of calculation by the SAD calculation unit 6 (step S15), and if it is a target of the SAD calculation unit 6 (step S15; YES). In step S11, the corresponding point search process is performed by the SAD calculation unit 6, and the processes from step S12 to step S14 are repeated.

他方、次階層がSAD演算部6による演算対象の階層ではない場合(ステップS15;NO)には、当該階層及びそれ以降の階層についてPOC演算部7による対応点探索処理が行われる(ステップS16)。本実施形態では、もとの画像の1/2の解像度の階層以降の階層画像についてPOC演算部7による演算が行われるようになっている。   On the other hand, when the next hierarchy is not a calculation target hierarchy by the SAD calculation unit 6 (step S15; NO), corresponding point search processing by the POC calculation unit 7 is performed for the hierarchy and the subsequent layers (step S16). . In the present embodiment, the calculation by the POC calculation unit 7 is performed on hierarchical images after the half of the resolution of the original image.

図10は、POC演算部7による対応点探索処理を示すフローチャートである。
POC演算処理においては、まず、窓関数部71a,71bが画像データに基づく信号に対して窓関数を掛け、FFT部72a,72bが中心画素を中心とした32×32画素のブロックサイズの2次元フーリエ変換処理を行う。
つまり、窓関数部71aが基準画像に基づく信号f1を作成し、この信号f1について72aがフーリエ変換処理を行って信号f1を信号F1に変換する(ステップS31)。また、窓関数部71bが基準画像に基づく信号f2を作成し、この信号f2について72bがフーリエ変換処理を行って信号f2を信号F2に変換する。(ステップS32)。
2次元フーリエ変換処理は、基準画像に設定した測距点を中心としたブロックと、直前の階層における演算処理によって得られた視差に対応する参照画像内の対応点(候補座標)を中心としたブロックと、に対して行われる。
FIG. 10 is a flowchart showing the corresponding point search processing by the POC calculation unit 7.
In the POC calculation processing, first, the window function units 71a and 71b apply a window function to the signal based on the image data, and the FFT units 72a and 72b are two-dimensionally having a block size of 32 × 32 pixels centered on the central pixel. Perform Fourier transform processing.
That is, the window function unit 71a creates a signal f1 based on the reference image, and 72a performs a Fourier transform process on the signal f1 to convert the signal f1 into the signal F1 (step S31). Further, the window function unit 71b creates a signal f2 based on the reference image, and 72b performs a Fourier transform process on the signal f2 to convert the signal f2 into the signal F2. (Step S32).
The two-dimensional Fourier transform processing is centered on a block centered on a distance measuring point set in the reference image and a corresponding point (candidate coordinates) in a reference image corresponding to the parallax obtained by the arithmetic processing in the immediately preceding hierarchy. To the block.

その後、位相情報抽出部73a,73bは、信号F1,F2に基づき、その振幅成分を除去して信号F1から位相情報F3を、信号F2から位相情報F4をそれぞれ抽出する(ステップS33)。さらに、位相情報のみの信号F3,F4は、合成部74によって合成され、合成信号F5が生成される(ステップS34)。合成信号F5は合成部74からIFFT部75に出力され、IFFT部75はこの合成信号F5に対して、逆フーリエ変換処理を施しf5に変換する(ステップS35)。その後、相関値演算部76は、f5に基づいて相関値maxx,yf5(u,v)を算出し(ステップS36)、さらに、対応点の候補座標を算出する(ステップS37)。 Thereafter, the phase information extraction units 73a and 73b remove the amplitude components based on the signals F1 and F2 and extract the phase information F3 from the signal F1 and the phase information F4 from the signal F2 (step S33). Further, the signals F3 and F4 having only the phase information are combined by the combining unit 74 to generate a combined signal F5 (step S34). The synthesized signal F5 is output from the synthesizing unit 74 to the IFFT unit 75, and the IFFT unit 75 performs inverse Fourier transform processing on the synthesized signal F5 to convert it to f5 (step S35). Thereafter, the correlation value calculator 76 calculates the correlation value max x, y f5 (u, v) based on f5 (step S36), and further calculates the corresponding coordinates of the corresponding point (step S37).

図8に戻って、1つの階層についてPOC演算が終了すると、対応点探索部15は、当該対応点探索処理において得られた相関値に基づいて候補座標を算出し、これを探索結果として探索領域設定部14に出力する(ステップS17)。また、対応点探索部15は、最高解像度画像までPOC演算処理が終了したか否か(当該階層画像が最高解像度画像か否か)を判断する(ステップS18)。そして、最高解像度画像(もとの画像と同じ解像度の画像)まで処理が終了している場合(ステップS18;YES)には、POC演算部7によるPOC演算処理を終了する。
他方、最高解像度の階層画像まで処理が終了していない場合(さらに高解像度の次階層がある場合、ステップS18;NO)には、対応点探索部15は、次階層の階層画像を演算対象として設定する(ステップS19)。また、探索領域設定部14は直前の階層における探索結果に基づいて探索領域を設定する(ステップS20)。そして、ステップS16に戻り、次階層についてPOC演算部7による対応点探索処理が行われ、最高解像度の階層画像(もとの画像と同じ解像度の画像)について処理が終了するまで、多重解像度画像の各階層画像についてステップS17からステップS20の処理が繰り返される。
Returning to FIG. 8, when the POC calculation is completed for one layer, the corresponding point search unit 15 calculates candidate coordinates based on the correlation value obtained in the corresponding point search processing, and uses this as a search result as a search region. It outputs to the setting part 14 (step S17). Further, the corresponding point search unit 15 determines whether or not the POC calculation process has been completed up to the highest resolution image (whether the hierarchical image is the highest resolution image) (step S18). When the processing has been completed up to the highest resolution image (an image having the same resolution as the original image) (step S18; YES), the POC calculation processing by the POC calculation unit 7 is ended.
On the other hand, if the processing has not been completed up to the highest resolution hierarchical image (if there is a higher resolution next layer, step S18; NO), the corresponding point search unit 15 uses the next layer hierarchical image as a calculation target. Set (step S19). The search area setting unit 14 sets a search area based on the search result in the immediately preceding hierarchy (step S20). Then, returning to step S16, the corresponding point search processing is performed by the POC calculation unit 7 for the next layer, and the processing of the multi-resolution image is completed until the processing is completed for the highest-resolution layer image (image having the same resolution as the original image). The processing from step S17 to step S20 is repeated for each hierarchical image.

次に、図7に戻って、最低解像度の階層画像(図2における第n層目)から最高解像度画像(もとの画像と同じ解像度の画像、図2における第0層目)まで、SAD演算部6及びPOC演算部7による対応点探索処理が終了すると(図8のステップS18;YES)、距離画像生成部16によって距離画像が生成され(ステップS5)、必要に応じて出力部20から出力される。   Next, returning to FIG. 7, the SAD calculation is performed from the lowest resolution hierarchical image (the nth layer in FIG. 2) to the highest resolution image (the image having the same resolution as the original image, the 0th layer in FIG. 2). When the corresponding point search processing by the unit 6 and the POC calculation unit 7 is completed (step S18 in FIG. 8; YES), a distance image is generated by the distance image generation unit 16 (step S5), and output from the output unit 20 as necessary. Is done.

以上のように、本実施形態によれば、解像度の異なる複数の階層画像からなる多重解像度画像を生成して、低解像度の階層画像から高解像度の階層画像に向かって順次対応点の探索処理を繰り返すとともに、低解像度の階層画像について得られた探索結果に基づいて探索領域設定部14が次階層の階層画像の探索領域を設定するので、高速に対応点探索を行うことができるとともに、対象物の正確な距離画像を生成することが可能となる。   As described above, according to the present embodiment, a multi-resolution image composed of a plurality of hierarchical images having different resolutions is generated, and corresponding point search processing is sequentially performed from the low-resolution hierarchical image to the high-resolution hierarchical image. In addition, since the search area setting unit 14 sets the search area of the next hierarchical image based on the search result obtained for the low resolution hierarchical image, the corresponding point search can be performed at high speed and the target object can be searched. It is possible to generate an accurate distance image.

また、対応点探索部15は、SAD演算部6とPOC演算部7とを備え、低解像度の階層画像については高速で演算処理を行うことのできるSAD演算部6により対応点探索処理を行い、もとの画像の1/2の解像度以上の階層画像については高精度の演算処理を行うことのできるPOC演算部7により対応点探索処理を行うので、対応点探索を効率的に行って、相関演算の総処理時間の短縮と、高精度な距離画像の生成との両立を図ることができる。   The corresponding point search unit 15 includes a SAD calculation unit 6 and a POC calculation unit 7, and performs a corresponding point search process by the SAD calculation unit 6 that can perform calculation processing at high speed for a low-resolution hierarchical image. For a hierarchical image having a resolution of 1/2 or more of the original image, the corresponding point search process is performed by the POC calculation unit 7 capable of performing a high-precision calculation process. It is possible to achieve both the reduction of the total processing time of calculation and the generation of a highly accurate distance image.

さらに、一旦精度の高いPOC演算部7による対応点探索を行った後はSAD演算部6による対応点探索を行わないこととするので、高解像度の階層画像に対しては高精度の演算処理を行うことができ、信頼性の高い演算結果を得ることができる。   Further, once the corresponding point search by the high-precision POC calculation unit 7 is performed, the corresponding point search by the SAD calculation unit 6 is not performed. Therefore, a high-precision calculation process is performed on a high-resolution hierarchical image. It is possible to obtain an operation result with high reliability.

なお、本実施形態においては、2つの撮像手段2a,2bを備えて各撮像手段2a,2bにより同一対象物を撮像して基準画像データ(第1画像情報)と参照画像データ(第2画像情報)とを取得する構成としたが、撮像装置2a,2bの構成はこれに限定されない。撮像装置2a,2bは少なくとも1つの撮像手段を備えて構成されていればよく、1つの撮像手段により同一対象物を異なるタイミングで撮像して基準画像データと参照画像データとを取得するものでもよいし、2つ以上の撮像手段を備えて各撮像手段により同一対象物を撮像して基準画像データと参照画像データとを取得するものでもよい。   In the present embodiment, two image pickup means 2a and 2b are provided, the same object is picked up by the image pickup means 2a and 2b, and standard image data (first image information) and reference image data (second image information). However, the configuration of the imaging devices 2a and 2b is not limited to this. The imaging devices 2a and 2b need only be configured to include at least one imaging unit, and may acquire the standard image data and the reference image data by imaging the same object at different timings by one imaging unit. In addition, two or more imaging units may be provided, and the same object may be captured by each imaging unit to acquire the standard image data and the reference image data.

また、本実施形態においては、距離画像生成装置1の構成要素として撮像装置2a,2bを備える場合について説明したが、画像取得部を距離画像生成装置1の外部に設けて、距離画像生成装置1に外部から基準画像データ(第1画像情報)と参照画像データ(第2画像情報)が入力され、この画像データに基づいて相関演算等の処理が行われるようにしてもよい。   Further, in the present embodiment, the case where the imaging devices 2a and 2b are provided as the constituent elements of the distance image generating device 1 has been described. However, the image acquiring unit is provided outside the distance image generating device 1, and the distance image generating device 1 is provided. Alternatively, reference image data (first image information) and reference image data (second image information) may be input from the outside, and processing such as correlation calculation may be performed based on the image data.

また、本実施形態においては、SAD演算部6及びPOC演算部7において、相関値に基づく候補座標の算出を行い、算出された候補座標を探索結果として探索領域設定部14に出力するように構成したが、探索領域設定部14に出力される探索結果はこれに限定されない。例えば、探索領域設定部14には、探索結果としてSAD演算部6及びPOC演算部7から相関値を示す演算結果が出力され、探索領域設定部14が、この演算結果に基づいて、最も相関度の高かった点(候補座標)を算出し、この候補座標の周辺を探索領域として設定してもよい。   In the present embodiment, the SAD calculation unit 6 and the POC calculation unit 7 calculate candidate coordinates based on the correlation value, and output the calculated candidate coordinates to the search region setting unit 14 as a search result. However, the search result output to the search area setting unit 14 is not limited to this. For example, the search region setting unit 14 outputs a calculation result indicating a correlation value from the SAD calculation unit 6 and the POC calculation unit 7 as a search result, and the search region setting unit 14 determines the highest degree of correlation based on the calculation result. It is also possible to calculate a point (candidate coordinate) having a high value and set the periphery of the candidate coordinate as a search area.

また、本実施形態においては、画像の全画面を測距の対象とする(すなわち、全画素を測距点とする)場合を例として説明したが、ユーザの用途等により、例えば画像内の人物部分についてだけ測距を行いたい場合等であれば、測距を行いたい対象部分のみに測距点を設定して対応点探索処理を行う等、対応点探索処理を行う範囲を限定してもよい。   Further, in the present embodiment, the case has been described as an example in which the entire screen of the image is the object of distance measurement (that is, all the pixels are the distance measurement points). If you want to perform distance measurement only on the part, you can limit the range of the corresponding point search process, such as setting the distance measurement point only to the target part you want to measure and performing the corresponding point search process. Good.

また、本実施形態においては、1つの探索領域について、X軸方向のすべての画素について対応点探索を行う場合を例として説明したが、ユーザの用途等により一定の限定された距離値の範囲のみ距離を求めることができればよい場合もある。このような場合には、用途に応じた距離範囲に対応する視差値の範囲を演算範囲とし、比較対象領域をこの範囲で移動させて対応点探索処理を行うようにしてもよい。
例えば、100m以上離れた距離にあるものの距離のみを求めれば足りる場合には、100m以上の距離値に対応する視差値の範囲で比較対象領域をこの範囲で移動させる。これにより、対応点探索処理において、相関演算の処理時間を短縮することができる。
Further, in the present embodiment, a case where corresponding point search is performed for all pixels in the X-axis direction for one search region has been described as an example, but only a range of a certain distance value that is limited depending on the user's use or the like. In some cases, the distance may be obtained. In such a case, the range of parallax values corresponding to the distance range according to the application may be used as the calculation range, and the corresponding point search process may be performed by moving the comparison target region within this range.
For example, when it is sufficient to obtain only a distance that is at a distance of 100 m or more, the comparison target area is moved within this range within a range of parallax values corresponding to a distance value of 100 m or more. Thereby, in the corresponding point search process, the processing time of the correlation calculation can be shortened.

また、本実施形態においては、基準画像を25画素ずつの単位面積に分割して探索領域を設定し、この探索領域ごとに相関演算を行う場合を例として説明したが、探索領域の範囲は、25画素ずつに限定されず、任意の範囲に設定することができる。
また、本実施形態においては、探索領域を25画素ずつの所定の領域とし、この領域ごとに相関演算を行うものとしたが、例えば1画素ごとに基準画像と参照画像の相関度を算出するようにしてもよい。
Further, in this embodiment, the case where the reference image is divided into unit areas of 25 pixels and a search region is set and correlation calculation is performed for each search region has been described as an example. It is not limited to 25 pixels each, and can be set to an arbitrary range.
In this embodiment, the search area is a predetermined area of 25 pixels, and the correlation calculation is performed for each area. For example, the correlation between the reference image and the reference image is calculated for each pixel. It may be.

また、本実施形態においては、第1の演算手段として、SAD演算法により距離値を求めるSAD演算部6を設けたが、第1の演算手段は高速に距離値を求める処理を行うことができるものであればよく、これに限定されない。例えば、第1の演算手段として、SSD(Sum of Squared Differences)演算法や、NCC(Normalized Cross-Correlation)演算法により距離値を求める演算部を設けてもよい。   In the present embodiment, the SAD computing unit 6 that obtains the distance value by the SAD computing method is provided as the first computing means. However, the first computing means can perform processing for obtaining the distance value at high speed. It may be anything, and is not limited to this. For example, a calculation unit that obtains a distance value by an SSD (Sum of Squared Differences) calculation method or an NCC (Normalized Cross-Correlation) calculation method may be provided as the first calculation means.

また、本実施形態においては、第2の演算手段として、POC演算法により対応点を探索するPOC演算部7を設けたが、第2の演算手段は高精度に対応点の探索を行うことのできるものであればよく、POC演算法によるものに限定されない。   In the present embodiment, the POC calculation unit 7 for searching for corresponding points by the POC calculation method is provided as the second calculation means. However, the second calculation means can search for the corresponding points with high accuracy. It can be anything that can be done, and is not limited to the one based on the POC calculation method.

また、本実施形態においては、画像処理部10が、CPU等とROM、RAM等のメモリで構成されるコンピュータである場合を例として説明したが、画像処理部10の全体又は一部を専用ハードウェアで構成してもよい。
すなわち、例えばPOC演算部7は、位相限定相関処理を行なう専用のハードウェアで構成されていることが好ましい。専用のハードウェアとしては、例えば、ASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)等が適用可能である。
Further, in the present embodiment, the case where the image processing unit 10 is a computer including a CPU and the like and a memory such as a ROM and a RAM has been described as an example. You may comprise by wear.
That is, for example, the POC calculation unit 7 is preferably configured by dedicated hardware that performs phase-only correlation processing. As dedicated hardware, for example, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or the like is applicable.

その他、本発明が上記実施の形態に限らず適宜変更可能であるのは勿論である。   In addition, it is needless to say that the present invention is not limited to the above embodiment and can be modified as appropriate.

本実施形態に係る相関演算装置の全体構成を示すブロック図である。It is a block diagram which shows the whole structure of the correlation calculating apparatus which concerns on this embodiment. 本実施形態における多重解像度画像の構造を模式的に示した説明図である。It is explanatory drawing which showed typically the structure of the multi-resolution image in this embodiment. 図3(a)は、本実施形態における基準画像の例を示した図であり、図3(b)は、本実施形態における参照画像の例を示した図である。FIG. 3A is a diagram illustrating an example of a reference image in the present embodiment, and FIG. 3B is a diagram illustrating an example of a reference image in the present embodiment. 相関度と視差値との関係を示す説明図である。It is explanatory drawing which shows the relationship between a correlation degree and a parallax value. 図1に示すPOC演算部の構成を示すブロック図である。It is a block diagram which shows the structure of the POC calculating part shown in FIG. POC演算処理によって得られる結果の例を示す説明図である。It is explanatory drawing which shows the example of the result obtained by POC arithmetic processing. 本実施形態における距離画像生成処理を表すフローチャートである。It is a flowchart showing the distance image generation process in this embodiment. 図7に示す対応点探索処理を表すフローチャートである。It is a flowchart showing the corresponding point search process shown in FIG. 図8に示す1回目のSAD演算処理を表すフローチャートである。It is a flowchart showing the 1st SAD calculation process shown in FIG. 図8に示すPOC演算処理を表すフローチャートである。It is a flowchart showing the POC calculation process shown in FIG.

符号の説明Explanation of symbols

1 距離画像生成装置
2a,2b 撮像装置(画像取得手段)
6 SAD演算部(第1の演算手段)
7 POC演算部(第1の演算手段)
10 画像処理部
11 レンズ歪み補正部
12 画像平行化処理部
13 多重解像度画像生成部(多重解像度画像生成手段)
14 探索領域設定部(探索領域設定手段)
15 距離画像生成部(距離画像生成手段)
71a,71b 窓関数部
72a,72b FFT部
73a,73b 位相情報抽出部
74 合成部
75 IFFT部
76 相関演算部
1 Distance Image Generating Device 2a, 2b Imaging Device (Image Acquisition Unit)
6 SAD computing unit (first computing means)
7 POC calculation section (first calculation means)
DESCRIPTION OF SYMBOLS 10 Image processing part 11 Lens distortion correction part 12 Image parallelization processing part 13 Multi-resolution image generation part (Multi-resolution image generation means)
14 Search area setting unit (search area setting means)
15 Distance image generation unit (distance image generation means)
71a, 71b Window function units 72a, 72b FFT units 73a, 73b Phase information extraction unit 74 Synthesis unit 75 IFFT unit 76 Correlation calculation unit

Claims (12)

第1画像情報と比較対象となる第2画像情報とを取得する画像取得手段と、
前記画像取得手段により取得された前記第1画像情報及び前記第2画像情報について解像度の異なる複数の階層画像が低解像度から高解像度まで順に階層構造をなす多重解像度画像を生成する多重解像度画像生成手段と、
前記第1画像情報と前記第2画像情報とを照合して所定の探索領域について対応点を探索するものであって、前記多重解像度画像のうち、少なくとも最低解像度の階層画像に対して第1の演算手法により対応点探索を行う第1の演算手段と、少なくとも最高解像度の階層画像に対して前記第1の演算手法よりも精度の高い第2の演算手法により対応点探索を行う第2の演算手段と、を備え、前記多重解像度画像のうち、低解像度の階層画像から前記対応点探索を開始し、順次解像度の高い階層画像について前記対応点探索を行い、最高解像度の階層画像に至るまで順に前記対応点探索を繰り返す対応点探索手段と、
前記対応点探索手段により一つの階層画像についての探索が終了すると当該階層画像についての探索結果に基づいて次の階層の階層画像の探索領域を設定する探索領域設定手段と、
前記対応点探索手段による探索結果に基づいて距離画像を生成する距離画像生成手段と、
を備えていることを特徴とする距離画像生成装置。
Image acquisition means for acquiring first image information and second image information to be compared;
Multi-resolution image generation means for generating a multi-resolution image in which a plurality of hierarchical images having different resolutions form a hierarchical structure in order from low resolution to high resolution for the first image information and the second image information acquired by the image acquisition means When,
The first image information and the second image information are collated to search for a corresponding point in a predetermined search area, and at least a first resolution layer image of the lowest resolution among the multi-resolution images A first calculation means for searching for corresponding points by a calculation method; and a second calculation for searching for corresponding points by a second calculation method that is more accurate than the first calculation method for at least the highest resolution hierarchical image. And starting the corresponding point search from a low-resolution hierarchical image among the multi-resolution images, sequentially performing the corresponding point search for a high-resolution hierarchical image, and sequentially reaching the highest-resolution hierarchical image. Corresponding point search means for repeating the corresponding point search;
Search area setting means for setting a search area for a next hierarchical image based on a search result for the hierarchical image when the search for one hierarchical image is completed by the corresponding point search means;
A distance image generating means for generating a distance image based on a search result by the corresponding point searching means;
A distance image generating apparatus comprising:
前記第2の演算手段による対応点探索が行われた後は、以降の階層画像について前記第1の演算手段による対応点探索を行わないことを特徴とする請求項1に記載の距離画像生成装置。   2. The distance image generation apparatus according to claim 1, wherein after the corresponding point search by the second calculation unit is performed, the corresponding point search by the first calculation unit is not performed for the subsequent hierarchical images. . 前記第1の演算手段により行われる第1の演算手法は、SAD演算法、SSD演算法、NCC演算法のうちのいずれかであることを特徴とする請求項1又は請求項2に記載の距離画像生成装置。   The distance according to claim 1 or 2, wherein the first calculation method performed by the first calculation means is any one of an SAD calculation method, an SSD calculation method, and an NCC calculation method. Image generation device. 前記第2の演算手段により行われる第2の演算手法は、POC演算法であることを特徴とする請求項1から請求項3のいずれか一項に記載の距離画像生成装置。   4. The distance image generating apparatus according to claim 1, wherein the second calculation method performed by the second calculation unit is a POC calculation method. 5. 第1画像情報と比較対象となる第2画像情報とを取得する画像取得工程と、
前記画像取得工程において取得された前記第1画像情報及び前記第2画像情報について解像度の異なる複数の階層画像が低解像度から高解像度まで順に階層構造をなす多重解像度画像を生成する多重解像度画像生成工程と、
前記第1画像情報と前記第2画像情報とを照合して所定の探索領域について対応点を探索するものであって、前記多重解像度画像のうち、少なくとも最低解像度の階層画像に対して第1の演算手法により対応点探索を行う第1の演算工程と、少なくとも最高解像度の階層画像に対して前記第1の演算手法よりも精度の高い第2の演算手法により対応点探索を行う第2の演算工程と、を含み、前記多重解像度画像のうち、低解像度の階層画像から前記対応点探索を開始し、順次解像度の高い階層画像について前記対応点探索を行い、最高解像度の階層画像に至るまで順に前記対応点探索を繰り返す対応点探索工程と、
前記対応点探索工程において一つの階層画像についての探索が終了すると当該階層画像についての探索結果に基づいて次の階層の階層画像の探索領域を設定する探索領域設定工程と、
前記対応点探索工程における探索結果に基づいて距離画像を生成する距離画像生成工程と、
を備えていることを特徴とする距離画像生成方法。
An image acquisition step of acquiring first image information and second image information to be compared;
A multi-resolution image generation step of generating a multi-resolution image in which a plurality of hierarchical images having different resolutions form a hierarchical structure in order from a low resolution to a high resolution with respect to the first image information and the second image information acquired in the image acquisition step When,
The first image information and the second image information are collated to search for a corresponding point in a predetermined search area, and at least a first resolution layer image of the lowest resolution among the multi-resolution images A first calculation step of searching for corresponding points by a calculation method, and a second calculation of searching for corresponding points by a second calculation method having higher accuracy than the first calculation method for at least the highest resolution hierarchical image And starting the corresponding point search from a low-resolution hierarchical image among the multi-resolution images, sequentially performing the corresponding point search for a high-resolution hierarchical image, and sequentially reaching the highest-resolution hierarchical image. A corresponding point search step for repeating the corresponding point search;
A search region setting step of setting a search region for a hierarchical image of the next layer based on a search result for the hierarchical image when the search for one hierarchical image is completed in the corresponding point search step;
A distance image generation step of generating a distance image based on a search result in the corresponding point search step;
A distance image generation method characterized by comprising:
前記第2の演算工程による対応点探索が行われた後は、以降の階層画像について前記第1の演算工程による対応点探索を行わないことを特徴とする請求項5に記載の距離画像生成方法。   6. The distance image generation method according to claim 5, wherein after the corresponding point search by the second calculation step is performed, the corresponding point search by the first calculation step is not performed for the subsequent hierarchical images. . 前記第1の演算工程により行われる第1の演算手法は、SAD演算法、SSD演算法、NCC演算法のうちのいずれかであることを特徴とする請求項5又は請求項6に記載の距離画像生成方法。   The distance according to claim 5 or 6, wherein the first calculation method performed in the first calculation step is any one of an SAD calculation method, an SSD calculation method, and an NCC calculation method. Image generation method. 前記第2の演算工程により行われる第2の演算手法は、POC演算法であることを特徴とする請求項5から請求項7のいずれか一項に記載の距離画像生成方法。   The distance image generation method according to any one of claims 5 to 7, wherein the second calculation method performed in the second calculation step is a POC calculation method. 第1画像情報と比較対象となる第2画像情報とについて解像度の異なる複数の階層画像が低解像度から高解像度まで順に階層構造をなす多重解像度画像を生成する多重解像度画像生成機能と、
前記第1画像情報と前記第2画像情報とを照合して所定の探索領域について対応点を探索するものであって、前記多重解像度画像のうち、少なくとも最低解像度の階層画像に対して第1の演算手法により対応点探索を行う第1の演算機能と、少なくとも最高解像度の階層画像に対して前記第1の演算手法よりも精度の高い第2の演算手法により対応点探索を行う第2の演算機能と、を含み、前記多重解像度画像のうち、低解像度の階層画像から前記対応点探索を開始して順次解像度の高い階層画像について前記対応点探索を行い、最高解像度の階層画像に至るまで順に前記対応点探索を繰り返す対応点探索機能と、
前記対応点探索機能により一つの階層画像についての探索が終了すると当該階層画像についての探索結果に基づいて次の階層の階層画像の探索領域を設定する探索領域設定機能と、
前記対応点探索機能による探索結果に基づいて距離画像を生成する距離画像生成機能と、
をコンピュータに実現させることを特徴とするコンピュータ読取可能なプログラム。
A multi-resolution image generation function for generating a multi-resolution image in which a plurality of hierarchical images having different resolutions form a hierarchical structure in order from a low resolution to a high resolution for the first image information and the second image information to be compared;
The first image information and the second image information are collated to search for a corresponding point in a predetermined search area, and at least a first resolution layer image of the lowest resolution among the multi-resolution images A first calculation function for searching for corresponding points by a calculation method, and a second calculation for searching for corresponding points by a second calculation method that is more accurate than the first calculation method for at least the highest resolution hierarchical image Among the multi-resolution images, the corresponding point search is started from a low-resolution hierarchical image, and the corresponding point search is sequentially performed for a hierarchical image with a high resolution, and the hierarchical image with the highest resolution is sequentially reached. A corresponding point search function for repeating the corresponding point search;
A search area setting function for setting a search area for the next hierarchical image based on a search result for the hierarchical image when the search for the hierarchical image is completed by the corresponding point search function;
A distance image generation function for generating a distance image based on a search result by the corresponding point search function;
A computer-readable program characterized by causing a computer to realize the above.
前記第2の演算手法による対応点探索が行われた後は、以降の階層画像について前記第1の演算手法による対応点探索を行わないことを特徴とする請求項9に記載のコンピュータ読取可能なプログラム。   10. The computer-readable computer program product according to claim 9, wherein after the corresponding point search by the second calculation method is performed, the corresponding point search by the first calculation method is not performed for the subsequent hierarchical images. program. 前記第1の演算手法は、SAD演算法、SSD演算法、NCC演算法のうちのいずれかであることを特徴とする請求項9又は請求項10に記載のコンピュータ読取可能なプログラム。   The computer-readable program according to claim 9 or 10, wherein the first calculation method is any one of an SAD calculation method, an SSD calculation method, and an NCC calculation method. 前記第2の演算手法は、POC演算法であることを特徴とする請求項9から請求項11のいずれか一項に記載のコンピュータ読取可能なプログラム。   The computer-readable program according to any one of claims 9 to 11, wherein the second calculation method is a POC calculation method.
JP2007055827A 2007-03-06 2007-03-06 Distance image generating apparatus, distance image generating method and program Active JP5098369B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007055827A JP5098369B2 (en) 2007-03-06 2007-03-06 Distance image generating apparatus, distance image generating method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007055827A JP5098369B2 (en) 2007-03-06 2007-03-06 Distance image generating apparatus, distance image generating method and program

Publications (2)

Publication Number Publication Date
JP2008216126A true JP2008216126A (en) 2008-09-18
JP5098369B2 JP5098369B2 (en) 2012-12-12

Family

ID=39836330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007055827A Active JP5098369B2 (en) 2007-03-06 2007-03-06 Distance image generating apparatus, distance image generating method and program

Country Status (1)

Country Link
JP (1) JP5098369B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011170519A (en) * 2010-02-17 2011-09-01 Konica Minolta Holdings Inc Image processing apparatus, image processing method, and program
WO2013001710A1 (en) * 2011-06-29 2013-01-03 コニカミノルタホールディングス株式会社 Corresponding-point search apparatus
JP2013114477A (en) * 2011-11-29 2013-06-10 Konica Minolta Inc Image processing device, image processing method and image processing program
JP2013254300A (en) * 2012-06-06 2013-12-19 Konica Minolta Inc Image processing method
JP2015078852A (en) * 2013-10-15 2015-04-23 株式会社ディスコ Alignment method
WO2017033853A1 (en) * 2015-08-26 2017-03-02 株式会社ソニー・インタラクティブエンタテインメント Image processing device and image processing method
CN110274573A (en) * 2018-03-16 2019-09-24 北京深鉴智能科技有限公司 Binocular distance measuring method, device, equipment, storage medium and calculating equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5648510A (en) * 1979-09-28 1981-05-01 Agency Of Ind Science & Technol Distance pattern measuring system by adverse convoluting method
JPH02238580A (en) * 1989-03-13 1990-09-20 Nippon Telegr & Teleph Corp <Ntt> Hierarchic image matching processing system
JPH10134197A (en) * 1996-11-01 1998-05-22 Yamatake Honeywell Co Ltd Distance measuring instrument
JP2000171214A (en) * 1998-12-08 2000-06-23 Meidensha Corp Corresponding point retrieving method and three- dimensional position measuring method utilizing same
JP2001319229A (en) * 2000-05-10 2001-11-16 Toyota Central Res & Dev Lab Inc Correlation calculation method for image
WO2003049190A1 (en) * 2001-12-05 2003-06-12 Hamamatsu Photonics K.K. Light detection device, imaging device and distant image acquisition device
JP2004239705A (en) * 2003-02-05 2004-08-26 Ricoh Co Ltd Object distance detection device and camera equipped with object distance detection device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5648510A (en) * 1979-09-28 1981-05-01 Agency Of Ind Science & Technol Distance pattern measuring system by adverse convoluting method
JPH02238580A (en) * 1989-03-13 1990-09-20 Nippon Telegr & Teleph Corp <Ntt> Hierarchic image matching processing system
JPH10134197A (en) * 1996-11-01 1998-05-22 Yamatake Honeywell Co Ltd Distance measuring instrument
JP2000171214A (en) * 1998-12-08 2000-06-23 Meidensha Corp Corresponding point retrieving method and three- dimensional position measuring method utilizing same
JP2001319229A (en) * 2000-05-10 2001-11-16 Toyota Central Res & Dev Lab Inc Correlation calculation method for image
WO2003049190A1 (en) * 2001-12-05 2003-06-12 Hamamatsu Photonics K.K. Light detection device, imaging device and distant image acquisition device
JP2004239705A (en) * 2003-02-05 2004-08-26 Ricoh Co Ltd Object distance detection device and camera equipped with object distance detection device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011170519A (en) * 2010-02-17 2011-09-01 Konica Minolta Holdings Inc Image processing apparatus, image processing method, and program
WO2013001710A1 (en) * 2011-06-29 2013-01-03 コニカミノルタホールディングス株式会社 Corresponding-point search apparatus
US20140147049A1 (en) * 2011-06-29 2014-05-29 Konica Minolta, Inc. Corresponding point searching apparatus
JPWO2013001710A1 (en) * 2011-06-29 2015-02-23 コニカミノルタ株式会社 Corresponding point search device
US9117135B2 (en) * 2011-06-29 2015-08-25 Konica Minolta, Inc. Corresponding point searching apparatus
JP2013114477A (en) * 2011-11-29 2013-06-10 Konica Minolta Inc Image processing device, image processing method and image processing program
JP2013254300A (en) * 2012-06-06 2013-12-19 Konica Minolta Inc Image processing method
JP2015078852A (en) * 2013-10-15 2015-04-23 株式会社ディスコ Alignment method
WO2017033853A1 (en) * 2015-08-26 2017-03-02 株式会社ソニー・インタラクティブエンタテインメント Image processing device and image processing method
US10559089B2 (en) 2015-08-26 2020-02-11 Sony Interactive Entertainment Inc. Information processing apparatus and information processing method
CN110274573A (en) * 2018-03-16 2019-09-24 北京深鉴智能科技有限公司 Binocular distance measuring method, device, equipment, storage medium and calculating equipment
CN110274573B (en) * 2018-03-16 2021-10-26 赛灵思电子科技(北京)有限公司 Binocular ranging method, device, equipment, storage medium and computing equipment

Also Published As

Publication number Publication date
JP5098369B2 (en) 2012-12-12

Similar Documents

Publication Publication Date Title
JP4883223B2 (en) Motion vector generation apparatus and motion vector generation method
US10462447B1 (en) Electronic system including image processing unit for reconstructing 3D surfaces and iterative triangulation method
JP5098369B2 (en) Distance image generating apparatus, distance image generating method and program
JP5311016B2 (en) Stereo camera unit and stereo matching method
JP4941565B2 (en) Corresponding point search apparatus and corresponding point searching method
EP3135033B1 (en) Structured stereo
JP2008216127A (en) Distance image generation device, distance image generation method, and program
JP2011165045A (en) Image processing device
JP6052186B2 (en) Image processing device
CN107466356A (en) Measuring method, measurement apparatus, process of measurement and the computer-readable recording medium that have recorded process of measurement
CN103905746A (en) Method and device for localization and superposition of sub-pixel-level image offset and video device
JP2016020896A (en) Positional deviation extent measuring method, correction table generating device, image pickup device, and projection device
JP5034554B2 (en) Correlation calculation device, correlation calculation method and program
JP2011180670A (en) Image processor
JP6040782B2 (en) Image processing apparatus and program
JP6494402B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP2016164709A (en) Image processing device, imaging apparatus, and image processing program
JP7057717B2 (en) Phase difference detector, image processing device, and program
JP6317611B2 (en) Display display pattern generating apparatus and program thereof
JP2017059998A (en) Image processing apparatus and method, and imaging device
JP5167614B2 (en) Distance image generating apparatus, distance image generating method and program
JP2017022597A (en) Image processing apparatus, control method therefor, and control program
JP2020102230A (en) Calibration method
JP7496564B2 (en) Image processing device, image processing method, and program
JP5057134B2 (en) Distance image generating apparatus, distance image generating method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100303

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120228

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120426

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20120426

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120828

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120910

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151005

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5098369

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350