JP2018133064A - Image processing apparatus, imaging apparatus, image processing method, and image processing program - Google Patents

Image processing apparatus, imaging apparatus, image processing method, and image processing program Download PDF

Info

Publication number
JP2018133064A
JP2018133064A JP2017028513A JP2017028513A JP2018133064A JP 2018133064 A JP2018133064 A JP 2018133064A JP 2017028513 A JP2017028513 A JP 2017028513A JP 2017028513 A JP2017028513 A JP 2017028513A JP 2018133064 A JP2018133064 A JP 2018133064A
Authority
JP
Japan
Prior art keywords
parallax
image data
image
reference pattern
reduction
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.)
Abandoned
Application number
JP2017028513A
Other languages
Japanese (ja)
Inventor
明広 福田
Akihiro Fukuda
明広 福田
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.)
Canon Inc
Original Assignee
Canon 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 Canon Inc filed Critical Canon Inc
Priority to JP2017028513A priority Critical patent/JP2018133064A/en
Publication of JP2018133064A publication Critical patent/JP2018133064A/en
Abandoned legal-status Critical Current

Links

Landscapes

  • Transforming Light Signals Into Electric Signals (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve accuracy of calculating parallax while reducing a calculation load required for calculating the parallax.SOLUTION: An image processing apparatus 102 calculates first parallax included in parallax image data to be acquired from captured image data generated by imaging from multiple different points of sight. The apparatus generates reduced image data by reducing the captured image data, and calculates second parallax included in the reduced image data. The apparatus acquires parallax image data from the captured image data by use of the second parallax and a reduction rate of reduction pixel data in reduction processing with respect to the captured image data. The apparatus calculates a plurality of first coefficients for weighting each of reference pattern data corresponding to different parallax, for representing the parallax image data, by use of the reference pattern data, and calculates first parallax included in the parallax image data by use of the parallax corresponding to each of the reference pattern data and the first coefficients.SELECTED DRAWING: Figure 2

Description

本発明は、被写体空間を異なる視点から撮像することで得られた画像データから視差の情報を取得する画像処理技術に関する。   The present invention relates to an image processing technique for acquiring parallax information from image data obtained by imaging a subject space from different viewpoints.

被写体空間を複数の視点から撮像することで得られた複数の視点画像から視差の情報を取得する方法が種々提案されている。例えば、複数の視点画像間においてブロックマッチング等の画像探索処理によって互いに対応する対応点を検出し、それぞれの視点画像における対応点の位置(座標)の相違量から視差量を求める方法がある。求められた視差量は、被写体までの距離の算出等に利用される。   Various methods for acquiring parallax information from a plurality of viewpoint images obtained by imaging a subject space from a plurality of viewpoints have been proposed. For example, there is a method in which corresponding points corresponding to each other are detected between a plurality of viewpoint images by image search processing such as block matching, and a parallax amount is obtained from a difference amount of the positions (coordinates) of the corresponding points in the respective viewpoint images. The obtained amount of parallax is used for calculating the distance to the subject.

また、特許文献1には、互いに異なる2視点からの撮像により得られた2つの視点画像間で同サイズの領域同士の相対的な位置を変えながら該領域間でブロックマッチングを行い、最も類似性が高い領域同士を対応領域として検出する方法が開示されている。そして、対応領域内での位置差をそれらの対応領域間の視差として得る。   Further, in Patent Document 1, block matching is performed between regions having the same size while changing the relative positions of regions of the same size between two viewpoint images obtained by imaging from two different viewpoints. A method of detecting regions having high values as corresponding regions is disclosed. Then, the position difference in the corresponding area is obtained as the parallax between the corresponding areas.

特許2966248号Japanese Patent No. 2966248

しかしながら、ブロックマッチング等の画像探索処理は計算負荷が大きい。この点、特許文献1にて開示された方法では、撮像視差画像を低解像度の画像に縮小して低解像画像に対して視差を求めることで、探索する領域のサイズを制限し、計算負荷を低減させているが、画像探索処理が必要であるために負荷軽減には限界がある。   However, image search processing such as block matching is computationally intensive. In this regard, in the method disclosed in Patent Document 1, the size of the area to be searched is limited by reducing the captured parallax image to a low-resolution image and obtaining parallax for the low-resolution image. However, there is a limit to reducing the load because an image search process is necessary.

本発明は、画像探索処理を行うことなく視差の算出に必要な計算負荷を軽減することができるようにした画像処理装置等を提供する。   The present invention provides an image processing apparatus and the like that can reduce a calculation load necessary for calculating parallax without performing an image search process.

本発明の一側面としての画像処理装置は、互いに異なる複数の視点からの撮像により生成された撮像画像データから取得可能な視差画像データに含まれる第1の視差を算出する。該画像処理装置は、撮像画像データに対して縮小処理を行うことにより縮小画像データを生成する縮小手段と、縮小画像データに含まれる第2の視差を算出し、該第2の視差と縮小処理における撮像画像データに対する縮小画像データの縮小率とを用いて、撮像画像データから視差画像データを取得する取得手段と、互いに異なる視差に対応する複数の参照パターンデータを用いて視差画像データを表すために該複数の参照パターンデータのそれぞれに重みを付ける複数の第1の係数を算出し、複数の参照パターンデータのそれぞれに対応する視差と数の第1の係数とを用いて視差画像データに含まれる第1の視差を算出する算出手段とを有することを特徴とする。   An image processing apparatus according to an aspect of the present invention calculates a first parallax included in parallax image data that can be acquired from captured image data generated by imaging from a plurality of different viewpoints. The image processing apparatus calculates a second parallax included in the reduced image data by reducing means for generating reduced image data by performing reduction processing on the captured image data, and the second parallax and the reduction processing In order to represent parallax image data using acquisition means for acquiring parallax image data from captured image data using a reduction ratio of the reduced image data with respect to the captured image data and a plurality of reference pattern data corresponding to different parallaxes And calculating a plurality of first coefficients for weighting each of the plurality of reference pattern data, and including them in the parallax image data using the parallax and the number of first coefficients corresponding to each of the plurality of reference pattern data And calculating means for calculating the first parallax.

なお、上記画像処理装置を含む撮像装置も、本発明の他の一側面を構成する。   Note that an imaging apparatus including the image processing apparatus also constitutes another aspect of the present invention.

また、本発明の他の一側面としての画像処理方法は、互いに異なる複数の視点からの撮像により生成された撮像画像データから取得可能な視差画像データに含まれる視差を算出する。該画像処理方法は、撮像画像データに対して縮小処理を行うことにより縮小画像データを生成するステップと、縮小画像データに含まれる第2の視差を算出し、該第2の視差と縮小処理における撮像画像データに対する縮小画像データの縮小率とを用いて、撮像画像データから視差画像データを取得するステップと、互いに異なる視差に対応する複数の参照パターンデータを用いて視差画像データを表すために該複数の参照パターンデータのそれぞれに重みを付ける複数の第1の係数を算出し、複数の参照パターンデータのそれぞれに対応する視差と複数の第1の係数とを用いて視差画像データに含まれる第1の視差を算出するステップとを有することを特徴とする。   An image processing method according to another aspect of the present invention calculates parallax included in parallax image data that can be acquired from captured image data generated by imaging from a plurality of different viewpoints. In the image processing method, a reduction process is performed on captured image data to generate reduced image data, a second parallax included in the reduced image data is calculated, and the second parallax and the reduction process Using the reduction ratio of the reduced image data with respect to the captured image data to obtain the parallax image data from the captured image data, and to represent the parallax image data using a plurality of reference pattern data corresponding to different parallaxes. A plurality of first coefficients for weighting each of the plurality of reference pattern data are calculated, and the first coefficients included in the parallax image data using the parallax corresponding to each of the plurality of reference pattern data and the plurality of first coefficients. And calculating one parallax.

なお、コンピュータを上記画像処理装置として動作させるコンピュータプログラムとしての画像処理プログラムも、本発明の他の一側面を構成する。   An image processing program as a computer program that causes a computer to operate as the image processing apparatus also constitutes another aspect of the present invention.

本発明によれば、計算負荷を軽減しつつ視差画像データに含まれる視差を高精度に算出することができる。   According to the present invention, it is possible to calculate the parallax included in the parallax image data with high accuracy while reducing the calculation load.

本発明の実施例1,2における視差算出の概略を示す図。The figure which shows the outline of the parallax calculation in Example 1, 2 of this invention. 実施例1における撮像装置の構成を示すブロック図。1 is a block diagram illustrating a configuration of an imaging device according to Embodiment 1. FIG. 実施例1における撮像部の構成を示す図。FIG. 3 is a diagram illustrating a configuration of an imaging unit according to the first embodiment. 実施例1における視差算出処理を示すフローチャート。5 is a flowchart illustrating parallax calculation processing according to the first embodiment. 実施例1,2における参照パターンの機械学習処理を示すフローチャート。9 is a flowchart showing machine learning processing of reference patterns in the first and second embodiments. 実施例1,2における参照視差群の算出処理を示すフローチャート。9 is a flowchart illustrating reference parallax group calculation processing according to the first and second embodiments. 実施例2における画像処理システムの構成を示すブロック図。FIG. 3 is a block diagram illustrating a configuration of an image processing system according to a second embodiment. 実施例2における視差算出処理を示すフローチャート。10 is a flowchart illustrating parallax calculation processing according to the second embodiment.

以下、本発明の実施例について図面を参照しながら説明する。まず、実施例の具体的な説明の前に、典型的な実施例の概要について図1を用いて説明する。   Embodiments of the present invention will be described below with reference to the drawings. First, an outline of a typical embodiment will be described with reference to FIG. 1 before a specific description of the embodiment.

典型的な実施例では、被写体空間を複数の視点から撮像することで生成された撮像画像データから一組の入力画像i(i,i,…)を取得する。ここで、一組の入力画像とは、撮像画像データにおいて同一被写体に対する視差の算出を行う一組の部分領域であり、視差の情報を含む視差画像データである。撮像画像データは、被写体空間を複数の視点から撮像することで取得可能な1まとまり又は複数組の画像データであるが、以下の説明では一組の画像データとしての一組の撮像画像という。一組の入力画像は、一組の撮像画像のうち互いに同一位置の部分領域の画像データとして取得される。 In a typical embodiment, a set of input images i (i 1 , i 2 ,...) Is acquired from captured image data generated by capturing the subject space from a plurality of viewpoints. Here, a set of input images is a set of partial areas in which parallax is calculated for the same subject in captured image data, and is parallax image data including parallax information. The captured image data is a set or a plurality of sets of image data that can be acquired by imaging the subject space from a plurality of viewpoints. In the following description, the captured image data is referred to as a set of captured images. A set of input images is acquired as image data of partial areas at the same position in the set of captured images.

ただし、上記のように取得された一組の入力画像データから同一被写体の視差を算出する場合に、入力画像のサイズに対して視差が大きくてそれぞれの入力画像に同一被写体が含まれないと、視差を算出することができない。これに対して、それぞれの入力画像に同一被写体が含まれるように入力画像のサイズを大きくすることもできるが、視差を算出するために処理するデータ量が増えて計算負荷が増大する。   However, when calculating the parallax of the same subject from the set of input image data acquired as described above, if the parallax is large with respect to the size of the input image and each input image does not include the same subject, The parallax cannot be calculated. On the other hand, the size of the input image can be increased so that the same subject is included in each input image, but the amount of data to be processed to calculate the parallax increases and the calculation load increases.

そこで、実施例では、最終的に一組の入力画像から算出したい視差(第1の視差)の想定範囲(以下、想定視差範囲という)に基づいて、一組の撮像画像を縮小して一組の縮小画像データ(以下、単に一組の縮小画像という)を生成する。言い換えれば、一組の撮像画像の解像度を低下させて一組の低解像度画像を生成する。この際の撮像画像に対する縮小画像の縮小率は、上記想定視差範囲に基づいて、一組の縮小画像のうち互いに同一位置の部分領域である仮の一組の入力画像に同一被写体が含まれるように設定する。   Therefore, in the embodiment, a set of captured images is reduced based on an assumed range of parallax (first parallax) to be calculated from a set of input images (hereinafter referred to as an assumed parallax range). Reduced image data (hereinafter, simply referred to as a set of reduced images). In other words, the resolution of a set of captured images is reduced to generate a set of low resolution images. The reduction ratio of the reduced image with respect to the captured image at this time is such that the same subject is included in the temporary set of input images that are partial areas at the same position in the set of reduced images based on the assumed parallax range. Set to.

そして、仮の一組の入力画像における視差(第2の視差)を概算し、この概算視差を用いて一組の撮像画像のうち本来の一組の入力画像を取得する位置を設定する。これにより、一組の入力画像内に同一被写体が含まれるようになり、入力画像のサイズより大きい視差(第1の視差)を高精度に求めることができる。なお、想定視差範囲は、例えば撮像を行って撮像画像を生成した撮像装置の構成に基づいて設定される。   Then, the parallax (second parallax) in the temporary set of input images is approximated, and a position for acquiring the original set of input images from the set of captured images is set using the approximate parallax. Thereby, the same subject is included in a set of input images, and a parallax (first parallax) larger than the size of the input image can be obtained with high accuracy. Note that the assumed parallax range is set based on, for example, the configuration of an imaging apparatus that has captured an image and generated a captured image.

また、実施例では、事前に互いに異なる複数の既知の視差に対応する複数の参照パターンデータを用意する。参照パターンデータは、ある視差を有する画像間に表れる相違を表す一組の基本的なパターンである一組の参照パターンを示すデータである。以下の説明において、参照パターンデータに対応する視差を参照視差ともいい、複数の参照パターンデータのそれぞれに対応する複数の視差をまとめて参照視差群ともいう。   In the embodiment, a plurality of reference pattern data corresponding to a plurality of different known parallaxes are prepared in advance. The reference pattern data is data indicating a set of reference patterns, which is a set of basic patterns representing differences that appear between images having a certain parallax. In the following description, the parallax corresponding to the reference pattern data is also referred to as reference parallax, and the plurality of parallaxes corresponding to each of the plurality of reference pattern data are collectively referred to as a reference parallax group.

一組の入力画像は、複数の参照パターンデータを用いて表すことができる。実施例では、一組の入力画像を複数の参照パターンデータの組合せにより表すために、それぞれの参照パターンデータに重みを付けるための複数の係数α,α,…(以下、まとめて係数群αともいう)を算出する。一組の入力画像は、複数の参照パターンデータに係数群α(α,α,…)を乗じて加算する(重み付け平均する)ことで表すことができる。実施例では、このことを利用して、算出した係数群αと複数の参照パターンデータに対応する参照視差群d(d,d,…)とを用いて一組の入力画像の視差を算出する。この際、一組の入力画像を入力とする関数を用いるが、この関数の例については具体的な実施例にて説明する。 A set of input images can be represented using a plurality of reference pattern data. In the embodiment, in order to represent a set of input images by a combination of a plurality of reference pattern data, a plurality of coefficients α 1 , α 2 ,... For weighting each reference pattern data (hereinafter collectively referred to as a group of coefficients). (also referred to as α). A set of input images can be expressed by multiplying a plurality of reference pattern data by a coefficient group α (α 1 , α 2 ,...) And adding (weighted average). In the embodiment, using this, the parallax of a set of input images is calculated using the calculated coefficient group α and the reference parallax group d (d 1 , d 2 ,...) Corresponding to the plurality of reference pattern data. calculate. At this time, a function using a set of input images as an input is used. An example of this function will be described in a specific embodiment.

このような実施例においては、後述する行列演算によって係数群を算出すればよい。このため、ブロックマッチング等の画像探索処理が必要なくなり、視差算出における計算負荷が低減される。   In such an embodiment, the coefficient group may be calculated by a matrix operation described later. For this reason, image search processing such as block matching is not necessary, and the calculation load in parallax calculation is reduced.

さらに、複数の参照パターンデータに対応する参照視差群は、一組の入力画像における視差を算出する前に既知の情報として取得しておく。これにより、参照パターンデータに対応する参照視差群と係数群とを用いた単純な演算によって一組の入力画像の視差を算出することができる。すなわち、視差算出のための計算負荷を低減することができる。   Furthermore, a reference parallax group corresponding to a plurality of reference pattern data is acquired as known information before calculating parallax in a set of input images. Thereby, the parallax of a set of input images can be calculated by a simple calculation using the reference parallax group and the coefficient group corresponding to the reference pattern data. That is, the calculation load for calculating the parallax can be reduced.

本発明の具体的な実施例1である撮像装置100の構成について図2を用いて説明する。撮像部101は、被写体空間を互いに異なる複数の視点から撮像することにより撮像画像データとしての一組(例えば一対)の撮像画像を生成する。撮像部101の詳しい構成については後述する。   A configuration of an imaging apparatus 100 that is a specific embodiment 1 of the present invention will be described with reference to FIG. The imaging unit 101 generates a set (for example, a pair) of captured images as captured image data by capturing the subject space from a plurality of different viewpoints. A detailed configuration of the imaging unit 101 will be described later.

画像処理装置としての画像処理部102は、一組の撮像画像から取得する一組の入力画像の視差を算出する。画像処理部102は、学習部102aと視差画像取得部102bと視差算出部102cとを有する。学習部102aは、複数の参照パターンデータを機械学習によって生成(算出)し、生成した複数の参照パターンデータをこれらのそれぞれに対応する参照視差と関連付けて記憶部(記憶手段)103に記憶させる。学習部102aは生成手段として機能する。   An image processing unit 102 as an image processing device calculates parallax of a set of input images acquired from a set of captured images. The image processing unit 102 includes a learning unit 102a, a parallax image acquisition unit 102b, and a parallax calculation unit 102c. The learning unit 102a generates (calculates) a plurality of reference pattern data by machine learning, and stores the generated plurality of reference pattern data in the storage unit (storage unit) 103 in association with the corresponding reference parallax. The learning unit 102a functions as a generation unit.

視差画像取得部102bは、一組の撮像画像に対して縮小処理を行って一組の縮小画像を生成し、該一組の縮小画像間の視差(第2の視差)を求め、該視差に基づいて、一組の撮像画像から一組の視差画像を一組の入力画像として取得する。視差画像の取得処理についての詳細は後述する。視差画像取得部102bは、縮小手段および取得手段として機能する。   The parallax image acquisition unit 102b performs a reduction process on the set of captured images to generate a set of reduced images, obtains a parallax (second parallax) between the set of reduced images, Based on the set of captured images, a set of parallax images is acquired as a set of input images. Details of the parallax image acquisition process will be described later. The parallax image acquisition unit 102b functions as a reduction unit and an acquisition unit.

視差算出部102cは、記憶部103から読み出された参照パターンデータを用いて一組の入力画像の視差を算出する。視差算出部102cは、算出手段として機能する。画像処理部102が行う機械学習や視差算出処理についての詳細は後述する。   The parallax calculation unit 102 c calculates the parallax of a set of input images using the reference pattern data read from the storage unit 103. The parallax calculation unit 102c functions as a calculation unit. Details of the machine learning and parallax calculation processing performed by the image processing unit 102 will be described later.

なお、視差算出部102cは、記憶媒体105に保存された撮像画像について、ユーザにより指定されたタイミングで視差を算出してもよい。また、撮像画像は静止画に限らず動画でもよい。この場合、一組の動画のそれぞれを構成する同タイミングのフレーム画像間の視差が算出される。   Note that the parallax calculation unit 102c may calculate the parallax of the captured image stored in the storage medium 105 at a timing designated by the user. The captured image is not limited to a still image, and may be a moving image. In this case, the parallax between the frame images of the same timing constituting each of the set of moving images is calculated.

システムコントローラ106は、撮像部101および画像処理部102の動作を制御する。また、システムコントローラ106は、撮像画像を液晶ディスプレイ等の表示部104に表示したり記録媒体105に保存したりする。   The system controller 106 controls the operations of the imaging unit 101 and the image processing unit 102. Further, the system controller 106 displays the captured image on the display unit 104 such as a liquid crystal display or saves it in the recording medium 105.

次に、撮像部101の構成について図3(a),(b)を用いて説明する。図3(a),(b)では代表的な撮像部101の構成を示しているが、撮像部としては被写体空間を互いに異なる複数の視点から撮像することで互いに異なる視差を含む撮像画像データ(1まとまり又は複数の撮像画像)を得ることができる構成を有すればよい。   Next, the configuration of the imaging unit 101 will be described with reference to FIGS. 3 (a) and 3 (b) show a typical configuration of the imaging unit 101. As the imaging unit, captured image data including different parallaxes by imaging a subject space from a plurality of different viewpoints ( It is only necessary to have a configuration capable of obtaining one or a plurality of captured images.

図3(a)には、撮像レンズ(撮像光学系)201と撮像素子202とにより構成される第1のカメラユニットと、撮像レンズ203と撮像素子204とにより構成される第2のカメラユニットの2つのカメラユニットを有する撮像部101を示している。なお、撮像部101に設けられるカメラユニットは2つである必要はなく、3つ以上の複数のカメラユニットを含んでいてもよい。また、各撮像レンズは1つのレンズ素子により構成されてもよいし、複数のレンズ素子により構成されてもよい。このような構成の撮像部101を有する撮像装置は、多眼カメラ、カメラアレイまたはステレオカメラ等と称される。   FIG. 3A shows a first camera unit composed of an imaging lens (imaging optical system) 201 and an imaging element 202, and a second camera unit composed of an imaging lens 203 and an imaging element 204. An imaging unit 101 having two camera units is shown. Note that the number of camera units provided in the imaging unit 101 is not necessarily two, and may include three or more camera units. Each imaging lens may be configured by a single lens element or a plurality of lens elements. The imaging apparatus having the imaging unit 101 having such a configuration is referred to as a multi-lens camera, a camera array, a stereo camera, or the like.

複数のカメラユニットが同時に被写体空間における被写体面200を撮像することで撮像画像データが生成される。複数のカメラユニットは互いに異なる視点に配置されているため、被写体面200を互いに異なる複数の視点に対応する撮像画像データを取得することができる。また、複数のカメラユニットの配置方向と平行な直線被写体に対しては視差が付かないので、3つ以上のカメラユニットについては同一直線上に並ばないように配置する方が、後述する視差算出(推定)に対するロバスト性の観点から有利である。   A plurality of camera units simultaneously capture the subject surface 200 in the subject space to generate captured image data. Since the plurality of camera units are arranged at different viewpoints, captured image data corresponding to a plurality of different viewpoints on the subject surface 200 can be acquired. In addition, since a parallax is not attached to a straight subject parallel to the arrangement direction of a plurality of camera units, it is more preferable to arrange three or more camera units so that they are not arranged on the same straight line. This is advantageous from the viewpoint of robustness against estimation).

また、図3(b)には、撮像レンズ211と撮像素子213との間にマイクロレンズアレイ212が配置された撮像部101を示している。このような撮像部101を有する撮像装置は、プレノプティックカメラと称される。マイクロレンズアレイ212は、複数の微小な凸レンズを2次元アレイ状に配置することで構成される。撮像レンズ211は1つのレンズ素子により構成されてもよいし、複数のレンズ素子により構成されてもよい。   FIG. 3B shows the imaging unit 101 in which the microlens array 212 is disposed between the imaging lens 211 and the imaging element 213. An imaging apparatus having such an imaging unit 101 is referred to as a plenoptic camera. The microlens array 212 is configured by arranging a plurality of minute convex lenses in a two-dimensional array. The imaging lens 211 may be configured by a single lens element, or may be configured by a plurality of lens elements.

被写体面200の同一点から発せられて撮像レンズ211に入射した光束214,215は、マイクロレンズアレイ212のうち同一の凸レンズを通過して撮像素子213における互いに異なる画素(受光素子)216,217に到達する。このようなプレノプティックカメラは、マイクロレンズアレイ212の作用によって撮像レンズ211の射出瞳のうち互いに異なる瞳領域を通過した光束を弁別することができる。   Light beams 214 and 215 emitted from the same point on the subject surface 200 and incident on the image pickup lens 211 pass through the same convex lens in the microlens array 212 and enter different pixels (light receiving elements) 216 and 217 in the image pickup device 213. To reach. Such a plenoptic camera can discriminate light beams that have passed through different pupil regions of the exit pupil of the imaging lens 211 by the action of the microlens array 212.

具体的には、撮像レンズ211の射出瞳のうち上半分(平面視における右半分)の瞳領域を通過した光束214は撮像素子213の画素217等のR画素に入射する。また、射出瞳の下半分(平面視における左半分)の領域を通過した光束215は撮像素子213の画素216等のL画素に入射する。このように、撮像レンズ211の射出瞳のうち互いに異なる瞳領域を通過した光束が撮像素子213における互いに異なる画素に入射するため、これら光束を弁別することができる。   Specifically, the light beam 214 that has passed through the upper half (right half in plan view) of the exit pupil of the imaging lens 211 is incident on an R pixel such as the pixel 217 of the imaging element 213. Further, the light beam 215 that has passed through the lower half (left half in plan view) of the exit pupil is incident on L pixels such as the pixel 216 of the image sensor 213. Thus, since the light beams that have passed through different pupil regions of the exit pupil of the imaging lens 211 are incident on different pixels in the image sensor 213, these light beams can be discriminated.

そして、撮像素子213における複数のR画素の信号を抜き出して再配置することで、撮像レンズ211の右瞳領域を視点とするR撮像画像を生成することができる。また、複数のL画素の信号を抜き出して再配置することで、撮像レンズ211の左瞳領域を視点とするL撮像画像を生成することができる。   Then, by extracting and rearranging the signals of a plurality of R pixels in the image sensor 213, an R captured image with the right pupil region of the imaging lens 211 as a viewpoint can be generated. Further, by extracting and rearranging a plurality of L pixel signals, an L captured image with the left pupil region of the imaging lens 211 as a viewpoint can be generated.

なお、図3(b)ではマイクロレンズアレイ212の1つの凸レンズに対して2つの画素が配置される撮像素子213を示しているが、3つ以上の画素が配置されてもよく、1つの凸レンズに対する画素数に応じた視点数の画像を生成することができる。   3B shows the image sensor 213 in which two pixels are arranged with respect to one convex lens of the microlens array 212, three or more pixels may be arranged, and one convex lens. An image with the number of viewpoints corresponding to the number of pixels with respect to can be generated.

次に、画像処理部102が行う視差算出処理について、図4のフローチャートを用いて説明する。画像処理コンピュータにより構成される画像処理部102のうち視差算出部102cがコンピュータプログラムである画像処理プログラムに従って本処理を実行する。   Next, the parallax calculation processing performed by the image processing unit 102 will be described with reference to the flowchart of FIG. The parallax calculation unit 102c of the image processing unit 102 configured by the image processing computer executes this processing according to an image processing program that is a computer program.

ステップS101では、視差算出部102cは、事前に用意されて記憶部103に記憶された複数の参照パターンデータとこれらに対応する参照視差群とを取得する。参照パターンデータの生成方法(学習方法)および参照視差群の算出方法については後に詳しく説明する。   In step S101, the parallax calculation unit 102c acquires a plurality of reference pattern data prepared in advance and stored in the storage unit 103, and a reference parallax group corresponding to these. A reference pattern data generation method (learning method) and a reference parallax group calculation method will be described in detail later.

ステップS102では、視差算出部102cは、視差画像取得部102bが取得した一組の視差画像を入力画像として取得する。入力画像の取得処理については後に図6を用いて詳しく説明する。   In step S102, the parallax calculation unit 102c acquires a set of parallax images acquired by the parallax image acquisition unit 102b as an input image. The input image acquisition process will be described later in detail with reference to FIG.

視差画像がRGB(Red, Green, Blue)等の複数の色成分で表されている場合には、これら複数の色成分を1つの色成分に変換することにより入力画像を取得(生成)する。例えば、全ての色成分を平均化することでグレースケールの色成分の入力画像を生成したり任意の変換式を用いて1つの色成分に変換することで入力画像を生成したりする。また、複数の色成分のうち代表的な1つの色成分を入力画像として取得してもよい。また、複数の色成分を全て入力画像として取得してもよい。この場合、色成分ごとに視差を算出してその平均値を入力画像の視差としてもよい。   When the parallax image is represented by a plurality of color components such as RGB (Red, Green, Blue), the input image is acquired (generated) by converting the plurality of color components into one color component. For example, an input image of a grayscale color component is generated by averaging all the color components, or an input image is generated by converting it to one color component using an arbitrary conversion formula. Moreover, you may acquire one typical color component among several color components as an input image. Moreover, you may acquire all the several color components as an input image. In this case, the parallax may be calculated for each color component, and the average value may be used as the parallax of the input image.

さらに、1つの色成分は、それをそのまま入力画像として取得してもよいし、微分フィルタを用いて輝度変化を表す入力画像に変換してもよい。複数の色成分を、それらの平均値を差し引いた上でコントラストを揃えて入力画像として取得してもよい。これらの入力画像取得処理を行うことにより、撮像画像の明暗や撮像部101でのヴィネッティングの影響を低減し、より正確に視差の算出を行うことが可能な入力画像を取得することができる。なお、微分フィルタを用いる場合は、後述する学習画像に対しても同様の処理を行うことが望ましい。   Further, one color component may be acquired as it is as an input image, or may be converted into an input image representing a luminance change using a differential filter. A plurality of color components may be acquired as an input image by subtracting their average values and aligning the contrast. By performing these input image acquisition processes, it is possible to acquire the input image that can reduce the influence of the contrast of the captured image and the vignetting in the imaging unit 101 and can calculate the parallax more accurately. In addition, when using a differential filter, it is desirable to perform the same process also with respect to the learning image mentioned later.

ステップS103では、視差算出部102cは、一組の入力画像と複数の参照パターンデータとを用いて係数群を算出する。具体的には、視差算出部102cは、複数の参照パターンデータに乗じることで一組の入力画像を表すことができる係数群を算出可能な任意の関数に該入力画像を代入することで係数群を算出する。関数の計算量によって入力画像の視差算出における計算負荷が大きく左右されるため、できるだけ計算量を少なくすることができる関数を用いることが望ましい。なお、入力画像は、計算負荷を軽減する観点から、複数の参照パターンデータの組合せで表されることが望ましい。入力画像を表す参照パターンデータの数が1つであると、入力画像を正確に表すためにはその参照パターンデータに非常に多くの参照パターンのデータを含める必要があり、計算負荷が増大するためである。   In step S103, the parallax calculation unit 102c calculates a coefficient group using a set of input images and a plurality of reference pattern data. Specifically, the parallax calculation unit 102c assigns the input image to an arbitrary function that can calculate a coefficient group that can represent a set of input images by multiplying a plurality of reference pattern data. Is calculated. Since the calculation load in calculating the parallax of the input image greatly depends on the calculation amount of the function, it is desirable to use a function that can reduce the calculation amount as much as possible. The input image is preferably represented by a combination of a plurality of reference pattern data from the viewpoint of reducing the calculation load. If the number of reference pattern data representing an input image is one, in order to accurately represent the input image, it is necessary to include a large amount of reference pattern data in the reference pattern data, which increases calculation load. It is.

本実施例では、上記関数として、参照パターンデータに基づいた行列演算を用いる。一組の入力画像を列ベクトルiとし、参照パターンデータを列ベクトルとしたときに複数の参照パターンデータのそれぞれを列成分として持つ(つまりは配列した)行列を変換行列Dとし、係数群を列ベクトルαで表す。この場合、以下の式(1)のように変換行列Dの一般化逆行列D−1に列ベクトルiを乗じることで列ベクトルαが求められる。 In this embodiment, matrix calculation based on reference pattern data is used as the function. When a set of input images is a column vector i and the reference pattern data is a column vector, a matrix having each of a plurality of reference pattern data as column components (that is, an array) is a transformation matrix D, and a coefficient group is a column Represented by the vector α. In this case, the column vector α is obtained by multiplying the generalized inverse matrix D −1 of the transformation matrix D by the column vector i as shown in the following equation (1).

変換行列Dが正則行列である場合は、一般化逆行列D−1は行列Dの逆行列を指す。なお、図1に示すように、各参照パターンは入力画像間の視差を表すだけでなく明暗や構造も表すため、参照パターンには視点間で同一のパターン等、視差を表さないものも含まれる。視差算出において視差を表さない参照パターンは必要ないため、変換行列Dの一般化逆行列D−1から視差を表さない参照パターンを除いて以後の処理に用いてもよいし、そのまま用いてもよい。 When the transformation matrix D is a regular matrix, the generalized inverse matrix D −1 refers to the inverse matrix of the matrix D. As shown in FIG. 1, each reference pattern not only represents parallax between input images but also represents light and darkness and structure. Therefore, the reference pattern includes those that do not represent parallax, such as the same pattern between viewpoints. It is. Since a reference pattern that does not represent parallax is not necessary in the parallax calculation, the reference pattern that does not represent parallax may be removed from the generalized inverse matrix D −1 of the transformation matrix D, or may be used as it is. Also good.

ステップS104では、視差算出部102cは、ステップS103で求めた係数群と複数の参照パターンデータに対応する参照視差群とを用いて一組の入力画像の視差(第1の視差)を算出(推定)する。参照視差群を行ベクトルdとし、任意の1つの視点を基準とした一組の入力画像間の視差をスカラー量pとすると、pは以下の式(2)に示すようにdの各要素(d)とαの各要素(α)と符号調整項jとの積の総和で求められる。 In step S104, the parallax calculation unit 102c calculates (estimates) the parallax (first parallax) of a set of input images using the coefficient group obtained in step S103 and the reference parallax group corresponding to the plurality of reference pattern data. ) Assuming that the reference parallax group is a row vector d and the parallax between a set of input images based on any one viewpoint is a scalar quantity p, p represents each element of d ( d i ), each element of α (α i ), and the sign adjustment term j.

参照パターンの濃淡反転等を表現するために、係数群αは正と負の両方の値を取り得る。しかし、係数の符号の違いは視差が発生する方向には関係なく、一組の入力画像の視差の算出においては該係数の大きさのみが用いられる。したがって、係数が負の場合は、係数あるいは対応する参照視差のどちらか一方の符号を反転させることによって、係数と参照視差との積の符号を、常に参照視差の符号と一致させる必要がある。本実施例では、符号を反転させる方法として符号調整項jを用いて係数と同じ符号の値を乗じる手法を用いているが、αの絶対値をとる手法を用いてもよい。これにより、入力画像の色や明暗の違いによる影響を低減し、視差の算出精度を向上させることができる。   The coefficient group α can take both positive and negative values to express the inversion of the reference pattern. However, the difference in the sign of the coefficient is independent of the direction in which the parallax occurs, and only the magnitude of the coefficient is used in calculating the parallax of a set of input images. Therefore, when the coefficient is negative, it is necessary to always match the code of the product of the coefficient and the reference parallax with the code of the reference parallax by inverting the sign of either the coefficient or the corresponding reference parallax. In this embodiment, as a method of inverting the sign, a technique of multiplying the value of the same sign as the coefficient using the sign adjustment term j is used, but a technique of taking the absolute value of α may be used. Thereby, the influence by the difference of the color of an input image, or brightness and darkness can be reduced, and the calculation precision of a parallax can be improved.

次に、参照パターンデータの生成方法(生成処理)について図5のフローチャートを用いて説明する。本実施例では、参照パターンデータを機械学習によって生成(算出)する。機械学習は、視差算出の前であれば、撮像装置100の学習部102aで行ってもよいし、撮像装置100とは別の演算装置で行ってもよい。本実施例では、学習部102aで機械学習を行う場合について説明する。   Next, a reference pattern data generation method (generation process) will be described with reference to the flowchart of FIG. In this embodiment, reference pattern data is generated (calculated) by machine learning. The machine learning may be performed by the learning unit 102a of the imaging device 100 or a computing device different from the imaging device 100 before the parallax calculation. In this embodiment, a case where machine learning is performed by the learning unit 102a will be described.

ステップS201では、学習部102aは、複数の視点から被写体を撮像することにより生成された一組の撮像画像の少なくとも一部から、該複数の視点のうち一組の視点から撮像された同一被写体位置の画像の組を複数の被写体位置について抽出する。そして、このように抽出した視点ごとの複数の被写体位置の画像の集合を1つの学習画像とし、一組の視点に対応する学習画像の組を学習画像データとしての一組の学習画像とする。なお、学習画像の元となる上記撮像画像は、被写体の撮像をコンピュータでシミュレーションして生成された画像であってもよい。   In step S201, the learning unit 102a uses the same subject position captured from a set of viewpoints out of at least a part of the set of captured images generated by capturing the subject from a plurality of viewpoints. Are extracted for a plurality of object positions. A set of images of a plurality of subject positions for each viewpoint extracted in this way is set as one learning image, and a set of learning images corresponding to one set of viewpoints is set as a set of learning images as learning image data. Note that the captured image that is the basis of the learning image may be an image generated by simulating imaging of a subject with a computer.

1つの学習画像を構成する前記撮像画像から抽出された画像のサイズは、入力画像と同じサイズの画像であってもよいし、入力画像とは異なるサイズの学習画像を入力画像のサイズに合わせて拡大または縮小して用いてもよい。一般に、撮像装置の構成に応じて撮像画像にて発生する視差が異なるため、参照パターンデータは撮像装置の構成に基づいて設定された視差を有する学習画像から生成することが望ましい。ここにいう撮像装置100の構成とは、視点数、撮像素子の画素ピッチ、撮像光学系の焦点距離、複数の視点(カメラユニット)の基線長、基線方向および輻輳角、プレノプティックカメラのF値やフォーカス位置等である。すなわち、撮像装置100の構成は、撮像装置により生成された一組の撮像画像間に発生する視差に影響する様々な要素を含む。言い換えれば、撮像装置100の構成とは、一組の撮像画像間に発生する視差に関する撮像条件である。これにより、学習画像から生成される参照パターンデータと一組の入力画像に含まれる視差とを同等にすることができ、発生しない視差ずれ量を参照パターンデータから排除することができるので、入力画像の視差算出における精度や計算速度が向上する。学習部102aは、視点の組が互いに異なる複数組の学習画像を生成する。   The size of the image extracted from the captured image constituting one learning image may be an image having the same size as the input image, or a learning image having a size different from the input image is matched to the size of the input image. It may be used after being enlarged or reduced. In general, since the parallax generated in the captured image varies depending on the configuration of the imaging device, it is desirable to generate the reference pattern data from a learning image having a parallax set based on the configuration of the imaging device. The configuration of the imaging apparatus 100 here refers to the number of viewpoints, the pixel pitch of the imaging element, the focal length of the imaging optical system, the baseline lengths of a plurality of viewpoints (camera units), the baseline direction and the convergence angle, the plenoptic camera F value, focus position, etc. That is, the configuration of the imaging apparatus 100 includes various elements that affect the parallax that occurs between a pair of captured images generated by the imaging apparatus. In other words, the configuration of the imaging apparatus 100 is an imaging condition related to parallax that occurs between a pair of captured images. Thereby, the reference pattern data generated from the learning image can be made equal to the parallax included in the set of input images, and the amount of parallax deviation that does not occur can be excluded from the reference pattern data. The accuracy and calculation speed in the parallax calculation are improved. The learning unit 102a generates a plurality of learning images having different viewpoint sets.

ステップS202では、学習部102aは、ステップS201で生成した複数組の学習画像(複数の学習画像データ)を用いた機械学習により複数の参照パターンデータを生成する。参照パターンデータを求めるために、以下の式(3)に示すように、学習画像を変換行列Dと係数行列Aとの積で表したときの誤差を最小にする変換行列Dを最適化によって求める。   In step S202, the learning unit 102a generates a plurality of reference pattern data by machine learning using a plurality of sets of learning images (a plurality of learning image data) generated in step S201. In order to obtain the reference pattern data, as shown in the following equation (3), a transformation matrix D that minimizes an error when the learning image is represented by the product of the transformation matrix D and the coefficient matrix A is obtained by optimization. .

係数行列Aは、一組の学習画像に対応する係数群を列ベクトルとしたときに複数組の学習画像のそれぞれの係数群を複数の列成分として持つ行列を表す。また、Lは一組の学習画像を列ベクトルとしたときに複数組の学習画像のそれぞれを複数の列成分として持つ行列を表す。
The coefficient matrix A represents a matrix having each coefficient group of a plurality of sets of learning images as a plurality of column components when the coefficient group corresponding to one set of learning images is a column vector. Further, L represents a matrix having a plurality of sets of learning images as a plurality of column components when a set of learning images is a column vector.

はフロベニウスノルムを、
Is the Frobenius norm,

はL0ノルムを、kは任意の定数を表す。変換行列Dや行列Aの初期値は任意の値でよく、例えば乱数から決定するとよい。行列AのL0ノルムでの最適化に制約を課すことで、少ない参照パターンデータの組合せで行列Lを表すことができる。これについて、例えば以下の参考文献1に詳しい。
[参考文献1]K. Marwah, et al., “Compressive Light Field Photography using Overcomplete Dictionaries and Optimized Projections.” Proc. of SIGGRAPH 2013 (ACM Transactions on Graphics 32, 4), 2013.
変換行列Dの各列成分としての列ベクトルは一組の参照パターンを表しているので、変換行列Dから該一組の参照パターンを示すデータである参照パターンデータを求めることができる。
Represents an L0 norm, and k represents an arbitrary constant. The initial values of the transformation matrix D and matrix A may be arbitrary values, for example, determined from random numbers. By imposing constraints on the optimization of the matrix A with the L0 norm, the matrix L can be expressed with a small number of combinations of reference pattern data. This is detailed in, for example, Reference Document 1 below.
[Reference 1] K. Marwah, et al., “Compressive Light Field Photography using Overcomplete Dictionaries and Optimized Projections.” Proc. Of SIGGRAPH 2013 (ACM Transactions on Graphics 32, 4), 2013.
Since the column vector as each column component of the transformation matrix D represents a set of reference patterns, reference pattern data which is data indicating the set of reference patterns can be obtained from the transformation matrix D.

ステップS203では、学習部102aは参照パターンデータに対応する視差を求める。視差を求める方法としては、任意の方法を用いることができる。例えば、ブロックマッチングを用いて視差を求める方法でもよいし、視差の分布(視差マップ)が既知である視差画像を用いて参照視差群を算出する方法でもよい。   In step S203, the learning unit 102a obtains a parallax corresponding to the reference pattern data. Any method can be used as a method for obtaining the parallax. For example, a method of obtaining a parallax using block matching or a method of calculating a reference parallax group using a parallax image whose parallax distribution (parallax map) is known may be used.

ここでは、視差マップが既知である視差画像を用いて参照視差群を算出する方法について説明する。学習部102aは、変換行列Dを用いて、視差算出部102cに代わって図4のステップS101からステップS103までの処理を行うことで係数群を求める。ここではステップS102において視差マップが既知である複数の視差画像を入力画像として用いる。これによって、複数の係数群が得られ、1つの係数群を列ベクトルとしたときに、各列に係数群のベクトルを持つ行列を行列Bとして生成する。   Here, a method for calculating a reference parallax group using a parallax image whose parallax map is known will be described. The learning unit 102a uses the transformation matrix D to obtain a coefficient group by performing the processing from step S101 to step S103 in FIG. 4 instead of the parallax calculation unit 102c. Here, in step S102, a plurality of parallax images whose parallax maps are known are used as input images. As a result, a plurality of coefficient groups are obtained. When one coefficient group is a column vector, a matrix having a coefficient group vector in each column is generated as a matrix B.

次に、学習部102aは、式(4)に示すように、求めたい参照視差群を表す参照視差ベクトルdと行列Bとの積が視差マップを行ベクトルで表したときの正解視差ベクトルRを正確に表すように最適化を行う。   Next, as shown in Equation (4), the learning unit 102a calculates the correct disparity vector R when the product of the reference disparity vector d representing the reference disparity group to be obtained and the matrix B represents the disparity map as a row vector. Optimize for accurate representation.

はL2ノルムを表す。以上の処理では、用いる画像内で比較して視差を算出するため、画像サイズよりも大きい視差を求めることは難しい。このため、参照視差ベクトルdの各要素に対して画像サイズを上限値とする制限を加えて最適化を行った方が、参照視差ベクトルdの算出精度の面で有利である。 Represents the L2 norm. In the above processing, since the parallax is calculated in comparison with the image to be used, it is difficult to obtain a parallax larger than the image size. For this reason, it is more advantageous in terms of calculation accuracy of the reference parallax vector d that the optimization is performed by adding a restriction with the image size as an upper limit value for each element of the reference parallax vector d.

次に、上述したステップS102において実行される入力画像の取得処理について図6のフローチャートを用いて説明する。本実施例では、撮像部101が生成した一組の撮像画像から視差画像を取得する。画像処理コンピュータにより構成される画像処理部102のうち視差画像取得部102bが上記画像処理プログラムに従って本処理を実行する。   Next, the input image acquisition process executed in step S102 described above will be described with reference to the flowchart of FIG. In this embodiment, a parallax image is acquired from a set of captured images generated by the imaging unit 101. The parallax image acquisition unit 102b of the image processing unit 102 constituted by the image processing computer executes this processing according to the image processing program.

ステップS301では、視差画像取得部102bは、一組の撮像画像のそれぞれに対して同じ縮小率Mで縮小処理を行うことにより一組の縮小画像を生成する。縮小率Mは、想定視差範囲が入力画像のサイズ内に収まるように設定されることが望ましい。視差画像取得部102bは、想定視差範囲を撮像装置100の構成や想定される被写体までの距離に基づいて設定する。   In step S301, the parallax image acquisition unit 102b generates a set of reduced images by performing a reduction process at the same reduction ratio M on each of the set of captured images. The reduction ratio M is preferably set so that the assumed parallax range is within the size of the input image. The parallax image acquisition unit 102b sets the assumed parallax range based on the configuration of the imaging device 100 and the assumed distance to the subject.

ステップS302では、視差画像取得部102bは、一組の縮小画像間の視差(第2の視差)を算出する。本ステップにおいて視差を求める方法としては、任意の方法を用いることができる。例えば、前述したブロックマッチング法を用いてもよいし、グラフカット法、セミグローバルマッチング法、動的計画法、などの従来の各種手法を用いてもよい。   In step S302, the parallax image acquisition unit 102b calculates the parallax (second parallax) between the pair of reduced images. As a method for obtaining the parallax in this step, any method can be used. For example, the block matching method described above may be used, and various conventional methods such as a graph cut method, a semi-global matching method, and a dynamic programming method may be used.

ステップS303では、視差画像取得部102bは、一組の撮像画像のそれぞれから入力画像を取得する、つまりは視差を算出する部分領域である視差算出領域を設定する。具体的には、図1に示すように、一組の撮像画像において互いに同一位置にある部分領域を基準領域Aとする。一組の撮像画像のうち一方の撮像画像の基準領域Aには被写体OBJが含まれ、他方の撮像画像における基準領域Aには上記一方の撮像画像に含まれる同一被写体としての被写体OBJが含まれていない。この場合に、視差画像取得部102bは、他方の撮像画像において被写体OBJを含む部分領域Bと基準領域Aとの位置差をシフト量として求める。視差画像取得部102bは、このときのシフト量を、縮小処理における撮像画像に対する縮小画像の縮小率Mと一組の縮小画像間で算出された視差との積により算出する。   In step S303, the parallax image acquisition unit 102b acquires an input image from each of the set of captured images, that is, sets a parallax calculation area that is a partial area for calculating parallax. Specifically, as shown in FIG. 1, a partial region located at the same position in a set of captured images is set as a reference region A. The reference area A of one captured image in the set of captured images includes the subject OBJ, and the reference area A in the other captured image includes the subject OBJ as the same subject included in the one captured image. Not. In this case, the parallax image acquisition unit 102b obtains the positional difference between the partial area B including the subject OBJ and the reference area A as the shift amount in the other captured image. The parallax image acquisition unit 102b calculates the shift amount at this time by the product of the reduction ratio M of the reduced image with respect to the captured image in the reduction process and the parallax calculated between the pair of reduced images.

ステップS304では、視差画像取得部102bは、一方の撮像画像における基準領域Aを視差算出領域に設定し、他方の撮像画像において基準領域AからステップS303で算出したシフト量だけ位置が異なる部分領域Bを視差算出領域に設定する。そして、これら一方および他方の撮像画像のそれぞれの視差算出領域から一組の入力画像を取得する。なお、他方の撮像画像の視差算出領域を設定する際に、該撮像画像に対して基準領域Aを部分領域Bの位置にシフトさせる処理を行ってもよいし、部分領域Bが基準領域Aの位置にシフトするように撮像画像を基準領域Aに対してシフトさせてもよい。   In step S304, the parallax image acquisition unit 102b sets the reference area A in one captured image as the parallax calculation area, and the partial area B whose position differs from the reference area A by the shift amount calculated in step S303 in the other captured image. Is set in the parallax calculation area. Then, a set of input images is acquired from the parallax calculation areas of the one and the other captured images. Note that when setting the parallax calculation area of the other captured image, a process of shifting the reference area A to the position of the partial area B may be performed on the captured image. The captured image may be shifted with respect to the reference region A so as to shift to the position.

本実施例では、計算負荷が大きくなり易い複数の参照パターンデータに対応する視差の算出を入力画像の視差算出の前に行い、該入力画像に対しては複数の参照パターンに対応する参照視差群と係数群とを用いた単純な演算により視差を算出する。また、入力画像の取得前に撮像画像を縮小して得られた縮小画像を用いて視差を概算し、その概算視差を用いて撮像画像から入力画像を取得する。これにより、入力画像の視差算出における計算負荷を軽減しながら、大きな視差を高精度に算出することができる。   In this embodiment, the calculation of parallax corresponding to a plurality of reference pattern data, which tends to increase the calculation load, is performed before the calculation of the parallax of the input image, and the reference parallax group corresponding to the plurality of reference patterns for the input image. And the parallax are calculated by a simple calculation using the coefficient group. Further, the parallax is estimated using the reduced image obtained by reducing the captured image before the input image is acquired, and the input image is acquired from the captured image using the approximate parallax. Thereby, it is possible to calculate a large parallax with high accuracy while reducing the calculation load in calculating the parallax of the input image.

算出された入力画像の視差は、撮像装置の構成(基線長等)に基づいて距離に変換することができる。そして、求めた距離の情報は、深度が深い撮像画像に対して距離に応じたぼけを付加する処理や撮像時のオートフォーカス等に利用することができる。また、撮像装置100を車載カメラとして構成し、距離情報や撮像画像から周囲の障害物を認識して自走する自動運転や衝突を回避するための運転補助(ブレーキ制御等)に利用することもできる。   The calculated parallax of the input image can be converted into a distance based on the configuration of the imaging device (baseline length or the like). The obtained distance information can be used for processing for adding a blur corresponding to the distance to a captured image having a deep depth, autofocus at the time of imaging, or the like. Further, the imaging apparatus 100 may be configured as an in-vehicle camera and used for driving assistance (brake control, etc.) for recognizing surrounding obstacles from distance information and captured images and for self-running and avoiding collisions. it can.

また、本実施例では撮像装置100に学習部102aを設ける場合について説明したが、予め学習した結果を記憶部103に記憶させておくことで、撮像装置100に学習部102aを設けなくてもよい。   In this embodiment, the case where the learning unit 102a is provided in the imaging device 100 has been described. However, the learning unit 102a may not be provided in the imaging device 100 by storing the learning result in the storage unit 103 in advance. .

次に、本発明の実施例2である画像処理システムについて図7を用いて説明する。本実施例では、入力画像の視差算出を行う画像処理装置301と、撮像画像データを生成する撮像装置300と、機械学習を行うサーバー305とが個別に存在している。画像処理装置301には、多眼カメラやプレノプティックカメラ等の様々な撮像装置300を接続することができ、接続された撮像装置300の構成に応じて使用する変換行列を切り替える。本実施例にいう撮像装置300の構成も、実施例1と同様に、視点数、撮像素子の画素ピッチ、撮像光学系の焦点距離、複数の視点(カメラユニット)の基線長、基線方向および輻輳角、プレノプティックカメラのF値やフォーカス位置等である。言い換えれば、一組の撮像画像間に発生する視差に関する撮像条件である。   Next, an image processing system that is Embodiment 2 of the present invention will be described with reference to FIG. In this embodiment, there are an image processing device 301 that performs parallax calculation of an input image, an imaging device 300 that generates captured image data, and a server 305 that performs machine learning. Various imaging devices 300 such as a multi-lens camera and a plenoptic camera can be connected to the image processing device 301, and a conversion matrix to be used is switched according to the configuration of the connected imaging device 300. Similarly to the first embodiment, the configuration of the imaging apparatus 300 according to the present embodiment also includes the number of viewpoints, the pixel pitch of the imaging device, the focal length of the imaging optical system, the baseline lengths of a plurality of viewpoints (camera units), the baseline direction, and the convergence. The angle, the F value of the plenoptic camera, the focus position, and the like. In other words, it is an imaging condition related to parallax that occurs between a pair of captured images.

また、本実施例では、一組の撮像画像に対して階層的に複数回、縮小処理を行って縮小率Mが互いに異なる複数組の縮小画像を生成する。これら複数組の縮小画像のうち最も縮小率Mが大きい、つまりは最も解像度が低い一組の縮小画像から解像度が高い一組の縮小画像まで順次視差を求める。これにより、最終的に最も解像度が高い一組の撮像画像から取得される一組の入力画像の視差を求める。本実施例によれば、撮像画像の視差が大きい場合でも、縮小処理による解像度の劣化の影響を最小限に抑えつつ、高精度な視差算出を可能とする。   In this embodiment, a set of captured images is subjected to a reduction process a plurality of times hierarchically to generate a plurality of sets of reduced images having different reduction ratios M. Among these plural sets of reduced images, the parallax is sequentially obtained from the set of reduced images having the highest reduction ratio M, that is, the lowest resolution to the set of reduced images having the highest resolution. Thereby, the parallax of a set of input images finally obtained from a set of captured images with the highest resolution is obtained. According to the present embodiment, even when the parallax of the captured image is large, high-precision parallax calculation can be performed while minimizing the influence of resolution degradation due to the reduction process.

撮像装置300の構成は、例えば実施例1の撮像装置100から画像処理部102を除いたものと同じである。撮像装置300により生成された撮像画像データは画像処理装置301に送られ、画像処理装置301内の生成記憶部302に記憶される。画像処理装置301は、有線または無線通信により直接またはネットワークを介してサーバー305と接続されている。   The configuration of the imaging apparatus 300 is the same as that obtained by removing the image processing unit 102 from the imaging apparatus 100 according to the first embodiment, for example. The captured image data generated by the imaging device 300 is sent to the image processing device 301 and stored in the generation storage unit 302 in the image processing device 301. The image processing apparatus 301 is connected to the server 305 directly or via a network by wired or wireless communication.

サーバー305は、複数の参照パターンデータを生成し、さらに変換行列と参照視差群を機械学習により生成(算出)する学習部307と、これら変換行列および参照視差群を記憶する記憶部306とを有する。なお、変換行列の生成方法は実施例1で図5のフローチャートを用いて説明した方法と同じである。また、変換行列は必ずしも学習によって生成する必要はなく、4次元離散コサイン変換等の画像圧縮で使われる変換基底画像から生成してもよい。   The server 305 includes a learning unit 307 that generates a plurality of reference pattern data, and further generates (calculates) a conversion matrix and a reference parallax group by machine learning, and a storage unit 306 that stores the conversion matrix and the reference parallax group. . Note that the generation method of the transformation matrix is the same as that described in the first embodiment with reference to the flowchart of FIG. In addition, the transformation matrix is not necessarily generated by learning, and may be generated from a transformation base image used in image compression such as four-dimensional discrete cosine transformation.

画像処理装置301は、記憶部302と階層画像生成部303と視差算出部304とを有する。縮小手段および取得手段としての階層画像生成部303は、n種類(nは2以上の整数)の解像度を有するn組の階層画像を取得または生成する。具体的には、階層画像生成部303は、撮像画像をn層または最下位層の階層画像として取得する。また、階層画像生成部303は、撮像画像に対して縮小処理を行うことにより第n層以外の第(n−1)層の階層画像を生成する。第(n−1)層の階層画像のうち最も縮小率が大きく解像度が低い階層画像の組を第1層または最上位層の階層画像とし、縮小率が小さくなるほど、すなわち解像度が高くなるほど下位層の階層画像とする。   The image processing apparatus 301 includes a storage unit 302, a hierarchical image generation unit 303, and a parallax calculation unit 304. A hierarchical image generation unit 303 as a reduction unit and an acquisition unit acquires or generates n sets of hierarchical images having n types of resolutions (n is an integer of 2 or more). Specifically, the hierarchical image generation unit 303 acquires the captured image as an n-layer or lowest-layer hierarchical image. Further, the hierarchical image generation unit 303 generates a hierarchical image of the (n−1) th layer other than the nth layer by performing a reduction process on the captured image. A group of hierarchical images having the highest reduction ratio and the lowest resolution among the hierarchical images of the (n−1) -th layer is defined as the first layer or the highest layer hierarchical image, and the lower the lower the reduction ratio, that is, the higher the resolution. The hierarchical image of

算出手段としての視差算出部304は、サーバー305の記憶部306から取得した変換行列と参照視差群とを用いて、第1層から第n層の階層画像のそれぞれの視差を順次算出する。算出された第m層(mは正の整数)の視差は第(m+1)層のシフト量の算出に用いられる。最終的に求められた第n層の撮像画像の視差は、撮像画像に対するぼけ付加処理等の画像処理に利用され、該画像処理後の画像は、表示装置308、記録媒体309および出力装置310のうち少なくとも1つに出力される。   The parallax calculation unit 304 serving as a calculation unit sequentially calculates the parallax of each of the first to n-th layer hierarchical images using the conversion matrix acquired from the storage unit 306 of the server 305 and the reference parallax group. The calculated parallax of the mth layer (m is a positive integer) is used to calculate the shift amount of the (m + 1) th layer. The finally obtained parallax of the captured image of the nth layer is used for image processing such as blur addition processing on the captured image, and the image after the image processing is displayed on the display device 308, the recording medium 309, and the output device 310. Output to at least one of them.

表示装置308は、液晶ディスプレイやプロジェクタ等である。記録媒体309は、半導体メモリ、ハードディスクまたはネットワーク上のサーバー等である。出力装置310は、プリンタ等である。画像処理装置301は、必要に応じて現像処理やその他の画像処理を行う機能を有していてもよい。   The display device 308 is a liquid crystal display, a projector, or the like. The recording medium 309 is a semiconductor memory, a hard disk, a network server, or the like. The output device 310 is a printer or the like. The image processing apparatus 301 may have a function of performing development processing and other image processing as necessary.

なお、階層画像生成部303では、撮像画像に含まれる視差を正確に算出するために、撮像画像に対する最上位層の階層画像の縮小率Mは、撮像装置の構成等に応じて設定された想定視差範囲に基づいて設定されることが望ましい。   Note that in the hierarchical image generation unit 303, in order to accurately calculate the parallax included in the captured image, the reduction ratio M of the hierarchical image of the uppermost layer with respect to the captured image is assumed to be set according to the configuration of the imaging device and the like. It is desirable to set based on the parallax range.

具体的には、想定視差範囲における視差の最大想定値である最大想定視差と最小想定値である最小想定視差をそれぞれde,maxとde,minとし、複数の参照パターンデータのそれぞれに対応する視差の最大値と最小値をそれぞれdmaxとdminとする。このとき、撮像画像に対する第1層(最上位層)の階層画像の縮小率Mが式(5)を満足することが望ましい。これにより、最上位層の階層画像において、参照パターンデータに含まれる視差の範囲内に想定視差範囲が収まるようになり、想定視差範囲の視差を正確に算出することができる。 Specifically, the maximum assumed parallax, which is the maximum assumed value of the parallax in the assumed parallax range, and the minimum assumed parallax, which is the minimum assumed value, are de, max and de , min , respectively, and correspond to each of a plurality of reference pattern data Let d max and d min be the maximum and minimum values of the parallax to be performed. At this time, it is desirable that the reduction ratio M of the first layer (uppermost layer) hierarchical image with respect to the captured image satisfies Expression (5). Thereby, in the uppermost layer image, the assumed parallax range is within the parallax range included in the reference pattern data, and the parallax of the assumed parallax range can be accurately calculated.

次に、画像処理コンピュータにより構成される画像処理装置301(階層画像生成部303および視差算出部304で行う視差算出処理を、図8のフローチャートを用いて説明する。パーソナルコンピュータにより構成される画像処理装置301は、コンピュータプログラムである画像処理プログラムに従って本処理を実行する。   Next, parallax calculation processing performed by the image processing apparatus 301 (hierarchical image generation unit 303 and parallax calculation unit 304) configured by an image processing computer will be described with reference to the flowchart of FIG. The apparatus 301 executes this processing according to an image processing program that is a computer program.

ステップS401では、視差算出部304は、階層画像生成部303で生成された階層画像データのうち、未だ視差を算出していない階層画像のうち最も上位層である第m層(mは正の整数)の階層画像を取得(生成)する。また、視差算出部304は、サーバー305の記憶部306から変換行列を取得する。   In step S401, the parallax calculation unit 304 is the m-th layer (m is a positive integer) that is the highest layer among the hierarchical images for which the parallax has not yet been calculated among the hierarchical image data generated by the hierarchical image generation unit 303. ) Is acquired (generated). In addition, the parallax calculation unit 304 acquires a transformation matrix from the storage unit 306 of the server 305.

ステップS402では、視差算出部304は、第m層の一組の階層画像のうち実施例1で説明した基準領域に対して後述するシフト量だけシフトした部分領域を視差算出領域に設定する。そして、これら一組の階層画像の視差算出領域から一組の入力画像を取得する。この際、視差算出領域のサイズは、全ての階層画像に対して同じであってもよいし、階層画像のサイズに合わせて変更してもよい。   In step S402, the parallax calculation unit 304 sets, in the parallax calculation area, a partial area that is shifted by a shift amount described later with respect to the reference area described in the first embodiment in the set of hierarchical images of the m-th layer. Then, a set of input images is acquired from the parallax calculation area of the set of hierarchical images. At this time, the size of the parallax calculation area may be the same for all the hierarchical images, or may be changed according to the size of the hierarchical images.

本実施例では、視差算出部304は、一組の階層画像から複数組の入力画像を取得してもよい。すなわち、1つの階層画像から複数の入力画像を取得してもよい。この際、1つの階層画像において複数の入力画像を部分的に重複するように取得してもよいし、重複しないように取得してもよい。ただし、一組の入力画像から1つの視差を算出するため、重複しないように複数組の入力画像を取得した場合は、算出された視差の分布、すなわち視差マップの解像度が入力画像に比べて低下する。これに対して、部分的に重複するように複数組の入力画像を取得することで視差マップの解像度を高めることができる。   In the present embodiment, the parallax calculation unit 304 may acquire a plurality of sets of input images from a set of hierarchical images. That is, a plurality of input images may be acquired from one hierarchical image. At this time, a plurality of input images may be acquired so as to partially overlap in one hierarchical image, or may be acquired so as not to overlap. However, since one parallax is calculated from one set of input images, when a plurality of sets of input images are acquired so as not to overlap, the calculated parallax distribution, that is, the resolution of the parallax map, is lower than that of the input image. To do. On the other hand, the resolution of the parallax map can be increased by acquiring a plurality of sets of input images so as to partially overlap.

また、シフト量は、記憶部302から取得した第(m−1)層の階層画像の視差と、第(m−1)層の第m層に対する縮小率Mとの積で求めることができる。なお、m=1(最上位層)の場合は、シフト量は0に設定する。   Further, the shift amount can be obtained by the product of the parallax of the (m−1) th layer image acquired from the storage unit 302 and the reduction ratio M of the (m−1) th layer with respect to the mth layer. When m = 1 (the highest layer), the shift amount is set to 0.

また、本ステップにおいて一組の階層画像から複数組の入力画像を取得する場合においては、一組の入力画像を列ベクトルとするときに複数組の入力画像を複数の列成分に持つ行列Iを生成する。入力画像を行列の形でまとめておくことで、以降の処理を階層画像全体で一括して行うことができ、視差算出の計算負荷を軽減することができる。   In addition, when acquiring a plurality of sets of input images from a set of hierarchical images in this step, a matrix I having a plurality of sets of input images as a plurality of column components when the set of input images is a column vector. Generate. By collecting the input images in the form of a matrix, the subsequent processing can be performed collectively for the entire hierarchical image, and the calculation load for parallax calculation can be reduced.

ステップS403では、視差算出部304は、以下の式(6)に示すように行列Iと変換行列Dの一般化逆行列との積を計算することで係数行列Aを求める。   In step S403, the parallax calculation unit 304 obtains the coefficient matrix A by calculating the product of the matrix I and the generalized inverse matrix of the transformation matrix D as shown in the following equation (6).

ステップS404では、視差算出部304は、係数行列Aの各要素をN乗(Nは正の偶数)して各係数の符号を正にすることで、入力画像の明暗や色の変化の影響を低減させる。Nの大きさによって各係数の重みのバランスを調整することができる。また、係数行列Aの各列のベクトルの大きさは、入力画像の明暗の大きさによって影響を受ける。それは、参照パターンは視差だけでなく明暗も表しており、入力画像の明暗が変われば、それに合わせて係数の大きさも変える必要があるからである。このため、係数行列Aの各列を正規化して列ベクトルの大きさを一定の値に揃えた行列Bを求めることによって、入力画像の明暗の影響を低減させ、視差の推定精度を向上させることができる。   In step S404, the parallax calculation unit 304 makes the sign of each coefficient positive by making each element of the coefficient matrix A to the Nth power (N is a positive even number), thereby affecting the influence of the change in brightness or color of the input image. Reduce. The balance of the weights of the coefficients can be adjusted according to the magnitude of N. Further, the magnitude of the vector of each column of the coefficient matrix A is affected by the magnitude of the brightness of the input image. This is because the reference pattern represents not only parallax but also light and dark, and if the light and darkness of the input image changes, it is necessary to change the coefficient size accordingly. For this reason, normalizing each column of the coefficient matrix A to obtain a matrix B in which the size of the column vector is set to a constant value, thereby reducing the influence of the contrast of the input image and improving the estimation accuracy of the parallax. Can do.

ステップS405では、視差算出部304は、以下の式(7)に示すように参照視差群を表す行ベクトルdに行列B(つまりは係数群)を乗じることにより、各組の入力画像の視差を表す行ベクトルPを求める。   In step S405, the parallax calculation unit 304 multiplies the row vector d representing the reference parallax group by the matrix B (that is, the coefficient group) as shown in the following equation (7), thereby calculating the parallax of each set of input images. A representing row vector P is obtained.

ここで求めた視差Pを入力画像の位置に応じて並べ替えることで、第m層の階層画像のうち視差算出領域全体の視差マップを求めることができる。   By rearranging the calculated parallax P according to the position of the input image, a parallax map of the entire parallax calculation area in the m-th layer image can be obtained.

ステップS406では、視差算出部304は、今回のルーチンでステップS401からステップS405までの処理を行った第m層の階層画像が第n層の階層画像か否か(つまりはm=nか否か)を判定する。m=nの場合は、撮像画像の視差マップとして第n層の階層画像の視差マップを出力する。   In step S406, the parallax calculation unit 304 determines whether or not the m-th layer image obtained by performing the processing from step S401 to step S405 in the current routine is the n-th layer image (that is, whether m = n). ). When m = n, the parallax map of the nth layer image is output as the parallax map of the captured image.

一方、m<nの場合は、視差算出部304は、記憶部302に第m層の階層画像と縮小率Mとを記憶し、ステップS407においてm=m+1としてステップS401からS405を繰り返す。このようにして全ての階層の階層画像の視差(マップ)を変換行列を用いた行列演算で求めることで、視差を算出する際の計算負荷を軽減させることができる。   On the other hand, when m <n, the parallax calculation unit 304 stores the m-th layer image and the reduction ratio M in the storage unit 302, and repeats steps S401 to S405 with m = m + 1 in step S407. Thus, by obtaining the parallax (map) of the hierarchical images of all the hierarchies by matrix calculation using the transformation matrix, it is possible to reduce the calculation load when calculating the parallax.

本実施例によれば、一組の入力画像の視差を算出する際の計算負荷を軽減させながら、大きい視差を正確に算出することが可能な画像処理システムを実現することができる。
(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
According to the present embodiment, it is possible to realize an image processing system capable of accurately calculating a large parallax while reducing a calculation load when calculating a parallax of a set of input images.
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

以上説明した各実施例は代表的な例にすぎず、本発明の実施に際しては、各実施例に対して種々の変形や変更が可能である。   Each embodiment described above is only a representative example, and various modifications and changes can be made to each embodiment in carrying out the present invention.

100,300 撮像装置
102 画像処置部
102b 視差画像取得部
102c,304 視差算出部
301 画像処理装置
303 階層画像生成部
100, 300 Imaging device 102 Image treatment unit 102b Parallax image acquisition unit 102c, 304 Parallax calculation unit 301 Image processing device 303 Hierarchical image generation unit

Claims (11)

互いに異なる複数の視点からの撮像により生成された撮像画像データから取得可能な視差画像データに含まれる第1の視差を算出する画像処理装置であって、
前記撮像画像データに対して縮小処理を行うことにより縮小画像データを生成する縮小手段と、
前記縮小画像データに含まれる第2の視差を算出し、該第2の視差と前記縮小処理における前記撮像画像データに対する前記縮小画像データの縮小率とを用いて前記撮像画像データから前記視差画像データを取得する取得手段と、
互いに異なる視差に対応する複数の参照パターンデータを用いて前記視差画像データを表すために該複数の参照パターンデータのそれぞれに重みを付ける複数の第1の係数を算出し、前記複数の参照パターンデータのそれぞれに対応する視差と前記複数の第1の係数とを用いて前記視差画像データに含まれる前記第1の視差を算出する算出手段とを有することを特徴とする画像処理装置。
An image processing apparatus that calculates a first parallax included in parallax image data that can be acquired from captured image data generated by imaging from a plurality of different viewpoints,
Reduction means for generating reduced image data by performing reduction processing on the captured image data;
The parallax image data is calculated from the captured image data by calculating a second parallax included in the reduced image data and using the second parallax and a reduction rate of the reduced image data with respect to the captured image data in the reduction process. Obtaining means for obtaining
In order to represent the parallax image data using a plurality of reference pattern data corresponding to different parallaxes, a plurality of first coefficients for weighting each of the plurality of reference pattern data are calculated, and the plurality of reference pattern data An image processing apparatus comprising: a calculation unit that calculates the first parallax included in the parallax image data using a parallax corresponding to each of the first parallax and the plurality of first coefficients.
前記取得手段は、前記第2の視差と前記縮小率とを用いて、前記撮像画像データのうち前記視差画像データを取得する領域を設定することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the acquisition unit sets an area for acquiring the parallax image data in the captured image data using the second parallax and the reduction ratio. . 前記縮小手段は、前記撮像画像データに対する前記縮小率が互い異なる複数の前記視差画像データを生成し、
前記取得手段は、前記複数の視差画像データのうち前記縮小率がより大きい視差画像データにおいて取得した前記視差画像データを用いて前記縮小率がより小さい視差画像データの視差を順次算出し、前記縮小率が最も小さい前記視差画像データから取得した前記第2の視差と該最も小さい縮小率とを用いて前記撮像画像データから前記視差画像データを取得することを特徴とする請求項1または2に記載の画像処理装置。
The reduction means generates a plurality of parallax image data having different reduction ratios with respect to the captured image data,
The acquisition means sequentially calculates the parallax of the parallax image data having a smaller reduction ratio using the parallax image data acquired in the parallax image data having a higher reduction ratio among the plurality of parallax image data, and the reduction The parallax image data is acquired from the captured image data using the second parallax acquired from the parallax image data having the smallest rate and the smallest reduction rate. Image processing apparatus.
前記縮小手段は、前記縮小率を、前記第1の視差の想定範囲に基づいて設定することを特徴とする請求項1から3のいずれか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the reduction unit sets the reduction ratio based on an assumed range of the first parallax. 前記想定範囲における前記第1の視差の最大想定値と最小想定値をそれぞれde,maxとde,minとし、前記複数の参照パターンデータのそれぞれに対応する視差の最大値と最小値をそれぞれdmaxとdminとするとき、前記縮小率Mが、

なる条件を満足することを特徴とする請求項4に記載の画像処理装置。
The maximum assumed value and the minimum assumed value of the first parallax in the assumed range are set to de, max and de , min , respectively, and the maximum value and the minimum value of the parallax corresponding to each of the plurality of reference pattern data are respectively set. When d max and d min , the reduction ratio M is

The image processing apparatus according to claim 4, wherein the following condition is satisfied.
前記縮小手段は、前記想定範囲または前記最大および最小想定値は、前記撮像を行った撮像装置の構成に応じて設定することを特徴とする請求項5に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein the reduction unit sets the assumed range or the maximum and minimum assumed values according to a configuration of an imaging apparatus that has performed the imaging. 前記撮像装置の構成は、前記複数の視点の数、撮像素子の画素ピッチ、撮像光学系の焦点距離、前記複数の視点の配置、F値およびフォーカス位置のうち少なくとも1つを含むことを特徴とすることを特徴とする請求項6に記載の画像処理装置。   The configuration of the imaging apparatus includes at least one of the number of the plurality of viewpoints, the pixel pitch of the imaging element, the focal length of the imaging optical system, the arrangement of the plurality of viewpoints, the F value, and the focus position. The image processing apparatus according to claim 6. 前記縮小手段は、前記参照パターンデータを用いて前記縮小画像データを表すために該複数の参照パターンデータのそれぞれに重みを付ける複数の第2の係数を算出し、前記複数の参照パターンデータのそれぞれに対応する視差と前記複数の第2の係数とを用いて前記第2の視差を算出することを特徴とする請求項1から7のいずれか一項に記載の画像処理装置。   The reduction means calculates a plurality of second coefficients that weight each of the plurality of reference pattern data to represent the reduced image data using the reference pattern data, and each of the plurality of reference pattern data The image processing apparatus according to claim 1, wherein the second parallax is calculated by using a parallax corresponding to the second parallax and the plurality of second coefficients. 互いに異なる複数の視点からの撮像を行う撮像部と、
請求項1から8のいずれか一項に記載の画像処理装置とを有することを特徴とする撮像装置。
An imaging unit that performs imaging from a plurality of different viewpoints;
An image pickup apparatus comprising: the image processing apparatus according to claim 1.
互いに異なる複数の視点からの撮像により生成された撮像画像データから取得可能な視差画像データに含まれる視差を算出する画像処理方法であって、
前記撮像画像データに対して縮小処理を行うことにより縮小画像データを生成するステップと、
前記縮小画像データに含まれる第2の視差を算出し、該第2の視差と前記縮小処理における前記撮像画像データに対する前記縮小画像データの縮小率とを用いて前記撮像画像データから前記視差画像データを取得するステップと、
互いに異なる視差に対応する複数の参照パターンデータを用いて前記視差画像データを表すために該複数の参照パターンデータのそれぞれに重みを付ける複数の第1の係数を算出し、前記複数の参照パターンデータのそれぞれに対応する視差と前記複数の第1の係数とを用いて前記視差画像データに含まれる前記第1の視差を算出するステップとを有することを特徴とする画像処理方法。
An image processing method for calculating parallax included in parallax image data obtainable from captured image data generated by imaging from a plurality of different viewpoints,
Generating reduced image data by performing a reduction process on the captured image data;
The parallax image data is calculated from the captured image data by calculating a second parallax included in the reduced image data and using the second parallax and a reduction rate of the reduced image data with respect to the captured image data in the reduction process. Step to get the
In order to represent the parallax image data using a plurality of reference pattern data corresponding to different parallaxes, a plurality of first coefficients for weighting each of the plurality of reference pattern data are calculated, and the plurality of reference pattern data And calculating a first parallax included in the parallax image data using a parallax corresponding to each of the first parallax and the plurality of first coefficients.
コンピュータに、互いに異なる複数の視点からの撮像により生成された撮像画像データから取得可能な視差画像データに含まれる視差を算出する画像処理を実行させるコンピュータプログラムであって、
前記コンピュータに、
前記撮像画像データに対して縮小処理を行わせて縮小画像データを生成させ、
前記縮小画像データに含まれる第2の視差を算出させ、
該第2の視差と前記縮小処理における前記撮像画像データに対する前記縮小画像データの縮小率とを用いて前記撮像画像データから前記視差画像データを取得させ、
互いに異なる視差に対応する複数の参照パターンデータを用いて前記視差画像データを表すために該複数の参照パターンデータのそれぞれに重みを付ける複数の第1の係数を算出させ、
前記複数の参照パターンデータのそれぞれに対応する視差と前記複数の第1の係数とを用いて前記視差画像データに含まれる前記第1の視差を算出させることを特徴とする画像処理プログラム。
A computer program for causing a computer to execute image processing for calculating parallax included in parallax image data that can be acquired from captured image data generated by imaging from a plurality of different viewpoints,
In the computer,
Causing the captured image data to be reduced to generate reduced image data;
Calculating a second parallax included in the reduced image data;
The parallax image data is acquired from the captured image data using the second parallax and the reduction ratio of the reduced image data with respect to the captured image data in the reduction processing,
Calculating a plurality of first coefficients that weight each of the plurality of reference pattern data in order to represent the parallax image data using a plurality of reference pattern data corresponding to different parallaxes;
An image processing program that causes the first parallax included in the parallax image data to be calculated using parallax corresponding to each of the plurality of reference pattern data and the plurality of first coefficients.
JP2017028513A 2017-02-17 2017-02-17 Image processing apparatus, imaging apparatus, image processing method, and image processing program Abandoned JP2018133064A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017028513A JP2018133064A (en) 2017-02-17 2017-02-17 Image processing apparatus, imaging apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017028513A JP2018133064A (en) 2017-02-17 2017-02-17 Image processing apparatus, imaging apparatus, image processing method, and image processing program

Publications (1)

Publication Number Publication Date
JP2018133064A true JP2018133064A (en) 2018-08-23

Family

ID=63249719

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017028513A Abandoned JP2018133064A (en) 2017-02-17 2017-02-17 Image processing apparatus, imaging apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP2018133064A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112602117A (en) * 2019-03-14 2021-04-02 欧姆龙株式会社 Image processing apparatus and three-dimensional measurement system
WO2022118442A1 (en) * 2020-12-03 2022-06-09 日本電信電話株式会社 Parallax learning device, merge data generation device, parallax learning method, merge data generation method, and parallax learning program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112602117A (en) * 2019-03-14 2021-04-02 欧姆龙株式会社 Image processing apparatus and three-dimensional measurement system
WO2022118442A1 (en) * 2020-12-03 2022-06-09 日本電信電話株式会社 Parallax learning device, merge data generation device, parallax learning method, merge data generation method, and parallax learning program

Similar Documents

Publication Publication Date Title
EP3516625B1 (en) A device and method for obtaining distance information from views
US11663691B2 (en) Method and apparatus for restoring image
CN106952341A (en) The underwater scene three-dimensional point cloud method for reconstructing and its system of a kind of view-based access control model
JP2013061850A (en) Image processing apparatus and image processing method for noise reduction
JP2020036310A (en) Image processing method, image processing apparatus, imaging apparatus, lens device, program, storage medium, and image processing system
US11967096B2 (en) Methods and apparatuses of depth estimation from focus information
JP6598473B2 (en) Imaging apparatus and image processing apparatus
JP2018133064A (en) Image processing apparatus, imaging apparatus, image processing method, and image processing program
US11790550B2 (en) Learnable cost volume for determining pixel correspondence
US20230245277A1 (en) Image restoration method and device
JP2018081378A (en) Image processing apparatus, imaging device, image processing method, and image processing program
JP2020030569A (en) Image processing method, image processing device, imaging device, lens device, program, and storage medium
EP3194886A1 (en) Positional shift amount calculation apparatus and imaging apparatus
US20190260925A1 (en) Image processing device, image processing method, and program
JP7009219B2 (en) Image processing method, image processing device, image pickup device, image processing program, and storage medium
CN113808070A (en) Binocular digital speckle image related parallax measurement method
JP6768431B2 (en) Image generator and program
US20230060314A1 (en) Method and apparatus with image processing
WO2016042721A1 (en) Positional shift amount calculation apparatus and imaging apparatus
CN116112656A (en) Method for acquiring point cloud image
Riou et al. A four-lens based plenoptic camera for depth measurements
CN115086628A (en) Learning method and image processing apparatus
JP2014016687A (en) Image processing apparatus, image processing method, and program
Louchet et al. Single-lens low-disparity stereo using microlenses
JP2018026619A (en) Imaging device and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200204

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20200727