JP2013254300A - Image processing method - Google Patents

Image processing method Download PDF

Info

Publication number
JP2013254300A
JP2013254300A JP2012128748A JP2012128748A JP2013254300A JP 2013254300 A JP2013254300 A JP 2013254300A JP 2012128748 A JP2012128748 A JP 2012128748A JP 2012128748 A JP2012128748 A JP 2012128748A JP 2013254300 A JP2013254300 A JP 2013254300A
Authority
JP
Japan
Prior art keywords
image
processing
processing method
correction
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012128748A
Other languages
Japanese (ja)
Inventor
Hisaki Tsuboi
央樹 坪井
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 JP2012128748A priority Critical patent/JP2013254300A/en
Publication of JP2013254300A publication Critical patent/JP2013254300A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To perform distortion correction processing quickly in a relatively small circuit.SOLUTION: Provided is an image processing method for processing an image by stereo matching by which identical points on a pair of photographed images photographed from different positions are searched to measure a three-dimensional position. The image processing method includes a step of creating, in performing segmentation processing of segmenting a part of an area in the photographed images and searching processing of performing said searching with reference to the image segmented in the segmentation processing, a lookup table for causing coordinates of the area before and after the segmentation in the segmentation processing to correspond to each other (S101a).

Description

本願発明は、撮影位置が異なる一対の撮影画像上の同一点を探索して3次元的な位置を計測するステレオマッチングにより画像を処理する画像処理方法に関する。   The present invention relates to an image processing method for processing an image by stereo matching that searches for the same point on a pair of captured images having different shooting positions and measures a three-dimensional position.

工業製品の開発や生産工程において、設計・開発・生産に関わるすべての情報を一元化して管理し、工程の効率化や期間の短縮をはかるためコンピュータを使用した情報システムが活用されている。   In the development and production process of industrial products, an information system using a computer is utilized to centralize and manage all information related to design, development and production, and to improve process efficiency and shorten the period.

この情報システムでは、CADデータなどの図面データや、仕様書などの文書データからなる設計に関するデータの管理や、製品を構成する部品の構成データの管理と購買・資材システムとの連携、設計・生産のスケジュールの把握と効率化をはかるワークフロー管理などの機能が中心となって構成される。   In this information system, management of design-related data consisting of drawing data such as CAD data and document data such as specifications, management of component data constituting products and linkage with purchasing and material systems, design and production It consists mainly of functions such as workflow management to grasp the schedule and improve efficiency.

そして、生産工程において、ステレオマッチング法による3D測距と、2Dテンプレートマッチングとによって、ロボットを制御してテーブル上に載置された部品をピッキングして組み付けるといった作業が可能になる。   In the production process, it is possible to perform operations such as picking and assembling components placed on the table by controlling the robot by 3D distance measurement by the stereo matching method and 2D template matching.

ここで、ステレオマッチング法による3D測距とは、左右に配置された2台のカメラ(ステレオカメラ)で撮影された2枚1組の一対の画像を用いて、左のカメラで撮影された画像が右のカメラで撮影された画像のどの部分に対応するかを面積相関の計算により求め、その対応関係を使った三角測量により、各点の3次元的位置を推測する方法である.
また、2Dテンプレートマッチングとは、予め保持している対象物のテンプレート画像と撮影画像とを比較し、撮影した画像中から特定の被写体(対象物)を探し出す手法のことである。
Here, 3D ranging by the stereo matching method is an image taken by the left camera using a pair of images taken by two cameras (stereo cameras) arranged on the left and right. This is a method of estimating the three-dimensional position of each point by triangulation using the area correlation calculation, which part of the image taken by the right camera corresponds to the area correlation calculation.
The 2D template matching is a technique for comparing a template image of a target object held in advance with a captured image and searching for a specific subject (target object) from the captured image.

なお、テーブル上の複数の対象物を、傾きも回転も無い状態で真上から撮影することができれば、3D測距は不要で、2Dテンプレートマッチングだけで済む。しかし、実際には、部品が載置された向きや、カメラの撮影方向に、傾きや回転が生じているため、2Dテンプレートマッチングの前処理として、上述したステレオマッチング法による3D測距が必要になる。   If a plurality of objects on the table can be photographed from directly above without tilting or rotating, 3D distance measurement is unnecessary and only 2D template matching is required. However, in actuality, since the tilt or rotation occurs in the direction in which the component is placed or the shooting direction of the camera, 3D distance measurement using the stereo matching method described above is necessary as preprocessing for 2D template matching. Become.

なお、実際には、3D測距の結果を用いて、撮影レンズにより生じる樽型や糸巻き型の歪曲収差を除去する歪補正や、撮影対象面と光軸とが垂直になっていない場合に発生するあおりを除去するあおり補正を行うことで、撮影画像がテンプレート画像と比較しうる状態になる。   Actually, distortion correction that removes barrel-type and pincushion-type distortion caused by the photographic lens using the result of 3D distance measurement, or when the subject surface and the optical axis are not perpendicular By performing the tilt correction for removing the tilt, the captured image can be compared with the template image.

これらに関連する技術は、以下の特許文献に記載されている。   Techniques related to these are described in the following patent documents.

特開2010−71743号公報JP 2010-71743 A 特開2010−133718号公報JP 2010-133718 A PCT/JP/060184号公報PCT / JP / 060184

特許文献1には、撮影画像について3D測距による計測データに基づいて2Dの変換を行い、物体の検出とロボット制御とを行うロボットシステムが記載されている。   Patent Document 1 describes a robot system that performs 2D conversion on a captured image based on measurement data obtained by 3D distance measurement and performs object detection and robot control.

特許文献2には、撮影画像に基づく作業対象物についての位置検出が記載されており、画像の回転にアフィン変換を用いることが記載されている。   Patent Document 2 describes position detection for a work object based on a photographed image, and describes that affine transformation is used for image rotation.

特許文献3には、撮影画像に対する各種の歪み補正のアルゴリズムが記載されている。   Patent Literature 3 describes various distortion correction algorithms for captured images.

しかし、いずれの特許文献においても、3D測距と2Dテンプレートマッチングとの効率的な処理は記載されておらず、それぞれの処理を順番に処理する必要がある。また、撮影画像を振幅情報と位相情報とに分解し、位相情報を用いて同一点を探索することで、精度の高い3D測距処理が行えるPOC処理が提案されている。しかし、このPOC処理では、フーリエ変換が必要であり、高性能の演算装置が必要であり、また、処理時間も掛かるという問題を抱えている。その結果、全体として処理に時間が掛かることから、全体として高速な処理が望まれていた。   However, neither patent document describes an efficient process of 3D distance measurement and 2D template matching, and each process needs to be processed in order. In addition, a POC process that can perform highly accurate 3D ranging processing by decomposing a captured image into amplitude information and phase information and searching for the same point using the phase information has been proposed. However, this POC process requires a Fourier transform, requires a high-performance computing device, and has a problem that it takes a long processing time. As a result, since the processing takes time as a whole, high-speed processing has been desired as a whole.

本願発明はこのような問題に鑑み、3D測距と2Dテンプレートマッチングとにより、被写体の正確な認識を図ること、及び、比較的小規模な回路で、処理時間の短縮化を図ることが可能な、画像処理方法を提供することを目的とする。   In view of such a problem, the present invention can accurately recognize a subject by 3D distance measurement and 2D template matching, and can shorten the processing time with a relatively small circuit. An object of the present invention is to provide an image processing method.

上記の目的は、下記に記載する発明により達成される。   The above object is achieved by the invention described below.

(1)この発明は、撮影位置が異なる一対の撮影画像上の同一点を探索して3次元的な位置を計測するステレオマッチングにより画像を処理する画像処理方法において、前記撮影画像のうちの一部の領域を切り出す切り出し処理と、前記切り出し処理により切り出された画像を参照して前記探索を行う探索処理とを実行する際に、前記切り出し処理において切り出す前後の領域の座標を対応させるためのルックアップテーブルを生成する、ことを特徴とする。   (1) The present invention provides an image processing method for processing an image by stereo matching that searches for the same point on a pair of photographed images with different photographing positions and measures a three-dimensional position, and is one of the photographed images. When performing a cutout process for cutting out a region of a part and a search process for performing the search with reference to an image cut out by the cutout process, a look for associating the coordinates of the areas before and after the cutout in the cutout process An up table is generated.

(2)この発明は、撮影位置が異なる一対の撮影画像上の同一点を探索して3次元的な位置を計測するステレオマッチングにより画像を処理する画像処理方法において、前記撮影画像のうちの一部の領域を切り出す切り出し処理と、前記切り出し処理により切り出された画像を参照して前記探索を行う探索処理とを実行する際に、前記切り出し処理において切り出す前後の領域の座標を対応させるためのルックアップテーブルを生成し、前記ルックアップテーブルは、前記切り出し処理において切り出された後の領域の座標として、前記画像中の歪みを補正する歪補正処理が施された状態の座標とする、ことを特徴とする。   (2) The present invention provides an image processing method for processing an image by stereo matching that searches for the same point on a pair of photographed images with different photographing positions and measures a three-dimensional position. When performing a cutout process for cutting out a region of a part and a search process for performing the search with reference to an image cut out by the cutout process, a look for associating the coordinates of the areas before and after the cutout in the cutout process An up table is generated, and the look-up table is a coordinate in a state in which distortion correction processing for correcting distortion in the image is performed as coordinates of a region after being cut out in the cut-out processing. And

(3)この発明は、上記(1)−(2)において、前記一対の撮影画像を振幅情報と位相情報とに分解し、前記位相情報を用いて前記同一点を探索する、ことを特徴とする。   (3) The present invention is characterized in that, in the above (1)-(2), the pair of photographed images are decomposed into amplitude information and phase information, and the same point is searched using the phase information. To do.

(4)この発明は、上記(3)において、前記位相情報を用いた同一点の探索を実行する際に、前記切り出し処理において低解像度から高解像度に解像度を変えつつ繰り返して実行する、ことを特徴とする。   (4) The present invention, in (3), when performing the search for the same point using the phase information, repeatedly executing the cutout process while changing the resolution from low resolution to high resolution. Features.

(5)この発明は、撮影位置が異なる一対の撮影画像上の同一点を探索して3次元的な位置を計測して被写体画像を抽出するステレオマッチングによる前処理と、前記前処理により抽出された被写体画像と予め保持しているテンプレート画像との一致を検出するテンプレートマッチングによる後処理と、を有する画像処理方法であって、前記前処理において、前記被写体の姿勢を検出し、前記あおりと前記回転と撮影時の歪曲収差とを解消するよう補正する歪補正処理を同時に行うように、座標を対応させるためのルックアップテーブルを生成する、ことを特徴とする。   (5) In the present invention, the same point on a pair of photographed images with different photographing positions is searched, the three-dimensional position is measured, and the subject image is extracted, and the stereo matching preprocessing and the preprocessing are extracted. A post-processing by template matching for detecting a match between the subject image and a template image held in advance, wherein in the pre-processing, the posture of the subject is detected, and the tilt and the A lookup table for associating coordinates is generated so that a distortion correction process for correcting the rotation and distortion at the time of photographing is simultaneously performed.

(6)この発明は、上記(5)において、前記姿勢補正は、前記撮影画像中の前記被写体の計測結果に基づいて決定される、ことを特徴とする。   (6) This invention is characterized in that, in the above (5), the posture correction is determined based on a measurement result of the subject in the captured image.

(7)この発明は、上記(5)−(6)において、前記姿勢補正は、前記被写体を撮影時の光軸周りに回転させることで処理する、ことを特徴とする。   (7) The present invention is characterized in that, in the above (5) to (6), the posture correction is processed by rotating the subject around an optical axis at the time of photographing.

(8)この発明は、上記(5)−(6)において、前記姿勢補正は、前記被写体を光軸から水平方向の軸周りに回転させることで補正する、ことを特徴とする。   (8) The present invention is characterized in that, in the above (5) to (6), the posture correction is performed by rotating the subject around an axis in a horizontal direction from an optical axis.

(9)この発明は、上記(1)−(8)において、前記歪補正処理は、被写体を撮像ユニットにより撮影する際の入射角と、前記撮像ユニットでの撮影時に発生する歪曲収差の補正とを考慮した、前記撮像ユニットの撮像素子表面上の座標の関係をデータとして保有しており、前記撮像ユニットにより得られる撮影画像を切り出す際の、前記撮像素子上の座標と切り出された後の画像の座標とを、歪補正を伴った状態で対応させるルックアップテーブルを生成する、ことを特徴とする。   (9) In the present invention, in the above (1) to (8), the distortion correction processing includes correcting an incident angle when the subject is imaged by the imaging unit and correcting distortion aberration generated when the imaging unit is captured. The relationship between the coordinates on the surface of the image sensor of the image pickup unit is taken into account as data, and the image after being cut out with the coordinates on the image sensor when the shot image obtained by the image pickup unit is cut out A look-up table is generated that correlates these coordinates with distortion correction.

この発明では、撮影位置が異なる一対の撮影画像上の同一点を探索して3次元的な位置を計測するステレオマッチングにより画像を処理する際に、撮影画像のうちの一部の領域を切り出す切り出し処理と、切り出し処理により切り出された画像を参照して探索を行う探索処理とを実行する際に、切り出し処理において切り出す前後の領域の座標を対応させるためのルックアップテーブルを生成しており、このルックアップテーブルでは、切り出し処理において切り出された後の領域の座標として、画像中の歪みを補正する歪補正処理が施された状態の座標としている。これにより、縮小画像作成のための切り出し処理と、各種歪みを補正する歪補正処理とを同時に実行することになり、全体として高速な処理が可能になる。   In the present invention, when an image is processed by stereo matching that searches for the same point on a pair of photographed images with different photographing positions and measures a three-dimensional position, a part of the photographed image is cut out. When executing the process and the search process for performing a search with reference to the image cut out by the cutout process, a lookup table is generated to correspond the coordinates of the area before and after the cutout in the cutout process. In the look-up table, the coordinates of the region after being cut out in the cut-out process are the coordinates in a state where the distortion correction process for correcting the distortion in the image is performed. As a result, the cut-out process for creating a reduced image and the distortion correction process for correcting various distortions are executed simultaneously, and high-speed processing is possible as a whole.

また、この発明では、撮影位置が異なる一対の撮影画像上の同一点を探索して3次元的な位置を計測して被写体画像を抽出するステレオマッチングによる前処理と、前処理により抽出された被写体画像と予め保持しているテンプレート画像との一致を検出するテンプレートマッチングによる後処理と、を実行する際に、前処理において、被写体画像のあおりや回転を検出し、後処理において、姿勢(あおりや回転)補正と撮影時の歪曲収差補正とを同時に1つの歪補正処理として行うように、座標を対応させるためのルックアップテーブルを生成する。これにより、姿勢(あおりや回転)補正と歪曲収差補正とを同時に実行することになり、全体として高速な処理が可能になる。   Further, in the present invention, a pre-processing by stereo matching that searches for the same point on a pair of photographed images with different photographing positions, measures a three-dimensional position, and extracts a subject image, and a subject extracted by the pre-processing When performing post-processing by template matching that detects a match between an image and a template image held in advance, the pre-processing detects the tilt and rotation of the subject image, and the post-processing performs posture (a A lookup table for associating coordinates is generated so that (rotation) correction and distortion correction at the time of photographing are performed simultaneously as one distortion correction process. As a result, posture (tilting and rotation) correction and distortion correction are executed simultaneously, and high-speed processing is possible as a whole.

第1実施形態に係る処理を実行する装置の構成を示す構成図である。It is a block diagram which shows the structure of the apparatus which performs the process which concerns on 1st Embodiment. 第1実施形態に係る処理を実行する装置の主要部構成を示す構成図である。It is a block diagram which shows the principal part structure of the apparatus which performs the process which concerns on 1st Embodiment. 比較例の制御フローを示すフローチャートである。It is a flowchart which shows the control flow of a comparative example. 比較例の処理の様子を模式的に示す説明図である。It is explanatory drawing which shows typically the mode of the process of a comparative example. 第1実施形態の制御フローを示すフローチャートである。It is a flowchart which shows the control flow of 1st Embodiment. 第1実施形態の処理の様子を模式的に示す説明図である。It is explanatory drawing which shows typically the mode of the process of 1st Embodiment. 第2実施形態に係る処理を実行する装置の主要部構成を示す構成図である。It is a block diagram which shows the principal part structure of the apparatus which performs the process which concerns on 2nd Embodiment. 比較例の制御フローを示すフローチャートである。It is a flowchart which shows the control flow of a comparative example. 比較例の処理の様子を模式的に示す説明図である。It is explanatory drawing which shows typically the mode of the process of a comparative example. 第2実施形態の制御フローを示すフローチャートである。It is a flowchart which shows the control flow of 2nd Embodiment. 第2実施形態の処理の様子を模式的に示す説明図である。It is explanatory drawing which shows typically the mode of the process of 2nd Embodiment.

以下、本発明を実施の形態を具体例に基づいて説明するが、本発明は該実施の形態に示される具体例に限られるものではない。   Hereinafter, the present invention will be described based on specific examples, but the present invention is not limited to the specific examples shown in the embodiments.

〔A〕第1実施形態の構成:
図1は第1実施形態に係る画像処理方法を実現する画像処理システムあるいは情報システムの構成を示す構成図である。以下、画像処理システムと情報処理システムを総称して画像処理システムと呼ぶ。
[A] Configuration of the first embodiment:
FIG. 1 is a configuration diagram showing a configuration of an image processing system or an information system that realizes the image processing method according to the first embodiment. Hereinafter, the image processing system and the information processing system are collectively referred to as an image processing system.

この画像処理システムは、本実施形態の画像処理方法を実施する処理装置100と、撮影位置が異なる一対の撮影画像をステレオマッチングのために生成する撮像ユニット110a及び110bと、処理装置100での処理結果や各種状況を表示する表示部120と、処理装置100に対して各種の設定等を入力する操作部130と、を備えて構成されている。   The image processing system includes a processing device 100 that performs the image processing method of the present embodiment, imaging units 110a and 110b that generate a pair of captured images with different imaging positions for stereo matching, and processing performed by the processing device 100. The display unit 120 displays results and various situations, and the operation unit 130 inputs various settings and the like to the processing apparatus 100.

また、処理装置100は、工業製品の開発や生産工程においてコンピュータを用いた画像処理システム等で使用されるもので、撮像ユニット110a,110bからの一対の撮影画像を受けて、ステレオマッチングによる前処理とテンプレートマッチングによる後処理とを実行する。   The processing apparatus 100 is used in an image processing system using a computer in industrial product development and production processes, and receives a pair of captured images from the imaging units 110a and 110b and performs preprocessing by stereo matching. And post-processing by template matching.

ここで、処理装置100は、本実施形態の画像処理方法を実施する際の各種制御を行う制御部101と、ステレオマッチングによる前処理並びに該前処理により抽出された被写体画像及び予め保持しているテンプレート画像の一致を検出するテンプレートマッチングによる後処理とを行う画像処理部103と、テンプレートマッチングの際に被写体画像と比較するために用いられるテンプレート画像を予め記憶しておく記憶部105と、を有して構成される。   Here, the processing apparatus 100 holds in advance a control unit 101 that performs various controls when performing the image processing method of the present embodiment, pre-processing by stereo matching, and subject images extracted by the pre-processing. An image processing unit 103 that performs post-processing by template matching for detecting matching of template images, and a storage unit 105 that stores in advance a template image used for comparison with a subject image at the time of template matching. Configured.

なお、処理装置100での処理結果は、表示部120に表示されるほか、図示されないロボット等の生産装置にも送られる。   The processing result of the processing apparatus 100 is displayed on the display unit 120 and also sent to a production apparatus such as a robot (not shown).

また、画像処理部103の詳細構成を図2に示す。画像処理部103は、3D測距処理部1031と、2D姿勢計測部1032と、補正画像作成処理部1033と、2Dテンプレートマッチング処理部1039と、を備えて構成されている。   The detailed configuration of the image processing unit 103 is shown in FIG. The image processing unit 103 includes a 3D distance measurement processing unit 1031, a 2D attitude measurement unit 1032, a corrected image creation processing unit 1033, and a 2D template matching processing unit 1039.

ここで、3D測距処理部1031は、後述する2Dテンプレートマッチング処理(後処理)の前段階の前処理として、左右に配置された2台のカメラ(ステレオカメラ)で撮影された2枚1組の一対の撮影画像を用いて、ステレオマッチング法による3D測距処理により、左のカメラで撮影された画像が右のカメラで撮影された画像のどの部分に対応するかを面積相関の計算により求め、その対応関係を使った三角測量により、各点の3次元的位置を推測する。   Here, the 3D distance measurement processing unit 1031 is a set of two images taken by two cameras (stereo cameras) arranged on the left and right as a pre-process before the 2D template matching process (post-process) described later. Using a pair of captured images, a 3D distance measurement process using the stereo matching method is used to calculate which part of the image captured by the left camera corresponds to the portion of the image captured by the right camera by calculating the area correlation. The three-dimensional position of each point is estimated by triangulation using the correspondence.

また、2D姿勢計測部1032は、被写体画像に含まれる被写体の回転やオフセットといった2次元の姿勢計測処理(2D姿勢計測処理)を既知の手法に従って行う。   The 2D attitude measurement unit 1032 performs a two-dimensional attitude measurement process (2D attitude measurement process) such as rotation and offset of the subject included in the subject image according to a known method.

補正画像作成処理部1033は、3D測距処理部1031の計測結果と2D姿勢計測部1032の計測結果とを受けて、被写体画像に含まれる被写体画像について、あおり(撮影対象面の光軸に対する傾き)、回転、オフセット等の撮影時に生じる歪みが補正された状態の撮影画像を作成する。   The corrected image creation processing unit 1033 receives the measurement result of the 3D distance measurement processing unit 1031 and the measurement result of the 2D attitude measurement unit 1032 and applies a tilt to the subject image included in the subject image (inclination with respect to the optical axis of the imaging target surface). ), A photographed image in a state in which distortion generated during photographing such as rotation and offset is corrected is created.

2Dテンプレートマッチング処理部1039は、後処理として、記憶部105からの対象物のテンプレート画像と、補正画像作成処理部1033で作成された撮影画像とを比較し、撮影画像中の特定の被写体(対象物)を探し出す。   As a post-processing, the 2D template matching processing unit 1039 compares the template image of the target object from the storage unit 105 with the captured image created by the corrected image creation processing unit 1033, and performs a specific subject (target) in the captured image. Search for things.

また、3D測距処理部1031は、その内部に、撮影画像を振幅情報と位相情報とに分解して位相情報を用いて同一点を探索することにより精度の高い3D測距処理を行うPOC処理部1031aを有する。   In addition, the 3D distance measurement processing unit 1031 includes a POC process for performing highly accurate 3D distance measurement processing by decomposing a captured image into amplitude information and phase information and searching for the same point using the phase information. Part 1031a.

また、POC処理部1031aは、その内部に、切り出し処理において低解像度から高解像度に解像度を変えつつ、位相情報を用いた同一点の探索を繰り返して実行する、ピラミッド処理部1031bを有する。   In addition, the POC processing unit 1031a includes a pyramid processing unit 1031b that repeatedly executes search for the same point using phase information while changing the resolution from low resolution to high resolution in the cutout process.

また、ピラミッド処理部1031bは、その内部に、切り出し処理において切り出す前後の領域の座標を対応させるためのルックアップテーブルを生成し、ルックアップテーブルは、切り出し処理において切り出された後の領域の座標として、撮影画像中の歪みを補正する歪補正処理が施された状態の座標とする、歪補正処理部1031cを有する。   In addition, the pyramid processing unit 1031b generates therein a lookup table for associating the coordinates of the area before and after being cut out in the cutout process, and the lookup table is used as the coordinates of the area after being cut out in the cutout process. , A distortion correction processing unit 1031c is provided which has coordinates in a state where distortion correction processing for correcting distortion in the captured image is performed.

〔B〕第1実施形態の動作:
以下、図3と図5のフローチャート、図4と図6の説明図を参照して、従来動作と比較しつつ、第1実施形態の動作を説明する。
[B] Operation of the first embodiment:
The operation of the first embodiment will be described below with reference to the flowcharts of FIGS. 3 and 5 and the explanatory diagrams of FIGS. 4 and 6 while comparing with the conventional operation.

まず、図3を参照して、第1実施形態に対応する従来例の動作を説明する。   First, the operation of the conventional example corresponding to the first embodiment will be described with reference to FIG.

撮像ユニットで得られた撮影画像(例えば、図4中のG1)について、既知の間引き処理等のダウンサイズ処理により、サイズが小さく低解像度のダウンサイズ画像G2、G3、G4を生成する(図3中のステップS11a)。なお、以上のダウンサイズ画像の生成を、左右に配置された2台のカメラ(ステレオカメラ)で撮影された2枚1組の一対の撮影画像について行う。   With respect to the captured image (for example, G1 in FIG. 4) obtained by the imaging unit, downsize images G2, G3, and G4 having a small size and low resolution are generated by a downsize process such as a known thinning process (FIG. 3). Middle step S11a). Note that the generation of the above-described downsized image is performed on a pair of two captured images captured by two cameras (stereo cameras) arranged on the left and right.

そして、以上の一対の撮影画像から生成された各階層の画像で、ステレオマッチング法による3D測距処理により、左のカメラで撮影された画像が右のカメラで撮影された画像のどの部分に対応するかを面積相関の計算により求め、その対応関係を使った三角測量により、各点の3次元的位置を推測する(図3中のステップS11b)。   Then, with each layer image generated from the above pair of captured images, the image captured by the left camera corresponds to which part of the image captured by the right camera by the 3D ranging process by the stereo matching method. Whether to do so is determined by calculating area correlation, and the three-dimensional position of each point is estimated by triangulation using the corresponding relationship (step S11b in FIG. 3).

なお、この場合、各階層について、低解像度画像から高解像度画像に向かうG4,G3,G2,G1について、ga,gb,gc,gdのように、被写体を含む所定の領域を切り出してステレオマッチング法による3D測距処理を行う。なお、このステレオマッチング法による3D測距処理は前処理であり、撮影画像に含まれる歪曲収差等の歪が残った状態で処理を行っている。   In this case, for each layer, for G4, G3, G2, and G1 from the low-resolution image to the high-resolution image, a predetermined region including the subject is cut out, such as ga, gb, gc, and gd, and the stereo matching method is used. 3D distance measurement processing is performed. Note that the 3D distance measurement process by the stereo matching method is a preprocess, and the process is performed in a state where distortion such as distortion aberration included in the captured image remains.

その後、以上のステレオマッチングによる前処理で抽出された被写体画像について、歪曲収差補正等の各種の歪補正処理を行う(図3中のステップS12)。この歪曲収差の補正は、撮像ユニットの光学系の特性に対応して実行すればよい。そして、歪補正処理された被写体画像について、予め保持されているテンプレート画像との一致を検出するテンプレートマッチング処理を行う(図3中のステップS13)。   Thereafter, various distortion correction processes such as distortion correction are performed on the subject image extracted by the above pre-processing by stereo matching (step S12 in FIG. 3). The correction of the distortion aberration may be executed corresponding to the characteristics of the optical system of the imaging unit. Then, a template matching process for detecting a match with a template image held in advance for the subject image subjected to the distortion correction process is performed (step S13 in FIG. 3).

次に、図5を参照して、第1実施形態の動作を説明する。   Next, the operation of the first embodiment will be described with reference to FIG.

撮像ユニット110a,110bで得られた撮影画像(例えば、図4中のG1)について、3D測距処理部1031内のPOC処理部1031aが、撮影画像を振幅情報と位相情報とに分解して、位相情報を用いて同一点を探索することにより精度の高い3D測距処理を行う。   For the captured images (for example, G1 in FIG. 4) obtained by the imaging units 110a and 110b, the POC processing unit 1031a in the 3D distance measurement processing unit 1031 decomposes the captured image into amplitude information and phase information, High-precision 3D distance measurement processing is performed by searching for the same point using the phase information.

ここで、POC処理部1031a内部のピラミッド処理部1031bが、図4中のga〜gdのような切り出し処理において、低解像度から高解像度に解像度を変えつつ、位相情報を用いた同一点の探索を繰り返して実行する。   Here, the pyramid processing unit 1031b inside the POC processing unit 1031a searches for the same point using the phase information while changing the resolution from the low resolution to the high resolution in the clipping process such as ga to gd in FIG. Run repeatedly.

また、ピラミッド処理部1031b内の歪補正処理部1031cが、以上のピラミッド処理での切り出し処理において、切り出す前後の領域の座標を対応させるためのルックアップテーブルを生成し、ルックアップテーブルによる切り出し処理を行う。このルックアップテーブルは、切り出し処理において切り出された後の領域の座標として、撮影画像中の歪みを補正する歪補正処理が施された状態の座標とする。   In addition, the distortion correction processing unit 1031c in the pyramid processing unit 1031b generates a lookup table for associating the coordinates of the region before and after the extraction in the above-described extraction processing in the pyramid processing, and performs the extraction processing by the lookup table. Do. In this lookup table, the coordinates after the distortion correction processing for correcting the distortion in the photographed image is performed as the coordinates of the region after the clipping processing.

すなわち、この第1実施形態では、3D測距処理におけるピラミッド処理のための切り出し処理を行いつつ、歪補正処理を並行して、前処理を実行する(図5中のステップS101a)。ここで、歪補正処理としては、撮影レンズにより生じる樽型や糸巻き型の歪曲収差を除去する歪補正、撮影対象面と光軸とが垂直になっていない場合に発生するあおりを除去するあおり補正、などが含まれる。従って、3D測距処理部1031における3D測距処理は、撮影画像から各種歪が除去された状態で実行されるため、処理の精度が従来よりも向上している。   That is, in the first embodiment, the pre-processing is executed in parallel with the distortion correction processing while performing the clipping processing for the pyramid processing in the 3D distance measurement processing (step S101a in FIG. 5). Here, as distortion correction processing, distortion correction that removes barrel-shaped and pincushion-shaped distortion aberration caused by the photographing lens, and tilt correction that occurs when the photographing target surface and the optical axis are not perpendicular to each other are removed. , Etc. are included. Therefore, since the 3D distance measurement processing in the 3D distance measurement processing unit 1031 is executed in a state where various distortions are removed from the captured image, the processing accuracy is improved as compared with the conventional method.

そして、以上の歪補正を伴って生成された各階層の一対の画像で、ステレオマッチング法による3D測距処理により、左のカメラで撮影された画像が右のカメラで撮影された画像のどの部分に対応するかを面積相関の計算により求め、その対応関係を使った三角測量により、各点の3次元的位置を推測する(図5中のステップS101b)。以上のように3D測距処理部1031において歪補正を伴ったピラミッド処理による3D測距処理により、被写体画像のあおり(撮影対象面の光軸に対する傾き)や3次元位置情報が計測結果として出力される。   Then, with a pair of images of each layer generated with the above distortion correction, any part of the image captured by the left camera is captured by the left camera by the 3D ranging process using the stereo matching method. Is obtained by area correlation calculation, and the three-dimensional position of each point is estimated by triangulation using the correspondence (step S101b in FIG. 5). As described above, the 3D distance measurement processing unit 1031 outputs the tilt of the subject image (inclination with respect to the optical axis of the imaging target surface) and the three-dimensional position information as the measurement result by the 3D distance measurement process using the pyramid process with distortion correction. The

そして、3D測距処理部1031での3D測距処理の計測結果である3次元位置情報と、2D姿勢計測部1032での2D姿勢計測処理の計測結果である2次元姿勢情報とを受けた補正画像作成処理部1033は、各種歪が補正された状態の撮影画像を作成し、2Dテンプレートマッチング処理部1039に送る。2Dテンプレートマッチング処理部1039では、後処理としてのテンプレートマッチング処理により、記憶部105からの対象物のテンプレート画像と、補正画像作成処理部1033で作成された撮影画像とを比較し、撮影画像中の特定の被写体(対象物)を探し出す(図5中のステップS102)。   And the correction which received 3D position information which is a measurement result of 3D ranging processing in 3D ranging processing part 1031 and 2D attitude information which is a measurement result of 2D attitude measurement processing in 2D attitude measurement part 1032 The image creation processing unit 1033 creates a captured image in a state where various distortions are corrected, and sends the captured image to the 2D template matching processing unit 1039. The 2D template matching processing unit 1039 compares the template image of the target object from the storage unit 105 with the captured image created by the corrected image creation processing unit 1033 by template matching processing as post-processing, and A specific subject (object) is searched for (step S102 in FIG. 5).

以上の第1実施形態では、撮影位置が異なる一対の撮影画像上の同一点を探索して3次元的な位置を計測するステレオマッチングにより画像を処理する際に、撮影画像のうちの一部の領域を切り出す切り出し処理と、切り出し処理により切り出された画像を参照して探索を行う探索処理とを実行する際に、切り出し処理において切り出す前後の領域の座標を対応させるためのルックアップテーブルを生成しており、このルックアップテーブルでは、切り出し処理において切り出された後の領域の座標として、画像中の歪みを補正する歪補正処理が施された状態の座標としている。これにより、切り出し処理と、各種歪みを補正する歪補正処理とを同時に実行することになり、全体として高速な処理が可能になる。   In the first embodiment described above, when an image is processed by stereo matching that searches for the same point on a pair of photographed images with different photographing positions and measures a three-dimensional position, some of the photographed images are processed. Generates a lookup table for associating the coordinates of the area before and after clipping in the clipping process when executing the clipping process for clipping the area and the search process for searching with reference to the image clipped by the clipping process In this lookup table, the coordinates of the region after being cut out in the cut-out process are coordinates in a state in which the distortion correction process for correcting the distortion in the image has been performed. As a result, the cut-out process and the distortion correction process for correcting various distortions are executed simultaneously, and high-speed processing as a whole becomes possible.

以下、3D測距処理部1031において、3D測距処理におけるピラミッド処理のための切り出し処理を行いつつ、歪補正処理を並行して同時に実行する様子を、図6を参照して説明する。   Hereinafter, how the 3D distance measurement processing unit 1031 performs distortion correction processing in parallel while performing cutout processing for pyramid processing in 3D distance measurement processing will be described with reference to FIG.

この歪補正処理を伴う切り出し処理を行う座標変換については、例えば、本件出願の出願人の提案によるWO2011/158344号公報などに記載された座標変換の手法を用いることができる。この座標変換の手法とは、ワールド座標系に設定された曲面若しくは複数の平面を連結した面からなる仮想投影面の画像データについて、ワールド座標系における座標を歪み補正係数を用いてカメラ座標系に変換し、カメラ座標系に変換した座標及び撮像素子の画素データに基づいて算出する画像処理である。なお、この座標変換の手法は一例であり、他の手法を用いることも可能である。   For the coordinate conversion that performs the clipping process with the distortion correction process, for example, a coordinate conversion method described in WO 2011/158344 proposed by the applicant of the present application can be used. This coordinate transformation method is a method for converting image data of a virtual projection plane composed of a curved surface set in the world coordinate system or a plane connecting a plurality of planes to a camera coordinate system using a distortion correction coefficient. This is image processing that is calculated based on the coordinates converted into the camera coordinate system and the pixel data of the image sensor. Note that this coordinate conversion method is merely an example, and other methods may be used.

図6(a)は撮像ユニット110a,110bにより得られる撮影画像の一例である。なお、図6(a)は図4における高解像度画像G1に相当する。   FIG. 6A is an example of a captured image obtained by the imaging units 110a and 110b. FIG. 6A corresponds to the high resolution image G1 in FIG.

そして、ピラミッド処理において撮影画像から領域Obj(図6(b)中のハッチング部分)を切り出す場合は、撮像ユニット110a,110b(図6(c)中のCa)による撮影範囲Vall中に含まれる仮想投影面Vobjを指定した座標変換により行える。   When the region Obj (hatched portion in FIG. 6B) is cut out from the captured image in the pyramid process, the virtual range included in the imaging range Val by the imaging units 110a and 110b (Ca in FIG. 6C). This can be done by coordinate transformation designating the projection plane Vobj.

この場合、ピラミッド処理による切り出し処理の大きさの変更は、図6(c)においてはズーム処理により対処することができる。また、切り出し処理の位置の変更は、仮想投影面Vobjの位置変更あるいは、視点Caの位置変更により対処することができる。   In this case, the change in the size of the clipping process by the pyramid process can be dealt with by the zoom process in FIG. Further, the change of the position of the clipping process can be dealt with by changing the position of the virtual projection plane Vobj or changing the position of the viewpoint Ca.

また、所望の領域の画像を切り出す座標変換を実行する際に、上述した各種歪(歪曲収差、あおり等)補正が実行されるように、歪補正のパラメータを含んだ状態の座標変換用ルックテーブルを作成する。この場合、被写体画像のあおりや回転の補正のパラメータと、レンズの歪曲収差補正のパラメータとに基づく歪み補正係数を用いて座標変換するよう、ルックアップテーブルを作成する。   In addition, the coordinate conversion look table including distortion correction parameters so that the above-described various distortion (distortion aberration, tilt, etc.) correction is executed when executing coordinate conversion for cutting out an image of a desired region. Create In this case, a look-up table is created so as to perform coordinate conversion using a distortion correction coefficient based on a correction parameter for tilt and rotation of the subject image and a distortion correction parameter for the lens.

すなわち、歪補正処理部1031cでは、設定された仮想投影面Vobjの位置やサイズに基づいて仮想投影面上の各座標のカメラ座標系への変換用ルックアップテーブルを作成し、当該ルックアップテーブルを用いて撮像ユニット110a,110bで撮影された画素データを処理する。これにより、歪補正処理部1031cは、レンズデータに基づいてワールド座標の位置がカメラ座標のどの座標位置に対応するかを当てはめる座標変換を行う。この際に、歪曲収差補正及び、仮想投影面Vobjの位置の計算にともなう回転、傾き(あおり)、平行移動、拡大、縮小が併せて行われる。   That is, the distortion correction processing unit 1031c creates a lookup table for converting each coordinate on the virtual projection plane to the camera coordinate system based on the set position and size of the virtual projection plane Vobj, The pixel data photographed by the imaging units 110a and 110b is processed. As a result, the distortion correction processing unit 1031c performs coordinate transformation that applies to which coordinate position of the camera coordinates the world coordinate position corresponds to based on the lens data. At this time, the correction of distortion and the calculation of the position of the virtual projection plane Vobj are performed together with rotation, tilt (tilt), translation, enlargement, and reduction.

このような座標変換を実行することで、図6(d)に示されるような、歪補正処理がされた状態で切り出された被写体画像が得られる。   By executing such coordinate conversion, a subject image cut out in a state where distortion correction processing is performed as shown in FIG. 6D is obtained.

〔C〕第2実施形態の構成:
第2実施形態に係る画像処理方法を実現する画像処理システム中の画像処理部103’の詳細構成を図7に示す。なお、第2実施形態が適用される画像処理システムについては、図1に示されたものを適用可能である。
[C] Configuration of the second embodiment:
FIG. 7 shows a detailed configuration of the image processing unit 103 ′ in the image processing system that implements the image processing method according to the second embodiment. As the image processing system to which the second embodiment is applied, the one shown in FIG. 1 can be applied.

この画像処理部103’は、3D測距処理部1035と、2D姿勢計測部1036と、補正画像作成処理部1037と、2Dテンプレートマッチング処理部1039と、を備えて構成されている。   The image processing unit 103 ′ includes a 3D distance measurement processing unit 1035, a 2D attitude measurement unit 1036, a corrected image creation processing unit 1037, and a 2D template matching processing unit 1039.

ここで、3D測距処理部1035は、後述する2Dテンプレートマッチング処理(後処理)の前段階の前処理として、左右に配置された2台のカメラ(ステレオカメラ)で撮影された2枚1組の一対の撮影画像を用いて、ステレオマッチング法による3D測距処理により、左のカメラで撮影された画像が右のカメラで撮影された画像のどの部分に対応するかを面積相関の計算により求め、その対応関係を使った三角測量により、各点の3次元的位置を推測する。   Here, the 3D ranging processing unit 1035 is a set of two images taken by two cameras (stereo cameras) arranged on the left and right as a pre-process before the 2D template matching process (post-process) described later. Using a pair of captured images, a 3D distance measurement process using the stereo matching method is used to calculate which part of the image captured by the left camera corresponds to the portion of the image captured by the right camera by calculating the area correlation. The three-dimensional position of each point is estimated by triangulation using the correspondence.

また、2D姿勢計測部1036は、被写体画像に含まれる被写体の回転やオフセットといった2次元の姿勢計測処理(2D姿勢計測処理)を既知の手法に従って行う。   The 2D attitude measurement unit 1036 performs a two-dimensional attitude measurement process (2D attitude measurement process) such as rotation and offset of a subject included in the subject image according to a known method.

補正画像作成処理部1037は、3D測距処理部1035の計測結果と2D姿勢計測部1036の計測結果とを受けて、前処理として、被写体画像に含まれる被写体画像について、あおり(撮影対象面の光軸に対する傾き)、回転、オフセット等の撮影時に生じる歪みが補正された状態の撮影画像を作成する。   In response to the measurement result of the 3D distance measurement processing unit 1035 and the measurement result of the 2D attitude measurement unit 1036, the corrected image creation processing unit 1037 performs pre-processing on the subject image included in the subject image as A photographed image is created in a state in which distortions occurring during photographing such as (tilt with respect to the optical axis), rotation, and offset are corrected.

2Dテンプレートマッチング処理部1039は、以上の前処理に続く後処理として、記憶部105からの対象物のテンプレート画像と、補正画像作成処理部1037で作成された撮影画像とを比較し、撮影画像中の特定の被写体(対象物)を探し出す。   The 2D template matching processing unit 1039 compares the template image of the target object from the storage unit 105 with the captured image created by the corrected image creation processing unit 1037 as post-processing subsequent to the above pre-processing. Find a specific subject (object).

〔D〕第2実施形態の動作:
以下、図8と図10のフローチャート、図9と図11の説明図を参照して、従来動作と比較しつつ、第2実施形態の動作を説明する。
[D] Operation of the second embodiment:
The operation of the second embodiment will be described below with reference to the flowcharts of FIGS. 8 and 10 and the explanatory diagrams of FIGS. 9 and 11 while comparing with the conventional operation.

まず、図8を参照して、第2実施形態に対応する従来例の動作を説明する。なお、記憶部105には予め対象物のテンプレート画像(図9(a))が保持されている。   First, the operation of the conventional example corresponding to the second embodiment will be described with reference to FIG. Note that a template image (FIG. 9A) of an object is held in the storage unit 105 in advance.

撮像ユニットで得られた撮影画像(図9(b))について、既知のハフ変換等の手法により、2次元の姿勢、例えば、被写体画像の回転θを計測する(図8中のステップS21)。なお、回転θの計測は既知の各種の手法を用いることができる。また、回転の基準としては、テンプレート画像を用いても良いし、予め設定されたアルゴリズム(長辺が水平など)を基準としても良い。   With respect to the captured image (FIG. 9B) obtained by the imaging unit, a two-dimensional posture, for example, the rotation θ of the subject image is measured by a known method such as Hough transform (step S21 in FIG. 8). Various known methods can be used to measure the rotation θ. As a reference for rotation, a template image may be used, or a preset algorithm (long side is horizontal, etc.) may be used as a reference.

そして、撮像ユニットで得られた一対の撮影画像(図9(b))について、ステレオマッチング法による3D測距処理により、左のカメラで撮影された画像が右のカメラで撮影された画像のどの部分に対応するかを面積相関の計算により求め、その対応関係を使った三角測量により、各点の3次元的位置を推測し、被写体画像の3次元の姿勢(あおり等)を計測する(図8中のステップS22)。   Then, with respect to a pair of captured images (FIG. 9B) obtained by the imaging unit, which of the images captured by the left camera is the image captured by the left camera by the 3D distance measurement process using the stereo matching method. It is calculated by area correlation calculation whether it corresponds to a part, and the three-dimensional position of each point is estimated by triangulation using the correspondence, and the three-dimensional posture (tilt etc.) of the subject image is measured (Fig. 8 step S22).

その後、以上のステレオマッチングによる前処理で抽出された被写体画像について、まず、既知のアフィン変換等の手法により、上述した回転やあおりを補正する(図8中のステップS23)。ここで、図9(c)があおり補正前の撮影画像、図9(d)があおり補正後の撮影画像である。   Thereafter, with respect to the subject image extracted by the preprocessing by stereo matching described above, first, the above-described rotation and tilt are corrected by a known technique such as affine transformation (step S23 in FIG. 8). Here, FIG. 9C shows a photographed image before correction and FIG. 9D shows a photographed image after correction.

次に、撮像ユニットの光学系に起因する歪曲収差補正等の各種の歪補正処理を行う(図8中のステップS24)。この歪曲収差の補正は、撮像ユニットの光学系の特性に対応して実行すればよい。ここで、図9(d)が歪曲収差補正前の撮影画像、図9(e)が歪曲収差補正後の撮影画像である。   Next, various distortion correction processes such as distortion correction due to the optical system of the imaging unit are performed (step S24 in FIG. 8). The correction of the distortion aberration may be executed corresponding to the characteristics of the optical system of the imaging unit. Here, FIG. 9D shows a captured image before distortion correction, and FIG. 9E shows a captured image after distortion correction.

そして、歪補正処理された被写体画像(図9(e))について、予め保持されているテンプレート画像(図9(a))との一致を検出するテンプレートマッチング処理を行う(図8中のステップS25)。   Then, a template matching process for detecting a match with a template image (FIG. 9A) held in advance is performed on the subject image (FIG. 9E) subjected to the distortion correction process (step S25 in FIG. 8). ).

以上の一連の処理では、回転とあおりの補正処理、歪補正処理と、2段階の補正処理を行っていた。   In the above series of processing, rotation and tilt correction processing, distortion correction processing, and two-step correction processing are performed.

次に、図10を参照して、第2実施形態の動作を説明する。   Next, the operation of the second embodiment will be described with reference to FIG.

撮像ユニット110a,110bで得られた撮影画像の一方について、既知のハフ変換等の手法により、2D姿勢計測部1036は、被写体画像に含まれる被写体の2次元の姿勢、例えば、被写体画像の回転θを既知の手法に従って計測する(図10中のステップS201)。なお、回転θの計測は既知の各種の手法を用いることができる。また、回転の基準としては、テンプレート画像を用いても良いし、予め設定されたアルゴリズム(長辺が水平など)を基準としても良い。   With respect to one of the captured images obtained by the imaging units 110a and 110b, the 2D orientation measurement unit 1036 uses a known method such as Hough transform, so that the 2D orientation of the subject included in the subject image, for example, rotation θ of the subject image Is measured according to a known method (step S201 in FIG. 10). Various known methods can be used to measure the rotation θ. As a reference for rotation, a template image may be used, or a preset algorithm (long side is horizontal, etc.) may be used as a reference.

そして、撮像ユニット110a,110bで得られた一対の撮影画像について、3D測距処理部1035においてステレオマッチング法による3D測距処理により、左のカメラで撮影された画像が右のカメラで撮影された画像のどの部分に対応するかを面積相関の計算により求め、その対応関係を使った三角測量により、各点の3次元的位置を推測し、被写体画像の3次元の姿勢(あおり等)を計測する(図10中のステップS202)。なお、この3D測距処理として、必要に応じて、POC処理により撮影画像を振幅情報と位相情報とに分解して、位相情報を用いて同一点を探索することにより精度の高い3D測距処理を行っても良い。   Then, with respect to the pair of photographed images obtained by the imaging units 110a and 110b, the image photographed by the left camera is photographed by the right camera by the 3D ranging processing unit 1035 by the 3D ranging process by the stereo matching method. Determine which part of the image corresponds to the area by calculating the area correlation, and estimate the three-dimensional position of each point by triangulation using the correspondence, and measure the three-dimensional posture (tilting, etc.) of the subject image (Step S202 in FIG. 10). In addition, as this 3D ranging process, a highly accurate 3D ranging process is performed by decomposing a captured image into amplitude information and phase information by POC processing and searching for the same point using the phase information as necessary. May be performed.

以上のようにして、前処理として、2D姿勢計測部1036からは撮影画像中の被写体画像の回転等の2次元の姿勢情報が計測結果として出力され、3D測距処理部1035からは撮影画像中の被写体画像のあおりや3次元位置情報が計測結果として出力される。   As described above, as preprocessing, two-dimensional posture information such as rotation of the subject image in the photographed image is output from the 2D posture measurement unit 1036 as a measurement result, and the three-dimensional distance measurement processing unit 1035 is in the photographed image. And the three-dimensional position information of the subject image are output as measurement results.

そして、3D測距処理部1035での3D測距処理の計測結果であるあおりや3次元位置情報と、2D姿勢計測部1036での2D姿勢計測処理の計測結果である回転等の2次元姿勢情報とを受けた補正画像作成処理部1037は、従来例の処理とは異なり、姿勢補正(回転やあおりの補正)と、歪曲収差補正とを含んだ状態の1プロセスとしての歪補正処理を実行して、各種歪が補正された状態の撮影画像を作成し、2Dテンプレートマッチング処理部1039に送る。   Then, two-dimensional posture information such as tilt and three-dimensional position information that is a measurement result of the 3D distance measurement processing in the 3D distance measurement processing unit 1035 and rotation that is a measurement result of the 2D posture measurement processing in the 2D posture measurement unit 1036 The corrected image creation processing unit 1037 that receives the above, unlike the processing of the conventional example, executes distortion correction processing as one process including posture correction (rotation and tilt correction) and distortion correction. Then, a captured image with various distortions corrected is created and sent to the 2D template matching processing unit 1039.

2Dテンプレートマッチング処理部1039では、後処理としてのテンプレートマッチング処理により、記憶部105からの対象物のテンプレート画像と、補正画像作成処理部1037で作成された撮影画像とを比較し、撮影画像中の特定の被写体(対象物)を探し出す(図10中のステップS204)。   The 2D template matching processing unit 1039 compares the template image of the object from the storage unit 105 with the captured image created by the corrected image creation processing unit 1037 by template matching processing as post-processing. A specific subject (object) is searched for (step S204 in FIG. 10).

以上の第2実施形態では、撮影位置が異なる一対の撮影画像上の同一点を探索して3次元的な位置を計測して被写体画像を抽出するステレオマッチングによる前処理と、前処理により抽出された被写体画像と予め保持しているテンプレート画像との一致を検出するテンプレートマッチングによる後処理とを実行する際に、前処理において、被写体画像の姿勢(あおりや回転)を検出し、姿勢(あおりや回転)補正と撮影時の歪曲収差補正とを同時に1つの歪補正処理として行うように、座標を対応させるためのルックアップテーブルを生成する。これにより、姿勢(あおりや回転)補正と歪曲収差補正とを1つの歪補正処理として同時に実行することになり、全体として高速な処理が可能になる。   In the second embodiment described above, the same point on a pair of photographed images with different photographing positions is searched, the three-dimensional position is measured, and the subject image is extracted, and the stereo matching preprocessing and the preprocessing are extracted. When performing post-processing by template matching that detects a match between a pre-held template image and a template image held in advance, the pre-processing detects the posture (tilt and rotation) of the subject image, and A lookup table for associating coordinates is generated so that (rotation) correction and distortion correction at the time of photographing are performed simultaneously as one distortion correction process. As a result, posture (tilting and rotation) correction and distortion correction are simultaneously performed as one distortion correction process, and high-speed processing as a whole becomes possible.

以下、補正画像作成処理部1037において、姿勢(あおりや回転)補正と歪曲収差補正とを同時に1つの歪補正処理として実行する様子を、図11を参照して説明する。   Hereinafter, how the corrected image creation processing unit 1037 executes posture (tilting and rotation) correction and distortion correction simultaneously as one distortion correction process will be described with reference to FIG.

図11において、視点Caは撮像ユニット110a,110bの撮像位置を表しており、Vobjは被写体画像の撮影面に相当する仮想投影面である。そして、撮像ユニット110a,110bの撮影による被写体画像について、あおりや回転の補正を行う場合には、歪補正処理における仮想投影面Vobjに対する視点変換の機能を用いて行える。   In FIG. 11, the viewpoint Ca represents the imaging positions of the imaging units 110a and 110b, and Vobj is a virtual projection plane corresponding to the imaging plane of the subject image. Then, when tilt and rotation correction is performed on the subject images captured by the imaging units 110a and 110b, the viewpoint conversion function for the virtual projection plane Vobj in the distortion correction processing can be used.

このあおり補正と回転補正、歪曲収差補正を同時に行う歪補正処理については、例えば、本件出願の出願人の提案によるWO2011/158344号公報などに記載された座標変換や視点変換の手法を用いることができる。この座標変換の手法とは、既に説明したように、ワールド座標系における座標を歪み補正係数を用いたカメラ座標系への変換を用いることができる。また、視点変換の手法とは、カメラ座標系の画像中心を回転中心(若しくは移動中心)として、仮想投影面の位置を変更する処理を採用することができる。なお、この座標変換や視点変換の手法は一例であり、他の手法を用いることも可能である。   For distortion correction processing that simultaneously performs tilt correction, rotation correction, and distortion correction, for example, a coordinate conversion or viewpoint conversion method described in WO 2011/158344 proposed by the applicant of the present application may be used. it can. As described above, the coordinate conversion method can use conversion of coordinates in the world coordinate system to a camera coordinate system using a distortion correction coefficient. In addition, as the viewpoint conversion method, a process of changing the position of the virtual projection plane with the image center of the camera coordinate system as the rotation center (or movement center) can be employed. Note that the coordinate conversion and viewpoint conversion methods are merely examples, and other methods may be used.

図11は、撮像ユニット110a,110bそれぞれの視点Caを回転中心(若しくは移動中心)として、仮想投影面Vobjの位置(回転やあおりを含む)を変更する例である。   FIG. 11 is an example in which the position (including rotation and tilt) of the virtual projection plane Vobj is changed with the viewpoint Ca of each of the imaging units 110a and 110b as the rotation center (or movement center).

この図11に示すように、視点Caを回転中心として、X軸回りの回転がpitch(ピッチ、tilt(チルト)ともいう)である。また、Y軸回りの回転がyaw(ヨー、pan(パン)ともいう)である。また、Z軸回りの回転がroll(ロール)である。   As shown in FIG. 11, rotation about the X axis with the viewpoint Ca as the center of rotation is pitch (also referred to as pitch or tilt). The rotation around the Y axis is yaw (also called yaw or pan). Further, the rotation around the Z axis is a roll.

この図11において、X軸周りの回転(ピッチ)による視点変換で、仮想投影面Vobj中の被写体を光軸から水平方向の軸周りにr方向に回転させることに等しくなり、X軸方向のあおりを補正することができる。Y軸周りの回転(ヨー)による視点変換で、仮想投影面Vobj中の被写体を光軸から垂直方向の軸周りにy方向に回転させることに等しくなり、Y軸方向のあおりを補正することができる。また、X軸周りの回転(ロール)による視点変換で、被写体をr方向に回転させることに均区にあり、被写体の回転を補正することができる。すなわち以上の視点変換の機能により、撮影画像中の被写体画像の各種の姿勢補正が可能になる。   In FIG. 11, viewpoint conversion by rotation (pitch) around the X axis is equivalent to rotating the subject in the virtual projection plane Vobj from the optical axis in the r direction around the horizontal axis, and in the X axis direction. Can be corrected. The viewpoint conversion by rotation around the Y axis (yaw) is equivalent to rotating the subject in the virtual projection plane Vobj in the y direction around the vertical axis from the optical axis, and correcting the tilt in the Y axis direction. it can. In addition, the viewpoint is converted by rotating (rolling) around the X axis, so that the subject is rotated in the r direction, and the rotation of the subject can be corrected. That is, various viewpoint corrections of the subject image in the photographed image can be performed by the above viewpoint conversion function.

なお、図11では視点変換として回転によるものを示したが、視点Caの平行移動(図示せず)による仮想投影面Vobjの移動、視点Caを回転中心として光軸をXあるいはY方向に移動する(図示せず)ことによる仮想投影面Vobjの移動も可能であり、これらによる被写体画像の姿勢補正も可能である。   In FIG. 11, although the viewpoint conversion is based on rotation, the virtual projection plane Vobj is moved by translation of the viewpoint Ca (not shown), and the optical axis is moved in the X or Y direction with the viewpoint Ca as the rotation center. (Not shown), the virtual projection plane Vobj can be moved, and the posture of the subject image can be corrected by these movements.

そして、以上の歪補正処理における視点変換によるあおりや回転の補正を実行すると同時に、撮像ユニット110a,110bの光学系に起因する歪曲収差補正が実行されるように、各種補正(あお・回転補正、歪曲収差補正)のパラメータを含んだ状態の座標変換用ルックテーブルを作成する。この場合、被写体画像のあおりや回転の補正の視点変換のパラメータと、レンズの歪曲収差補正のパラメータとに基づく歪み補正係数を用いて座標変換するよう、ルックアップテーブルを作成する。   Then, various corrections (blue / rotation correction, blue / rotation correction, so as to execute distortion correction due to the optical system of the imaging units 110a and 110b at the same time as correction of tilt and rotation by viewpoint conversion in the above distortion correction processing are performed. Create a coordinate conversion look-up table that includes parameters for distortion correction. In this case, a look-up table is created so as to perform coordinate conversion using a distortion correction coefficient based on a viewpoint conversion parameter for correcting tilt and rotation of the subject image and a lens distortion correction parameter.

すなわち、補正画像作成処理部1037では、設定された仮想投影面Vobjの位置やサイズに基づいて仮想投影面上の各座標のカメラ座標系への変換用ルックアップテーブルを作成し、当該ルックアップテーブルを用いて撮像ユニット110a,110bで撮影された画素データを処理する。これにより、補正画像作成処理部1037は、レンズデータに基づいてワールド座標の位置がカメラ座標のどの座標位置に対応するかを当てはめる座標変換を行う。この際に、歪曲収差補正及び、仮想投影面Vobjの位置の計算にともなう回転、傾き(あおり)、平行移動、拡大、縮小が併せて行われる。   That is, the corrected image creation processing unit 1037 creates a lookup table for converting each coordinate on the virtual projection plane into the camera coordinate system based on the set position and size of the virtual projection plane Vobj, and the lookup table Is used to process pixel data photographed by the imaging units 110a and 110b. As a result, the corrected image creation processing unit 1037 performs coordinate conversion that applies to which coordinate position of the camera coordinates the world coordinate position corresponds to based on the lens data. At this time, the correction of distortion and the calculation of the position of the virtual projection plane Vobj are performed together with rotation, tilt (tilt), translation, enlargement, and reduction.

100 処理装置
101 制御部
103 画像処理部
105 記憶部
110a,110b 撮像ユニット
120 表示部
130 操作部
1031 3D測距処理部
1032 2D姿勢計測部
1033 補正画像作成処理部
1035 3D測距処理部
1036 2D姿勢計測部
1037 補正画像作成処理部
1039 2Dテンプレートマッチング処理部
DESCRIPTION OF SYMBOLS 100 Processing apparatus 101 Control part 103 Image processing part 105 Storage part 110a, 110b Imaging unit 120 Display part 130 Operation part 1031 3D distance measurement process part 1032 2D attitude | position measurement part 1033 Correction image creation process part 1035 3D distance measurement process part 1036 2D attitude | position Measurement unit 1037 Correction image creation processing unit 1039 2D template matching processing unit

Claims (9)

撮影位置が異なる一対の撮影画像上の同一点を探索して3次元的な位置を計測するステレオマッチングにより画像を処理する画像処理方法において、
前記撮影画像のうちの一部の領域を切り出す切り出し処理と、前記切り出し処理により切り出された画像を参照して前記探索を行う探索処理とを実行する際に、
前記切り出し処理において切り出す前後の領域の座標を対応させるためのルックアップテーブルを生成する、
ことを特徴とする画像処理方法。
In an image processing method for processing an image by stereo matching that searches for the same point on a pair of captured images having different shooting positions and measures a three-dimensional position,
When performing a cutout process for cutting out a partial area of the captured image and a search process for performing the search with reference to the image cut out by the cutout process,
Generating a lookup table for associating the coordinates of the area before and after the cutout in the cutout process;
An image processing method.
撮影位置が異なる一対の撮影画像上の同一点を探索して3次元的な位置を計測するステレオマッチングにより画像を処理する画像処理方法において、
前記撮影画像のうちの一部の領域を切り出す切り出し処理と、前記切り出し処理により切り出された画像を参照して前記探索を行う探索処理とを実行する際に、
前記切り出し処理において切り出す前後の領域の座標を対応させるためのルックアップテーブルを生成し、
前記ルックアップテーブルは、前記切り出し処理において切り出された後の領域の座標として、前記画像中の歪みを補正する歪補正処理が施された状態の座標とする、
ことを特徴とする画像処理方法。
In an image processing method for processing an image by stereo matching that searches for the same point on a pair of captured images having different shooting positions and measures a three-dimensional position,
When performing a cutout process for cutting out a partial area of the captured image and a search process for performing the search with reference to the image cut out by the cutout process,
Generate a lookup table for associating the coordinates of the area before and after cutting in the cutting process,
The look-up table is a coordinate in a state where a distortion correction process for correcting distortion in the image is performed as the coordinates of the area after being cut out in the cutout process.
An image processing method.
前記一対の撮影画像を振幅情報と位相情報とに分解し、前記位相情報を用いて前記同一点を探索する、
ことを特徴とする請求項1−2に記載の画像処理方法。
Decomposing the pair of captured images into amplitude information and phase information, and searching for the same point using the phase information;
The image processing method according to claim 1-2.
前記位相情報を用いた同一点の探索を実行する際に、前記切り出し処理において低解像度から高解像度に解像度を変えつつ繰り返して実行する、
ことを特徴とする請求項3に記載の画像処理方法。
When performing a search for the same point using the phase information, repeatedly executing while changing the resolution from low resolution to high resolution in the cutout process,
The image processing method according to claim 3.
撮影位置が異なる一対の撮影画像上の同一点を探索して3次元的な位置を計測して被写体画像を抽出するステレオマッチングによる前処理と、前記前処理により抽出された被写体画像と予め保持しているテンプレート画像との一致を検出するテンプレートマッチングによる後処理と、を有する画像処理方法であって、
前記前処理において、前記撮影画像の姿勢補正と前記撮影画像の歪曲収差補正とを同時に行うように、補正前後の座標を対応させるルックアップテーブルを生成する、
ことを特徴とする画像処理方法。
Pre-processing by stereo matching that searches for the same point on a pair of captured images with different shooting positions, measures a three-dimensional position, and extracts a subject image, and the subject image extracted by the pre-processing are stored in advance. A post-processing by template matching for detecting a match with a template image, and an image processing method comprising:
In the preprocessing, a look-up table that associates coordinates before and after correction so as to simultaneously perform posture correction of the captured image and distortion correction of the captured image,
An image processing method.
前記姿勢補正は、前記撮影画像中の前記被写体の計測結果に基づいて決定される、
ことを特徴とする請求項5に記載の画像処理方法。
The posture correction is determined based on a measurement result of the subject in the captured image.
The image processing method according to claim 5.
前記姿勢補正は、前記被写体を撮影時の光軸周りに回転させることで処理する、
ことを特徴とする請求項5−6に記載の画像処理方法。
The posture correction is processed by rotating the subject around the optical axis at the time of shooting.
An image processing method according to claim 5-6.
前記姿勢補正は、前記被写体を光軸から水平方向の軸周りに回転させることで補正する、
ことを特徴とする請求項5−6に記載の画像処理方法。
The posture correction is performed by rotating the subject around the horizontal axis from the optical axis.
An image processing method according to claim 5-6.
前記歪補正処理は、
前記被写体を撮影する際の撮像ユニットへの入射角と、前記撮像ユニットでの撮影時に発生する歪曲収差の補正とを考慮した、前記撮像ユニットの撮像素子表面上の座標の関係をデータとして保有しており、
前記撮像ユニットにより得られる撮影画像を切り出す際の、前記撮像素子上の座標と切り出された後の画像の座標とを、歪補正を伴った状態で対応させるルックアップテーブルを生成する、
ことを特徴とする請求項1−8のいずれか一項に記載の画像処理方法。
The distortion correction process
The relationship between coordinates on the imaging device surface of the imaging unit is considered as data, taking into consideration the incident angle to the imaging unit when shooting the subject and the correction of distortion occurring when shooting with the imaging unit. And
Generating a look-up table that correlates the coordinates on the image pickup element and the coordinates of the image after being cut out with distortion correction when cutting a captured image obtained by the image pickup unit;
The image processing method according to claim 1, wherein:
JP2012128748A 2012-06-06 2012-06-06 Image processing method Pending JP2013254300A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012128748A JP2013254300A (en) 2012-06-06 2012-06-06 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012128748A JP2013254300A (en) 2012-06-06 2012-06-06 Image processing method

Publications (1)

Publication Number Publication Date
JP2013254300A true JP2013254300A (en) 2013-12-19

Family

ID=49951766

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012128748A Pending JP2013254300A (en) 2012-06-06 2012-06-06 Image processing method

Country Status (1)

Country Link
JP (1) JP2013254300A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015200918A (en) * 2014-04-04 2015-11-12 大木 光晴 Image processor, method, and program
JP2018525693A (en) * 2015-06-12 2018-09-06 グーグル エルエルシー Electronic display stabilization of head mounted display

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11325889A (en) * 1998-05-14 1999-11-26 Fuji Heavy Ind Ltd Picture correcting apparatus for stereoscopic camera
JP2001143073A (en) * 1999-11-10 2001-05-25 Nippon Telegr & Teleph Corp <Ntt> Method for deciding position and attitude of object
JP2005292080A (en) * 2004-04-05 2005-10-20 Denso Corp Image correction device for stereoscopic camera
JP2008216126A (en) * 2007-03-06 2008-09-18 Konica Minolta Holdings Inc Distance image generating device, distance image generation method, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11325889A (en) * 1998-05-14 1999-11-26 Fuji Heavy Ind Ltd Picture correcting apparatus for stereoscopic camera
JP2001143073A (en) * 1999-11-10 2001-05-25 Nippon Telegr & Teleph Corp <Ntt> Method for deciding position and attitude of object
JP2005292080A (en) * 2004-04-05 2005-10-20 Denso Corp Image correction device for stereoscopic camera
JP2008216126A (en) * 2007-03-06 2008-09-18 Konica Minolta Holdings Inc Distance image generating device, distance image generation method, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015200918A (en) * 2014-04-04 2015-11-12 大木 光晴 Image processor, method, and program
JP2018525693A (en) * 2015-06-12 2018-09-06 グーグル エルエルシー Electronic display stabilization of head mounted display

Similar Documents

Publication Publication Date Title
JP6426968B2 (en) INFORMATION PROCESSING APPARATUS AND METHOD THEREOF
US20200096317A1 (en) Three-dimensional measurement apparatus, processing method, and non-transitory computer-readable storage medium
WO2014024579A1 (en) Optical data processing device, optical data processing system, optical data processing method, and optical data processing-use program
CN109472820B (en) Monocular RGB-D camera real-time face reconstruction method and device
CN107767456A (en) A kind of object dimensional method for reconstructing based on RGB D cameras
JP2011179907A (en) Device and method for measuring position and attitude, and program
JP2011192214A (en) Geometric feature extracting device, geometric feature extraction method and program, three-dimensional measuring device and object recognition device
JP2014013146A5 (en)
CN110136211A (en) A kind of workpiece localization method and system based on active binocular vision technology
CN112017302A (en) Real-time registration method of projection mark and machine vision based on CAD model
JP6310288B2 (en) Image processing apparatus and three-dimensional object tracking method
JP2019158691A (en) Controller, robot, robot system, and method for recognizing object
JP2018173882A (en) Information processing device, method, and program
JP6040264B2 (en) Information processing apparatus, information processing apparatus control method, and program
JP2014053018A (en) Information processing device, control method for information processing device, and program
JP6228239B2 (en) A method for registering data using a set of primitives
CN113103226A (en) Visual guide robot system for ceramic biscuit processing and manufacturing
JP2006195790A (en) Lens distortion estimation apparatus, lens distortion estimation method, and lens distortion estimation program
JP2013254300A (en) Image processing method
JP2015132544A (en) Image processing apparatus and three-dimensional space information acquisition method
KR101673144B1 (en) Stereoscopic image registration method based on a partial linear method
CN115345942A (en) Space calibration method and device, computer equipment and storage medium
JP2010146357A (en) Method and apparatus for three-dimensional image processing
JP2007034964A (en) Method and device for restoring movement of camera viewpoint and three-dimensional information and estimating lens distortion parameter, and program for restoring movement of camera viewpoint and three-dimensional information and estimating lens distortion parameter
JP7298687B2 (en) Object recognition device and object recognition method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140909

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150630

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150707

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20151110