JP2019207185A - Image processing device, and imaging device and method - Google Patents

Image processing device, and imaging device and method Download PDF

Info

Publication number
JP2019207185A
JP2019207185A JP2018103349A JP2018103349A JP2019207185A JP 2019207185 A JP2019207185 A JP 2019207185A JP 2018103349 A JP2018103349 A JP 2018103349A JP 2018103349 A JP2018103349 A JP 2018103349A JP 2019207185 A JP2019207185 A JP 2019207185A
Authority
JP
Japan
Prior art keywords
image
blur
distance
sensor
subject
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018103349A
Other languages
Japanese (ja)
Other versions
JP6847891B2 (en
Inventor
貴之 佐々木
Takayuki Sasaki
貴之 佐々木
三島 直
Sunao Mishima
直 三島
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2018103349A priority Critical patent/JP6847891B2/en
Publication of JP2019207185A publication Critical patent/JP2019207185A/en
Application granted granted Critical
Publication of JP6847891B2 publication Critical patent/JP6847891B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To provide an image processing device, and an imaging device and method capable of acquiring highly accurate distance information.SOLUTION: An image processing device 100 includes acquisition means 110 and calculation means 120. The acquisition means acquires a second image of a first color component in which a blur function included in a first image affected by the aberration of an optical system is represented in non-point symmetry, and a third image of a second color component different from the first color component. The calculation means calculates a distance to a subject included in the first image according to a correlation between a plurality of fourth images obtained by adding a plurality of different blurs to the second image and the third image. The correlation is calculated on the basis of the aberration.SELECTED DRAWING: Figure 4

Description

本発明の実施形態は、画像処理装置、撮像装置及び方法に関する。   Embodiments described herein relate generally to an image processing apparatus, an imaging apparatus, and a method.

例えばステレオカメラと称される2つのカメラで被写体を異なる方向から撮像することによって、当該被写体までの距離情報を取得することが知られている。   For example, it is known to acquire distance information to a subject by imaging the subject from different directions with two cameras called stereo cameras.

また、近年では、1つのカメラで被写体を撮像した画像から、当該被写体までの距離情報を取得する技術が提案されている。   In recent years, a technique has been proposed in which distance information to an object is acquired from an image obtained by imaging the object with a single camera.

特開2014−026051号公報JP 2014-026051 A

ところで、上記した被写体までの距離情報の精度は、レンズの収差(光学系における理想的な結像からのずれ)に起因するぼけや色ずれにより低下する場合がある。   Incidentally, the accuracy of the distance information to the subject described above may be lowered due to blur or color shift caused by lens aberration (deviation from ideal image formation in the optical system).

そこで、本発明が解決しようとする課題は、精度の高い距離情報を得ることが可能な画像処理装置、撮像装置及び方法を提供することにある。   Therefore, the problem to be solved by the present invention is to provide an image processing device, an imaging device and a method capable of obtaining highly accurate distance information.

実施形態に係る画像処理装置は、取得手段と、算出手段とを具備する。前記取得手段は、光学系の収差の影響を受けた第1画像に含まれる、ぼけ関数が非点対称に表された第1色成分の第2画像と、前記第1色成分とは異なる第2色成分の第3画像とを取得する。前記算出手段は、前記第2画像に対して複数の異なるぼけを付加して得られる複数の第4画像と、前記第3画像との相関に応じて、前記第1画像に含まれる被写体までの距離を算出する。前記相関は、前記収差に基づいて計算される。   The image processing apparatus according to the embodiment includes an acquisition unit and a calculation unit. The acquisition means includes a second image of the first color component in which the blur function is expressed asymptotically included in the first image affected by the aberration of the optical system, and a second image different from the first color component. A third image of two color components is acquired. The calculation means is configured to determine a subject included in the first image according to a correlation between a plurality of fourth images obtained by adding a plurality of different blurs to the second image and the third image. Calculate the distance. The correlation is calculated based on the aberration.

実施形態に係る撮像装置のハードウェア構成の一例を示す図。1 is a diagram illustrating an example of a hardware configuration of an imaging apparatus according to an embodiment. フィルタの一例について説明するための図。The figure for demonstrating an example of a filter. 第1フィルタ領域及び第2フィルタ領域の透過率特性の一例を示す図。The figure which shows an example of the transmittance | permeability characteristic of a 1st filter area | region and a 2nd filter area | region. 撮像装置の機能構成の一例を示す図。2 is a diagram illustrating an example of a functional configuration of an imaging device. FIG. 撮像装置の処理手順の一例を示すフローチャート。6 is a flowchart illustrating an example of a processing procedure of the imaging apparatus. 被写体までの距離と画像において生じるぼけ形状との関係を説明するための図。The figure for demonstrating the relationship between the distance to a to-be-photographed object and the blur shape which arises in an image. 対象画像のぼけ形状の大きさが距離に応じて変化することを示す図。The figure which shows that the magnitude | size of the blur shape of a target image changes according to distance. 基準画像のぼけ形状の大きさが距離に応じて変化することを示す図。The figure which shows that the magnitude | size of the blur shape of a reference | standard image changes according to distance. ぼけ補正カーネルの一例を示す図。The figure which shows an example of a blur correction | amendment kernel. 像面湾曲の原理について説明するための図。The figure for demonstrating the principle of a curvature of field. 像面湾曲の原理について説明するための図。The figure for demonstrating the principle of a curvature of field. 像面湾曲によって生じる収差を補正していない場合の指標値の分布の一例を示す図。The figure which shows an example of distribution of the index value in case the aberration which arises by curvature of field is not correct | amended. 像面湾曲によって生じる収差を補正した場合の指標値の分布の一例を示す図。The figure which shows an example of distribution of the index value at the time of correct | amending the aberration which arises by a curvature of field. 第2の実施形態に係る撮像装置の処理手順の一例を示すフローチャート。9 is a flowchart illustrating an example of a processing procedure of the imaging apparatus according to the second embodiment. 第3の実施形態に係るフィルタの一例について説明するための図。The figure for demonstrating an example of the filter which concerns on 3rd Embodiment. 第1フィルタ領域及び第2フィルタ領域の透過率特性の例を示す図。The figure which shows the example of the transmittance | permeability characteristic of a 1st filter area | region and a 2nd filter area | region. 撮像装置の処理手順の一例を示すフローチャート。6 is a flowchart illustrating an example of a processing procedure of the imaging apparatus. 像面湾曲によって生じる収差を補正していない場合の指標値の分布の一例を示す図。The figure which shows an example of distribution of the index value in case the aberration which arises by curvature of field is not correct | amended. 像面湾曲によって生じる収差を補正した場合の指標値の分布の一例を示す図。The figure which shows an example of distribution of the index value at the time of correct | amending the aberration which arises by a curvature of field. 第4の実施形態に係る撮像装置の処理手順の一例を示すフローチャート。10 is a flowchart illustrating an example of a processing procedure of an imaging apparatus according to a fourth embodiment. 撮像装置を備える移動体の構成の一例を示すブロック図。FIG. 11 is a block diagram illustrating an example of a structure of a moving object including an imaging device. 撮像装置を備える自動車の外観の一例を示す斜視図。The perspective view which shows an example of the external appearance of a motor vehicle provided with an imaging device. 撮像装置を備えるドローンの外観の一例を示す斜視図。The perspective view which shows an example of the external appearance of a drone provided with an imaging device. 撮像装置を備えるロボットの外観の一例を示す斜視図。The perspective view which shows an example of the external appearance of a robot provided with an imaging device. 撮像装置を備えるロボットアームの外観の一例を示す斜視図。The perspective view which shows an example of the external appearance of a robot arm provided with an imaging device.

以下、図面を参照して、各実施形態について説明する。
(第1の実施形態)
まず、第1の実施形態について説明する。図1は、第1の実施形態に係る撮像装置のハードウェア構成を示すブロック図である。
Hereinafter, each embodiment will be described with reference to the drawings.
(First embodiment)
First, the first embodiment will be described. FIG. 1 is a block diagram illustrating a hardware configuration of the imaging apparatus according to the first embodiment.

図1に示すように、撮像装置100は、フィルタ10と、レンズ20と、イメージセンサ30と、CPU(Central Processing Unit)40と、メモリ50と、通信I/F60と、ディスプレイ70と、メモリカードスロット80とを有する。   As shown in FIG. 1, the imaging apparatus 100 includes a filter 10, a lens 20, an image sensor 30, a CPU (Central Processing Unit) 40, a memory 50, a communication I / F 60, a display 70, and a memory card. And a slot 80.

イメージセンサ30、CPU40、メモリ50、通信I/F60、ディスプレイ70及びメモリカードスロット80は、バスにより接続される。   The image sensor 30, CPU 40, memory 50, communication I / F 60, display 70, and memory card slot 80 are connected by a bus.

図1に示す例において、フィルタ10に向かう矢印は、光の入射を表す。フィルタ10は、撮像装置100の光学系に設置される。なお、撮像装置100の光学系は、レンズ20及びイメージセンサ30等から構成される。すなわち、フィルタ10は、レンズ20の内部や撮像装置100の開口部に設置されてもよいし、レンズ20とイメージセンサ30との間に設置されてもよい。   In the example shown in FIG. 1, the arrow toward the filter 10 represents the incidence of light. The filter 10 is installed in the optical system of the imaging device 100. Note that the optical system of the imaging apparatus 100 includes the lens 20, the image sensor 30, and the like. That is, the filter 10 may be installed in the lens 20 or in the opening of the imaging device 100, or may be installed between the lens 20 and the image sensor 30.

フィルタ10は被写体で反射した光を入射し、当該入射した光は、フィルタ10及びレンズ20を透過する。フィルタ10及びレンズ20を透過した光は、イメージセンサ30に到達し、イメージセンサ30によって受光される。イメージセンサ30は、受光した光を電気信号に変換(光電変換)することによって、複数の画素から構成される画像を生成する。以下の説明においては、イメージセンサ30によって生成される画像を便宜的に撮像画像と称する。   The filter 10 receives light reflected by the subject, and the incident light passes through the filter 10 and the lens 20. The light transmitted through the filter 10 and the lens 20 reaches the image sensor 30 and is received by the image sensor 30. The image sensor 30 generates an image composed of a plurality of pixels by converting the received light into an electrical signal (photoelectric conversion). In the following description, an image generated by the image sensor 30 is referred to as a captured image for convenience.

なお、イメージセンサ30は、例えばCCD(Charge Coupled Device)イメージセンサ及びCMOS(Complementary Metal Oxide Semiconductor)イメージセンサ等により実現される。イメージセンサ30は、例えば赤色(R)の波長帯域の光を検出するセンサ(Rセンサ)、緑色(G)の波長帯域の光を検出するセンサ(Gセンサ)及び青色(B)の波長帯域の光を検出するセンサ(Bセンサ)を有し、それぞれのセンサにより対応する波長帯域の光を受光して、各波長帯域(色成分)に対応するセンサ画像(R画像、G画像及びB画像)を生成する。すなわち、上記した撮像画像には、R画像、G画像及びB画像の各センサ画像が含まれる。   The image sensor 30 is realized by, for example, a CCD (Charge Coupled Device) image sensor, a CMOS (Complementary Metal Oxide Semiconductor) image sensor, or the like. The image sensor 30 is, for example, a sensor (R sensor) that detects light in the red (R) wavelength band, a sensor (G sensor) that detects light in the green (G) wavelength band, and a blue (B) wavelength band. A sensor image (R image, G image, and B image) corresponding to each wavelength band (color component) is received by receiving light in the corresponding wavelength band by each sensor. Is generated. That is, the above-described captured image includes sensor images of R image, G image, and B image.

CPU40は、撮像装置100の動作を統括的に制御するハードウェアプロセッサである。具体的には、CPU40は、メモリ50等に記憶されたプログラムを実行し、撮像装置100全体の動作を制御する。   The CPU 40 is a hardware processor that comprehensively controls the operation of the imaging apparatus 100. Specifically, the CPU 40 executes a program stored in the memory 50 or the like and controls the operation of the entire imaging apparatus 100.

メモリ50は、HDD(Hard Disk Drive)やNAND型フラッシュメモリ等の書き換え可能な不揮発性の記憶デバイスである。メモリ50は、例えば撮像装置100の制御に関するプログラムや処理に使用される各種データ等を記憶する。   The memory 50 is a rewritable nonvolatile storage device such as an HDD (Hard Disk Drive) or a NAND flash memory. The memory 50 stores, for example, programs related to control of the imaging apparatus 100 and various data used for processing.

通信I/F60は、例えば外部機器との通信や、ユーザによる各種指示の入力を制御するインタフェースである。ディスプレイ70は、液晶ディスプレイやタッチパネル等を含む。メモリカードスロット80は、例えばSDメモリカード及びSDHCメモリカード等の可搬記憶媒体を挿入して利用することができるように構成されている。メモリカードスロット80に記憶媒体が挿入された場合、当該記憶媒体に対するデータの書き込み及び読み出しが実行され得る。   The communication I / F 60 is an interface that controls communication with an external device and input of various instructions by a user, for example. The display 70 includes a liquid crystal display, a touch panel, and the like. The memory card slot 80 is configured such that a portable storage medium such as an SD memory card or an SDHC memory card can be inserted and used. When a storage medium is inserted into the memory card slot 80, data can be written to and read from the storage medium.

次に、図2を参照して、フィルタ10の一例について説明する。フィルタ10は、カラーフィルタであり、特定の波長帯域の光を透過する。図2に示す例では、フィルタ10は、第1フィルタ領域11及び第2フィルタ領域12を含む。   Next, an example of the filter 10 will be described with reference to FIG. The filter 10 is a color filter and transmits light in a specific wavelength band. In the example shown in FIG. 2, the filter 10 includes a first filter region 11 and a second filter region 12.

図2に示すように、フィルタ10の中心は撮像装置100の光学中心と一致している。第1フィルタ領域11及び第2フィルタ領域12は、それぞれ光学中心に対して非点対称である形状を有している。換言すれば、第1フィルタ領域11及び第2フィルタ領域12は、光学中心であるフィルタ領域の中心点(重心位置の点)を対称点とするときに、点対称形にならないように構成される。なお、第1フィルタ領域11及び第2フィルタ領域12は、重複せず、かつ、フィルタ10の全領域を構成している。   As shown in FIG. 2, the center of the filter 10 coincides with the optical center of the imaging device 100. The first filter region 11 and the second filter region 12 each have a shape that is asymmetric with respect to the optical center. In other words, the first filter region 11 and the second filter region 12 are configured not to be point-symmetric when the center point (the center of gravity position) of the filter region that is the optical center is a symmetric point. . Note that the first filter region 11 and the second filter region 12 do not overlap and constitute the entire region of the filter 10.

図2に示す例では、第1フィルタ領域11及び第2フィルタ領域12は、それぞれ円形のフィルタ10が光学中心を通る線分で分割された半円の形状を有している。また、第1フィルタ領域11は例えばイエロー(Y)のフィルタ領域であり、第2フィルタ領域12は例えばシアン(C)のフィルタ領域である。この場合、第1フィルタ領域11は、赤色の波長帯域の光と緑色の波長帯域の光とを透過し、青色の波長帯域の光を減衰させる。また、第2フィルタ領域12は、緑色の波長帯域の光と青色の波長帯域の光とを透過し、赤色の波長帯域の光を減衰させる。   In the example shown in FIG. 2, each of the first filter region 11 and the second filter region 12 has a semicircular shape in which the circular filter 10 is divided by a line segment passing through the optical center. The first filter region 11 is, for example, a yellow (Y) filter region, and the second filter region 12 is, for example, a cyan (C) filter region. In this case, the first filter region 11 transmits light in the red wavelength band and light in the green wavelength band, and attenuates light in the blue wavelength band. The second filter region 12 transmits light in the green wavelength band and light in the blue wavelength band, and attenuates light in the red wavelength band.

フィルタ10は、2以上のカラーフィルタ領域を有する。カラーフィルタ領域の各々は、撮像装置100の光学中心に対して非点対称な形状である。1のカラーフィルタ領域を透過する光の波長帯域の一部と、他のカラーフィルタ領域を透過する光の波長帯域の一部は、例えば重複する。すなわち、1のカラーフィルタ領域を透過する光の波長帯域は、例えば他のカラーフィルタ領域が透過する光の波長帯域を含んでいてもよい。   The filter 10 has two or more color filter regions. Each of the color filter regions has an asymmetrical shape with respect to the optical center of the imaging apparatus 100. A part of the wavelength band of light transmitted through one color filter region and a part of the wavelength band of light transmitted through the other color filter area overlap, for example. That is, the wavelength band of light transmitted through one color filter region may include, for example, the wavelength band of light transmitted through another color filter region.

このようなフィルタ10を介して被写体が撮像された場合には、それぞれぼけ関数が異なる各波長帯域に対応するセンサ画像(R画像、G画像及びB画像)が生成される。ぼけ関数とは、点光源を被写体として撮像した像のぼけの形状を表す関数であり、点拡がり関数(PSF:Point Spread Function)とも称される。   When a subject is imaged through such a filter 10, sensor images (R image, G image, and B image) corresponding to each wavelength band having different blur functions are generated. The blur function is a function that represents the blur shape of an image captured using a point light source as a subject, and is also referred to as a point spread function (PSF).

なお、第1フィルタ領域11と第2フィルタ領域12とは、任意の波長帯域の透過率を変更するフィルタ、任意方向の偏光光を通過させる偏光フィルタまたは任意の波長帯域の集光パワーを変更するマイクロレンズであってもよい。具体的には、任意の波長帯域の透過率を変更するフィルタは、原色フィルタ(RGB)、補色フィルタ(CMY)、色補正フィルタ(CC−RGB/CMY)、赤外線または紫外線カットフィルタ、NDフィルタ、遮蔽板であってもよい。第1フィルタ領域11と第2フィルタ領域12とがマイクロレンズである場合は、レンズ20により光線の集光の分布に偏りが生じることでぼけ関数が変化する。   In addition, the 1st filter area | region 11 and the 2nd filter area | region 12 change the condensing power of the filter which changes the transmittance | permeability of arbitrary wavelength bands, the polarization filter which passes the polarized light of arbitrary directions, or arbitrary wavelengths band. A microlens may be used. Specifically, filters that change the transmittance of an arbitrary wavelength band include primary color filters (RGB), complementary color filters (CMY), color correction filters (CC-RGB / CMY), infrared or ultraviolet cut filters, ND filters, It may be a shielding plate. In the case where the first filter region 11 and the second filter region 12 are microlenses, the blur function changes due to a bias in the distribution of the condensed light rays by the lens 20.

ここで、図3は、上記した第1フィルタ領域11がイエロー(Y)のフィルタ領域であり、第2フィルタ領域12がシアン(C)のフィルタ領域である場合の当該第1フィルタ領域11及び第2フィルタ領域の透過率特性の例を示す。図3においては、上記したように第1フィルタ領域11が赤色の光と緑色の光を透過し、青色の光を減衰させることが示されている。また、図3においては、第2フィルタ領域12が緑色の光と青色の光を透過し、赤色の光を減衰させることが示されている。   Here, FIG. 3 shows the first filter region 11 and the first filter region 11 when the first filter region 11 is a yellow (Y) filter region and the second filter region 12 is a cyan (C) filter region. The example of the transmittance | permeability characteristic of 2 filter area | regions is shown. FIG. 3 shows that the first filter region 11 transmits red light and green light and attenuates blue light as described above. FIG. 3 shows that the second filter region 12 transmits green light and blue light and attenuates red light.

図4は、本実施形態に係る撮像装置100の機能構成の一例を示す。図4に示すように、撮像装置100は、撮像部110及び画像処理部120を含む。撮像部110は、撮像光学系に相当し、上述したフィルタ10、レンズ20及びイメージセンサ30を含む。   FIG. 4 shows an example of a functional configuration of the imaging apparatus 100 according to the present embodiment. As illustrated in FIG. 4, the imaging apparatus 100 includes an imaging unit 110 and an image processing unit 120. The imaging unit 110 corresponds to an imaging optical system and includes the filter 10, the lens 20, and the image sensor 30 described above.

画像処理部120は、撮像部110によって撮像された被写体を含む画像から当該被写体までの距離を算出する機能部である。本実施形態において、画像処理部120の一部または全ては、CPU40等のコンピュータにプログラムを実行させること、すなわちソフトウェアによって実現されるものとする。コンピュータに実行させるプログラムは、コンピュータ読み取り可能な記憶媒体に格納して頒布されてもよいし、ネットワークを通じて撮像装置100にダウンロードされてもよい。なお、画像処理部120の一部または全ては、IC(Integrated Circuit)等のハードウェアによって実現されもよいし、ソフトウェア及びハードウェアの組み合わせ構成として実現されてもよい。   The image processing unit 120 is a functional unit that calculates the distance from the image including the subject imaged by the imaging unit 110 to the subject. In the present embodiment, a part or all of the image processing unit 120 is realized by causing a computer such as the CPU 40 to execute a program, that is, by software. A program to be executed by a computer may be stored and distributed in a computer-readable storage medium, or may be downloaded to the imaging apparatus 100 through a network. Part or all of the image processing unit 120 may be realized by hardware such as an IC (Integrated Circuit), or may be realized as a combination configuration of software and hardware.

イメージセンサ30は、フィルタ10及びレンズ20を透過した光を光電変換し、電気信号を画像処理部120に送る。図4においてはフィルタ10とイメージセンサ30との間にレンズ20が設けられる構成が示されているが、上記したようにレンズ20とイメージセンサ30との間にフィルタ10が設けられてもよいし、レンズ20が複数ある場合には、2つのレンズの間にフィルタ10が設けられてもよい。また、フィルタ10は、レンズ20の内部に設けられていてもよいし、レンズ20の面上に設けられてもよい。すなわち、フィルタ10は、イメージセンサ30がフィルタ10を透過した光を受光して画像を生成することが可能な位置に設けられていればよい。   The image sensor 30 photoelectrically converts the light transmitted through the filter 10 and the lens 20 and sends an electric signal to the image processing unit 120. Although FIG. 4 shows a configuration in which the lens 20 is provided between the filter 10 and the image sensor 30, the filter 10 may be provided between the lens 20 and the image sensor 30 as described above. When there are a plurality of lenses 20, the filter 10 may be provided between the two lenses. The filter 10 may be provided inside the lens 20 or may be provided on the surface of the lens 20. That is, the filter 10 only needs to be provided at a position where the image sensor 30 can receive light transmitted through the filter 10 and generate an image.

イメージセンサ30は、第1センサ31、第2センサ32及び第3センサ33を含む。例えば第1センサ31は赤色の波長帯域の光を検出するRセンサであり、第2センサ32は緑色の波長帯域の光を検出するGセンサであり、第3センサ33は青色の波長帯域の光を検出するBセンサである。   The image sensor 30 includes a first sensor 31, a second sensor 32, and a third sensor 33. For example, the first sensor 31 is an R sensor that detects light in the red wavelength band, the second sensor 32 is a G sensor that detects light in the green wavelength band, and the third sensor 33 is light in the blue wavelength band. B sensor for detecting

第1センサ31、第2センサ32及び第3センサ33の各々は、検出された光に基づいてセンサ画像を生成する。具体的には、第1センサ31は、当該第1センサ31によって検出された赤色の波長帯域の光に基づいてR画像を生成する。第2センサ32は、当該第2センサ32によって検出された緑色の波長帯域の光に基づいてG画像を生成する。第3センサ33は、当該第3センサ33によって検出された青色の波長帯域の光に基づいてB画像を生成する。これにより、イメージセンサ30は、R画像、G画像及びB画像を含む撮像画像を生成することができる。   Each of the first sensor 31, the second sensor 32, and the third sensor 33 generates a sensor image based on the detected light. Specifically, the first sensor 31 generates an R image based on the light in the red wavelength band detected by the first sensor 31. The second sensor 32 generates a G image based on the light in the green wavelength band detected by the second sensor 32. The third sensor 33 generates a B image based on the light in the blue wavelength band detected by the third sensor 33. Thereby, the image sensor 30 can generate a captured image including an R image, a G image, and a B image.

ここで、第2センサ32は、上記したように第1フィルタ領域11及び第2フィルタ領域12の両方を透過した緑色の波長帯域の光を検出する。このため、第2センサ32によって生成されるG画像は、他の画像(R画像及びB画像)より明るく、ノイズの少ない画像であり、フィルタ10が設けられたことによる影響が少ない画像であるといえる。一方、第1センサ31によって生成されるR画像及び第2センサ33によって生成されるB画像は、第1フィルタ領域11及び第2フィルタ領域12の一方のフィルタ領域を透過した光から生成される画像であるため、G画像とは異なる。   Here, the second sensor 32 detects the light in the green wavelength band that has passed through both the first filter region 11 and the second filter region 12 as described above. For this reason, the G image generated by the second sensor 32 is an image that is brighter than other images (R image and B image), has less noise, and is less affected by the provision of the filter 10. I can say that. On the other hand, the R image generated by the first sensor 31 and the B image generated by the second sensor 33 are images generated from light transmitted through one of the first filter region 11 and the second filter region 12. Therefore, it is different from the G image.

上記したように第1センサ31、第2センサ32及び第3センサ33によって生成されたR画像、G画像及びB画像を含む撮像画像(イメージセンサ30によって生成された画像)は、イメージセンサ30から画像処理部120に対して出力される。   As described above, a captured image (an image generated by the image sensor 30) including the R image, the G image, and the B image generated by the first sensor 31, the second sensor 32, and the third sensor 33 is obtained from the image sensor 30. It is output to the image processing unit 120.

図4に示すように、画像処理部120は、センサ制御部121、距離算出部122及び収差情報格納部123を含む。   As shown in FIG. 4, the image processing unit 120 includes a sensor control unit 121, a distance calculation unit 122, and an aberration information storage unit 123.

センサ制御部121は、イメージセンサ30を制御し、当該イメージセンサ30から出力された撮像画像(R画像、G画像及びB画像)を取得する。なお、センサ制御部121によって取得される撮像画像に含まれるR画像、G画像及びB画像は、それぞれぼけ関数が異なる画像であり、例えばぼけ関数が非点対称に変更された対象画像及びぼけ関数が点対称である基準画像を含む。   The sensor control unit 121 controls the image sensor 30 and acquires captured images (R image, G image, and B image) output from the image sensor 30. Note that the R image, the G image, and the B image included in the captured image acquired by the sensor control unit 121 are images having different blur functions, for example, the target image and the blur function in which the blur function is changed to be astigmatic. Includes a reference image that is point-symmetric.

距離算出部122は、後述するぼけ補正カーネルに基づいて異なるぼけを付加した対象画像と基準画像との相関に応じて、撮像画像に含まれる被写体までの距離を算出する(つまり、被写体までの距離情報を取得する)。   The distance calculation unit 122 calculates the distance to the subject included in the captured image according to the correlation between the target image to which different blur is added based on the blur correction kernel described later and the reference image (that is, the distance to the subject). Get information).

ここで、撮像画像(R画像、G画像及びB画像)は、上記した撮像光学系の収差の影響を受けている。このため、本実施形態において、被写体までの距離は、撮像光学系の収差の影響を考慮して算出されるものとする。   Here, the captured images (R image, G image, and B image) are affected by the aberration of the imaging optical system described above. For this reason, in this embodiment, the distance to the subject is calculated in consideration of the influence of the aberration of the imaging optical system.

収差情報格納部123には、撮像光学系の収差を補正しながら被写体までの距離を算出する際に用いられる情報(以下、収差情報と表記)が予め格納されている。   The aberration information storage unit 123 stores in advance information used when calculating the distance to the subject while correcting the aberration of the imaging optical system (hereinafter referred to as aberration information).

なお、図4においては、画像処理部120が撮像装置100に含まれるものとして説明したが、画像処理部120は、撮像装置100とは別個の装置(画像処理装置)として実現されても構わない。   In FIG. 4, the image processing unit 120 is described as being included in the imaging device 100, but the image processing unit 120 may be realized as a device (image processing device) separate from the imaging device 100. .

以下、図5のフローチャートを参照して、本実施形態に係る撮像装置100の処理手順の一例について説明する。なお、図5に示す処理は、撮像装置100に含まれる画像処理部120によって実行される。   Hereinafter, an example of a processing procedure of the imaging apparatus 100 according to the present embodiment will be described with reference to the flowchart of FIG. 5 is executed by the image processing unit 120 included in the imaging apparatus 100.

ここで、撮像装置100において例えば被写体が撮像された場合、上記したように当該被写体を含む撮像画像がイメージセンサ30から出力される。   Here, for example, when a subject is imaged by the imaging apparatus 100, a captured image including the subject is output from the image sensor 30 as described above.

この場合、センサ制御部121は、上記したイメージセンサ30から出力された撮像画像を取得する(ステップS1)。なお、ステップS1において取得された撮像画像は、上記した第1センサ31、第2センサ32及び第3センサ33の各々によって生成されたセンサ画像(R画像、G画像及びB画像)を含む。このセンサ画像のうちの少なくとも1つは、フィルタ10によってぼけ関数が非点対称に変更されている。すなわち、フィルタ10のフィルタ領域(第1フィルタ領域11及び第2フィルタ領域12)は、イメージセンサ30で受光される光のうち、任意の光を減衰させることや、光線の集光の分布に偏りを生じさせることで、センサ画像のぼけ関数を変更することができる。なお、図2において説明したフィルタ10の例では、B画像及びR画像がフィルタ10によってぼけ関数が非点対称に変更された画像に相当する。   In this case, the sensor control unit 121 acquires the captured image output from the image sensor 30 (step S1). Note that the captured image acquired in step S1 includes sensor images (R image, G image, and B image) generated by each of the first sensor 31, the second sensor 32, and the third sensor 33 described above. At least one of the sensor images has the blur function changed to asymmetry by the filter 10. That is, the filter area (the first filter area 11 and the second filter area 12) of the filter 10 attenuates arbitrary light out of the light received by the image sensor 30, and is biased toward the distribution of light collection. As a result, the blur function of the sensor image can be changed. In the example of the filter 10 described with reference to FIG. 2, the B image and the R image correspond to images in which the blur function has been changed to asymmetry by the filter 10.

次に、センサ制御部121は、ステップS1において取得された撮像画像から対象画像を取得する(ステップS2)。本実施形態において、対象画像は、例えばフィルタ10が有する第1フィルタ領域11で減衰(吸収)され、第2フィルタ領域12を透過した光を受光して生成されたセンサ画像であり、例えばB画像である。B画像は、半円形のぼけ関数を有しており、ぼけ形状は半円形状となる。   Next, the sensor control unit 121 acquires a target image from the captured image acquired in step S1 (step S2). In the present embodiment, the target image is a sensor image generated by receiving light that has been attenuated (absorbed) by the first filter region 11 of the filter 10 and transmitted through the second filter region 12, for example, a B image. It is. The B image has a semicircular blur function, and the blur shape is a semicircular shape.

以下の説明では、対象画像がB画像である場合について説明するが、対象画像は、第2フィルタ領域12で減衰され、第1フィルタ領域11を透過した光を受光して生成されたセンサ画像(R画像)であってもよい。   In the following description, the case where the target image is a B image will be described. However, the target image is attenuated by the second filter region 12 and the sensor image generated by receiving the light transmitted through the first filter region 11 ( R image).

また、センサ制御部121は、ステップS1において取得された撮像画像から基準画像を取得する(ステップS3)。本実施形態において、基準画像は、例えばフィルタ10が有する第1フィルタ領域11及び第2フィルタ領域12を透過した光を受光して生成されたセンサ画像であり、例えばG画像である。G画像は、円形のぼけ関数を有しており、ぼけ形状は円形状となる。   The sensor control unit 121 acquires a reference image from the captured image acquired in step S1 (step S3). In the present embodiment, the reference image is a sensor image generated by receiving light transmitted through the first filter region 11 and the second filter region 12 of the filter 10, for example, and is a G image, for example. The G image has a circular blur function, and the blur shape is circular.

ここで、図6を参照して、被写体までの距離と画像において生じるぼけ形状(ぼけ関数)との関係を説明する。図6の左列は、それぞれ撮像装置100を上方向(つまり、フィルタ10の分割方向に平行なY軸の正方向)から見た場合におけるレンズ20及びフィルタ10の組み合わせとイメージセンサ30と被写体との位置関係を示している。図6の中列と右列は、それぞれ左列において示している被写体を撮像したときにイメージセンサ30上に形成される対象画像(B画像)及び基準画像(G画像)のぼけ形状を表している。   Here, with reference to FIG. 6, the relationship between the distance to the subject and the blurred shape (blurring function) generated in the image will be described. The left column of FIG. 6 shows the combination of the lens 20 and the filter 10, the image sensor 30, and the subject when the imaging apparatus 100 is viewed from above (that is, the positive direction of the Y axis parallel to the dividing direction of the filter 10). The positional relationship is shown. The middle column and the right column in FIG. 6 represent blur shapes of the target image (B image) and the reference image (G image) formed on the image sensor 30 when the subject shown in the left column is imaged. Yes.

なお、以下の説明においては、撮像装置100においてピントが合う位置(以下、ピント位置と表記)から被写体までの距離を距離dと称する。なお、距離dは、ピント位置を基準(0)として、撮像装置100に対して被写体の位置がピント位置よりも遠い場合には正の値となり、撮像装置100に対して被写体の位置がピント位置よりも近い場合には負の値となるものとする。   In the following description, the distance from the focus position (hereinafter referred to as the focus position) in the imaging apparatus 100 to the subject is referred to as a distance d. The distance d is a positive value when the position of the subject is far from the focus position with respect to the imaging apparatus 100 with the focus position as the reference (0), and the position of the subject with respect to the imaging apparatus 100 is the focus position. If it is closer, the value is negative.

まず、被写体の位置がピント位置よりも遠い、つまり、距離d>0の場合を想定する。この場合、被写体にはピントが合っていないため、図6の上段に示すように、対象画像においても基準画像においてもぼけが生じる。   First, it is assumed that the position of the subject is farther than the focus position, that is, the distance d> 0. In this case, since the subject is not in focus, the target image and the reference image are blurred as shown in the upper part of FIG.

また、距離d>0の場合の対象画像のぼけ形状201aは、例えば点対称な基準画像のぼけ形状202aと比較して右側に偏った非点対称な形状となる。基準画像(G画像)のぼけ形状202aが点対称形状であるのは、フィルタ10が有する第1フィルタ領域11と第2フィルタ領域12がほぼ均等に緑色の光を透過させるためのである。一方、対象画像(B画像)のぼけ形状201aが非点対称形状(右側に偏った形状)であるのは、フィルタ10が有する第1フィルタ領域11が青色の光を減衰させ、第2フィルタ領域12が青色の光を透過させるためのである。   Further, the blur shape 201a of the target image when the distance d> 0 is, for example, an asymmetrical shape biased to the right as compared with the blur shape 202a of the point-symmetric reference image. The blur shape 202a of the reference image (G image) is point-symmetric because the first filter region 11 and the second filter region 12 of the filter 10 transmit green light almost evenly. On the other hand, the blur shape 201a of the target image (B image) is an asymmetrical shape (a shape biased to the right) because the first filter region 11 of the filter 10 attenuates blue light and the second filter region. 12 is for transmitting blue light.

本実施形態において説明するぼけ形状とは、特定の画素を含む所定の範囲において生じているぼけの形状をいう。以下の説明においても同様である。   The blur shape described in the present embodiment refers to a blur shape generated in a predetermined range including a specific pixel. The same applies to the following description.

次に、被写体の位置がピント位置に一致する、つまり、距離d=0の場合を想定する。図6の中段に示すように、距離d=0の場合には、対象画像においても基準画像においてもぼけは生じない。   Next, it is assumed that the position of the subject matches the focus position, that is, the distance d = 0. As shown in the middle part of FIG. 6, when the distance d = 0, no blur occurs in the target image and the reference image.

更に、被写体の位置がピント位置よりも近い、つまり、距離d<0の場合を想定する。この場合、図6の下段に示すように、被写体にはピントが合っていないため、対象画像においても基準画像においてもぼけが生じる。   Furthermore, it is assumed that the position of the subject is closer than the focus position, that is, the distance d <0. In this case, as shown in the lower part of FIG. 6, since the subject is not in focus, the target image and the reference image are blurred.

また、上記したように対象画像(B画像)は第2フィルタ領域12を主に透過した光(青色の光)に基づいて生成される画像であるが、距離d<0の場合の対象画像のぼけ形状201bは、図6の下段に示すように、例えば基準画像のぼけ形状202bと比較して左側に偏った形状となる。   Further, as described above, the target image (B image) is an image generated based on light (blue light) mainly transmitted through the second filter region 12, but the target image when the distance d <0 is satisfied. As shown in the lower part of FIG. 6, the blur shape 201 b is a shape that is biased to the left as compared with the blur shape 202 b of the reference image, for example.

すなわち、ぼけ形状201bは、上記したぼけ形状201aと同様に非点対称形状であり、Y軸方向に平行な直線を軸にしてぼけ形状201aを反転した形状となる。   That is, the blur shape 201b is an astigmatic shape similar to the blur shape 201a described above, and is a shape obtained by inverting the blur shape 201a about a straight line parallel to the Y-axis direction.

一方、この場合における基準画像のぼけ形状202bは、上記した基準画像のぼけ形状202aと同様の点対称形状となる。   On the other hand, the blur shape 202b of the reference image in this case is a point-symmetric shape similar to the blur shape 202a of the reference image described above.

上記したように対象画像においては、距離dに応じてぼけ形状が変化する。具体的には、対象画像のぼけ形状は、距離d>0であれば基準画像のぼけ形状の左側が欠けた半円のような形状(非点対称形状)に変化し、距離d<0であれば基準画像のぼけ形状の右側が欠けた半円のような形状(非点対称形状)に変化する。   As described above, in the target image, the blur shape changes according to the distance d. Specifically, if the distance d> 0, the blur shape of the target image changes to a semicircle shape (asymmetry shape) with the left side of the blur shape of the reference image missing, and the distance d <0. If there is, the shape of the reference image changes to a semicircular shape (asymmetry shape) with a missing right side of the blurred shape.

また、図6においては示されていないが、対象画像及び基準画像におけるぼけ形状の大きさ(幅)は、距離|d|に依存する。なお、図7は、対象画像のぼけ形状の大きさが距離|d|に応じて変化することを示している。また、図8は、基準画像のぼけ形状の大きさが距離|d|に応じて変化することを示している。すなわち、ぼけ形状の大きさは、距離|d|が大きいほど大きく(幅が広く)なる。   Although not shown in FIG. 6, the size (width) of the blurred shape in the target image and the reference image depends on the distance | d |. FIG. 7 shows that the size of the blur shape of the target image changes according to the distance | d |. FIG. 8 shows that the size of the blurred shape of the reference image changes according to the distance | d |. That is, the size of the blur shape becomes larger (wider) as the distance | d | is larger.

ここで、本実施形態においては上記したように第1フィルタ領域11及び第2フィルタ領域12を有するフィルタ10を介して光を受光することによってそれぞれぼけ関数が異なるセンサ画像が生成されるが、当該センサ画像(対象画像及び基準画像)においては当該フィルタ10に起因するぼけとは異なるレンズ収差(撮像光学系の収差)に起因するぼけ(画像劣化)が生じる場合がある。   Here, in the present embodiment, sensor images having different blur functions are generated by receiving light through the filter 10 having the first filter region 11 and the second filter region 12 as described above. In the sensor image (target image and reference image), blur (image degradation) due to lens aberration (aberration of the imaging optical system) different from blur due to the filter 10 may occur.

このようにレンズ収差の影響を受けている対象画像及び基準画像に基づいて被写体までの距離が算出されると、当該距離の算出精度が低下する可能性がある。よって、被写体までの距離の算出においては、レンズ収差の影響を除去(補正)する必要がある。なお、レンズ収差には様々なものが存在するが、本実施形態においては、例えば像面湾曲によって生じる収差を対象とする。   When the distance to the subject is calculated based on the target image and the reference image that are affected by the lens aberration in this way, the calculation accuracy of the distance may be reduced. Therefore, in calculating the distance to the subject, it is necessary to remove (correct) the influence of lens aberration. There are various lens aberrations, but in this embodiment, for example, aberrations caused by field curvature are targeted.

ところで、被写体までの距離の算出に対して直接影響しない(つまり、対象画像及び基準画像のぼけ形状に影響を与えない)収差に関しては、当該距離の算出処理の前に除去することが好ましい。被写体までの距離の算出に対して直接影響しない収差には、例えば倍率色収差及び歪曲収差が含まれる。   Incidentally, aberrations that do not directly affect the calculation of the distance to the subject (that is, do not affect the blur shapes of the target image and the reference image) are preferably removed before the distance calculation processing. Aberrations that do not directly affect the calculation of the distance to the subject include, for example, lateral chromatic aberration and distortion.

再び図5に戻ると、距離算出部122は、収差情報格納部123に格納されている収差情報に基づいて、対象画像及び基準画像における倍率色収差及び歪曲収差を補正する(ステップS4)。   Returning to FIG. 5 again, the distance calculation unit 122 corrects the lateral chromatic aberration and distortion in the target image and the reference image based on the aberration information stored in the aberration information storage unit 123 (step S4).

なお、倍率色収差とは、光の波長帯域(色成分)による屈折率の差から結像位置が異なる色収差をいう。この倍率色収差によれば、画像において像高方向の色ずれが生じる。また、歪曲収差によれば、被写体平面状の形状と像面(画像)上の形状とが相似にならないという位置ずれが生じる。   Note that lateral chromatic aberration refers to chromatic aberration in which the imaging position differs due to a difference in refractive index due to the wavelength band (color component) of light. According to this lateral chromatic aberration, a color shift in the image height direction occurs in the image. Further, according to the distortion aberration, there occurs a positional shift that the shape of the subject plane and the shape on the image plane (image) are not similar.

ここで、収差情報格納部123に格納されている収差情報には、例えば画像中の局所領域に対応する水平方向及び垂直方向の補正量(ずれ量)を保持する倍率色収差及び歪曲収差用の補正テーブル(以下、第1補正テーブルと表記)が含まれる。   Here, the aberration information stored in the aberration information storage unit 123 includes, for example, correction for lateral chromatic aberration and distortion aberration that holds horizontal and vertical correction amounts (deviation amounts) corresponding to local regions in the image. A table (hereinafter referred to as a first correction table).

ステップS4においては、このような第1補正テーブルを参照することによって、対象画像及び基準画像に対して倍率色収差により生じている色ずれ及び歪曲収差により生じている位置ずれが補正される。   In step S4, referring to such a first correction table, the color shift caused by the chromatic aberration of magnification and the positional shift caused by the distortion aberration are corrected with respect to the target image and the reference image.

本実施形態においては倍率色収差及び歪曲収差の両方を補正するものとして説明したが、収差の影響によっては、例えば倍率色収差及び歪曲収差の一方のみを補正する構成としてもよいし、倍率色収差及び歪曲収差の両方を補正しない構成としてもよい。具体的には、例えば焦点距離が小さい(画角が広い)レンズでは歪曲収差の影響が大きいのに対し、焦点距離が大きい(望遠)レンズでは歪曲収差の影響よりも倍率色収差の影響の方が大きい。このため、例えばレンズの焦点距離が予め定められた値よりも小さい場合には歪曲収差を補正する構成とし、当該レンズの焦点距離が予め定められた値よりも大きい場合には倍率色収差を補正する構成とするようにしてもよい。なお、倍率色収差または歪曲収差を補正するか否かについては、その他のレンズの特性(当該レンズの部材等)に応じて決定されてもよい。   In the present embodiment, it has been described that both the lateral chromatic aberration and the distortion aberration are corrected. However, depending on the influence of the aberration, for example, only one of the lateral chromatic aberration and the distortion aberration may be corrected, or the lateral chromatic aberration and the distortion aberration may be corrected. It is good also as a structure which does not correct | amend both. Specifically, for example, a lens having a small focal length (wide angle of view) has a large influence of distortion, whereas a lens having a large focal length (telephoto) has a larger influence of lateral chromatic aberration than the influence of distortion. large. For this reason, for example, when the focal length of the lens is smaller than a predetermined value, the distortion is corrected, and when the focal length of the lens is larger than a predetermined value, the lateral chromatic aberration is corrected. It may be configured. Whether or not to correct the lateral chromatic aberration or distortion may be determined according to other lens characteristics (such as the lens member).

ステップS4の処理が実行されると、対象画像及び基準画像(撮像画像)を構成する画素毎にステップS5以降の処理を実行する。以下、ステップS5以降の処理の対象となる画素を対象画素として説明する。以下の説明において、対象画像のぼけ形状とは、対象画像を構成する対象画素を含む所定の範囲内のぼけの形状であり、基準画像のぼけ形状とは、基準画像を構成する対象画素を含む所定の範囲内のぼけの形状であるものとする。   When the process of step S4 is executed, the process after step S5 is executed for each pixel constituting the target image and the reference image (captured image). Hereinafter, a pixel that is a target of processing in step S5 and subsequent steps will be described as a target pixel. In the following description, the blur shape of the target image is a blur shape within a predetermined range including the target pixels constituting the target image, and the blur shape of the reference image includes the target pixels constituting the reference image. It is assumed that the shape of blur is within a predetermined range.

この場合、距離算出部122は、対象画像に異なるぼけを付加することで、当該対象画像のぼけ形状を補正(変更)した補正画像を生成する(ステップS5)。   In this case, the distance calculation unit 122 generates a corrected image by correcting (changing) the blur shape of the target image by adding different blurs to the target image (step S5).

ここで、対象画像と基準画像とのぼけ形状は、上記したように撮像画像に含まれる被写体までの距離dに応じて変化する。このため、本実施形態では、撮像画像に含まれる被写体までの距離が任意の距離dであると仮定し、異なる距離d毎に作成した複数のぼけ補正カーネル(ぼけ変更フィルタ)を用意する。この複数のぼけ補正カーネルを用いて対象画像のぼけ形状を補正した補正画像を生成することによって、当該生成した補正画像と基準画像との相関がより高くなるぼけ補正カーネルを特定し、当該特定されたぼけ補正カーネルに対応する距離dを求めることで被写体までの距離を算出する。なお、ぼけ補正カーネルは、対象画像のぼけ形状を基準画像のぼけ形状に補正するための畳み込み関数である。   Here, the blur shape between the target image and the reference image changes according to the distance d to the subject included in the captured image as described above. For this reason, in this embodiment, it is assumed that the distance to the subject included in the captured image is an arbitrary distance d, and a plurality of blur correction kernels (blur change filters) created for different distances d are prepared. By generating a corrected image in which the blur shape of the target image is corrected using the plurality of blur correction kernels, a blur correction kernel having a higher correlation between the generated corrected image and the reference image is specified, and the specified The distance to the subject is calculated by obtaining the distance d corresponding to the blur correction kernel. The blur correction kernel is a convolution function for correcting the blur shape of the target image to the blur shape of the reference image.

以下、上記したステップS5における補正画像の生成処理について具体的に説明する。まず、フィルタ10の影響を受けていない画像(センサ画像)について考える。この場合、センサ画像Ixに含まれる被写体からピント位置までの距離をdとすると、センサ画像Ixは、ぼけの少ない理想的なセンサ画像Iyと、上記したように距離dに応じて変化するセンサ画像のぼけ関数f(d)を用いて、以下の式(1)で表すことができる。   Hereinafter, the correction image generation process in step S5 described above will be specifically described. First, an image (sensor image) that is not affected by the filter 10 is considered. In this case, if the distance from the subject included in the sensor image Ix to the focus position is d, the sensor image Ix is an ideal sensor image Iy with less blur and the sensor image that changes according to the distance d as described above. Using the blur function f (d), it can be expressed by the following equation (1).

Figure 2019207185
Figure 2019207185

なお、上記したセンサ画像のぼけ関数f(d)は、撮像装置100の開口形状と距離dとによって決定される。距離dについては、上記したようにピント位置を基準として、被写体がピント位置よりも遠くに存在する場合はd>0、被写体がピント位置よりも近くに存在する場合はd<0となる。撮像装置100の開口形状が円形状(点対称形状)である場合には、ぼけ関数f(d)の形状はピント位置の前後で変化はないため、ぼけ関数f(d)は距離dの大きさ|d|によってぼけの幅が変化するガウス関数として表現できる。なお、ぼけ関数f(d)は、距離dの大きさ|d|によってぼけの幅が変化するプルボックス関数として表現してもよい。   Note that the blur function f (d) of the sensor image described above is determined by the opening shape of the imaging apparatus 100 and the distance d. With respect to the distance d, with respect to the focus position as described above, d> 0 when the subject exists farther than the focus position, and d <0 when the subject exists closer to the focus position. When the aperture shape of the imaging apparatus 100 is a circular shape (point-symmetric shape), the blur function f (d) does not change before and after the focus position, so the blur function f (d) is a large distance d. It can be expressed as a Gaussian function in which the blur width varies depending on the depth | d |. The blur function f (d) may be expressed as a pull box function in which the blur width changes depending on the magnitude | d | of the distance d.

次に、フィルタ10の影響を受けている画像(対象画像及び基準画像)について考える。ここで、対象画像Ixは、式(1)と同様に、開口形状とフィルタ領域との特性から決定されるぼけ関数f(d)を用いて、以下の式(2)で表すことができる。 Next, consider an image (target image and reference image) affected by the filter 10. Here, the target image Ix o can be expressed by the following equation (2) using a blur function f o (d) determined from the characteristics of the aperture shape and the filter region, as in the equation (1). it can.

Figure 2019207185
Figure 2019207185

また、基準画像Ixは、式(1)と同様に、開口形状とフィルタ領域との特性から決定するぼけ関数f(d)を用いて、以下の式(3)で表すことができる。 The reference image Ix r can be expressed by the following expression (3) using the blur function f r (d) determined from the characteristics of the aperture shape and the filter region, as in the expression (1).

Figure 2019207185
Figure 2019207185

ここで、図2に示すフィルタ10(第1フィルタ領域11及び第2フィルタ領域12)の場合、対象画像(B画像)のぼけ関数f(d)は、第1フィルタ領域11での光減衰の影響により、上記した図6において説明したようにピント位置であるd=0の前後で異なる形状に変化する。また、上記した図7に示すように、対象画像のぼけ関数f(d)は、被写体がピント位置よりも遠方にあるd>0の場合に、x>0で第1のフィルタ領域での光減衰に応じて、減衰したぼけの幅|d|のガウス関数となる。同様に、対象関数のぼけ関数f(d)は、被写体がピント位置よりも近方にあるd<0の場合に、x<0で第1フィルタ領域11での光減衰に応じて、減衰したぼけの幅|d|のガウス関数となる。 Here, in the case of the filter 10 (first filter region 11 and second filter region 12) shown in FIG. 2, the blur function f o (d) of the target image (B image) is the light attenuation in the first filter region 11. Due to the influence of the above, as described with reference to FIG. 6 described above, the shape changes to before and after the focus position d = 0. In addition, as shown in FIG. 7 described above, the blur function f o (d) of the target image is x> 0 and the first filter region is d> 0 when d> 0 where the subject is far from the focus position. According to the light attenuation, a Gaussian function of the attenuated blur width | d | Similarly, the blur function f o (d) of the target function is attenuated according to the light attenuation in the first filter region 11 when x <0 when d <0 where the subject is closer to the focus position. The Gaussian function of the blurred blur width | d |.

一方、図2に示したフィルタ10の場合、基準画像(G画像)は第1フィルタ領域11及び第2フィルタ領域12の影響を受けないため、当該基準画像のぼけ関数f(d)=f(d)となる。 On the other hand, in the case of the filter 10 shown in FIG. 2, since the reference image (G image) is not affected by the first filter region 11 and the second filter region 12, the blur function f r (d) = f of the reference image. (D).

対象画像Ixにぼけを付加して、対象画像Ixのぼけ形状を基準画像Ixのぼけ形状と一致させるためのぼけ関数を、ぼけ補正カーネルf(d)と定義する。この場合、上記した基準画像Ixは、ぼけ補正カーネルf(d)及び対象画像Ixを用いて、以下の式(4)で表すことができる。 By adding a blur in the target image Ix o, the blurring function for the blur shape of the target image Ix o match the blurring shape of the reference image Ix r, defined as the blur correction kernel f c (d). In this case, the reference image Ix r described above can be expressed by the following expression (4) using the blur correction kernel f c (d) and the target image Ix o .

Figure 2019207185
Figure 2019207185

式(4)のぼけ補正カーネルf(d)は、上記した式(2)〜式(4)により、基準画像Ixのぼけ関数f(d)と対象画像Ixのぼけ関数f(d)とを用いて、以下の式(5)のように表すことができる。 The blur correction kernel f c (d) of the equation (4) is obtained by using the above-described equations (2) to (4), the blur function f r (d) of the reference image Ix r and the blur function f o of the target image Ix o. Using (d), it can be expressed as in the following formula (5).

Figure 2019207185
Figure 2019207185

式(5)のf −1(d)は、対象画像のぼけ関数f(d)の逆フィルタである。本実施形態においては、これらにより、基準画像Ixと対象画像Ixとのぼけ関数から解析してぼけ補正カーネルf(d)を算出することが可能となる。対象画像Ixのぼけ形状(ぼけ関数)は、ぼけ補正カーネルf(d)を用いて、任意の距離dを想定した様々なぼけ形状に補正することができる。 In Equation (5), f o −1 (d) is an inverse filter of the blur function f o (d) of the target image. In this embodiment, it is possible to calculate the blur correction kernel f c (d) by analyzing from the blur function of the reference image Ix r and the target image Ix o . The blur shape (blur function) of the target image Ix o can be corrected to various blur shapes assuming an arbitrary distance d by using the blur correction kernel f c (d).

ここで、図9は、上記したぼけ補正カーネルの例を示す。なお、図9においては、距離d<0の場合の対象画像のぼけ関数にぼけを付加するぼけ補正カーネルが示されている。   Here, FIG. 9 shows an example of the blur correction kernel described above. FIG. 9 shows a blur correction kernel that adds blur to the blur function of the target image when the distance d <0.

図9に示すぼけ補正カーネルf(d)は、第1フィルタ領域11と第2フィルタ領域12とを分割する線分の中心点を通り、かつ、当該線分に対して垂直方向の直線状(直線付近)に分布するぼけ関数に相当する。 The blur correction kernel f c (d) shown in FIG. 9 passes through the center point of the line segment that divides the first filter region 11 and the second filter region 12, and is linear in the direction perpendicular to the line segment. This corresponds to the blur function distributed in the vicinity of the straight line.

対象画像Ixのぼけ形状を任意の距離dにおけるぼけ補正カーネルf(d)を用いて補正した補正画像をIx´(d)とすると、補正画像Ix´(d)は、以下の式(6)で表すことができる。 If a corrected image obtained by correcting the blur shape of the target image Ix o using the blur correction kernel f c (d) at an arbitrary distance d is Ix ′ o (d), the corrected image Ix ′ o (d) is It can be expressed by equation (6).

Figure 2019207185
Figure 2019207185

上記したステップS5において、距離算出部122は、このような式(6)により、任意の距離dに対応するぼけ関数f(d)を用いて対象画像Ixにぼけ付加し、補正画像Ix´(d)を生成することができる。 In step S5 described above, the distance calculation unit 122 adds the blur to the target image Ix o using the blur function f c (d) corresponding to the arbitrary distance d by using the equation (6), and the corrected image Ix ′ O (d) can be generated.

再び図5に戻ると、距離算出部122は、ステップS5において生成された補正画像Ix´(d)と基準画像Ixとを比較し、補正画像Ix´(d)と基準画像Ixとのぼけ形状の一致度を計算する(ステップS6)。ステップS6においては、後述するように光学系の収差に基づいてぼけ形状の一致度が計算される。なお、ぼけ形状の一致度としては、対象画素を中心とする任意サイズの矩形領域における補正画像Ix´と基準画像Ixとの相関が計算されればよい。このぼけ形状の一致度の計算には、例えばSSD(Sum of Squared Difference)、SAD(Sum of Absolute Difference)、NCC(Normalized Cross-Correlation)、ZNCC(Zero-mean Normalized Cross-Correlation)、Color Alignment Measure、エッジ画像のZNCC等を利用することができる。本実施形態においては、明るさの変動にロバストなZNCCを利用するものとする。 Returning to FIG. 5 again, the distance calculation unit 122 compares the corrected image Ix ′ o (d) generated in step S5 with the reference image Ix r, and corrects the corrected image Ix ′ o (d) and the reference image Ix r. The degree of coincidence of the blurred shape is calculated (step S6). In step S6, the degree of coincidence of the blur shape is calculated based on the aberration of the optical system, as will be described later. As the degree of matching blur shape, the correlation between the corrected image Ix' o and the reference image Ix r in the rectangular region of any size around the target pixel need be computed. For calculating the degree of coincidence of the blur shape, for example, SSD (Sum of Squared Difference), SAD (Sum of Absolute Difference), NCC (Normalized Cross-Correlation), ZNCC (Zero-mean Normalized Cross-Correlation), Color Alignment Measure The edge image ZNCC or the like can be used. In the present embodiment, it is assumed that ZNCC that is robust to brightness fluctuations is used.

次に、距離算出部122は、ステップS6において算出された一致度に基づいて、補正画像Ix´(d)と基準画像Ixとのぼけ形状が一致しているか否かを判定する(ステップS7)。なお、ぼけ形状が一致するとは、当該ぼけ形状が完全に一致する場合だけではなく、一致度が所定の閾値以上である場合を含めてもよい。また、後述するZNCCを利用した指標を一致度として用いる場合には、ステップS7における判定処理において、当該指標値が閾値未満である場合にぼけ形状が一致すると判定されてもよい。 Next, the distance calculation unit 122 determines whether the blurred shape of the corrected image Ix ′ o (d) and the reference image Ix r match based on the matching degree calculated in step S6 (step S6). S7). Note that “the blurred shape matches” may include not only the case where the blurred shape completely matches, but also the case where the degree of matching is equal to or greater than a predetermined threshold. When an index using ZNCC, which will be described later, is used as the degree of coincidence, it may be determined in the determination process in step S7 that the blurred shapes match when the index value is less than a threshold value.

補正画像Ix´(d)と基準画像Ixとのぼけ形状が一致していると判定された場合(ステップS7のYES)、補正画像Ix´(d)における距離dが撮像画像に含まれる被写体までの距離として算出される。 When it is determined that the blurred shape of the corrected image Ix ′ o (d) and the reference image Ix r match (YES in step S7), the distance d in the corrected image Ix ′ o (d) is included in the captured image. Calculated as the distance to the subject.

一方、補正画像Ix´(d)と基準画像Ixとのぼけ形状が一致していないと判定された場合(ステップS7のNO)、上記したステップS5に戻って処理が繰り返される。この場合、上記したぼけ補正カーネルf(d)における距離dを変えてステップS5の処理が実行される。 On the other hand, when it is determined that the blurred shape of the corrected image Ix ′ o (d) and the reference image Ix r do not match (NO in step S7), the process returns to the above step S5 and is repeated. In this case, the process of step S5 is executed by changing the distance d in the blur correction kernel f c (d).

なお、図5ではステップS7において補正画像Ix´(d)と基準画像Ixとのぼけ形状が一致していると判定された場合に処理が終了されるものとして説明したが、例えば仮定する全ての距離dについて一致度を算出し、当該一致度が最も高い距離dを被写体までの距離として算出するようにしてもよい。 In FIG. 5, although it has been described that the process ends when it is determined in step S7 that the blurred shape of the corrected image Ix ′ o (d) and the reference image Ix r match, for example, it is assumed. The degree of coincidence may be calculated for all distances d, and the distance d having the highest degree of coincidence may be calculated as the distance to the subject.

換言すれば、距離算出部122は、補正画像Ix´(d)と基準画像Ixとで相関が最も高くなる距離dを求めることにより、被写体までの距離を算出することができる。 In other words, the distance calculation unit 122 can calculate the distance to the subject by obtaining the distance d that gives the highest correlation between the corrected image Ix ′ o (d) and the reference image Ix r .

なお、ここでは対象画素についてステップS5以降の処理が実行される場合について説明したが、当該対象画素について被写体までの距離が算出された場合には、当該対象画素以外の画素についてもステップS5以降の処理が実行される。これにより、撮像画像(RGB画像)中に含まれる全ての被写体までの距離を算出することができる。   In addition, although the case where the process after step S5 is performed about a target pixel was demonstrated here, when the distance to a to-be-photographed object is calculated about the said target pixel, also about pixels other than the said target pixel after step S5 Processing is executed. Thereby, the distances to all the subjects included in the captured image (RGB image) can be calculated.

以下、上記した図5に示すステップS6における一致度の計算処理について具体的に説明する。ステップS6においては、イメージセンサ30によって生成された撮像画像に含まれる基準画像Ixと、距離dを仮定した(つまり、ぼけ補正カーネルf(d)を用いて対象画像Ixにぼけを付加した)補正画像Ix´(d)とから生成されるRGB画像の対象画素を中心とする局所領域(上記した任意サイズの矩形領域)で、指標L(d)を計算する。上記したように基準画像IxがG画像I、対象画像IxがB画像Iであるものとすると、指標L(d)は以下の式(7)により計算される。 The coincidence degree calculation process in step S6 shown in FIG. 5 will be specifically described below. In step S6, the reference image Ix r included in the captured image generated by the image sensor 30 and the distance d are assumed (that is, the blur is added to the target image Ix o using the blur correction kernel f c (d)). The index L (d) is calculated in the local region (the above-described rectangular region of any size) centered on the target pixel of the RGB image generated from the corrected image Ix ′ o (d). When the reference image Ix r as described above is assumed G image I G, the target image Ix o is a B image I B, index L (d) is calculated by the following equation (7).

Figure 2019207185
Figure 2019207185

なお、式(7)において、I´(d)はぼけ補正カーネルf(d)を用いてB画像Iのぼけ形状を補正した補正画像であり、IはG画像(基準画像)である。また、∇Iは、ぼけ画像Iのエッジ画像である。このような式(7)における指標L(d)は、値が小さいほど画像の一致度が高いことを示している。すなわち、本実施形態においては、この指標L(d)を一致度として用いることができる。 In the equation (7), I'B (d) is a corrected image obtained by correcting the blurring shape of the B image I B using the blur correction kernel f c (d), I G is G image (reference image) It is. Further, ∇I is an edge image of the blurred image I. The index L (d) in the equation (7) indicates that the smaller the value is, the higher the matching degree of the images is. That is, in the present embodiment, this index L (d) can be used as the degree of coincidence.

ここで、上記したように実際のレンズ20には収差が存在し、本実施形態における被写体までの距離の算出(推定)精度を低下させる場合がある。なお、被写体までの距離の算出に対して直接影響がある収差としては上記した像面湾曲を想定している。像面湾曲とは、例えば球面レンズの影響で集光面が湾曲し、像面が球面になる単色収差をいう。   Here, as described above, there is an aberration in the actual lens 20, and the calculation (estimation) accuracy of the distance to the subject in the present embodiment may be lowered. Note that the above-mentioned field curvature is assumed as the aberration that directly affects the calculation of the distance to the subject. The field curvature refers to monochromatic aberration in which, for example, the condensing surface is curved due to the influence of a spherical lens, and the image surface becomes spherical.

以下、図10A及び10Bを参照して、像面湾曲の原理について説明する。図10Aは、本実施形態におけるフィルタ10が設けられていない場合の像面湾曲によって生じる収差の影響について説明するための図である。図10Bは、本実施形態におけるフィルタ10が設けられている場合の像面湾曲によって生じる収差の影響を説明するための図である。   Hereinafter, the principle of field curvature will be described with reference to FIGS. 10A and 10B. FIG. 10A is a diagram for explaining the influence of aberration caused by field curvature when the filter 10 according to the present embodiment is not provided. FIG. 10B is a diagram for explaining the influence of aberration caused by field curvature when the filter 10 according to the present embodiment is provided.

上記したように単色収差である像面湾曲は、平面物体を撮像するとイメージセンサの中央にピントが合っていたとしても、撮像画像の端でピントがずれてぼけが生じるという現象である。   As described above, the curvature of field, which is a monochromatic aberration, is a phenomenon in which when a plane object is imaged, even if the center of the image sensor is in focus, the image is out of focus at the end of the captured image.

本実施形態におけるフィルタ10が設けられていない場合には、レンズは波長帯域によらず全ての光を透過させるので、図10Aに示すように、対象画像(B画像)と基準画像(G画像)とで観測されるぼけ関数は同様の形状となる。   When the filter 10 in the present embodiment is not provided, the lens transmits all light regardless of the wavelength band, so that the target image (B image) and the reference image (G image) are shown in FIG. 10A. The blur function observed at and has the same shape.

一方、本実施形態におけるフィルタ10が設けられている場合(つまり、一部の波長帯域を遮断する第1フィルタ領域11が存在する場合)には、図10Bに示すように、像面湾曲の影響で対象画像(B画像)のぼけ関数が変化する。   On the other hand, when the filter 10 according to the present embodiment is provided (that is, when the first filter region 11 that blocks a part of the wavelength band exists), as shown in FIG. The blur function of the target image (B image) changes.

上記したように像面湾曲は本来単色収差であるが、図10Bに示すぼけ関数の変化は、フィルタ10の挿入により色収差となって発生したものである。   As described above, the field curvature is originally monochromatic aberration, but the change in the blur function shown in FIG. 10B is caused by the insertion of the filter 10 as chromatic aberration.

本実施形態においては、このように発生する色収差の影響を緩和(補正)しながら、精度の高い一致度を計算し、誤差の少ない距離推定を実現するために、以下の式(8)により上記した指標L(d)を計算する。なお、式(8)におけるcが像面湾曲によるずれの補正量である。   In the present embodiment, in order to calculate the degree of coincidence with high accuracy and reduce the error while mitigating (correcting) the influence of the chromatic aberration generated in this way, The calculated index L (d) is calculated. Note that c in the equation (8) is a correction amount of deviation due to field curvature.

Figure 2019207185
Figure 2019207185

ここで、図11Aは、像面湾曲によって生じる収差を補正していない場合の指標値、すなわち、上記した式(7)を用いて計算された指標値(指標L(d))の分布を示す。一方、図11Bは、像面湾曲によって生じる収差を補正した場合の指標値、すなわち、上記した式(8)を用いて算出された指標値の分布を示す。   Here, FIG. 11A shows the distribution of the index value (index L (d)) calculated using the above equation (7) when the aberration caused by the curvature of field is not corrected. . On the other hand, FIG. 11B shows a distribution of index values when the aberration caused by the curvature of field is corrected, that is, the index value distribution calculated using the above equation (8).

像面湾曲によって生じる収差を補正していない場合には、図11Aに示すように、指標値の最小値(すなわち、一致度が最も高いd)が真値に対してずれている。   When the aberration caused by the curvature of field is not corrected, as shown in FIG. 11A, the minimum index value (that is, d having the highest degree of coincidence) is deviated from the true value.

これに対して、図11Bに示すように、例えば上記した像面湾曲によるずれの補正量が定義された像面湾曲用の補正テーブル(以下、第2補正テーブルと表記)を用いて指標値と距離dの対応関係を変更する(ずらす)ことによって、像面湾曲によるずれを補正することができる。なお、この第2補正テーブルは上記した収差情報として収差情報格納部123に予め格納されているものとする。   On the other hand, as shown in FIG. 11B, for example, an index value is obtained by using a correction table for field curvature (hereinafter referred to as a second correction table) in which the correction amount of deviation due to field curvature is defined. By changing (shifting) the correspondence relationship of the distance d, it is possible to correct the shift due to the curvature of field. This second correction table is stored in advance in the aberration information storage unit 123 as the aberration information described above.

ここで、この像面湾曲によって生じる収差の補正処理は各画素で行われるため、画像全体の(つまり、画像を構成する画素毎に補正量が定義された)第2補正テーブルが用意されているものとする。第2補正テーブルは、事前に評価パターンを撮像し、平面からのずれ量を計測しておくことで作成されるものとする。このように得られる計測点から画像全体のずれ量を求めるためには、多項式近似曲線やゼルニケ多項式等のモデル近似を用いる。なお、モデル係数がわかれば展開により画像全体の補正量が計算可能である。このため、上記した収差情報として収差情報格納部123に格納されている第2補正テーブルは、モデル係数であってもよいし、展開後の全画素の補正値でもよい。   Here, since the correction processing of the aberration caused by the curvature of field is performed in each pixel, a second correction table for the entire image (that is, a correction amount is defined for each pixel constituting the image) is prepared. Shall. The second correction table is created by imaging the evaluation pattern in advance and measuring the amount of deviation from the plane. In order to obtain the shift amount of the entire image from the measurement points obtained in this way, model approximation such as a polynomial approximation curve or Zernike polynomial is used. If the model coefficient is known, the correction amount of the entire image can be calculated by development. For this reason, the second correction table stored in the aberration information storage unit 123 as the aberration information described above may be a model coefficient or a correction value of all the pixels after development.

なお、像面湾曲によって生じる収差は、被写体までの距離(撮像距離)に応じて変化する場合があるため、当該距離に応じて第2補正テーブルを切り替える構成としても構わない。この場合には、例えば以下の式(9)により指標L(d)を計算するものとする。   Since the aberration caused by the curvature of field may change according to the distance to the subject (imaging distance), the second correction table may be switched according to the distance. In this case, for example, the index L (d) is calculated by the following equation (9).

Figure 2019207185
Figure 2019207185

この式(9)においては、c(d)が像面湾曲によるずれの補正量であり、当該補正量を距離dに応じて変化させる。c(d)は、距離に応じた第2補正テーブルを複数用意して、当該複数の第2補正テーブルのうち距離dに最も近い距離に応じた第2補正テーブルを参照することによって特定されてもよいし、当該距離dに近い距離に応じた複数の第2補正テーブルから線形補間により求めてもよいし、または、距離方向に対するモデル近似により展開された値としてもよい。   In this equation (9), c (d) is a correction amount of deviation due to field curvature, and the correction amount is changed according to the distance d. c (d) is specified by preparing a plurality of second correction tables corresponding to the distance and referring to the second correction table corresponding to the distance closest to the distance d among the plurality of second correction tables. Alternatively, it may be obtained by linear interpolation from a plurality of second correction tables corresponding to distances close to the distance d, or may be a value developed by model approximation in the distance direction.

上記したように本実施形態においては、撮像光学系の収差(レンズ収差)の影響を受けた撮像画像(第1画像)に含まれる、ぼけ関数が非点対称に表された例えば青色(第1色成分)の対象画像(第2画像)と、ぼけ関数が点対称に表された例えば緑色(第2色成分)の基準画像(第3画像)とを取得し、対象画像に対して複数の異なるぼけを付加して得られる複数の画像(補正画像)と基準画像との相関に応じて、撮像画像に含まれる被写体までの距離を算出する。なお、本実施形態において、被写体までの距離を算出するための画像間の相関は撮像光学系の収差に基づいて計算されるが、当該撮像光学系の収差には、フィルタ10を用いて撮像された被写体までの距離の算出に対して影響を与える像面湾曲によって生じる収差が含まれる。   As described above, in the present embodiment, the blur function included in the captured image (first image) affected by the aberration (lens aberration) of the imaging optical system is expressed, for example, in blue (first) Color component) target image (second image) and, for example, a green (second color component) reference image (third image) in which the blur function is expressed in point symmetry, The distance to the subject included in the captured image is calculated according to the correlation between the plurality of images (corrected images) obtained by adding different blurs and the reference image. In this embodiment, the correlation between images for calculating the distance to the subject is calculated based on the aberration of the imaging optical system. The aberration of the imaging optical system is imaged using the filter 10. Aberrations caused by curvature of field that affect the calculation of the distance to the subject.

すなわち、本実施形態においては、撮像装置100の光学系に設置したフィルタ10に応じて変更された対象画像のぼけ形状を、距離dを仮定したぼけ補正カーネル(対象画像のぼけ関数を基準画像のぼけ関数に補正するための畳み込み関数)により補正した補正画像を生成し、当該生成した補正画像と基準画像との相関がより高くなる距離dを求めることで、撮像画像に含まれる被写体(撮像画像に写る被写体)までの距離を算出する際に、事前に計測した像面湾曲によるずれを補正する。   In other words, in the present embodiment, the blur shape of the target image changed according to the filter 10 installed in the optical system of the imaging apparatus 100 is the blur correction kernel assuming the distance d (the blur function of the target image is used as the reference image). A corrected image corrected by a convolution function for correcting to a blur function is generated, and a subject (captured image) included in the captured image is obtained by obtaining a distance d at which the correlation between the generated corrected image and the reference image becomes higher. When calculating the distance to the subject shown in (2), the deviation due to the curvature of field measured in advance is corrected.

なお、ぼけ補正カーネルは対象画像のぼけ関数と基準画像のぼけ関数とを解析することによって算出することが可能であり、本実施形態においては、任意の距離の被写体のぼけを補正するための複数のぼけ補正カーネルが予め用意されているものとする。   Note that the blur correction kernel can be calculated by analyzing the blur function of the target image and the blur function of the reference image. In the present embodiment, a plurality of blur correction kernels are used for correcting blur of a subject at an arbitrary distance. It is assumed that a blur correction kernel is prepared in advance.

本実施形態においては、このような構成により、レンズ収差(像面湾曲)により生じるずれを補正しながら、ぼけ関数とサンプリング位置が一致する画像の相関を用いて距離を算出するため、精度の高い距離情報を得ることが可能となり、誤差の少ない距離推定を実現することができる。更に、本実施形態においては、空間情報の畳み込み結果であるぼけ情報を利用するため、距離推定の結果が安定的であり、繰り返しパターンや陰面等の影響を受けることのない距離推定を実現することができる。   In the present embodiment, with such a configuration, the distance is calculated using the correlation between the image where the blur function and the sampling position coincide with each other while correcting the shift caused by the lens aberration (field curvature). Distance information can be obtained, and distance estimation with less error can be realized. Furthermore, in this embodiment, since blur information that is a result of convolution of spatial information is used, the result of distance estimation is stable, and distance estimation that is not affected by a repetitive pattern or hidden surface is realized. Can do.

なお、本実施形態においては、上記したように算出された被写体までの距離(距離情報)に基づいて加工された距離画像等を生成することが可能である。具体的には、距離画像としては、例えば被写体までの距離に応じて、手前に存在する被写体ほど明るく、奥に存在する被写体ほど暗くなるような画像を生成することができる。   In the present embodiment, it is possible to generate a distance image or the like processed based on the distance (distance information) to the subject calculated as described above. Specifically, as the distance image, for example, according to the distance to the subject, it is possible to generate an image in which the subject existing in the foreground is brighter and the subject existing in the back is darker.

更に、本実施形態においては、被写体までの距離の算出に用いられる対象画像及び基準画像に対して事前に倍率色収差により生じている色ずれまたは歪曲収差により生じている位置ずれを補正することが可能であるため、より精度の高い距離情報を得ることができる。   Further, in the present embodiment, it is possible to correct a color shift caused by lateral chromatic aberration or a position shift caused by distortion aberration with respect to the target image and the reference image used for calculating the distance to the subject in advance. Therefore, more accurate distance information can be obtained.

なお、本実施形態においては第2フィルタ領域12がシアンのフィルタ領域であるものとして説明したが、上記した図5に示す処理のように対象画像をB画像、基準画像をG画像とする場合には、第2フィルタ領域12は緑色及び青色の波長帯域の光を透過するものであれば他のフィルタ領域であっても構わない。   In the present embodiment, the second filter region 12 is described as a cyan filter region. However, when the target image is a B image and the reference image is a G image as in the process shown in FIG. The second filter region 12 may be another filter region as long as it transmits light in the green and blue wavelength bands.

例えば第2フィルタ領域12が全ての波長帯域の光を透過する透明なフィルタ領域等である場合には、緑色の波長帯域の光と同様に、赤色の波長帯域の光も第1フィルタ領域11及び第2フィルタ領域12の両方を透過する。この場合には、R画像を基準画像としてもよい。また、G画像及びR画像の両方を基準画像として、当該G画像及びR画像のそれぞれに対して指標(一致度)を算出し、当該指標の加重平均を用いて被写体までの距離が算出されるようにしてもよい。   For example, when the second filter region 12 is a transparent filter region or the like that transmits light in all the wavelength bands, the red wavelength band light is also transmitted in the first filter region 11 and the same as the green wavelength band light. It passes through both of the second filter regions 12. In this case, the R image may be used as the reference image. Also, using both the G image and the R image as reference images, an index (degree of coincidence) is calculated for each of the G image and the R image, and the distance to the subject is calculated using a weighted average of the index. You may do it.

また、本実施形態において説明したように第1フィルタ領域がイエローのフィルタ領域であり、第2フィルタ領域12がシアンのフィルタ領域である場合には、赤色の波長帯域の光は第1フィルタ領域11を透過し、第2フィルタ領域12で減衰されるため、R画像のぼけ関数もB画像のぼけ数と同様に非点対称に変更される。この場合には、B画像ではなく、R画像を対象画像としてもよい。なお、R画像のぼけ関数(ぼけ形状)は、B画像のぼけ形状をY軸方向に平行な直線を軸にして反転した形状となる。   Further, as described in the present embodiment, when the first filter region is the yellow filter region and the second filter region 12 is the cyan filter region, the light in the red wavelength band is the first filter region 11. , And is attenuated by the second filter region 12, the blur function of the R image is also changed to astigmatism similarly to the blur number of the B image. In this case, the R image may be the target image instead of the B image. Note that the blur function (blurred shape) of the R image is a shape obtained by inverting the blurred shape of the B image about a straight line parallel to the Y-axis direction.

なお、本実施形態におけるフィルタ10には、点対称形でなければ、任意の領域数のフィルタ領域が存在していてもよい。また、フィルタ10は、センサ画像のぼけ関数を変更することが可能であれば、1つのフィルタ領域により構成されていてもよいし、複数のフィルタ領域により構成されていてもよい。   Note that the filter 10 in the present embodiment may have any number of filter regions as long as the filter 10 is not point-symmetric. Further, the filter 10 may be configured by one filter region or a plurality of filter regions as long as the blur function of the sensor image can be changed.

また、本実施形態において、第1のフィルタ領域11及び第2のフィルタ領域12はフィルタ10を任意の直線で分割した形状であり、当該直線は光学中心を通過する。このような構成によれば、ぼけ補正カーネルの次元を削減することができ、かつ、光量調整のための遮蔽物等の絞り機構が挿入された場合であってもセンサ画像のぼけ関数を変更可能な構造とすることができる。   In the present embodiment, the first filter region 11 and the second filter region 12 have a shape obtained by dividing the filter 10 by an arbitrary straight line, and the straight line passes through the optical center. According to such a configuration, the dimension of the blur correction kernel can be reduced, and the blur function of the sensor image can be changed even when an aperture mechanism such as a shield for adjusting the amount of light is inserted. Structure.

また、本実施形態においてイメージセンサ30は第1センサ31(Rセンサ)、第2センサ32(Gセンサ)及び第3センサ33(Bセンサ)を有するものとして説明したが、イメージセンサ30は、2以上のセンサを有し、フィルタ10を光が通過することにより、ぼけ関数が非点対称に変更された対象画像と、少なくとも1種類以上のセンサ画像である基準画像等を生成することが可能なように構成されていればよい。2以上のセンサとは、例えば、RGBセンサのうち、RセンサとGセンサ、GセンサとBセンサ、RセンサとBセンサ、RセンサとGセンサとBセンサ等の2以上のセンサの組み合わせをいう。すなわち、イメージセンサ30は、例えば2以上のセンサのうち、いずれかのセンサが対象画像を生成し、他のセンサが基準画像を生成するように構成されていればよい。   In the present embodiment, the image sensor 30 has been described as including the first sensor 31 (R sensor), the second sensor 32 (G sensor), and the third sensor 33 (B sensor). By having the above sensors and passing light through the filter 10, it is possible to generate a target image in which the blur function is changed to asymmetry, a reference image that is at least one type of sensor image, and the like. What is necessary is just to be comprised. The two or more sensors are, for example, a combination of two or more sensors such as R sensor and G sensor, G sensor and B sensor, R sensor and B sensor, R sensor, G sensor, and B sensor among RGB sensors. . That is, the image sensor 30 may be configured such that, for example, one of two or more sensors generates a target image, and another sensor generates a reference image.

また、本実施形態においてはイメージセンサ30がRGBセンサを備えるものとして主に説明したが、イメージセンサ30が有するセンサの波長帯域はこれらに限られるものではない。   In the present embodiment, the image sensor 30 is mainly described as including an RGB sensor, but the wavelength band of the sensor included in the image sensor 30 is not limited thereto.

(第2の実施形態)
次に、第2の実施形態について説明する。なお、本実施形態に係る撮像装置のハードウェア構成、フィルタ及び機能構成は、前述した第1の実施形態と同様であるため、適宜、図1、図2及び図4等を用いて説明する。また、以下の説明においては、前述した第1の実施形態と同様の部分についてはその詳しい説明を省略し、当該第1の実施形態と異なる部分について主に述べる。
(Second Embodiment)
Next, a second embodiment will be described. Note that the hardware configuration, filter, and functional configuration of the imaging apparatus according to this embodiment are the same as those in the first embodiment described above, and therefore will be described with reference to FIGS. 1, 2, 4, and the like as appropriate. In the following description, detailed description of the same parts as those of the first embodiment described above will be omitted, and parts different from those of the first embodiment will be mainly described.

前述した第1の実施形態においては倍率色収差を補正するものとして説明したが、当該第1の実施形態では、距離に応じて変動する倍率色収差には対応していない。   In the first embodiment described above, the chromatic aberration of magnification is corrected. However, in the first embodiment, the chromatic aberration of magnification that varies depending on the distance is not supported.

そこで、本実施形態においては、被写体までの距離を算出するタイミングで倍率色収差補正を行う点で、前述した第1の実施形態とは異なる。   Therefore, this embodiment is different from the first embodiment described above in that the magnification chromatic aberration correction is performed at the timing of calculating the distance to the subject.

以下、図12のフローチャートを参照して、本実施形態に係る撮像装置100の処理手順の一例について説明する。なお、図12に示す処理は、撮像装置100に含まれる画像処理部120によって実行される。   Hereinafter, an example of a processing procedure of the imaging apparatus 100 according to the present embodiment will be described with reference to the flowchart of FIG. Note that the processing illustrated in FIG. 12 is executed by the image processing unit 120 included in the imaging apparatus 100.

まず、前述した図5に示すステップS1〜S3の処理に相当するステップS11〜S13の処理が実行される。   First, the processes of steps S11 to S13 corresponding to the processes of steps S1 to S3 shown in FIG. 5 described above are executed.

次に、距離算出部122は、収差情報格納部123に格納されている収差情報(第1補正テーブル)に基づいて、対象画像及び基準画像における倍率色収差を補正する(ステップS14)。   Next, the distance calculation unit 122 corrects the chromatic aberration of magnification in the target image and the reference image based on the aberration information (first correction table) stored in the aberration information storage unit 123 (step S14).

なお、ステップS14の処理が実行された場合には前述した図5に示すステップS5〜S7の処理に相当するステップS15〜S17の処理が実行されるが、ステップS14においては、当該ステップS15及びS16において用いられる距離dに応じた補正量により倍率色収差により生じている色ずれを補正するものとする。   When the process of step S14 is executed, the processes of steps S15 to S17 corresponding to the processes of steps S5 to S7 shown in FIG. 5 are executed. However, in step S14, the steps S15 and S16 are executed. The color shift caused by the chromatic aberration of magnification is corrected by the correction amount corresponding to the distance d used in FIG.

この場合における距離dに応じた補正量は、例えば距離に応じた複数の第1補正テーブルを用意しておき、当該複数の第1補正テーブルのうち距離dに最も近い距離に応じた第1補正テーブルを参照することによって特定されてもよいし、当該距離dに近い距離に応じた複数の第1補正テーブルから線形補間により求めてもよいし、または、距離方向に対するモデル近似により展開された値としてもよい。   In this case, for the correction amount corresponding to the distance d, for example, a plurality of first correction tables corresponding to the distance are prepared, and the first correction corresponding to the distance closest to the distance d among the plurality of first correction tables is prepared. The value may be specified by referring to the table, may be obtained by linear interpolation from a plurality of first correction tables corresponding to distances close to the distance d, or may be a value developed by model approximation in the distance direction It is good.

なお、本実施形態においては距離dに応じた補正量により倍率色収差を補正する構成であるため、ステップS17において補正画像Ix´(d)と基準画像Ixとのぼけ形状が一致していないと判定された場合(ステップS17のNO)、ステップS14に戻って処理が繰り返される。 In the present embodiment, the chromatic aberration of magnification is corrected by a correction amount corresponding to the distance d. Therefore, the blurred shape of the corrected image Ix ′ o (d) and the reference image Ix r do not match in step S17. (NO in step S17), the process returns to step S14 and the process is repeated.

本実施形態においては、上記した処理が実行されることによって、被写体までの距離を算出するタイミングで距離dに応じた補正量により倍率色収差を補正することが可能となる。   In the present embodiment, by executing the above-described processing, it is possible to correct lateral chromatic aberration with a correction amount corresponding to the distance d at the timing of calculating the distance to the subject.

また、前述した第1の実施形態においては対象画像及び基準画像を構成する各画素についてステップS5以降の処理が実行されるものとして説明したが、本実施形態においては、対象画像及び基準画像を構成する各画素についてステップS14以降の処理が実行される。   Further, in the first embodiment described above, it has been described that the processing after step S5 is executed for each pixel constituting the target image and the reference image. However, in the present embodiment, the target image and the reference image are configured. The process after step S14 is performed about each pixel to perform.

なお、図12においては省略されているが、前述した第1の実施形態において説明した歪曲収差を補正する処理がステップS13の処理の後等に実行されるようにしても構わない。   Although omitted in FIG. 12, the processing for correcting distortion described in the first embodiment may be executed after the processing in step S13.

上記したように本実施形態においては、倍率色収差による影響が距離に応じて変動する点を考慮して当該倍率色収差を補正することにより、より精度の高い距離情報を得ることが可能となり、誤差の少ない距離推定を実現することができる。   As described above, in the present embodiment, it is possible to obtain more accurate distance information by correcting the magnification chromatic aberration in consideration of the point that the influence of the magnification chromatic aberration varies depending on the distance, and the error can be obtained. Less distance estimation can be realized.

(第3の実施形態)
次に、第3の実施形態について説明する。前述した第1の実施形態においてはセンサ画像(例えば、G画像)を基準画像とするものとして説明したが、本実施形態は、いずれかのセンサ画像にぼけを付加した画像を基準画像とする点で、前述した第1の実施形態とは異なる。なお、本実施形態に係る撮像装置のハードウェア構成は、前述した第1の実施形態と同様であるため、適宜、図1を用いて説明する。また、以下の説明においては、前述した第1の実施形態と同様の部分についてはその詳しい説明を省略し、当該第の1実施形態と異なる部分について主に述べる。
(Third embodiment)
Next, a third embodiment will be described. In the first embodiment described above, the sensor image (eg, G image) is described as the reference image. However, in the present embodiment, an image obtained by adding blur to any one of the sensor images is used as the reference image. This is different from the first embodiment described above. The hardware configuration of the imaging apparatus according to the present embodiment is the same as that of the first embodiment described above, and will be described with reference to FIG. 1 as appropriate. In the following description, detailed description of the same parts as those of the first embodiment will be omitted, and parts different from those of the first embodiment will be mainly described.

まず、図13を参照して、本実施形態におけるフィルタ10の一例について説明する。ここでは、前述した第1の実施形態におけるフィルタ10と異なる点について説明する。   First, an example of the filter 10 in the present embodiment will be described with reference to FIG. Here, differences from the filter 10 in the first embodiment described above will be described.

図13に示すように、本実施形態におけるフィルタ10は、第1フィルタ領域13及び第2フィルタ領域14を含む。   As shown in FIG. 13, the filter 10 in the present embodiment includes a first filter region 13 and a second filter region 14.

本実施形態において、第1フィルタ領域13及び第2フィルタ領域14は、イメージセンサ30のRGBセンサのいずれかの波長帯域において異なる透過率特性を有している。具体的には、第1フィルタ領域13は黄色の色補正フィルタ(CC−Y)であり、第2フィルタ領域14はシアンの色補正フィルタ(CC−C)であるものとして説明する。   In the present embodiment, the first filter region 13 and the second filter region 14 have different transmittance characteristics in any wavelength band of the RGB sensor of the image sensor 30. Specifically, description will be made assuming that the first filter region 13 is a yellow color correction filter (CC-Y) and the second filter region 14 is a cyan color correction filter (CC-C).

図14は、上記した第1フィルタ領域13及び第2フィルタ領域14の透過率特性の例を示す。   FIG. 14 shows an example of the transmittance characteristics of the first filter region 13 and the second filter region 14 described above.

図14に示すように、第1フィルタ領域13は、赤色の光と、緑色の光と、青色の光との全ての波長帯域の光を透過する。また、第2フィルタ領域14は、赤色の光と、緑色の光と、青色の光との全ての波長帯域の光を透過する。   As shown in FIG. 14, the first filter region 13 transmits light in all wavelength bands of red light, green light, and blue light. Further, the second filter region 14 transmits light in all wavelength bands of red light, green light, and blue light.

しかしながら、第1フィルタ領域13と第2フィルタ領域14とでは、各波長帯域の透過率が異なる。なお、第1フィルタ領域13と第2フィルタ領域14とは、任意の波長帯域の透過率を変更するフィルタや、任意方向の偏光光を通過させる偏光フィルタまたは任意の波長帯域の集光パワーを変更するマイクロレンズであってもよい。具体的には、任意の波長帯域の透過率を変更するフィルタは、原色フィルタ(RGB)、補色フィルタ(CMY)、色補正フィルタ(CC−RGB/CMY)、赤外線または紫外線カットフィルタ、NDフィルタ、遮蔽板であってもよい。第1フィルタ領域13と第2フィルタ領域13とがマイクロレンズである場合は、レンズ20により光線の集光の分布に偏りが生じることでぼけ関数が変化する。   However, the transmittance of each wavelength band is different between the first filter region 13 and the second filter region 14. In addition, the 1st filter area | region 13 and the 2nd filter area | region 14 change the transmittance | permeability of arbitrary wavelength bands, the polarization filter which passes the polarized light of arbitrary directions, or the condensing power of arbitrary wavelength bands It may be a micro lens. Specifically, filters that change the transmittance of an arbitrary wavelength band include primary color filters (RGB), complementary color filters (CMY), color correction filters (CC-RGB / CMY), infrared or ultraviolet cut filters, ND filters, It may be a shielding plate. In the case where the first filter region 13 and the second filter region 13 are microlenses, the blur function changes due to a bias in the distribution of the condensed light rays by the lens 20.

本実施形態に係る撮像装置100は、上記した構成のフィルタ10を介して任意の被写体を撮像することによって、当該被写体までの距離を示す距離情報を得ることができる。   The imaging apparatus 100 according to the present embodiment can obtain distance information indicating the distance to the subject by imaging an arbitrary subject via the filter 10 having the above-described configuration.

なお、本実施形態に係る撮像装置100の機能構成は前述した第1の実施形態と同様であるが、本実施形態において、画像処理部120に含まれる距離算出部122は、予め用意されている複数のぼけ補正カーネルに基づいて異なるぼけを付加した対象画像(補正画像)と、いずれかのセンサ画像(対象画像)にぼけを付加した基準画像との相関に応じて、撮像画像に含まれる被写体までの距離を算出する。   Note that the functional configuration of the imaging apparatus 100 according to this embodiment is the same as that of the first embodiment described above, but in this embodiment, the distance calculation unit 122 included in the image processing unit 120 is prepared in advance. Subject included in captured image according to correlation between target image (corrected image) with different blur added based on multiple blur correction kernels and reference image with blur added to any sensor image (target image) The distance to is calculated.

以下、図15のフローチャートを参照して、本実施形態に係る撮像装置100の処理手順の一例について説明する。なお、図15に示す処理は、撮像装置100に含まれる画像処理部120によって実行される。   Hereinafter, an example of a processing procedure of the imaging apparatus 100 according to the present embodiment will be described with reference to the flowchart of FIG. The process illustrated in FIG. 15 is executed by the image processing unit 120 included in the imaging apparatus 100.

まず、前述した図5に示すステップS1の処理に相当するステップS21の処理が実行される。   First, the process of step S21 corresponding to the process of step S1 shown in FIG. 5 described above is executed.

次に、センサ制御部121は、ステップS21において取得された撮像画像から対象画像を取得する(ステップS22)。   Next, the sensor control unit 121 acquires a target image from the captured image acquired in step S21 (step S22).

ここで、対象画像のぼけ関数は、フィルタ10(第1フィルタ領域13及び第2フィルタ領域14)により非点対称に変化している。この結果、被写体の位置がピント位置よりも遠くに存在する場合(d>0)と、被写体の位置がピント位置よりも近くに存在する場合(d<0)とで、対象画像のぼけは、非点対称形のぼけとなり、また、ピント位置の前後で異なる形状となる。具体的には、第1センサ31(Rセンサ)、第2センサ32(Gセンサ)及び第3センサ33(Bセンサ)の各波長帯域で観測される光が、第1のフィルタ領域13と第2フィルタ領域13とのどちらをより多く通過してきたかで、対象画像のぼけ形状の偏りが定まる。なお、被写体の位置がピント位置に存在する場合(d=0)は、対象画像はぼけのない画像となる。   Here, the blur function of the target image changes asymmetrically by the filter 10 (the first filter region 13 and the second filter region 14). As a result, blurring of the target image is caused when the position of the subject exists farther than the focus position (d> 0) and when the position of the subject exists closer than the focus position (d <0). Astigmatism is blurred, and the shape is different before and after the focus position. Specifically, light observed in each wavelength band of the first sensor 31 (R sensor), the second sensor 32 (G sensor), and the third sensor 33 (B sensor) is transmitted to the first filter region 13 and the first filter region 13. The deviation of the blur shape of the target image is determined depending on which of the two filter regions 13 has passed. Note that when the position of the subject exists at the focus position (d = 0), the target image is an image with no blur.

なお、図13に示すフィルタ10の場合、第1フィルタ領域13及び第2フィルタ領域14により、赤色の波長帯域の光と、緑色の波長帯域の光と、青色の波長帯域の光との全てが減衰し、通過してイメージセンサ30で受光される。このため、本実施形態においては、ステップS21において取得された撮像画像に含まれるセンサ画像の全て(R画像、G画像及びB画像)が対象画像となり得る。なお、対象画像は、R画像、G画像及びB画像の全ての画像でなくてもよい。センサ制御部121は、撮像画像に含まれる複数のセンサ画像から選択されたセンサ画像を対象画像として取得する。   In the case of the filter 10 shown in FIG. 13, the first filter region 13 and the second filter region 14 cause the red wavelength band light, the green wavelength band light, and the blue wavelength band light to all be reflected. Attenuated, passed, and received by the image sensor 30. For this reason, in this embodiment, all the sensor images (R image, G image, and B image) included in the captured image acquired in step S21 can be the target images. Note that the target image may not be all images of the R image, the G image, and the B image. The sensor control unit 121 acquires a sensor image selected from a plurality of sensor images included in the captured image as a target image.

フィルタ10を通過する光のうち、青色の光は、CC−Cフィルタ(第2フィルタ領域13)よりもCC−Yフィルタ(第1のフィルタ領域)でより吸収され、減衰する。このため、被写体の位置がピント位置よりも遠くに存在する場合(d>0)では、B画像には円形状と比較して右側に偏ったぼけが生じ、被写体の位置がピント位置よりも近くに存在する場合(d<0)では、B画像には円形状と比較して左側に偏ったぼけが生じる。   Of the light passing through the filter 10, blue light is more absorbed and attenuated by the CC-Y filter (first filter region) than by the CC-C filter (second filter region 13). For this reason, when the position of the subject exists farther than the focus position (d> 0), the B image is blurred to the right as compared with the circular shape, and the position of the subject is closer to the focus position. In the image (d <0), the B image is blurred to the left as compared with the circular shape.

また、フィルタ10を通過する光のうち、赤色の光は、CC−Yフィルタ(第1フィルタ領域13)よりもCC−Cフィルタ(第2フィルタ領域14)でより吸収され、減衰する。このため、被写体の位置がピント位置よりも遠くに存在する場合(d>0)では、R画像には円形状と比較して左側に偏ったぼけが生じ、被写体の位置がピント位置よりも近くに存在する場合(d<0)では、R画像には円形状と比較して右側に偏ったぼけが生じる。   Of the light passing through the filter 10, red light is more absorbed and attenuated by the CC-C filter (second filter region 14) than by the CC-Y filter (first filter region 13). For this reason, when the position of the subject exists farther than the focus position (d> 0), the R image is blurred to the left as compared with the circular shape, and the position of the subject is closer to the focus position. In the case (d <0), the R image is blurred to the right as compared with the circular shape.

また、フィルタ10を通過する光のうち、緑色の光は、CC−Cフィルタ(第2のフィルタ領域14)よりもCC−Yフィルタ(第1フィルタ領域13)でより吸収され、減衰する。このため、被写体の位置がピント位置よりも遠くに存在する場合(d>0)では、G画像には円形状と比較して右側に偏ったぼけが生じ、被写体の位置がピント位置よりも近くに存在する場合(d<0)では、G画像には円形状と比較して左側に偏ったぼけが生じる。   Further, among the light passing through the filter 10, green light is more absorbed and attenuated by the CC-Y filter (first filter region 13) than by the CC-C filter (second filter region 14). For this reason, when the position of the subject exists farther than the focus position (d> 0), the G image is blurred to the right as compared to the circular shape, and the position of the subject is closer to the focus position. In the G image (d <0), the G image is blurred to the left as compared with the circular shape.

なお、以下の説明においては、ステップS22においては撮像画像に含まれるセンサ画像(R画像、G画像及びB画像)の全てが対象画像として取得されたものとして説明する。   In the following description, it is assumed that all sensor images (R image, G image, and B image) included in the captured image are acquired as target images in step S22.

ステップS22の処理が実行されると、図5に示すステップS4の処理に相当するステップS23の処理が実行される。   When the process of step S22 is executed, the process of step S23 corresponding to the process of step S4 shown in FIG. 5 is executed.

次に、対象画像(撮像画像)を構成する画素毎にステップS24以降の処理が実行される。以下、ステップS24以降の処理の対象となる画素を対象画素として説明する。以下の説明において、対象画像のぼけ形状とは、対象画素を構成する画素を含む所定の範囲内のぼけの形状であるものとする。   Next, the process after step S24 is performed for every pixel which comprises a target image (captured image). Hereinafter, description will be made assuming that the pixel to be processed in step S24 and subsequent steps is the target pixel. In the following description, the blur shape of the target image is a blur shape within a predetermined range including pixels constituting the target pixel.

この場合、距離算出部122は、ステップ22において取得された対象画像のうちの少なくとも1つの対象画像(以下、第1対象画像と表記)のぼけ形状を任意形状のぼけに補正した基準画像を生成する(ステップS24)。   In this case, the distance calculation unit 122 generates a reference image in which the blur shape of at least one target image (hereinafter referred to as a first target image) among the target images acquired in step 22 is corrected to a blur of an arbitrary shape. (Step S24).

ステップS24において、距離算出部122は、被写体まで距離が任意の距離dであると仮定し、当該距離dについて作成したぼけ補正カーネルを用いて、第1対象画像のぼけ形状を補正した基準画像を生成する。なお、第1対象画像のぼけ形状を任意形状のぼけに補正する処理は、図5に示すステップS5の処理と同様である。   In step S24, the distance calculation unit 122 assumes that the distance to the subject is an arbitrary distance d, and uses the blur correction kernel created for the distance d to generate a reference image obtained by correcting the blur shape of the first target image. Generate. Note that the process of correcting the blur shape of the first target image to a blur of an arbitrary shape is the same as the process of step S5 shown in FIG.

以下の説明においては、ステップS24において生成された基準画像のぼけ形状が円形状であるものとして説明するが、当該基準画像のぼけ形状は任意のセンサ画像(対象画像)のぼけ形状でもよいし、これらとは異なる他の形状であってもよい。   In the following description, it is assumed that the blur shape of the reference image generated in step S24 is a circular shape, but the blur shape of the reference image may be a blur shape of an arbitrary sensor image (target image), Other shapes different from these may be used.

ここで、任意に選択された第1対象画像Ixのぼけ形状を補正して基準画像を生成するぼけ補正カーネルf´(d)は、上述した式(5)における基準画像のぼけ関数f(d)をf´(d)とすることで、以下の式(10)のように表すことができる。 Here, the blur correction kernel f ′ c (d) for generating the reference image by correcting the blur shape of the arbitrarily selected first target image Ix o is the blur function f of the reference image in the above-described equation (5). By setting r (d) to f ′ r (d), it can be expressed as the following formula (10).

Figure 2019207185
Figure 2019207185

また、第1対象画像Ixのぼけを補正した基準画像Ix´(d)は、式(10)によって表されるぼけ補正カーネルf´(d)を用いて、以下の式(11)で表すことができる。 The reference image Ix ′ r (d) obtained by correcting the blur of the first target image Ix o is expressed by the following equation (11) using the blur correction kernel f ′ c (d) represented by the equation (10). Can be expressed as

Figure 2019207185
Figure 2019207185

本実施形態においては、上記したように被写体までの距離がdであると仮定した場合の基準画像Ix´(d)を生成することができる。 In the present embodiment, as described above, it is possible to generate the reference image Ix ′ r (d) when it is assumed that the distance to the subject is d.

次に、距離算出部122は、ステップS22において取得された対象画像のうちの第1対象画像以外の対象画像(以下、第2対象画像と表記)のぼけ形状を補正した補正画像を生成する(ステップS25)。なお、第2対象画像のぼけ形状を補正する処理は、図5に示すステップS5の処理と同様である。   Next, the distance calculation unit 122 generates a corrected image in which the blur shape of a target image other than the first target image (hereinafter referred to as a second target image) among the target images acquired in step S22 is corrected ( Step S25). Note that the process of correcting the blurred shape of the second target image is the same as the process of step S5 shown in FIG.

具体的には、任意に選択された第2対象画像にぼけを付加して、当該第2対象画像のぼけ形状をステップS24において生成された基準画像のぼけ形状と一致させるためのぼけ補正カーネルf´(d)は、上述した式(10)により求めることができる。距離算出部122は、求めたぼけ補正カーネルf´(d)を用いて、第2対象画像のぼけ形状を補正した補正画像を生成する。 Specifically, a blur correction kernel f for adding blur to the arbitrarily selected second target image and matching the blur shape of the second target image with the blur shape of the reference image generated in step S24. ′ C (d) can be obtained by the above-described equation (10). The distance calculation unit 122 generates a corrected image in which the blur shape of the second target image is corrected using the obtained blur correction kernel f ′ c (d).

ここで、ぼけ補正カーネルf´(d)を用いて第2対象画像Ixのぼけ形状を補正した補正画像をIx´(d)とすると、補正画像Ix´(d)は、以下の式(12)で表すことができる。 Here, if a corrected image obtained by correcting the blur shape of the second target image Ix o using the blur correction kernel f ′ c (d) is Ix ′ o (d), the corrected image Ix ′ o (d) is (12).

Figure 2019207185
Figure 2019207185

本実施形態においては、上記したように被写体までの距離がdであると仮定した場合の補正画像Ix´o(d)を生成することができる。   In the present embodiment, as described above, it is possible to generate the corrected image Ix′o (d) when it is assumed that the distance to the subject is d.

なお、上記したステップS24及びS25の処理は、ステップS22において取得された対象画像の組み合わせ毎に実行される。具体的には、上記したように撮像画像に含まれるR画像、G画像及びB画像の各々が対象画像として取得されている場合には、例えば、第1対象画像をG画像、第2対象画像をR画像としてステップS24及びS25が実行され、第1対象画像をB画像、第2対象画像をG画像としてステップS24及びS25の処理が実行され、第1対象画像をR画像、第2対象画像をB画像としてステップS24及びS25の処理が実行される。   Note that the processes in steps S24 and S25 described above are executed for each combination of target images acquired in step S22. Specifically, when each of the R image, the G image, and the B image included in the captured image is acquired as the target image as described above, for example, the first target image is the G image and the second target image. Steps S24 and S25 are executed with the first target image as the B image and the second target image as the G image, and the processes at Steps S24 and S25 are executed with the first target image as the R image and the second target image. The processes of steps S24 and S25 are executed with B as the B image.

次に、距離算出部122は、ステップS25において生成された補正画像Ix´(d)と基準画像Ix´(d)とを比較し、補正画像Ix´(d)と基準画像Ix´(d)とのぼけ形状の一致度を計算する(ステップS26)。ステップS26においては、後述するように光学系の収差に基づいてぼけ形状の一致度が計算される。 Next, the distance calculation unit 122 compares the corrected image Ix ′ o (d) generated in step S25 with the reference image Ix ′ r (d), and the corrected image Ix ′ o (d) and the reference image Ix ′. The degree of coincidence of the blurred shape with r (d) is calculated (step S26). In step S26, the degree of coincidence of the blur shape is calculated based on the aberration of the optical system, as will be described later.

以下、ステップS26における一致度の計算処理について具体的に説明する。ぼけ形状の一致度の計算には、例えばSSD、SAD、NCC、ZNCC、Color Alignment Measure、エッジ画像のZNCC等を利用することができるが、ここでは、明るさの変動にロバストなZNCCを利用する場合について説明する。   Hereinafter, the coincidence degree calculation process in step S26 will be described in detail. For example, SSD, SAD, NCC, ZNCC, Color Alignment Measure, and ZNCC of an edge image can be used to calculate the degree of coincidence of the blur shape. Here, ZNCC that is robust to variations in brightness is used. The case will be described.

ステップS26においては、距離dを仮定した基準画像Ix´(d)と補正画像Ix´(d)とから構成されるRGB画像の対象画素を中心とする局所領域で、指標L(d)を計算する。上記したようにステップS24及びS25の処理が対象画像(R画像、G画像及びB画像)の組み合わせ毎に実行されている場合には、指標L(d)は以下の式(13)により計算される。 In step S26, the index L (d) is a local region centered on the target pixel of the RGB image composed of the reference image Ix ′ r (d) and the corrected image Ix ′ o (d) assuming the distance d. Calculate As described above, when the processes of steps S24 and S25 are executed for each combination of target images (R image, G image, and B image), the index L (d) is calculated by the following equation (13). The

Figure 2019207185
Figure 2019207185

なお、式(13)において、I´(d)は、ぼけ補正カーネルf´(d)を用いてR画像Iのぼけ形状を補正した補正画像または基準画像である。I´(d)及びI´(d)は、I´(d)のR画像をG画像及びB画像としたものである。また、∇Iは、ぼけ画像Iのエッジ画像である。このような式(13)における指標L(d)は、値が小さいほど画像の一致度が高いことを示している。本実施形態においては、この指標L(d)を一致度として用いることができる。 In Expression (13), I'R (d ) is a corrected image or the reference image by correcting the blurring shape of the R image I R with a blur correction kernel f'c (d). I ′ G (d) and I ′ B (d) are obtained by converting the R image of I ′ R (d) into a G image and a B image. Further, ∇I is an edge image of the blurred image I. The index L (d) in the equation (13) indicates that the smaller the value is, the higher the matching degree of the images is. In the present embodiment, this index L (d) can be used as the degree of coincidence.

なお、式(13)においては、センサ画像(色)の組み合わせの重みを算術平均としたが、フィルタ10(第1フィルタ領域13及び第2フィルタ領域14)の透過率特性や各センサ(第1センサ31、第2センサ32及び第3センサ33)の分光感度特性を考慮した加重平均としてもよい。   In Expression (13), the weight of the combination of sensor images (colors) is an arithmetic average, but the transmittance characteristics of the filter 10 (first filter region 13 and second filter region 14) and each sensor (first It is good also as a weighted average which considered the spectral sensitivity characteristic of the sensor 31, the 2nd sensor 32, and the 3rd sensor 33).

ここで、実際のレンズ20には収差が存在し、本実施形態にける被写体までの距離の算出(推定)精度を低下させる場合がある。なお、被写体までの距離の算出に対して直接影響がある収差としては像面湾曲を想定している。像面湾曲の原理等については前述した第1の実施形態において説明した通りであるため、ここではその詳しい説明を省略する。   Here, there is an aberration in the actual lens 20, and the calculation (estimation) accuracy of the distance to the subject in the present embodiment may be lowered. Note that curvature of field is assumed as an aberration that directly affects the calculation of the distance to the subject. Since the field curvature principle and the like are as described in the first embodiment, detailed description thereof is omitted here.

本実施形態においては、像面湾曲によって生じる収差(色収差)の影響を緩和(補正)しながら、精度の高い一致度を計算し、誤差の少ない距離推定を実現するために、以下の式(14)により上記した指標L(d)を計算する。なお、式(14)におけるcRG、cGB及びcBRは、像面湾曲によるずれの補正量である。 In the present embodiment, in order to calculate a degree of coincidence with high accuracy and reduce distance with less error while reducing (correcting) the influence of aberration (chromatic aberration) caused by field curvature, the following equation (14) ) To calculate the above-described index L (d). Note that c RG , c GB, and c BR in Equation (14) are correction amounts for deviation due to field curvature.

Figure 2019207185
Figure 2019207185

ここで、図16Aは、像面湾曲によって生じる収差を補正していない場合の指標値、すなわち、上記した式(13)を用いて計算された指標値(指標L(d))の分布を示す。一方、図16Bは、像面湾曲によって生じる収差を補正した場合の指標値、すなわち、上記した式(14)を用いて算出された指標値の分布を示す。   Here, FIG. 16A shows the distribution of the index value (index L (d)) calculated using the above equation (13) when the aberration caused by the curvature of field is not corrected. . On the other hand, FIG. 16B shows an index value when the aberration caused by the curvature of field is corrected, that is, a distribution of index values calculated using the above-described equation (14).

像面湾曲によって生じる収差を補正していない場合には、図16Aに示すように、センサ画像の組み合わせ毎の指標値の最小値(すなわち、一致度が最も高いd)が真値に対してずれている。   When the aberration caused by the curvature of field is not corrected, as shown in FIG. 16A, the minimum index value (that is, d having the highest degree of coincidence) for each combination of sensor images is shifted from the true value. ing.

ここで、本実施形態にいては、上記した像面湾曲によるずれの補正量が定義された像面湾曲用の補正テーブル(以下、第3補正テーブルと表記)がセンサ画像の組み合わせ毎に予め用意されているものとする。なお、この第3補正テーブルは、収差情報として収差情報格納部123に予め格納されていればよい。   Here, in the present embodiment, a correction table for field curvature (hereinafter referred to as a third correction table) in which the correction amount of deviation due to field curvature is defined is prepared in advance for each combination of sensor images. It is assumed that This third correction table may be stored in advance in the aberration information storage unit 123 as aberration information.

これによれば、図16Bに示すように、センサ画像の組み合わせ毎に用意されている第3補正テーブル(つまり、R−Gの補正テーブル、G−Bの補正テーブル、B−Rの補正テーブル)を用いて指標値と距離dの対応関係を変更する(ずらす)ことによって、像面湾曲によるずれを補正することができる。   According to this, as shown in FIG. 16B, a third correction table prepared for each combination of sensor images (that is, an RG correction table, a GB correction table, and a BR correction table). By changing (shifting) the correspondence between the index value and the distance d using, the deviation due to the curvature of field can be corrected.

ここで、像面湾曲によって生じる収差の補正処理は各画素で行われるため、画像全体の第3補正テーブルが用意されているものとする。第3補正テーブルは、事前に評価パターンを撮像し、平面からのずれ量を計測しておくことで作成されるものとする。このように得られる計測点から画像全体のずれ量を求めるためには、多項式近似曲線やゼルニケ多項式等のモデル近似を用いる。なお、モデル係数がわかれば展開により画像全体の補正量が計算可能である。このため、上記した収差情報として収差情報格納部123に格納されている第3補正テーブルは、モデル係数であってもよいし、展開後の全画素の補正値でもよい。   Here, since the correction processing of the aberration caused by the curvature of field is performed in each pixel, it is assumed that a third correction table for the entire image is prepared. The third correction table is created by imaging the evaluation pattern in advance and measuring the amount of deviation from the plane. In order to obtain the shift amount of the entire image from the measurement points obtained in this way, model approximation such as a polynomial approximation curve or Zernike polynomial is used. If the model coefficient is known, the correction amount of the entire image can be calculated by development. For this reason, the third correction table stored in the aberration information storage unit 123 as the aberration information described above may be a model coefficient or a correction value of all the pixels after development.

なお、像面湾曲によって生じる収差は、被写体までの距離(撮像距離)に応じて変化する場合があるため、当該距離に応じて第3補正テーブルを切り替える構成としても構わない。この場合には、例えば以下の式(15)により指標L(d)を計算するものとする。   Since the aberration caused by the curvature of field may change according to the distance to the subject (imaging distance), the third correction table may be switched according to the distance. In this case, for example, the index L (d) is calculated by the following equation (15).

Figure 2019207185
Figure 2019207185

この式(15)においては、cRG(d)、cGB(d)及びcBR(d)が像面湾曲によるずれの補正量であり、当該補正量を距離dに応じて変化させる。cRG(d)、cGB(d)及びcBR(d)は、距離に応じた第3補正テーブルを複数用意して、当該複数の第3補正テーブルのうち距離dに最も近い距離に応じた第3補正テーブルを参照することによって特定されてもよいし、当該距離dに近い距離に応じた複数の第3補正テーブルから線形補間により求めてもよいし、また、距離方向に対するモデル近似により展開された値としてもよい。 In this equation (15), c RG (d), c GB (d), and c BR (d) are correction amounts for deviation due to field curvature, and the correction amounts are changed according to the distance d. For c RG (d), c GB (d), and c BR (d), a plurality of third correction tables corresponding to the distance are prepared, and according to the distance closest to the distance d among the plurality of third correction tables. May be specified by referring to the third correction table, or may be obtained by linear interpolation from a plurality of third correction tables corresponding to distances close to the distance d, or by model approximation with respect to the distance direction. It may be an expanded value.

距離算出部122は、ステップS26において算出された一致度に基づいて、補正画像Ix´(d)と基準画像Ix´(d)とのぼけ形状が一致しているか否かを判定する(ステップS27)。上記したようにZNCCを利用した指標L(d)を一致度として用いる場合には、当該指標L(d)が閾値未満であれば、補正画像Ix´(d)と基準画像Ix´(d)とのぼけ形状が一致していると判定する。 The distance calculation unit 122 determines whether the blurred shapes of the corrected image Ix ′ o (d) and the reference image Ix ′ r (d) match based on the degree of matching calculated in step S <b> 26 ( Step S27). As described above, when the index L (d) using ZNCC is used as the degree of coincidence, if the index L (d) is less than the threshold, the corrected image Ix ′ o (d) and the reference image Ix ′ r ( It is determined that the blurred shape matches with d).

補正画像Ix´(d)と基準画像Ix´(d)とのぼけ形状が一致していると判定された場合(ステップS27のYES)、距離dが撮像画像に含まれる被写体までの距離として算出される。 When it is determined that the blurred shape of the corrected image Ix ′ o (d) and the reference image Ix ′ r (d) match (YES in step S27), the distance d is the distance to the subject included in the captured image. Is calculated as

一方、補正画像Ix´(d)と基準画像Ix´(d)とのぼけ形状が一致していないと判定された場合(ステップS27のNO)、上記したステップS24に戻って処理が繰り返される。この場合、異なる距離dで基準画像及び補正画像が生成される。 On the other hand, when it is determined that the blurred shape of the corrected image Ix ′ o (d) and the reference image Ix ′ r (d) do not match (NO in step S27), the process returns to the above step S24 and the process is repeated. It is. In this case, the reference image and the corrected image are generated at different distances d.

なお、図15ではステップS27において補正画像Ix´(d)と基準画像Ix´(d)とのぼけ形状が一致していると判定された場合に処理が終了されるものとして説明したが、例えば仮定する全ての距離dについて一致度を算出し、当該一致度が最も高い距離d(例えば、指標L(d)が最小となる距離d)を被写体までの距離として算出するようにしてもよい。 In FIG. 15, the description has been made assuming that the processing is ended when it is determined in step S <b> 27 that the corrected image Ix ′ o (d) and the reference image Ix ′ r (d) match. For example, the degree of coincidence is calculated for all assumed distances d, and the distance d having the highest degree of coincidence (for example, the distance d with the smallest index L (d)) is calculated as the distance to the subject. Good.

換言すれば、距離算出部122は、補正画像Ix´(d)と基準画像Ix´(d)とで相関が最も高くなる距離dを求めることにより、被写体までの距離を算出することができる。 In other words, the distance calculation unit 122 can calculate the distance to the subject by obtaining the distance d that gives the highest correlation between the corrected image Ix ′ o (d) and the reference image Ix ′ r (d). it can.

なお、ここでは対象画素についてステップS24以降の処理が実行される場合について説明したが、当該対象画素について被写体までの距離が算出された場合には、当該対象画素以外の画素についてもステップS24以降の処理が実行される。これにより、撮像画像(RGB画像)中に含まれる全ての被写体までの距離を算出することができる。   In addition, although the case where the process after step S24 is performed about a target pixel was demonstrated here, when the distance to a to-be-photographed object is calculated about the said target pixel, also about pixels other than the said target pixel after step S24 Processing is executed. Thereby, the distances to all the subjects included in the captured image (RGB image) can be calculated.

上記したように本実施形態においては、第2対象画像に対して複数の異なるぼけを付加して得られる補正画像と第1対象画像(第3画像)にぼけを付加して得られる基準画像(第5画像)との相関に応じて被写体までの距離を算出する。具体的には、本実施形態においては、フィルタ10に応じて変更された複数の対象画像のぼけ形状を距離dを仮定した任意のぼけ形状に補正した基準画像と補正画像とを生成し、当該基準画像と補正画像との相関がより高くなる距離dを求めることで被写体までの距離を算出する。   As described above, in the present embodiment, a corrected image obtained by adding a plurality of different blurs to the second target image and a reference image obtained by adding blur to the first target image (third image) ( The distance to the subject is calculated according to the correlation with the fifth image). Specifically, in the present embodiment, a reference image and a corrected image are generated by correcting the blur shape of a plurality of target images changed according to the filter 10 to an arbitrary blur shape assuming a distance d, and The distance to the subject is calculated by obtaining the distance d at which the correlation between the reference image and the corrected image becomes higher.

本実施形態においては、このような構成により、前述した第1の実施形態と同様に精度の高い距離情報を得ることが可能となり、誤差の少ない距離推定を実現することが可能となる。   In the present embodiment, with such a configuration, it is possible to obtain highly accurate distance information as in the first embodiment described above, and it is possible to realize distance estimation with less error.

(第4の実施形態)
次に、第4の実施形態について説明する。なお、本実施形態に係る撮像装置のハードウェア構成、フィルタ及び機能構成は、前述した第1の実施形態と同様であるため、適宜、図1、図2及び図4等を用いて説明する。また、以下の説明においては、前述した第1の実施形態と同様の部分についてはその詳しい説明を省略し、当該第1の実施形態と異なる部分について主に述べる。
(Fourth embodiment)
Next, a fourth embodiment will be described. Note that the hardware configuration, filter, and functional configuration of the imaging apparatus according to this embodiment are the same as those in the first embodiment described above, and therefore will be described with reference to FIGS. 1, 2, 4, and the like as appropriate. In the following description, detailed description of the same parts as those of the first embodiment described above will be omitted, and parts different from those of the first embodiment will be mainly described.

前述した第3の実施形態においては倍率色収差を補正するものとして説明したが、当該第3の実施形態では、距離に応じて変動する倍率色収差には対応していない。   Although the third embodiment has been described as correcting the lateral chromatic aberration, the third embodiment does not support the lateral chromatic aberration that varies depending on the distance.

そこで、本実施形態においては、被写体までの距離を算出するタイミングで倍率色収差補正を行う点で、前述した第1の実施形態とは異なる。   Therefore, this embodiment is different from the first embodiment described above in that the magnification chromatic aberration correction is performed at the timing of calculating the distance to the subject.

以下、図17のフローチャートを参照して、本実施形態に係る撮像装置100の処理手順の一例について説明する。なお、図17に示す処理は、撮像装置100に含まれる画像処理部120によって実行される。   Hereinafter, an example of a processing procedure of the imaging apparatus 100 according to the present embodiment will be described with reference to the flowchart of FIG. Note that the processing illustrated in FIG. 17 is executed by the image processing unit 120 included in the imaging apparatus 100.

まず、前述した図15に示すステップS21及びS22の処理に相当するステップS31及びS32の処理が実行される。   First, the processes of steps S31 and S32 corresponding to the processes of steps S21 and S22 shown in FIG. 15 are executed.

次に、距離算出部122は、収差情報格納部123に格納されている収差情報(第1補正テーブル)に基づいて、対象画像間における倍率色収差を補正する(ステップS33)。   Next, the distance calculation unit 122 corrects the chromatic aberration of magnification between the target images based on the aberration information (first correction table) stored in the aberration information storage unit 123 (step S33).

なお、ステップS33の処理が実行された場合には前述した図15に示すステップS24〜S27の処理に相当するステップS34〜S37の処理が実行されるが、ステップS33においては、当該ステップS34及びS35において用いられる距離dに応じた補正量により倍率色収差により生じている色ずれを補正するものとする。   In addition, when the process of step S33 is performed, the process of step S34-S37 equivalent to the process of step S24-S27 shown in FIG. 15 mentioned above is performed, However, In step S33, the said step S34 and S35 are performed. The color shift caused by the chromatic aberration of magnification is corrected by the correction amount corresponding to the distance d used in FIG.

この場合における距離dに応じた補正量は、例えば距離に応じた複数の第1補正テーブルを用意しておき、当該複数の第1補正テーブルのうち距離dに最も近い距離に応じた第1補正テーブルを参照することによって特定されてもよいし、当該距離dに近い距離に応じた複数の第1補正テーブルから線形補間により求めてもよいし、または、距離方向に対するモデル近似により展開された値としてもよい。   In this case, for the correction amount corresponding to the distance d, for example, a plurality of first correction tables corresponding to the distance are prepared, and the first correction corresponding to the distance closest to the distance d among the plurality of first correction tables is prepared. The value may be specified by referring to the table, may be obtained by linear interpolation from a plurality of first correction tables corresponding to distances close to the distance d, or may be a value developed by model approximation in the distance direction It is good.

なお、本実施形態においては、距離dに応じた補正量により倍率色収差を補正する構成であるため、ステップS37において補正画像Ix´(d)と基準画像Ix´(d)とのぼけ形状が一致していないと判定された場合(ステップS37のNO)、ステップS33に戻って処理が繰り返される。 In the present embodiment, since the chromatic aberration of magnification is corrected by a correction amount corresponding to the distance d, the blurred shape between the corrected image Ix ′ o (d) and the reference image Ix ′ r (d) in step S37. Are determined not to match (NO in step S37), the process returns to step S33 and the process is repeated.

本実施形態においては、上記した処理が実行されることによって、被写体までの距離を算出するタイミングで距離dに応じた補正量により倍率色収差を補正することが可能となる。   In the present embodiment, by executing the above-described processing, it is possible to correct lateral chromatic aberration with a correction amount corresponding to the distance d at the timing of calculating the distance to the subject.

また、前述した第3の実施形態においては対象画像を構成する各画素についてステップS24以降の処理が実行されるものとして説明したが、本実施形態においては、対象画像を構成する各画素についてステップS33以降の処理が実行される。   Further, in the third embodiment described above, it has been described that the processing after step S24 is executed for each pixel constituting the target image. However, in this embodiment, step S33 is performed for each pixel constituting the target image. The subsequent processing is executed.

なお、図17においては省略されているが、前述した第1の実施形態において説明した歪曲収差を補正する処理がステップS32の処理の後等に実行されるようにしても構わない。   Although omitted in FIG. 17, the process for correcting distortion described in the first embodiment may be executed after the process of step S32.

上記したように本実施形態においては、倍率色収差による影響が距離に応じて変動する点を考慮して当該倍率色収差を補正することにより、より精度の高い距離情報を得ることが可能となり、誤差の少ない距離推定を実現することができる。   As described above, in the present embodiment, it is possible to obtain more accurate distance information by correcting the magnification chromatic aberration in consideration of the point that the influence of the magnification chromatic aberration varies depending on the distance, and the error can be obtained. Less distance estimation can be realized.

以上述べた少なくとも1つの実施形態によれば、精度の高い距離情報を得ることが可能な画像処理装置、撮像装置及び方法を提供することができる。   According to at least one embodiment described above, it is possible to provide an image processing apparatus, an imaging apparatus, and a method that can obtain highly accurate distance information.

なお、上記した処理手順、制御手順、具体的名称、各種のデータやパラメータ等を含む情報は、特記する場合を除いて任意に変更することができる。また、図示された装置の各構成要素は、機能概念的なものであり、必ずしも物理的に図示されているように構成されていることを要しない。すなわち、装置の分散または統合の具体的形態は、図示されたものに限られず、その全部または一部を各種の負担や使用状況等に応じて、任意の単位で機能的または物理的に分散または統合することができる。   The information including the processing procedure, control procedure, specific name, various data, parameters, and the like described above can be arbitrarily changed unless otherwise specified. Each component of the illustrated apparatus is functionally conceptual and does not necessarily have to be physically configured as illustrated. That is, the specific form of the distribution or integration of the devices is not limited to the illustrated one, and all or a part thereof is functionally or physically distributed or arbitrarily distributed in arbitrary units according to various burdens or usage conditions. Can be integrated.

また、上記した各実施形態に係る撮像装置100に含まれる画像処理部120の機能は、例えば、汎用のコンピュータ装置を基本ハードウェアとして用いることで実現することが可能である。実行されるプログラム(画像処理プログラム)は、上述した各機能を含むモジュール構成となっている。また、実行されるプログラムは、インストール可能な形式または実行可能な形式のファイルでCD−ROM、CD−R、DVD等のコンピュータ読み取り可能な記憶媒体に記録されて提供してもよいし、ROM等に予め組み込んで提供してもよい。   In addition, the function of the image processing unit 120 included in the imaging device 100 according to each of the above-described embodiments can be realized by using a general-purpose computer device as basic hardware, for example. The executed program (image processing program) has a module configuration including the above-described functions. The program to be executed may be provided by being recorded in a computer-readable storage medium such as a CD-ROM, CD-R, DVD or the like in an installable or executable format file, a ROM, etc. May be provided in advance.

(応用例)
以下、前述のような構成を有する撮像装置100が適用される応用例についていくつか説明する。
(Application examples)
Hereinafter, some application examples to which the imaging apparatus 100 having the above-described configuration is applied will be described.

図18は、撮像装置100を含む移動体300の機能構成例を示す。移動体300は、例えば、自動運転機能を有する自動車、無人航空機、自律型の移動ロボット等として実現され得る。無人航空機は、人が乗ることができない飛行機、回転翼航空機、滑空機、飛行船であって、遠隔操作または自動操縦により飛行させることができるものであり、例えば、ドローン(マルチコプター)、ラジコン機、農薬散布用ヘリコプター等を含む。自律型の移動ロボットは、無人搬送車(Automated Guided Vehicle:AGV)のような移動ロボット、床を掃除するための掃除ロボット、来場者に各種案内を行うコミュニケーションロボット等を含む。移動体300は更に、ロボット本体が移動するものだけでなく、ロボットアームのような、ロボットの一部分の移動・回転用の駆動機構を有する産業用ロボットも含まれ得る。   FIG. 18 illustrates a functional configuration example of the moving object 300 including the imaging device 100. The mobile object 300 can be realized as, for example, an automobile having an automatic driving function, an unmanned aircraft, an autonomous mobile robot, or the like. Unmanned aerial vehicles are airplanes, rotary wing aircraft, gliders, airships that humans cannot ride on, and can be made to fly by remote control or autopilot, such as drones (multicopters), radio control aircraft, Includes helicopters for spraying agricultural chemicals. Autonomous mobile robots include a mobile robot such as an automated guided vehicle (AGV), a cleaning robot for cleaning a floor, a communication robot for performing various guidance for visitors. The moving body 300 may include not only a robot body that moves but also an industrial robot having a drive mechanism for moving and rotating a part of the robot, such as a robot arm.

図18に示すように、移動体300は、例えば、撮像装置100と制御信号生成部301と駆動機構302とを有する。撮像装置100のうちの少なくとも撮像部110は、例えば、移動体300またはその一部分の進行方向の被写体を撮像するように設置される。   As illustrated in FIG. 18, the moving body 300 includes, for example, an imaging device 100, a control signal generation unit 301, and a drive mechanism 302. At least the imaging unit 110 of the imaging apparatus 100 is installed so as to image a subject in the traveling direction of the moving body 300 or a part thereof, for example.

図19に示すように、移動体300が自動車300Aである場合、撮像部110は、前方を撮像するいわゆるフロントカメラとして設置され得るほか、バック時に後方を撮像するいわゆるリアカメラとしても設置され得る。もちろん、これら両方が設置されてもよい。また、撮像部110は、いわゆるドライブレコーダーとしての機能を兼ねて設置されるものであってもよい。すなわち、撮像部110は、録画機器であってもよい。   As shown in FIG. 19, when the moving body 300 is an automobile 300 </ b> A, the imaging unit 110 can be installed as a so-called front camera that images the front, and can also be installed as a so-called rear camera that captures the rear when back. Of course, both of these may be installed. Further, the imaging unit 110 may be installed also as a function as a so-called drive recorder. That is, the imaging unit 110 may be a recording device.

次いで、図20は、移動体300がドローン300Bである場合の例を示す。ドローン300Bは、駆動機構302に相当するドローン本体310と4つのプロペラ部311,312,313,314とを備える。各プロペラ部311,312,313,314はプロペラとモータとを有する。モータの駆動がプロペラに伝達されることによって、プロペラが回転し、その回転による揚力によってドローン300Bが浮上する。ドローン本体310の、例えば下部には、撮像部110(あるいは、撮像部110を含む撮像装置100)が搭載されている。   Next, FIG. 20 shows an example in which the moving body 300 is a drone 300B. The drone 300 </ b> B includes a drone body 310 corresponding to the drive mechanism 302 and four propeller units 311, 312, 313, and 314. Each propeller part 311, 312, 313, 314 has a propeller and a motor. When the drive of the motor is transmitted to the propeller, the propeller is rotated, and the drone 300B is lifted by the lifting force by the rotation. An imaging unit 110 (or the imaging device 100 including the imaging unit 110) is mounted on, for example, the lower portion of the drone body 310.

また、図21は、移動体300が自律型の移動ロボット300Cである場合の例を示す。移動ロボット300Cの下部には、駆動機構302に相当する、モータや車輪等を含む動力部320が設けられている。動力部320は、モータの回転数や車輪の向きを制御する。移動ロボット300Cは、モータの駆動が伝達されることによって、路面または床面に設置する車輪が回転し、当該車輪の向きが制御されることにより任意の方向に移動することができる。撮像部110は、例えば、人型の移動ロボット300Cの頭部に、前方を撮像するように設置され得る。なお、撮像部110は、後方や左右を撮像するように設置されてもよいし、複数の方位を撮像するように複数設置されてもよい。また、センサ等を搭載するためのスペースが少ない小型ロボットに少なくとも撮像部110を設けて、被写体の位置を推定することにより、デッドレコニングを行うこともできる。   FIG. 21 shows an example in which the moving body 300 is an autonomous mobile robot 300C. Below the mobile robot 300C, a power unit 320 corresponding to the drive mechanism 302 and including a motor, wheels, and the like is provided. The power unit 320 controls the rotation speed of the motor and the direction of the wheels. The mobile robot 300 </ b> C can move in an arbitrary direction by rotating the wheels installed on the road surface or the floor surface by transmitting the motor drive and controlling the direction of the wheels. The imaging unit 110 can be installed, for example, on the head of the humanoid mobile robot 300C so as to capture the front. Note that the imaging unit 110 may be installed so as to capture the rear and left and right, or a plurality of imaging units 110 may be installed so as to capture a plurality of directions. Also, dead reckoning can be performed by providing at least the imaging unit 110 in a small robot with a small space for mounting a sensor or the like and estimating the position of the subject.

なお、移動体300の一部分の移動及び回転を制御する場合、図22に示すように、撮像部110は、例えば、ロボットアーム300Dで把持される物体を撮像するように、ロボットアーム300Dの先端等に設置されてもよい。画像処理部120は、把持しようとする物体の三次元形状やその物体が置かれている位置を推定する。これにより、物体の正確な把持動作を行うことができる。   In the case of controlling the movement and rotation of a part of the moving body 300, as shown in FIG. 22, the imaging unit 110, for example, the tip of the robot arm 300D or the like so as to image an object held by the robot arm 300D. May be installed. The image processing unit 120 estimates a three-dimensional shape of an object to be grasped and a position where the object is placed. Thereby, an accurate gripping operation of the object can be performed.

制御信号生成部301は、撮像装置100から出力される被写体の位置に基づいて、駆動機構302を制御するための制御信号を出力する。駆動機構302は、制御信号により、移動体300または移動体の一部分を駆動する。駆動機構302は、例えば、移動体300またはその一部分の移動、回転、加速、減速、推力(揚力)の加減、進行方向の転換、通常運転モードと自動運転モード(衝突回避モード)の切り替え、及びエアバック等の安全装置の作動のうちの少なくとも一つを行う。駆動機構302は、例えば、被写体までの距離が閾値未満である場合、移動、回転、加速、推力(揚力)の加減、物体に近寄る方向への方向転換、及び自動運転モード(衝突回避モード)から通常運転モードへの切り替えのうちの少なくとも一つを行ってもよい。   The control signal generation unit 301 outputs a control signal for controlling the drive mechanism 302 based on the position of the subject output from the imaging device 100. The driving mechanism 302 drives the moving body 300 or a part of the moving body by a control signal. The drive mechanism 302 is, for example, moving, rotating, accelerating, decelerating, adjusting thrust (lifting force), changing a traveling direction, switching between a normal operation mode and an automatic operation mode (collision avoidance mode), At least one of the operations of a safety device such as an air bag is performed. For example, when the distance to the subject is less than the threshold, the drive mechanism 302 moves, rotates, accelerates, adjusts thrust (lift), changes direction to approach the object, and from the automatic operation mode (collision avoidance mode). At least one of the switching to the normal operation mode may be performed.

自動車300Aの駆動機構302は、例えばタイヤである。ドローン300Bの駆動機構302は、例えばプロペラである。移動ロボット300Cの駆動機構302は、例えば脚部である。ロボットアーム300Dの駆動機構302は、例えば撮像部110が設けられた先端を支持する支持部である。   The drive mechanism 302 of the automobile 300A is, for example, a tire. The drive mechanism 302 of the drone 300B is, for example, a propeller. The drive mechanism 302 of the mobile robot 300C is, for example, a leg portion. The drive mechanism 302 of the robot arm 300D is a support unit that supports the tip provided with the imaging unit 110, for example.

移動体300は、更に画像処理部120からの被写体の位置に関する情報(距離情報)が入力されるスピーカやディスプレイを備えていてもよい。スピーカやディスプレイは、被写体の位置に関する音声または画像を出力する。スピーカやディスプレイは、撮像装置100と有線または無線で接続されている。更に、移動体300は、画像処理部120からの被写体の位置に関する情報が入力される発光部を有していてもよい。発光部は、例えば、画像処理部120からの被写体の位置に関する情報に応じて点灯したり消灯したりする。   The moving body 300 may further include a speaker or a display to which information (distance information) related to the position of the subject from the image processing unit 120 is input. The speaker or the display outputs sound or an image relating to the position of the subject. The speaker and the display are connected to the imaging device 100 by wire or wirelessly. Furthermore, the moving body 300 may include a light emitting unit to which information regarding the position of the subject from the image processing unit 120 is input. For example, the light emitting unit is turned on or off according to information on the position of the subject from the image processing unit 120.

別の例として、例えば、移動体300がドローンである場合、上空から、地図(物体の三次元形状)の作成、ビルや地形の構造調査、ひび割れや電線破断等の点検等が行われる際に、撮像部110は対象を撮影した画像を取得し、被写体との距離が閾値以上であるか否かを判定する。制御信号生成部301は、この判定結果に基づいて、点検対象との距離が一定になるようにドローンの推力を制御するための制御信号を生成する。ここで、推力には揚力も含まれる。駆動機構302が、この制御信号に基づいてドローンを動作させることにより、ドローンを点検対象に並行して飛行させることができる。移動体300が監視用のドローンである場合、監視対象の物体との距離を一定に保つようにドローンの推力を制御するための制御信号を生成してもよい。   As another example, for example, when the moving body 300 is a drone, when a map (three-dimensional shape of an object) is created, a structure survey of a building or terrain, an inspection such as a crack or an electric wire breakage is performed from above. The imaging unit 110 acquires an image obtained by photographing the target, and determines whether the distance to the subject is equal to or greater than a threshold value. Based on the determination result, the control signal generation unit 301 generates a control signal for controlling the thrust of the drone so that the distance from the inspection target is constant. Here, the thrust includes lift. The drive mechanism 302 operates the drone based on the control signal, so that the drone can fly in parallel with the inspection target. When the moving body 300 is a drone for monitoring, a control signal for controlling the drone thrust may be generated so as to keep the distance from the object to be monitored constant.

また、ドローンの飛行時に、撮像部110は地面方向を撮影した画像を取得し、地面との距離が閾値以上であるか否かを判定する。制御信号生成部301は、この判定結果に基づいて、地面からの高さが指定された高さになるようにドローンの推力を制御するための制御信号を生成する。駆動機構302が、この制御信号に基づいてドローンを動作させることにより、ドローンを指定された高さで飛行させることができる。農薬散布用ドローンであれば、ドローンの地面からの高さを一定に保つことで、農薬を均等に散布しやすくなる。   Further, when the drone flies, the imaging unit 110 acquires an image obtained by photographing the ground direction, and determines whether or not the distance from the ground is equal to or greater than a threshold value. Based on the determination result, the control signal generation unit 301 generates a control signal for controlling the thrust of the drone so that the height from the ground becomes a specified height. The drive mechanism 302 operates the drone based on the control signal, so that the drone can fly at a specified height. If it is a drone for agricultural chemical spraying, it will become easy to spray agricultural chemicals uniformly by keeping the height of the drone from the ground constant.

また、移動体300がドローンまたは自動車である場合、ドローンの連係飛行や自動車の連隊走行時に、撮像部110は、周囲のドローンや前方の自動車を撮影した画像を取得し、当該ドローンや自動車までの距離が閾値以上であるか否かを判定する。制御信号生成部301は、この判定結果に基づいて、その周囲のドローンや前方の自動車との距離が一定になるように、ドローンの推力や自動車の速度を制御するための制御信号を生成する。駆動機構302が、この制御信号に基づいてドローンや自動車を動作させることにより、ドローンの連係飛行や自動車の連隊走行を容易に行うことができる。移動体300が自動車である場合、ドライバーが閾値を設定できるように、ユーザインタフェースを介してドライバーの指示を受理することで、閾値を変化させてもよい。これにより、ドライバーが好む車間距離で自動車を走行させられる。あるいは、前方の自動車との安全な車間距離を保つために、自動車の速度に応じて閾値を変化させてもよい。安全な車間距離は、自動車の速度によって異なる。そこで、自動車の速度が速いほど閾値を長く設定することができる。また、移動体300が自動車である場合に、進行方向の所定の距離を閾値に設定しておき、その閾値の手前に物体が現れた場合にブレーキが自動で作動したり、エアバック等の安全装置が自動で作動したりするための制御信号を生成するように制御信号生成部301を構成するとよい。この場合、自動ブレーキやエアバック等の安全装置が駆動機構302に設けられる。   Further, when the moving body 300 is a drone or a car, the imaging unit 110 obtains an image of the surrounding drone or a front car during the drone linked flight or the car regime run, It is determined whether the distance is greater than or equal to a threshold value. Based on the determination result, the control signal generation unit 301 generates a control signal for controlling the drone thrust and the speed of the car so that the distance from the surrounding drone and the car ahead is constant. The drive mechanism 302 operates the drone or the vehicle based on the control signal, so that the drone linked flight and the vehicle regime can be easily performed. When the moving body 300 is an automobile, the threshold value may be changed by receiving an instruction from the driver via the user interface so that the driver can set the threshold value. As a result, the vehicle can be driven at a distance between the vehicles preferred by the driver. Alternatively, the threshold may be changed according to the speed of the automobile in order to maintain a safe inter-vehicle distance from the automobile ahead. The safe inter-vehicle distance depends on the speed of the car. Therefore, the threshold value can be set longer as the speed of the automobile is higher. In addition, when the moving body 300 is an automobile, a predetermined distance in the traveling direction is set as a threshold, and when an object appears in front of the threshold, a brake is automatically activated, or safety such as an airbag is set. The control signal generator 301 may be configured to generate a control signal for automatically operating the apparatus. In this case, a safety device such as an automatic brake or an airbag is provided in the drive mechanism 302.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。   Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and gist of the invention, and are also included in the invention described in the claims and the equivalents thereof.

10…フィルタ、11…第1フィルタ領域、12…第2フィルタ領域、20…レンズ、30…イメージセンサ、31…第1センサ、32…第2センサ、33…第3センサ、40…CPU、50…メモリ、60…通信I/F、70…ディスプレイ、80…メモリカードスロット、110…撮像部(光学系)、120…画像処理部(画像処理装置)、121…センサ制御部、122…距離算出部、123…収差情報格納部。   DESCRIPTION OF SYMBOLS 10 ... Filter, 11 ... 1st filter area | region, 12 ... 2nd filter area | region, 20 ... Lens, 30 ... Image sensor, 31 ... 1st sensor, 32 ... 2nd sensor, 33 ... 3rd sensor, 40 ... CPU, 50 ... Memory, 60 ... Communication I / F, 70 ... Display, 80 ... Memory card slot, 110 ... Imaging unit (optical system), 120 ... Image processing unit (image processing apparatus), 121 ... Sensor control unit, 122 ... Distance calculation Part, 123... Aberration information storage part.

Claims (10)

光学系の収差の影響を受けた第1画像に含まれる、ぼけ関数が非点対称に表された第1色成分の第2画像と、前記第1色成分とは異なる第2色成分の第3画像とを取得する取得手段と、
前記第2画像に対して複数の異なるぼけを付加して得られる複数の第4画像と、前記第3画像との相関に応じて、前記第1画像に含まれる被写体までの距離を算出する算出手段と
を具備し、
前記相関は、前記収差に基づいて計算される
画像処理装置。
A second image of the first color component in which the blur function is expressed asymptotically and included in the first image affected by the aberration of the optical system, and a second color component different from the first color component. Acquisition means for acquiring three images;
Calculation for calculating the distance to the subject included in the first image according to the correlation between the plurality of fourth images obtained by adding a plurality of different blurs to the second image and the third image Means and
The correlation is calculated based on the aberration.
前記光学系の収差は、像面湾曲によって生じる収差を含む請求項1記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the aberration of the optical system includes an aberration caused by curvature of field. 前記第2画像及び前記第3画像に対して倍率色収差により生じている色ずれを補正する第1補正手段を更に具備し、
前記算出手段は、前記補正された第2画像に対して複数の異なるぼけを付加して得られる複数の第4画像と、前記補正された第3画像との相関に応じて、前記被写体までの距離を算出する
請求項2記載の画像処理装置。
Further comprising first correction means for correcting color shift caused by lateral chromatic aberration with respect to the second image and the third image;
The calculating means is configured to detect the subject up to the subject according to a correlation between a plurality of fourth images obtained by adding a plurality of different blurs to the corrected second image and the corrected third image. The image processing apparatus according to claim 2, wherein the distance is calculated.
前記第2画像及び前記第3画像に対して歪曲収差により生じている位置ずれを補正する第2補正手段を更に具備し、
前記算出手段は、前記補正された第2画像に対して複数の異なるぼけを付加して得られる複数の第4画像と、前記補正された第3画像との相関に応じて、前記被写体までの距離を算出する
請求項2または3記載の画像処理装置。
A second correcting means for correcting a positional shift caused by distortion with respect to the second image and the third image;
The calculating means is configured to detect the subject up to the subject according to a correlation between a plurality of fourth images obtained by adding a plurality of different blurs to the corrected second image and the corrected third image. The image processing apparatus according to claim 2, wherein the distance is calculated.
前記算出手段は、前記第2画像に対して複数の異なるぼけを付加する複数のぼけ補正カーネルのうち、ぼけを付加して得られる第4画像と前記第3画像との相関が高いぼけ補正カーネルを特定することによって、当該特定されたぼけ補正カーネルに対応する距離を算出する請求項1〜4のいずれか一項に記載の画像処理装置。   The calculation means includes a blur correction kernel having a high correlation between a fourth image obtained by adding blur and the third image among a plurality of blur correction kernels that add a plurality of different blurs to the second image. The image processing apparatus according to any one of claims 1 to 4, wherein a distance corresponding to the specified blur correction kernel is calculated by specifying. 前記ぼけ補正カーネルは、前記第2画像のぼけ関数を前記第3画像のぼけ関数に補正するための畳み込み関数であり、第2画像のぼけ関数と第3画像のぼけ関数とから算出された任意の距離の被写体のぼけを補正するための複数のぼけ補正カーネルが予め用意されている請求項5記載の画像処理装置。   The blur correction kernel is a convolution function for correcting the blur function of the second image to the blur function of the third image, and is an arbitrary value calculated from the blur function of the second image and the blur function of the third image. The image processing apparatus according to claim 5, wherein a plurality of blur correction kernels for correcting blur of a subject at a distance of 5 are prepared in advance. 前記算出手段は、前記第2画像に対して複数の異なるぼけを付加して得られる複数の第4画像と前記第3画像にぼけを付加して得られる第5画像との相関に応じて、前記被写体までの距離を算出する請求項1記載の画像処理装置。   The calculation means is configured to determine a correlation between a plurality of fourth images obtained by adding a plurality of different blurs to the second image and a fifth image obtained by adding blurs to the third image. The image processing apparatus according to claim 1, wherein a distance to the subject is calculated. 請求項1〜7のいずれか一項に記載の画像処理装置と、
イメージセンサと
を具備する撮像装置であって、
前記イメージセンサは、ぼけ関数を非点対称に変更するフィルタを透過した光を受光し、当該フィルタによりぼけ関数が非点対称に変更された第1色成分の第2画像と、前記第1色成分とは異なる第2色成分の第3画像とを含む第1画像を生成する
撮像装置。
The image processing apparatus according to any one of claims 1 to 7,
An imaging device comprising an image sensor,
The image sensor receives light that has passed through a filter that changes a blur function to asymmetry, a second image of a first color component whose blur function is changed to asymmetry by the filter, and the first color An imaging device that generates a first image including a third image having a second color component different from the component.
前記イメージセンサは、赤色の光を受光する第1センサ、緑色の光を受光する第2センサ及び青色の光を受光する第3センサのうちの2以上のセンサを含み、
前記第2画像は、前記イメージセンサに含まれる2以上のセンサのうちの1のセンサによって生成され、
前記第3画像は、前記イメージセンサに含まれる2以上のセンサのうちの他のセンサによって生成される
請求項8記載の撮像装置。
The image sensor includes two or more sensors of a first sensor that receives red light, a second sensor that receives green light, and a third sensor that receives blue light,
The second image is generated by one of two or more sensors included in the image sensor,
The imaging device according to claim 8, wherein the third image is generated by another sensor of two or more sensors included in the image sensor.
光学系の収差の影響を受けた第1画像に含まれる、ぼけ関数が非点対称に表された第1色成分の第2画像と、前記第1色成分とは異なる第2色成分の第3画像とを取得するステップと、
異なるぼけを付加した前記第2画像と前記第3画像との相関に応じて、前記第1画像に含まれる被写体までの距離を算出するステップと
を具備し、
前記相関は、前記収差に基づいて計算される
方法。
A second image of the first color component in which the blur function is expressed asymptotically and included in the first image affected by the aberration of the optical system, and a second color component different from the first color component. Acquiring three images;
Calculating a distance to a subject included in the first image according to a correlation between the second image and the third image to which different blur is added, and
The correlation is calculated based on the aberration.
JP2018103349A 2018-05-30 2018-05-30 Image processing equipment, imaging equipment and methods Active JP6847891B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018103349A JP6847891B2 (en) 2018-05-30 2018-05-30 Image processing equipment, imaging equipment and methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018103349A JP6847891B2 (en) 2018-05-30 2018-05-30 Image processing equipment, imaging equipment and methods

Publications (2)

Publication Number Publication Date
JP2019207185A true JP2019207185A (en) 2019-12-05
JP6847891B2 JP6847891B2 (en) 2021-03-24

Family

ID=68767560

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018103349A Active JP6847891B2 (en) 2018-05-30 2018-05-30 Image processing equipment, imaging equipment and methods

Country Status (1)

Country Link
JP (1) JP6847891B2 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06130283A (en) * 1992-10-15 1994-05-13 Nikon Corp Focus detecting device and interchangeable lens for camera
JPH11127306A (en) * 1997-10-22 1999-05-11 Nikon Corp Image formation point detecting device
EP1256831A1 (en) * 2001-05-11 2002-11-13 MVTec Software GmbH Method and system for calibrating an image range device
JP2003121913A (en) * 2001-10-15 2003-04-23 Fuji Photo Film Co Ltd Lens barrel, lens interchangeable camera, and program
JP2011164370A (en) * 2010-02-10 2011-08-25 Nikon Corp Focus detection device
US20150092091A1 (en) * 2013-10-02 2015-04-02 Canon Kabushiki Kaisha Processing device, image pickup device and processing method
JP2016192620A (en) * 2015-03-31 2016-11-10 キヤノン株式会社 Imaging apparatus, image processing arithmetic unit, and image processing program
JP2017040642A (en) * 2015-08-20 2017-02-23 株式会社東芝 Image processing apparatus and imaging apparatus

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06130283A (en) * 1992-10-15 1994-05-13 Nikon Corp Focus detecting device and interchangeable lens for camera
JPH11127306A (en) * 1997-10-22 1999-05-11 Nikon Corp Image formation point detecting device
EP1256831A1 (en) * 2001-05-11 2002-11-13 MVTec Software GmbH Method and system for calibrating an image range device
JP2003121913A (en) * 2001-10-15 2003-04-23 Fuji Photo Film Co Ltd Lens barrel, lens interchangeable camera, and program
JP2011164370A (en) * 2010-02-10 2011-08-25 Nikon Corp Focus detection device
US20150092091A1 (en) * 2013-10-02 2015-04-02 Canon Kabushiki Kaisha Processing device, image pickup device and processing method
JP2015072155A (en) * 2013-10-02 2015-04-16 キヤノン株式会社 Image processor, imaging device and image processing method
JP2016192620A (en) * 2015-03-31 2016-11-10 キヤノン株式会社 Imaging apparatus, image processing arithmetic unit, and image processing program
JP2017040642A (en) * 2015-08-20 2017-02-23 株式会社東芝 Image processing apparatus and imaging apparatus

Also Published As

Publication number Publication date
JP6847891B2 (en) 2021-03-24

Similar Documents

Publication Publication Date Title
JP7051740B2 (en) Image processing equipment, ranging equipment, methods and programs
JP6878219B2 (en) Image processing device and ranging device
JP2022001882A (en) Distance measuring device and movable body
KR101787304B1 (en) Calibration method, calibration device, and computer program product
JP6585006B2 (en) Imaging device and vehicle
JP6971934B2 (en) Image processing device
JP7123884B2 (en) Imaging device, method and program
WO2016171050A1 (en) Image processing device
US20160360081A1 (en) Control apparatus, image pickup apparatus, control method, and non-transitory computer-readable storage medium
JP2018077190A (en) Imaging apparatus and automatic control system
KR20180066116A (en) Depth mapping to a head-mounted display using stereo cameras and structured light
JP7170609B2 (en) IMAGE PROCESSING DEVICE, RANGING DEVICE, METHOD AND PROGRAM
JP2019011971A (en) Estimation system and automobile
JP6971933B2 (en) Image processing equipment and imaging equipment
WO2020031970A1 (en) Information processing device, information processing method, and program
JP2018084802A (en) Imaging device, imaging system, and distance information acquisition method
JP2018155709A (en) Position posture estimation device, position posture estimation method and driving assist device
JP2017167126A (en) Range-finding device and moving body
JP6847891B2 (en) Image processing equipment, imaging equipment and methods
JP6204844B2 (en) Vehicle stereo camera system
JPWO2016104235A1 (en) Stereo imaging apparatus and moving body
CN114979418A (en) Image processing apparatus
JP7447042B2 (en) Image processing device, method and program
JP2023065092A (en) Distance measuring equipment, image processing device, method and program
JP2022040134A (en) Estimation system and automobile

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200316

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210202

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210210

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210303

R151 Written notification of patent or utility model registration

Ref document number: 6847891

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151