JP7009219B2 - Image processing method, image processing device, image pickup device, image processing program, and storage medium - Google Patents

Image processing method, image processing device, image pickup device, image processing program, and storage medium Download PDF

Info

Publication number
JP7009219B2
JP7009219B2 JP2018001551A JP2018001551A JP7009219B2 JP 7009219 B2 JP7009219 B2 JP 7009219B2 JP 2018001551 A JP2018001551 A JP 2018001551A JP 2018001551 A JP2018001551 A JP 2018001551A JP 7009219 B2 JP7009219 B2 JP 7009219B2
Authority
JP
Japan
Prior art keywords
image
pupil
image processing
captured
coefficient data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018001551A
Other languages
Japanese (ja)
Other versions
JP2019121972A (en
Inventor
法人 日浅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2018001551A priority Critical patent/JP7009219B2/en
Publication of JP2019121972A publication Critical patent/JP2019121972A/en
Application granted granted Critical
Publication of JP7009219B2 publication Critical patent/JP7009219B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、撮像画像から光学系の瞳を分割した画像を推定する画像処理方法に関する。 The present invention relates to an image processing method for estimating an image in which the pupil of an optical system is divided from a captured image.

特許文献1には、一つの画素内に二つの光電変換部を有する撮像素子において、二つの光電変換部の加算信号と一方の光電変換部の信号とを読み出し、両者の信号の差分から他方の光電変換部の信号を求める方法が開示されている。 In Patent Document 1, in an image pickup element having two photoelectric conversion units in one pixel, the addition signal of the two photoelectric conversion units and the signal of one photoelectric conversion unit are read out, and the difference between the two signals is used as the other signal. A method for obtaining a signal of a photoelectric conversion unit is disclosed.

特許第4691930号公報Japanese Patent No. 469930

しかし、特許文献1に開示された方法では、二つの光電変換部の加算信号が輝度飽和している場合、二つの光電変換部の加算信号と一方の光電変換部の信号との差分から他方の光電変換部の信号を正確に求めることができない。すなわち、この場合には瞳を分割した画像を高精度に推定することができない。 However, in the method disclosed in Patent Document 1, when the addition signals of the two photoelectric conversion units are saturated in luminance, the other is obtained from the difference between the addition signal of the two photoelectric conversion units and the signal of one photoelectric conversion unit. The signal of the photoelectric conversion unit cannot be obtained accurately. That is, in this case, it is not possible to estimate the image in which the pupil is divided with high accuracy.

そこで本発明は、輝度飽和が発生している場合でも高精度に瞳を分割した画像を推定することが可能な画像処理方法、画像処理装置、撮像装置、プログラム、および、記憶媒体を提供することを目的とする。 Therefore, the present invention provides an image processing method, an image processing device, an image pickup device, a program, and a storage medium capable of estimating an image in which the pupil is divided with high accuracy even when luminance saturation occurs. With the goal.

本発明の一側面としての画像処理方法は、光学系の第1の瞳を介して被写体空間を撮像することで得られた第1の画像と、前記第1の瞳の一部である第2の瞳を介して前記被写体空間を撮像することで得られた第2の画像とに基づく入力画像を取得する工程と、入力層と出力層の間に複数の中間層を有するニューラルネットワークを用いて、前記光学系の第3の瞳を介して前記被写体空間を撮像することで得られる画像に相当する第3の画像を前記入力画像から生成する工程とを有し、前記第3の瞳は、前記第1の瞳の一部であって前記第2の瞳とは異なる。 The image processing method as one aspect of the present invention includes a first image obtained by imaging the subject space through the first pupil of the optical system and a second image which is a part of the first pupil. Using a step of acquiring an input image based on a second image obtained by imaging the subject space through the pupil of the eye, and a neural network having a plurality of intermediate layers between the input layer and the output layer. The third pupil comprises a step of generating a third image corresponding to an image obtained by imaging the subject space through the third pupil of the optical system from the input image. It is a part of the first pupil and is different from the second pupil.

本発明の他の側面としての画像処理装置は、光学系の第1の瞳を介して被写体空間を撮像することで得られた第1の画像と、前記第1の瞳の一部である第2の瞳を介して前記被写体空間を撮像することで得られた第2の画像と、に基づく入力画像を取得する取得手段と、入力層と出力層の間に複数の中間層を有するニューラルネットワークを用いて、前記光学系の第3の瞳を介して前記被写体空間を撮像することで得られる画像に相当する第3の画像を前記入力画像から生成する生成手段とを有し、前記第3の瞳は、前記第1の瞳の一部であって前記第2の瞳とは異なる。 The image processing apparatus as another aspect of the present invention includes a first image obtained by capturing an image of the subject space through the first pupil of the optical system, and a part of the first pupil. A second image obtained by imaging the subject space through the second pupil, an acquisition means for acquiring an input image based on the second image, and a neural network having a plurality of intermediate layers between an input layer and an output layer. The third has a generation means for generating a third image corresponding to an image obtained by imaging the subject space through the third pupil of the optical system from the input image. The pupil is a part of the first pupil and is different from the second pupil.

本発明の他の側面としての撮像装置は、光学系により形成された光学像を光電変換する撮像素子と、前記画像処理装置とを有する。 The image pickup apparatus as another aspect of the present invention includes an image pickup element that photoelectrically converts an optical image formed by an optical system, and the image processing apparatus.

本発明の他の側面としての画像処理プログラムは、前記画像処理方法をコンピュータに実行させる。 An image processing program as another aspect of the present invention causes a computer to execute the image processing method.

本発明の他の側面としての記憶媒体は、前記画像処理プログラムを記憶している。 The storage medium as another aspect of the present invention stores the image processing program.

本発明の目的及び特徴は、以下の実施例において説明される。 The objects and features of the present invention will be described in the following examples.

本発明によれば、輝度飽和が発生している場合でも高精度に瞳を分割した画像を推定することが可能な画像処理方法、画像処理装置、撮像装置、画像処理プログラム、および、記憶媒体を提供することができる。 According to the present invention, an image processing method, an image processing device, an image pickup device, an image processing program, and a storage medium capable of estimating an image in which pupils are divided with high accuracy even when luminance saturation occurs are provided. Can be provided.

各実施例における画像生成のネットワーク構造を示す図である。It is a figure which shows the network structure of image generation in each Example. 実施例1における撮像装置のブロック図である。It is a block diagram of the image pickup apparatus in Example 1. FIG. 実施例1および実施例3における撮像装置の外観図である。It is an external view of the image pickup apparatus in Example 1 and Example 3. FIG. 実施例1における撮像部の説明図である。It is explanatory drawing of the image pickup part in Example 1. FIG. 実施例1および実施例2における画像推定処理のフローチャートである。It is a flowchart of the image estimation process in Example 1 and Example 2. 実施例1および実施例3における画像推定処理の説明図である。It is explanatory drawing of the image estimation processing in Example 1 and Example 3. 実施例1における分割瞳と像高とヴィネッティングとの関係を示す図である。It is a figure which shows the relationship between the split pupil, the image height and vignetting in Example 1. FIG. 各実施例における係数データの学習に関するフローチャートである。It is a flowchart about learning of coefficient data in each Example. 実施例1における各像高とアジムスでの瞳分割の説明図である。It is explanatory drawing of each image height in Example 1 and pupil division in Azymuth. 実施例2における画像処理システムのブロック図である。It is a block diagram of the image processing system in Example 2. 実施例2における画像処理システムの外観図である。It is an external view of the image processing system in Example 2. FIG. 実施例2における撮像素子の構成図である。It is a block diagram of the image pickup element in Example 2. FIG. 実施例2における画像推定処理のフローチャートである。It is a flowchart of the image estimation process in Example 2. 実施例3における撮像装置のブロック図である。It is a block diagram of the image pickup apparatus in Example 3. FIG. 実施例3における撮像装置の外観図である。It is an external view of the image pickup apparatus in Example 3. FIG.

以下、本発明の実施例について、図面を参照しながら詳細に説明する。各図において、同一の部材については同一の参照符号を付し、重複する説明は省略する。 Hereinafter, examples of the present invention will be described in detail with reference to the drawings. In each figure, the same members are designated by the same reference numerals, and duplicate description will be omitted.

実施例の具体的な説明へ入る前に、本発明の要旨を述べる。本発明では、ある瞳(第2の瞳)で撮像した画像(第2の画像)と、前記瞳と別の瞳とが合成された瞳(第1の瞳)で撮像した画像(第1の画像)から、ディープラーニングを用いて、前記別の瞳(第3の瞳)で撮像した画像(第3の画像)を推定する。この際、ディープラーニングの学習の際に輝度飽和が発生した学習データを用いることにより、輝度飽和が発生した場合でも高精度に画像(第3の画像)を推定することができる。 A gist of the present invention will be described before going into a specific description of the examples. In the present invention, an image (first image) captured by an image (second image) captured by a certain pupil (second pupil) and a pupil (first pupil) in which the pupil and another pupil are combined (first pupil). An image (third image) captured by the other pupil (third pupil) is estimated from the image) using deep learning. At this time, by using the learning data in which the luminance saturation occurs during the deep learning learning, the image (third image) can be estimated with high accuracy even when the luminance saturation occurs.

まず、図2および図3を参照して、本発明の実施例1における撮像装置について説明する。図2は、撮像装置100のブロック図である。図3は、撮像装置100の外観図である。まず、撮像装置100の各部の概略を説明し、その詳細については後述する。 First, the image pickup apparatus according to the first embodiment of the present invention will be described with reference to FIGS. 2 and 3. FIG. 2 is a block diagram of the image pickup apparatus 100. FIG. 3 is an external view of the image pickup apparatus 100. First, the outline of each part of the image pickup apparatus 100 will be described, and the details thereof will be described later.

図2に示されるように、撮像装置100は、被写体空間の像を撮影画像(入力画像)として取得する撮像部101を有する。撮像部101は、被写体空間からの入射光を集光する結像光学系101aと、複数の画素を有する撮像素子101bとを有する。撮像素子101bは、例えば、CCD(Charge Coupled Device)センサやCMOS(Complementary Metal-Oxide Semiconductor)センサである。 As shown in FIG. 2, the image pickup apparatus 100 has an image pickup unit 101 that acquires an image of a subject space as a captured image (input image). The image pickup unit 101 includes an imaging optical system 101a that collects incident light from the subject space, and an image pickup element 101b having a plurality of pixels. The image pickup device 101b is, for example, a CCD (Charge Coupled Device) sensor or a CMOS (Complementary Metal-Oxide Semiconductor) sensor.

図4は、撮像部101の説明図である。図4(A)は、撮像部101の断面図を示し、一点鎖線は軸上光束を表している。図4(B)は、撮像素子101bの上面図である。撮像素子101bは、マイクロレンズアレイ122と複数の画素121とを有する。マイクロレンズアレイ122は、結像光学系101aを介して被写体面120と共役の位置に配置されている。図4(B)に示されるように、マイクロレンズアレイ122を構成するマイクロレンズ122(マイクロレンズ122aのみ表記し、122b以降は省略)は、複数の画素121(画素121aのみ表記し、121b以降は省略)のそれぞれと対応している。ここで、複数の部位をまとめて指定する際は番号のみを付し、そのうちの1つを示す際は番号とaなどの記号を付す。 FIG. 4 is an explanatory diagram of the image pickup unit 101. FIG. 4A shows a cross-sectional view of the image pickup unit 101, and the alternate long and short dash line represents an axial luminous flux. FIG. 4B is a top view of the image pickup device 101b. The image pickup device 101b has a microlens array 122 and a plurality of pixels 121. The microlens array 122 is arranged at a position conjugate with the subject surface 120 via the imaging optical system 101a. As shown in FIG. 4B, the microlens 122 (only the microlens 122a is shown and omitted after 122b) constituting the microlens array 122 has a plurality of pixels 121 (only the pixel 121a is shown and 121b and later are shown). It corresponds to each of (omitted). Here, when a plurality of parts are collectively designated, only a number is attached, and when one of them is indicated, a number and a symbol such as a are attached.

複数の画素121のそれぞれは、結像光学系101aを介して形成された光学像を光電変換する第1の光電変換部123および第2の光電変換部124を有する。これにより、例えば画素121aに入射した光は、その入射角に依存して、第1の光電変換部123aと第2の光電変換部124aとに分離して受光される(第1の光電変換部123aと第2の光電変換部124aは、互いに異なる入射角で入射する光を受光する)。光の入射角は、その光が結像光学系101aにおける瞳のいずれの位置を通過したかにより決定される。このため、結像光学系101aの瞳は2つの光電変換部により2つの部分瞳に分割され、一つの画素内の2つの光電変換部は互いに異なる視点(瞳の位置)から被写体空間を観察した情報を取得する。なお本実施例において、瞳の分割方向は水平方向であるが、これに限定されるものではなく、垂直方向や斜め方向などの他の方向であってもよい。 Each of the plurality of pixels 121 has a first photoelectric conversion unit 123 and a second photoelectric conversion unit 124 that photoelectrically convert an optical image formed via the imaging optical system 101a. As a result, for example, the light incident on the pixel 121a is separated and received by the first photoelectric conversion unit 123a and the second photoelectric conversion unit 124a depending on the incident angle (first photoelectric conversion unit). The 123a and the second photoelectric conversion unit 124a receive light incident at different angles of incidence). The incident angle of the light is determined by which position of the pupil in the imaging optical system 101a the light has passed. Therefore, the pupil of the imaging optical system 101a is divided into two partial pupils by two photoelectric conversion units, and the two photoelectric conversion units in one pixel observe the subject space from different viewpoints (pupil positions). Get information. In this embodiment, the pupil division direction is the horizontal direction, but the present invention is not limited to this, and other directions such as a vertical direction and an oblique direction may be used.

撮像素子101bは、第1の光電変換部123で取得された信号(第2の撮像画像、A画像)と、この信号(A画像)と第2の光電変換部124で取得された信号(第3の撮像画像、B画像)との加算信号(第1の撮像画像、A+B画像)を出力する。A画像およびA+B画像は、画像処理部102に出力される。画像処理部(画像処理装置)102は、情報取得部(取得手段)102aおよび画像生成部(生成手段)102bを有し、本実施例の画像処理方法を実行する。この際、画像処理部102は、記憶部(記憶手段)103に記憶された係数データを用いるが、この処理の詳細に関しては後述する。これにより、画像処理部102は、B画像を推定し、A画像と推定B画像とにより位相差情報を取得することができる。システムコントローラ106は、画像処理部102により取得した位相差情報に基づいて、撮像部101の合焦位置を制御する。 The image pickup element 101b has a signal (second captured image, A image) acquired by the first photoelectric conversion unit 123, this signal (A image), and a signal (second) acquired by the second photoelectric conversion unit 124. An addition signal (first captured image, A + B image) with the captured image (B image) of 3 is output. The A image and the A + B image are output to the image processing unit 102. The image processing unit (image processing apparatus) 102 has an information acquisition unit (acquisition means) 102a and an image generation unit (generation means) 102b, and executes the image processing method of the present embodiment. At this time, the image processing unit 102 uses the coefficient data stored in the storage unit (storage means) 103, and the details of this processing will be described later. As a result, the image processing unit 102 can estimate the B image and acquire the phase difference information from the A image and the estimated B image. The system controller 106 controls the in-focus position of the image pickup unit 101 based on the phase difference information acquired by the image processing unit 102.

ユーザからレリーズの指示が出された場合、撮像部101はそのときの合焦位置に対して撮像を実行し、得られたA画像とA+B画像とが記録媒体105に保存される。ユーザから撮像画像の表示に関する指示が出された場合、システムコントローラ106は、記録媒体105に保存されたデータを読み出し、そのデータを表示部104に表示する。この際、画像処理部102は、ユーザにより指定された条件に応じて、表示部104に表示する画像を生成する。撮像時と同じ合焦位置が指定された場合、表示部104はA+B画像をそのまま表示する。また、撮像時と異なる合焦位置が指定された場合、画像処理部102はリフォーカス画像を生成する。リフォーカス画像は、A+B画像とA画像とに基づいて、本実施例の画像処理方法を用いてB画像を推定し、A画像と推定B画像とを空間的にシフトして合成することで得られる。以上の一連の制御は、システムコントローラ106により行われる。 When the user gives an instruction to release the image, the image pickup unit 101 executes an image pickup at the in-focus position at that time, and the obtained A image and the A + B image are stored in the recording medium 105. When the user gives an instruction regarding the display of the captured image, the system controller 106 reads out the data stored in the recording medium 105 and displays the data on the display unit 104. At this time, the image processing unit 102 generates an image to be displayed on the display unit 104 according to the conditions specified by the user. When the same focusing position as at the time of imaging is specified, the display unit 104 displays the A + B image as it is. Further, when a focusing position different from that at the time of imaging is specified, the image processing unit 102 generates a refocused image. The refocused image is obtained by estimating the B image using the image processing method of this embodiment based on the A + B image and the A image, and spatially shifting and synthesizing the A image and the estimated B image. Be done. The above series of control is performed by the system controller 106.

次に、図5および図6を参照して、画像処理部102で実行される画像推定処理(B画像の推定処理)に関して説明する。B画像の推定処理の際に、画像処理部102は、事前に学習された係数データを用いるが、この学習に関する詳細については後述する。図5は、B画像の推定処理に関するフローチャートである。図6は、B画像の推定処理の説明図である。図5の各ステップは、システムコントローラ106の指令に基づいて画像処理部102により実行される。本実施例において、画像処理部102の情報取得部102aは図5のステップS101乃至ステップS104を実行し、画像生成部102bはステップS105乃至ステップS108を実行する。 Next, the image estimation process (B image estimation process) executed by the image processing unit 102 will be described with reference to FIGS. 5 and 6. In the estimation process of the B image, the image processing unit 102 uses the coefficient data learned in advance, and the details of this learning will be described later. FIG. 5 is a flowchart relating to the estimation process of the B image. FIG. 6 is an explanatory diagram of the estimation process of the B image. Each step in FIG. 5 is executed by the image processing unit 102 based on the command of the system controller 106. In this embodiment, the information acquisition unit 102a of the image processing unit 102 executes steps S101 to S104 of FIG. 5, and the image generation unit 102b executes steps S105 to S108.

まず、ステップS101において、画像処理部102は、A+B画像(第1の撮像画像)201とA画像(第2の撮像画像)202とを取得する。A画像202は、結像光学系101aの瞳の一部である部分瞳(第2の瞳)を通過する光束に基づいて被写体空間を撮像して得られた画像である。A+B画像201は、結像光学系101aの瞳(第1の瞳)を通過する光束に基づいて被写体空間を撮像して得られた画像である。本実施例において、第2の瞳は、第1の瞳に含まれ、第1の瞳の一部である。 First, in step S101, the image processing unit 102 acquires an A + B image (first captured image) 201 and an A image (second captured image) 202. The A image 202 is an image obtained by imaging the subject space based on the luminous flux passing through the partial pupil (second pupil) which is a part of the pupil of the imaging optical system 101a. The A + B image 201 is an image obtained by imaging the subject space based on the luminous flux passing through the pupil (first pupil) of the imaging optical system 101a. In this embodiment, the second pupil is included in the first pupil and is a part of the first pupil.

続いてステップS102において、画像処理部102は、A+B画像201の輝度飽和に基づいて、A+B画像201およびA画像202のそれぞれを2つの領域に分割する。本実施例では、図6に示されるように、画像処理部102は、A+B画像201を第1の領域204と第2の領域211とに分割する。また画像処理部102は、A画像202を第1の領域205と第2の領域212とに分割する。図6において、A+B画像201中の斜線部は、A+B画像201の輝度飽和している輝度飽和領域203を表す。A+B画像201における第1の領域204は、輝度飽和領域203を含むように設定される。なお、輝度飽和している領域が飛び飛びで存在する場合(互いに分離した複数の輝度飽和領域が存在する場合)、第1の領域204も同様に飛び飛びに設定してよく、連続的に分布した領域である必要はない。第2の領域211は、輝度飽和領域203を含まないように設定される。A画像202における第1の領域205および第2の領域212はそれぞれ、第1の領域204および第2の領域211と合致するように設定される。 Subsequently, in step S102, the image processing unit 102 divides each of the A + B image 201 and the A image 202 into two regions based on the luminance saturation of the A + B image 201. In this embodiment, as shown in FIG. 6, the image processing unit 102 divides the A + B image 201 into a first region 204 and a second region 211. Further, the image processing unit 102 divides the A image 202 into a first region 205 and a second region 212. In FIG. 6, the shaded portion in the A + B image 201 represents the luminance saturated region 203 in which the luminance is saturated in the A + B image 201. The first region 204 in the A + B image 201 is set to include the luminance saturation region 203. When the luminance-saturated regions exist in a discrete manner (when a plurality of luminance-saturated regions separated from each other exist), the first region 204 may be similarly set to the discrete regions, and the regions are continuously distributed. It doesn't have to be. The second region 211 is set so as not to include the luminance saturation region 203. The first region 205 and the second region 212 in the A image 202 are set to match the first region 204 and the second region 211, respectively.

なお、撮像素子101bがBayer配列のカラーセンサの場合、A+B画像およびA画像はBayer配列のままでよく、または、R、G1、G2、Bの4チャンネルに並び替えた画像でもよい。4チャンネルの画像とした場合、色ごとに飽和領域が異なるため、各色に対して個別に処理してもよい。または、全ての色に対して輝度飽和を含むように第1の領域を設定して、4チャンネル画像を一括で処理してもよい。 When the image sensor 101b is a color sensor having a Bayer array, the A + B image and the A image may remain in the Bayer array, or may be images rearranged into four channels of R, G1, G2, and B. In the case of a 4-channel image, the saturation region is different for each color, so each color may be processed individually. Alternatively, the 4-channel image may be processed at once by setting the first region so as to include luminance saturation for all colors.

続いてステップS103において、画像処理部102は、A+B画像201の第1の領域204から第1の画像206を抽出する。また画像処理部102は、A画像202の第1の領域205から第2の画像207を抽出する。第1の画像206はA+B画像201の部分領域であり、第2の画像207はA画像202の部分領域である。そして画像処理部102は、第1の画像206および第2の画像207に基づいて入力画像を設定する。本実施例において、入力画像は、第1の画像206および第2の画像207である。ただし本実施例は、これに限定されるものではない。例えば、第1の画像206から第2の画像207を減算した画像などを入力画像としてもよい。 Subsequently, in step S103, the image processing unit 102 extracts the first image 206 from the first region 204 of the A + B image 201. Further, the image processing unit 102 extracts the second image 207 from the first region 205 of the A image 202. The first image 206 is a partial region of the A + B image 201, and the second image 207 is a partial region of the A image 202. Then, the image processing unit 102 sets an input image based on the first image 206 and the second image 207. In this embodiment, the input images are the first image 206 and the second image 207. However, this embodiment is not limited to this. For example, an image obtained by subtracting the second image 207 from the first image 206 may be used as the input image.

続いてステップS104において、画像処理部102は、入力画像に対応する係数データを選択して取得する。係数データは、B画像の一部に相当する第3の画像を推定するための後述のニューラルネットワーク208で用いられる。本実施例において、複数種類の係数データが記憶部103に記憶されており、画像処理部102は記憶部103に記憶された複数種類の係数データから所望の係数データを取得する。ここでは、画像処理部102は、ステップS103にて抽出した第1の画像206と第2の画像207の位置(第1の撮像画像201と第2の撮像画像202のそれぞれにおける第1の画像206と第2の画像207の位置)に基づいて係数データを選択する。なお、第1の画像206と第2の画像207の位置に基づいて係数データを切り替えるのは、結像光学系101aのヴィネッティング(ケラレ)や収差が像高に応じて変化するためである。 Subsequently, in step S104, the image processing unit 102 selects and acquires the coefficient data corresponding to the input image. The coefficient data is used in the neural network 208 described later for estimating a third image corresponding to a part of the B image. In this embodiment, a plurality of types of coefficient data are stored in the storage unit 103, and the image processing unit 102 acquires desired coefficient data from the plurality of types of coefficient data stored in the storage unit 103. Here, the image processing unit 102 determines the positions of the first image 206 and the second image 207 extracted in step S103 (the first image 206 in each of the first captured image 201 and the second captured image 202). And the position of the second image 207) to select the coefficient data. The coefficient data is switched based on the positions of the first image 206 and the second image 207 because the vignetting (vignetting) and aberration of the imaging optical system 101a change according to the image height.

ここで、図7を参照して、ヴィネッティングの影響について説明する。図7は、分割瞳と像高とヴィネッティングとの関係を示す図である。図7(A)は、結像光学系101aの光軸上における瞳を示している。図7中の破線は、2つの光電変換部により分割される瞳の分割線を表している。図7(B)は、図7(A)の場合とは異なる像高における瞳を示している。図7(A)では2つの分割瞳の光量は均一だが、図7(B)ではヴィネッティングにより両者の光量比に偏りが生じている。このため、図7(A)と図7(B)とを比較すると、輝度飽和したA+B画像とA画像とから同一の係数データを用いて正確なB画像を推定することは困難であると分かる。図7(C)は、図7(B)と同一像高(光軸に垂直な平面内で光軸から同一の距離の位置)でアジムス(光軸に垂直な平面内で光軸から外周へ向かう方位角)が異なる場合である。この際も部分瞳の光量比が変化する。また、収差に関しても同様に像高とアジムスによって、2つの部分瞳の間で関係が変化する。このため係数データは、第1の画像206および第2の画像207の像高とアジムスとに基づいて選択(決定)されることが好ましい。 Here, the influence of vignetting will be described with reference to FIG. 7. FIG. 7 is a diagram showing the relationship between the split pupil, the image height, and vignetting. FIG. 7A shows the pupil on the optical axis of the imaging optical system 101a. The broken line in FIG. 7 represents the dividing line of the pupil divided by the two photoelectric conversion units. FIG. 7 (B) shows the pupil at an image height different from that in the case of FIG. 7 (A). In FIG. 7A, the light amounts of the two split pupils are uniform, but in FIG. 7B, the light amount ratio of the two is biased due to vignetting. Therefore, comparing FIGS. 7 (A) and 7 (B), it is found that it is difficult to estimate an accurate B image from the brightness-saturated A + B image and the A image using the same coefficient data. .. FIG. 7 (C) shows Azimuth (from the optical axis to the outer periphery in the plane perpendicular to the optical axis) at the same image height (position at the same distance from the optical axis in the plane perpendicular to the optical axis) as in FIG. 7 (B). This is the case when the azimuth to which the head is heading is different. At this time as well, the light intensity ratio of the partial pupil changes. Similarly, regarding aberrations, the relationship between the two partial pupils changes depending on the image height and the azimuth. Therefore, it is preferable that the coefficient data is selected (determined) based on the image heights of the first image 206 and the second image 207 and the azimuth.

なお、結像光学系101aのヴィネッティングが無視できる場合(望遠レンズ)や、像高による収差変化が無視できる場合(小絞り)には、撮像画像全体に対して同一の係数データを用いてもよい。また、図7では結像光学系101aの瞳が破線で二つに分割され、分割瞳が互いに交わらない場合を示したが、本実施例はこれに限定されるものではない。分割瞳が一部の領域で互いに重なり合っていてもよい(重なった領域では分割瞳同士で光量を分け合う)。また、A画像とB画像との光量比の幾つかのパターン(10:1、8:1、…、1:1、…、1:10のような)に対して、それぞれ対応する係数データを記憶部103に複数記憶しておいてもよい。また画像処理部102は、第1の画像206および第2の画像207における結像光学系101aのヴィネッティングに関する情報を取得し、ヴィネッティングに関する情報に基づいて該当する光量比の係数データを選択するように構成することもできる。 If the vignetting of the imaging optical system 101a can be ignored (telephoto lens) or the aberration change due to the image height can be ignored (small aperture), the same coefficient data can be used for the entire captured image. good. Further, FIG. 7 shows a case where the pupil of the imaging optical system 101a is divided into two by a broken line and the divided pupils do not intersect each other, but the present embodiment is not limited to this. The split pupils may overlap each other in some areas (in the overlapping areas, the split pupils share the amount of light). Further, the corresponding coefficient data is provided for some patterns (such as 10: 1, 8: 1, ..., 1: 1, ..., 1:10) of the light amount ratio between the A image and the B image. A plurality of storage units 103 may be stored. Further, the image processing unit 102 acquires information on the vignetting of the imaging optical system 101a in the first image 206 and the second image 207, and selects the corresponding coefficient data of the light amount ratio based on the information on the vignetting. It can also be configured as follows.

続いて、図5のステップS105において、画像処理部102は、入力画像(第1の画像206および第2の画像207)から第3の画像209を生成する。第3の画像209は、結像光学系101aの第3の瞳を通過した光束に基づいて被写体空間を撮像した画像(B画像)の部分領域に相当する画像である。第3の瞳は、第1の瞳の一部であって、第2の瞳とは異なる。本実施例において、第3の瞳は第1の瞳から第2の瞳を除いた成分であり、第2の瞳と第3の瞳との和で第1の瞳が表される。画像処理部102は、入力層と出力層との間に複数の中間層を有するニューラルネットワーク208を用いて、第3の画像209を生成する。本実施例では、畳み込みニューラルネットワーク(CNN:Convolutional Neural Network)が用いられる。ただし本実施例は、これに限定されるものではなく、GAN(Generative Adversarial Network)などの他のニューラルネットワークを用いてもよい。 Subsequently, in step S105 of FIG. 5, the image processing unit 102 generates a third image 209 from the input images (first image 206 and second image 207). The third image 209 is an image corresponding to a partial region of an image (B image) in which the subject space is captured based on the luminous flux passing through the third pupil of the imaging optical system 101a. The third pupil is a part of the first pupil and is different from the second pupil. In this embodiment, the third pupil is a component obtained by removing the second pupil from the first pupil, and the first pupil is represented by the sum of the second pupil and the third pupil. The image processing unit 102 generates a third image 209 by using a neural network 208 having a plurality of intermediate layers between the input layer and the output layer. In this embodiment, a convolutional neural network (CNN) is used. However, this embodiment is not limited to this, and other neural networks such as GAN (Generative Adversarial Network) may be used.

ここで、図1を参照して、CNNにより第3の画像209を生成する工程について詳述する。図1は、画像生成のネットワーク構造を示す図である。本実施例において、入力画像221は、第1の画像206と第2の画像207とがチャンネル方向にスタックされた画像である。第1の画像206と第2の画像207のそれぞれが複数のカラーチャンネルを有する場合、それらのチャンネル数の2倍のチャンネル数を持つ画像となる。 Here, with reference to FIG. 1, the step of generating the third image 209 by CNN will be described in detail. FIG. 1 is a diagram showing a network structure of image generation. In this embodiment, the input image 221 is an image in which the first image 206 and the second image 207 are stacked in the channel direction. When each of the first image 206 and the second image 207 has a plurality of color channels, the image has twice the number of channels.

CNNは複数の層構造になっており、各層で学習された係数データを用いた線型変換と非線型変換が実行される。線型変換は、入力されたデータとフィルタの畳み込み、及びバイアス(図1中のbias)との和で表現される。各層におけるフィルタおよびバイアスの値は、係数データにより決定される。非線形変換は、活性化関数(Activation Function)と呼ばれる非線型関数による変換である(図1中のAF)。活性化関数の例としては、シグモイド関数やハイパボリックタンジェント関数などがある。本実施例では、活性化関数として、以下の式(1)で表されるReLU(Rectified Linear Unit)が用いられる。 The CNN has a plurality of layer structures, and linear transformation and non-linear transformation using the coefficient data learned in each layer are executed. The linear transformation is represented by the sum of the input data, the convolution of the filter, and the bias (bias in FIG. 1). The filter and bias values for each layer are determined by the coefficient data. The non-linear transformation is a transformation by a non-linear function called an activation function (AF in FIG. 1). Examples of activation functions include sigmoid functions and hyperbolic tangent functions. In this embodiment, ReLU (Rectifier Unit) represented by the following equation (1) is used as the activation function.

Figure 0007009219000001
Figure 0007009219000001

式(1)において、maxは、引数のうち最大値を出力するMAX関数を表す。 In the equation (1), max represents a MAX function that outputs the maximum value among the arguments.

入力層に入力された入力画像221は、第1畳み込み層で複数のフィルタ222のそれぞれとのコンボリューションと、バイアスとの和を取られる。フィルタ222それぞれのチャンネル数は、入力画像221と一致し、入力画像221のチャンネル数が2以上の場合には3次元フィルタとなる(3次元目がチャンネル数を表す)。コンボリューションと和の結果は、活性化関数により非線形変換を施され、第1特徴マップ223が第1中間層に出力される。 The input image 221 input to the input layer is summed with the bias and the convolution with each of the plurality of filters 222 in the first convolution layer. The number of channels of each of the filters 222 matches the input image 221 and becomes a three-dimensional filter when the number of channels of the input image 221 is two or more (the third dimension represents the number of channels). The result of the convolution and the sum is subjected to a non-linear transformation by the activation function, and the first feature map 223 is output to the first intermediate layer.

次に、第2畳み込み層へ第1特徴マップ223が入力され、前述と同様に、複数のフィルタ224それぞれとのコンボリューションと、バイアスとの和が取られる。その結果を非線形変換し、以下同様に畳み込み層の数だけ繰り返す。最後は、第N-1中間層の第N-1特徴マップ231を第N畳み込み層へ入力し、第3の画像209を得る。ここで、Nは3以上の整数である。第N層のフィルタ232の数は、第3の画像209のチャンネル数と一致する。また、第3の画像209を生成する最後の畳み込み層では、非線形変換を実行しなくてよい。図1において、第3の画像209は、入力画像221より画像サイズが小さくなっている。これは、畳み込み層において、入力画像221(または特徴マップ)のデータが存在する領域のみでコンボリューションを実行しているためである。入力画像221(または特徴マップ)の周囲をゼロなどで埋めることや逆畳み込み層を利用することにより、画像サイズを不変にすることが可能である。 Next, the first feature map 223 is input to the second convolution layer, and the sum of the convolution with each of the plurality of filters 224 and the bias is taken as described above. The result is non-linearly transformed and repeated for the number of convolution layers in the same manner. Finally, the N-1 feature map 231 of the N-1 intermediate layer is input to the N-convolution layer to obtain a third image 209. Here, N is an integer of 3 or more. The number of filters 232 in the Nth layer matches the number of channels in the third image 209. Also, the final convolutional layer that produces the third image 209 does not have to perform a non-linear transformation. In FIG. 1, the image size of the third image 209 is smaller than that of the input image 221. This is because the convolution is executed only in the region where the data of the input image 221 (or the feature map) exists in the convolution layer. It is possible to make the image size invariant by filling the periphery of the input image 221 (or feature map) with zeros or the like or by using a deconvolution layer.

続いて、図5のステップS106において、画像処理部102は、所定の領域に対して第3の画像209を生成し終えたか否かを判定する。第3の画像209の生成が完了していない場合、ステップS103へ戻り、画像処理部102は所定の領域から新たに第1の画像206および第2の画像207を抽出する。一方、第3の画像の生成が完了している場合、ステップS107へ進む。リフォーカス画像などを生成する場合、撮像画像全体のB画像が必要になるため、輝度飽和領域203の全てに対して、第3の画像209を生成する必要がある。焦点検出が目的の場合、指定されたフォーカスポイントの近傍のみで第3の画像209を生成すればよい。所定の領域の全てに対して第3の画像209を生成した場合、図6に示されるように、B画像(推定B画像)における第1の領域210が生成される。 Subsequently, in step S106 of FIG. 5, the image processing unit 102 determines whether or not the third image 209 has been generated for the predetermined area. If the generation of the third image 209 is not completed, the process returns to step S103, and the image processing unit 102 newly extracts the first image 206 and the second image 207 from the predetermined area. On the other hand, when the generation of the third image is completed, the process proceeds to step S107. When generating a refocused image or the like, a B image of the entire captured image is required, so it is necessary to generate a third image 209 for all of the luminance saturation regions 203. When the focus detection is the purpose, the third image 209 may be generated only in the vicinity of the designated focus point. When the third image 209 is generated for all of the predetermined areas, the first area 210 in the B image (estimated B image) is generated as shown in FIG.

続いてステップS107において、画像処理部102は、A+B画像201の第2の領域211とA画像202の第2の領域212との差分に基づいて、第4の画像213を生成する。すなわち画像処理部102は、第2の領域211から第2の領域212を減算することにより、B画像における第2の領域に相当する第4の画像213を取得する。A+B画像201の第2の領域211には輝度飽和が存在しないため、画像処理部102は、減算処理によりB画像を求めることができる。輝度飽和が存在する領域のみをニューラルネットワーク208を用いて推定することにより、演算負荷を軽減することができる。なお、ステップS107は、ステップS102とステップS108との間であれば、いつ実行しても構わない。 Subsequently, in step S107, the image processing unit 102 generates a fourth image 213 based on the difference between the second region 211 of the A + B image 201 and the second region 212 of the A image 202. That is, the image processing unit 102 acquires the fourth image 213 corresponding to the second region in the B image by subtracting the second region 212 from the second region 211. Since there is no luminance saturation in the second region 211 of the A + B image 201, the image processing unit 102 can obtain the B image by subtraction processing. By estimating only the region where the luminance saturation exists by using the neural network 208, the calculation load can be reduced. Note that step S107 may be executed at any time between steps S102 and S108.

続いてステップS108において、画像処理部102は、第3の画像209(第1の領域210)と第4の画像213(第2の領域)とを合成することにより、第5の画像214を生成する。第5の画像214は、推定B画像である。 Subsequently, in step S108, the image processing unit 102 generates a fifth image 214 by synthesizing the third image 209 (first region 210) and the fourth image 213 (second region). do. The fifth image 214 is an estimated B image.

なお、ステップS107では、第2の領域211、212に関わらず、A+B画像201およびA画像202の全体に渡って差分をとってもよい。輝度飽和している領域は正しくB画像が求まらないが、その領域の信号を第1の領域210で置換することにより推定B画像(第5の画像214)を取得することができる。 In step S107, the difference may be taken over the entire A + B image 201 and A image 202 regardless of the second regions 211 and 212. Although the B image cannot be obtained correctly in the region where the luminance is saturated, the estimated B image (fifth image 214) can be obtained by substituting the signal in that region with the first region 210.

以上の処理により、A+B画像に輝度飽和がある場合でも、高精度にB画像を推定することができる。A画像と推定B画像とを用いることにより、位相差AFによる焦点検出、視差によるデプスマップの推定、および、リフォーカスなどが実行可能となる。 By the above processing, the B image can be estimated with high accuracy even when the A + B image has luminance saturation. By using the A image and the estimated B image, it is possible to perform focus detection by phase difference AF, estimation of depth map by parallax, refocusing, and the like.

次に、図8を参照して、係数データの学習に関して説明する。図8は、係数データの学習に関するフローチャートである。本実施例において、学習は撮像装置100以外の画像処理装置で事前に実行され、その結果(複数の係数データ)が記憶部103に記憶されている。ただし本実施例は、これに限定されるものではなく、撮像装置100内に学習を実行する部位が存在していてもよい。 Next, the learning of the coefficient data will be described with reference to FIG. FIG. 8 is a flowchart for learning the coefficient data. In this embodiment, the learning is executed in advance by an image processing device other than the image pickup device 100, and the result (a plurality of coefficient data) is stored in the storage unit 103. However, the present embodiment is not limited to this, and a portion for executing learning may exist in the image pickup apparatus 100.

まず、ステップS201において、画像処理装置は、複数の学習ペアを取得する。学習ペアとは、既知のA+B画像、A画像、B画像と、そこから抽出された第1の画像、第2の画像、第3の正解画像である。第1の画像および第2の画像の大きさは、図5および図6に示される第3の画像の生成処理と同じである。第3の正解画像は、第3の画像と同じサイズである。A+B画像、A画像、B画像は、実際の被写体を実写した画像でもよいし、CG(コンピュータ・グラフィクス)を用いた画像でもよい。学習ペアは、実際にB像の推定を行う画像の撮像系(本実施例では撮像部101)と略同一の構成で撮像された(撮像はCGによるシミュレーションでも可)画像から抽出することが好ましい。また、同一の係数データの算出に用いる学習ペアは、全て略同一のヴィネッティングや収差になっていることが好ましい。A+B画像が輝度飽和している場合でのB画像の推定を行うため、学習ペアには必ず輝度飽和した第1の画像が含まれていなければならない。 First, in step S201, the image processing apparatus acquires a plurality of learning pairs. The learning pair is a known A + B image, A image, B image, and a first image, a second image, and a third correct answer image extracted from the known A + B image, A image, and B image. The sizes of the first image and the second image are the same as those of the third image generation process shown in FIGS. 5 and 6. The third correct image has the same size as the third image. The A + B image, the A image, and the B image may be an image of an actual subject or an image using CG (computer graphics). It is preferable that the learning pair is extracted from an image captured with substantially the same configuration as the image imaging system (imaging unit 101 in this embodiment) that actually estimates the B image (imaging can be performed by CG simulation). .. Further, it is preferable that all the learning pairs used for calculating the same coefficient data have substantially the same vignetting and aberration. In order to estimate the B image when the A + B image is saturated in brightness, the learning pair must always include the first image in which the brightness is saturated.

続いてステップS202において、画像処理装置は、複数の学習ペアから係数データを生成する。学習の際には、ステップS105の第3の画像の生成と同じネットワーク構造を用いる。本実施例では、図1に示されるネットワーク構造に対して第1の画像および第2の画像を入力し、その出力結果(推定された第3の画像)と第3の正解画像との誤差を算出する。この誤差が最小となるように、例えば誤差逆伝播法(Backpropagation)などを用いて、各層で用いるフィルタの係数とバイアス(係数データ)を更新、最適化する。フィルタの係数とバイアスの初期値はそれぞれ任意の値を用いることができ、例えば乱数から決定される。または、各層ごとに初期値を事前学習するAuto Encoderなどのプレトレーニングを行ってもよい。 Subsequently, in step S202, the image processing device generates coefficient data from a plurality of learning pairs. During learning, the same network structure as the generation of the third image in step S105 is used. In this embodiment, the first image and the second image are input to the network structure shown in FIG. 1, and the error between the output result (estimated third image) and the third correct image is calculated. calculate. In order to minimize this error, the coefficient and bias (coefficient data) of the filter used in each layer are updated and optimized by using, for example, backpropagation. Arbitrary values can be used for the coefficient of the filter and the initial value of the bias, and are determined from, for example, a random number. Alternatively, pre-training such as Auto Encoder that pre-learns the initial value for each layer may be performed.

学習ペアを全てネットワーク構造へ入力し、それら全ての情報を使って係数データを更新する手法をバッチ学習と呼ぶ。ただし、この学習方法は学習ペアの数が増えるにつれて、演算負荷が膨大になる。逆に、係数データの更新に1つの学習ペアのみを使用し、更新ごとに異なる学習ペアを使用する学習手法をオンライン学習と呼ぶ。この手法は、学習ペアが増えても計算量が増大しない利点があるが、その代わりに1つの学習ペアに存在するノイズの影響を大きく受ける。このため、これら2つの手法の中間に位置するミニバッチ法を用いて学習することが好ましい。ミニバッチ法は、全学習ペアの中から少数を抽出し、それらを用いて係数データを更新する。次の更新では、異なる小数の学習ペアを抽出して使用する。これを繰り返すことにより、バッチ学習とオンライン学習の欠点を小さくすることができ、デプスの推定精度が向上しやすくなる。 The method of inputting all the learning pairs into the network structure and updating the coefficient data using all the information is called batch learning. However, in this learning method, the computational load becomes enormous as the number of learning pairs increases. Conversely, a learning method that uses only one learning pair to update the coefficient data and uses a different learning pair for each update is called online learning. This method has the advantage that the amount of calculation does not increase even if the number of learning pairs increases, but instead, it is greatly affected by the noise existing in one learning pair. Therefore, it is preferable to study using the mini-batch method located between these two methods. The mini-batch method extracts a small number from all the training pairs and uses them to update the coefficient data. In the next update, we will extract and use different fractional learning pairs. By repeating this, the drawbacks of batch learning and online learning can be reduced, and the accuracy of depth estimation can be easily improved.

続いてステップS203において、画像処理装置は、学習された係数データを出力する。様々な瞳の大きさ、またはヴィネッティングや収差に対して、同様の学習を繰り返すことにより、複数の係数データを取得することができる。本実施例において、係数データは記憶部103に記憶される。 Subsequently, in step S203, the image processing device outputs the learned coefficient data. By repeating the same learning for various pupil sizes, vignetting, and aberrations, a plurality of coefficient data can be acquired. In this embodiment, the coefficient data is stored in the storage unit 103.

次に、本発明の効果を高めるために好ましい条件に関して説明する。図5のステップS102において、A+B像とA像とが共に全て輝度飽和している領域を第3の領域とし、異なる処理を実行することが好ましい。ステップS105において、輝度飽和していない第2の画像(A像の部分領域)または第1の画像(A+B画像の部分領域)の輝度飽和していない色をヒントとして、第1の画像の輝度飽和領域における第3の画像を推定する。このため、入力画像が全て輝度飽和している場合、該当領域には第3の画像を推定するヒントが存在しない。したがって、図1のネットワークでは第3の画像を高精度に推定することができない。また、仮にB画像を推定することができたとしても、A画像が輝度飽和しているため、焦点検出などを行うことはできない。この場合、演算負荷の低減として、第3の領域では輝度飽和値で第3の画像を生成することが好ましい。または、CNNなどによるインペインティングを用いて、輝度飽和の周辺から第3の領域の信号(輝度飽和値を超える値を有する)を推定することもできる。この際、A画像から輝度飽和以外の領域も含まれるように部分領域を抽出してインペインティングを行う。A+B画像にも同様にインペインティングを行うことにより、その差分からB画像を推定することができる。 Next, preferable conditions for enhancing the effect of the present invention will be described. In step S102 of FIG. 5, it is preferable that the region where both the A + B image and the A image are saturated in luminance is set as the third region and different processes are executed. In step S105, the brightness saturation of the first image is hinted at by the color of the second image (partial region of the A image) or the first image (partial region of the A + B image) that is not saturated in brightness. Estimate a third image in the region. Therefore, when all the input images are saturated in brightness, there is no hint for estimating the third image in the corresponding region. Therefore, the network of FIG. 1 cannot estimate the third image with high accuracy. Further, even if the B image can be estimated, the focus detection cannot be performed because the A image is saturated in brightness. In this case, in order to reduce the calculation load, it is preferable to generate a third image with a luminance saturation value in the third region. Alternatively, the signal in the third region (having a value exceeding the luminance saturation value) can be estimated from the periphery of the luminance saturation by using inpainting by CNN or the like. At this time, a partial region is extracted from the A image so as to include a region other than the luminance saturation, and inpainting is performed. By inpainting the A + B image in the same manner, the B image can be estimated from the difference.

また、第3の画像の推定と同時に第2の画像のデノイジングを行うことが好ましい。A+B画像は、A画像とB画像との和のため、A画像よりも低ノイズである。このため、A+B画像を参照することにより、A画像のデノイジングを行うことができる。この場合、係数データの学習の際、既知の低ノイズのA画像とB画像とを用意する。ここからシミュレーションによりノイズを付与したA画像とB画像を生成し、これらを加算することによりA+B画像を生成する。ニューラルネットワークに入力するデータは、ノイズを付与したA画像とA+B画像各々から第2の画像および第1の画像を抽出して取得する。ニューラルネットワークの出力は、第3の画像とデノイジングされた第2の画像の2枚とし、低ノイズのA画像とB画像とから抽出した第3の正解画像と第2の正解画像とを比較することで誤差を算出する。このようにして学習された係数データを用いることにより、第3の画像の推定と同時にデノイジングされた第2の画像を生成するネットワークを実現することができる。 Further, it is preferable to perform denoising of the second image at the same time as estimating the third image. The A + B image has lower noise than the A image because of the sum of the A image and the B image. Therefore, the A image can be denoised by referring to the A + B image. In this case, when learning the coefficient data, a known low-noise A image and B image are prepared. From here, an A image and a B image to which noise is added are generated by simulation, and an A + B image is generated by adding these. The data to be input to the neural network is acquired by extracting the second image and the first image from each of the noise-added A image and the A + B image. The output of the neural network is two images, a third image and a denoized second image, and the third correct image and the second correct image extracted from the low noise A image and the B image are compared. The error is calculated by this. By using the coefficient data learned in this way, it is possible to realize a network that generates a second image denoized at the same time as estimating the third image.

より好ましくは、ノイズレベルにより係数データを変更する。これによって、より高精度なデノイジングを実現することができる。第1の画像および第2の画像のノイズレベル(ノイズに関する情報)は、撮像時のISO感度などから見積もることができる。また、画像中の平坦部における信号の分散などから推定することもできる。ノイズに関する情報を取得し、複数のノイズレベルそれぞれに対して学習された複数の係数データから、該当する係数データを選択して使用する。 More preferably, the coefficient data is changed according to the noise level. This makes it possible to realize more accurate denoising. The noise level (information about noise) of the first image and the second image can be estimated from the ISO sensitivity at the time of imaging and the like. It can also be estimated from the dispersion of signals in the flat portion in the image. Information on noise is acquired, and the corresponding coefficient data is selected and used from a plurality of coefficient data learned for each of a plurality of noise levels.

また本実施例では、撮像画像を二つの分割領域(第1の分割領域および第2の分割領域)に分割し、一方を反転することで係数データの量を削減することができる。これに関して、図9を参照して説明する。図9は、各像高とアジムスでの瞳分割の説明図である。図9はA+B画像を示し、×印の像高およびアジムスにおける分割瞳を×印の横に描画している。図9中の破線は瞳の分割線(分割直線)である。図9に示されるように、本実施例では一点鎖線を軸としてA+B画像の上下いずれか一方を反転すると、他方の瞳分割と重なり、線対称になっている。このため、一点鎖線の上下いずれか一方の領域に関して係数データを保持しておけば、他方は画像を反転することで第3の画像(B画像の一部)が推定することができる。 Further, in this embodiment, the amount of coefficient data can be reduced by dividing the captured image into two divided regions (a first divided region and a second divided region) and inverting one of them. This will be described with reference to FIG. FIG. 9 is an explanatory diagram of each image height and pupil division in Azymuth. FIG. 9 shows an A + B image, and the image height of the x mark and the split pupil in Azymuth are drawn next to the x mark. The broken line in FIG. 9 is a dividing line (dividing straight line) of the pupil. As shown in FIG. 9, in this embodiment, when either the upper or lower side of the A + B image is inverted with the alternate long and short dash line as the axis, it overlaps with the pupil division of the other and becomes line symmetric. Therefore, if the coefficient data is retained for either the upper or lower region of the alternate long and short dash line, the third image (a part of the B image) can be estimated by inverting the image of the other.

本実施例では水平方向に瞳を分割しているため、対称軸は水平な直線であるが、仮に垂直方向に瞳を分割していると対称軸も垂直な直線になる。これをさらに一般的に表現すると、以下のようになる。分割した瞳の関係が画像全体に対して線対称となる軸は、結像光学系101aの光軸を通過し、かつ光軸上で各分割瞳が線対称になる共通の軸(A画像およびB画像のそれぞれの光軸上における瞳に対して共通する線対称の軸)と平行である。この対称軸を分割線としてA+B画像とA画像とをそれぞれ二つに分割し、一方の分割された領域では抽出された第1の画像および第2の画像を分割線に対して反転して入力画像を取得する。係数データは、同じ像高でアジムスが正負反転した係数データを使用する。生成された第3の画像を反転し直すことで、第1の画像および第2の画像に対応する第3の画像が推定できる。これにより、係数データを全アジムス(-180°~180°)で保持する必要がなくなり、データ容量を半分にすることができる。 In this embodiment, since the pupil is divided in the horizontal direction, the axis of symmetry is a horizontal straight line, but if the pupil is divided in the vertical direction, the axis of symmetry is also a vertical straight line. This can be expressed more generally as follows. The axis in which the relationship between the divided pupils is line-symmetrical with respect to the entire image passes through the optical axis of the imaging optical system 101a, and the common axis (A image and) in which each divided pupil is line-symmetrical on the optical axis. It is parallel to the axis of line symmetry common to the pupil on each optical axis of the B image). The A + B image and the A image are each divided into two with this axis of symmetry as the dividing line, and the extracted first image and the second image are inverted and input with respect to the dividing line in one of the divided areas. Get an image. As the coefficient data, the coefficient data in which Azymuth is positive or negative inverted at the same image height is used. By re-inverting the generated third image, a third image corresponding to the first image and the second image can be estimated. This eliminates the need to hold the coefficient data for all azimuths (-180 ° to 180 °), and the data capacity can be halved.

なお、係数データの学習、および第3の画像の生成を行う際に扱う画像は、RAW画像でも現像後の画像でもよい。A+B画像とA画像とが符号化されている場合、復号してから学習および生成を行う。学習に使用した画像と生成の入力画像でガンマ補正の有無や、ガンマ値が異なる場合には、入力画像を処理して学習の画像に合わせることが好ましい。また、A+B画像とA画像(学習の際はB画像も)は、ニューラルネットワークへ入力する前に信号値を規格化しておくことが好ましい。規格化しない場合において学習と生成時にbit数が異なっていると、第3の画像が正しく推定できない。また、bit数に応じてスケールが変化するため、学習時の最適化で収束に影響を及ぼす可能性もある。規格化には、信号が実際に取り得る最大値(輝度飽和値)を用いる。例えばA+B画像が16bitで保存されていたとしても、輝度飽和値は12bitの場合などがあり、この際は12bitの最大値(4095)で規格化しなければ信号の範囲が0~1にならない。また、規格化の際はオプティカルブラックの値を減算することが好ましい。これにより、実際に画像が取り得る信号の範囲をより0~1に近づけることができる。具体的には、以下の式(2)に従って規格化することが好ましい。 The image handled when learning the coefficient data and generating the third image may be a RAW image or a developed image. When the A + B image and the A image are encoded, the learning and generation are performed after decoding. If the image used for training and the generated input image have different gamma corrections and gamma values, it is preferable to process the input image to match the training image. Further, it is preferable that the signal values of the A + B image and the A image (also the B image at the time of learning) are standardized before being input to the neural network. In the case of no standardization, if the number of bits is different at the time of learning and generation, the third image cannot be estimated correctly. In addition, since the scale changes according to the number of bits, optimization during learning may affect convergence. For normalization, the maximum value (luminance saturation value) that the signal can actually take is used. For example, even if the A + B image is stored in 16 bits, the luminance saturation value may be 12 bits, and in this case, the signal range cannot be 0 to 1 unless it is standardized by the maximum value (4095) of 12 bits. Further, it is preferable to subtract the value of optical black at the time of standardization. As a result, the range of signals that can actually be captured by the image can be made closer to 0 to 1. Specifically, it is preferable to standardize according to the following formula (2).

Figure 0007009219000002
Figure 0007009219000002

式(2)において、sはA+B画像(またはA画像もしくはB画像)の信号、sOBはオプティカルブラックの信号値(画像が取り得る信号の最小値)、ssatuは信号の輝度飽和値、snorは規格化された信号を示す。 In equation (2), s is the signal of the A + B image (or A image or B image), s OB is the signal value of optical black (minimum value of the signal that the image can take), s satu is the luminance saturation value of the signal, and s. nor indicates a standardized signal.

本実施例によれば、輝度飽和が発生している場合でも高精度に瞳を分割した画像を推定することが可能な画像処理方法、画像処理装置、および、撮像装置を提供することができる。 According to this embodiment, it is possible to provide an image processing method, an image processing device, and an image pickup device capable of estimating an image in which the pupil is divided with high accuracy even when luminance saturation occurs.

次に、本発明の実施例2における画像処理システムについて説明する。本実施例では、第3の画像を推定する画像処理装置、撮像画像を取得する撮像装置、および、学習を行うサーバが個別に存在している。 Next, the image processing system according to the second embodiment of the present invention will be described. In this embodiment, there are individually an image processing device that estimates a third image, an image pickup device that acquires a captured image, and a server that performs learning.

図10および図11を参照して、本実施例における画像処理システムについて説明する。図10は、画像処理システム300のブロック図である。図11は、画像処理システム300の外観図である。図10および図11に示されるように、画像処理システム300は、撮像装置301、画像処理装置302、サーバ306、表示装置309、記録媒体310、および、出力装置311を備えて構成される。 The image processing system in this embodiment will be described with reference to FIGS. 10 and 11. FIG. 10 is a block diagram of the image processing system 300. FIG. 11 is an external view of the image processing system 300. As shown in FIGS. 10 and 11, the image processing system 300 includes an image pickup device 301, an image processing device 302, a server 306, a display device 309, a recording medium 310, and an output device 311.

撮像装置301の基本構成は、第3の画像を生成する画像処理部、および撮像部を除いて、図2に示される撮像装置100と同様である。撮像装置301の撮像素子は、図12に示されるように構成されている。図12は、本実施例における撮像素子の構成図である。図12において、破線はマイクロレンズを示す。画素320(a、b以降は省略)のそれぞれには4つの光電変換部321、322、323、324(a、b以降は省略)が設けられ、結像光学系の瞳を2×2の四つに分割している。光電変換部321~324で取得される画像を、順に、A画像、B画像、C画像、D画像とし、それらの加算結果をABCD画像とする。撮像素子からは撮像画像として、ABCD画像とA画像、C画像、D画像の4画像が出力される。 The basic configuration of the image pickup apparatus 301 is the same as that of the image pickup apparatus 100 shown in FIG. 2, except for the image processing unit that generates the third image and the image pickup unit. The image pickup device of the image pickup device 301 is configured as shown in FIG. FIG. 12 is a block diagram of the image pickup device in this embodiment. In FIG. 12, the dashed line indicates a microlens. Each of the pixels 320 (omitted after a and b) is provided with four photoelectric conversion units 321, 322, 323, 324 (omitted after a and b), and the pupil of the imaging optical system is 2 × 2. It is divided into two. The images acquired by the photoelectric conversion units 321 to 324 are, in order, an A image, a B image, a C image, and a D image, and the addition result thereof is used as an ABCD image. The image sensor outputs four images, an ABCD image, an A image, a C image, and a D image, as captured images.

撮像装置301と画像処理装置302とが接続されると、撮像画像は記憶部303に記憶される。画像処理装置302は、画像生成部304にて撮像画像から推定B画像(第3の画像の集合)を生成する。この際、画像処理装置302は、ネットワーク305を介してサーバ306にアクセスし、生成に用いる係数データを読み出す。係数データは、学習部308で予め学習され、記憶部307に記憶されている。係数データは、複数のレンズ、焦点距離、F値などにより個別に学習されており、複数の係数データが存在する。 When the image pickup device 301 and the image processing device 302 are connected, the captured image is stored in the storage unit 303. The image processing device 302 generates an estimated B image (a set of third images) from the captured image by the image generation unit 304. At this time, the image processing device 302 accesses the server 306 via the network 305 and reads out the coefficient data used for generation. The coefficient data is learned in advance in the learning unit 308 and stored in the storage unit 307. The coefficient data is individually learned by a plurality of lenses, focal lengths, F-numbers, and the like, and there are a plurality of coefficient data.

画像処理装置302は、入力された撮像画像に合致する条件の係数データを選択して記憶部303に取得し、第3の画像を生成する。生成された推定B画像は、リフォーカス処理などに使用され、処理後の撮像画像が表示装置309、記録媒体310、および、出力装置311の少なくとも一つに出力される。表示装置309は、例えば液晶ディスプレイやプロジェクタなどである。ユーザは、表示装置309を介して、処理途中の画像を確認しながら作業を行うことができる。記録媒体310は、例えば半導体メモリ、ハードディスク、ネットワーク上のサーバなどである。出力装置311は、プリンタなどである。画像処理装置302は、必要に応じて現像処理やその他の画像処理を行う機能を有する。 The image processing device 302 selects coefficient data under conditions that match the input captured image, acquires it in the storage unit 303, and generates a third image. The generated estimated B image is used for refocus processing and the like, and the captured image after the processing is output to at least one of the display device 309, the recording medium 310, and the output device 311. The display device 309 is, for example, a liquid crystal display or a projector. The user can perform the work while confirming the image in the process of processing via the display device 309. The recording medium 310 is, for example, a semiconductor memory, a hard disk, a server on a network, or the like. The output device 311 is a printer or the like. The image processing device 302 has a function of performing development processing and other image processing as needed.

次に、図13を参照して、画像処理装置302の画像生成部304により実行される画像推定処理(第3の画像(B画像)の生成処理)について説明する。図13は、画像推定処理(B画像の推定処理)に関するフローチャートである。図13の各ステップは、主に、画像処理装置302(画像生成部304)により実行される。 Next, with reference to FIG. 13, an image estimation process (a third image (B image) generation process) executed by the image generation unit 304 of the image processing device 302 will be described. FIG. 13 is a flowchart relating to the image estimation process (B image estimation process). Each step of FIG. 13 is mainly executed by the image processing device 302 (image generation unit 304).

まず、ステップS301において、画像処理装置302は、第1の撮像画像および第2の撮像画像を取得する。本実施例において、第1の撮像画像はABCD画像であり、第2の撮像画像はA画像、C画像、および、D画像の3枚の画像である。続いてステップS302において、画像処理装置302は、第1の画像および第2の画像に基づいて入力画像を取得する。本実施例において、第1の画像はABCD画像から抽出され、第2の画像はA画像、C画像、および、D画像のそれぞれから抽出される。このため、第2の画像は3枚の画像である。本実施例では、第1の画像および第2の画像をチャンネル方向へスタックした4チャンネル画像を入力画像とする。 First, in step S301, the image processing device 302 acquires the first captured image and the second captured image. In this embodiment, the first captured image is an ABCD image, and the second captured image is three images, an A image, a C image, and a D image. Subsequently, in step S302, the image processing device 302 acquires an input image based on the first image and the second image. In this embodiment, the first image is extracted from the ABCD image and the second image is extracted from each of the A image, the C image, and the D image. Therefore, the second image is three images. In this embodiment, a 4-channel image in which the first image and the second image are stacked in the channel direction is used as an input image.

続いてステップS303において、画像処理装置302は、入力画像に対応する係数データを選択して取得する。続いてステップS304において、画像処理装置302は第3の画像を生成する。本実施例において、第3の画像の生成に用いるネットワークとしては、図1に示される畳み込みニューラルネットワークCNNが用いられる。 Subsequently, in step S303, the image processing device 302 selects and acquires the coefficient data corresponding to the input image. Subsequently, in step S304, the image processing device 302 generates a third image. In this embodiment, the convolutional neural network CNN shown in FIG. 1 is used as the network used to generate the third image.

続いてステップS305において、画像処理装置302は、所定の領域に対して第3の画像を生成し終えたか否かを判定する。本実施例において、所定の領域は、撮像画像全体である。第3の画像の生成が完了していない場合、ステップS302へ戻り、画像処理装置302は新たな入力画像を取得する。一方、第3の画像の生成が完了している場合、ステップS306へ進む。ステップS306において、画像処理装置302は、生成された複数の第3の画像から推定B画像を生成する。 Subsequently, in step S305, the image processing device 302 determines whether or not the third image has been generated for the predetermined area. In this embodiment, the predetermined area is the entire captured image. If the generation of the third image is not completed, the process returns to step S302, and the image processing device 302 acquires a new input image. On the other hand, when the generation of the third image is completed, the process proceeds to step S306. In step S306, the image processing device 302 generates an estimated B image from the plurality of generated third images.

本実施例において、学習部308による係数データの学習は、実施例1と同様に、図8に示されるフローチャートに従って行われる。レンズ(結像光学系101a)に応じて収差やヴィネッティングが異なるため、レンズの種類ごとに学習ペアを作成し、係数データを学習する。また、撮像条件(焦点距離やF値など)や像高により収差とヴィネッティングの変化が無視できない場合、複数の撮像条件および像高ごとに学習ペアを作成して係数データを学習する。なお本実施例では、第2の撮像画像が3枚の画像である場合の例を挙げているが、逆に第2の撮像画像がA画像1枚で、第3の画像がB画像、C画像、および、D画像それぞれの一部で3枚ある構成としてもよい。 In this embodiment, the learning of the coefficient data by the learning unit 308 is performed according to the flowchart shown in FIG. 8, as in the first embodiment. Since aberrations and vignetting differ depending on the lens (imaging optical system 101a), a learning pair is created for each lens type and coefficient data is learned. If changes in aberration and vignetting cannot be ignored due to imaging conditions (focal length, F value, etc.) and image height, learning pairs are created for each of a plurality of imaging conditions and image height to learn coefficient data. In this embodiment, an example is given in which the second captured image is three images, but conversely, the second captured image is one A image, and the third image is the B image and C. There may be a configuration in which there are three images as a part of each of the image and the D image.

本実施例によれば、輝度飽和が発生している場合でも高精度に瞳を分割した画像を推定することが可能な画像処理システムを提供することができる。 According to this embodiment, it is possible to provide an image processing system capable of estimating an image in which the pupil is divided with high accuracy even when luminance saturation occurs.

次に、本発明の実施例3における撮像装置について説明する。本実施例の撮像装置は、多眼構成の撮像装置である。図14は、撮像装置400のブロック図である。図15は、撮像装置400の外観図である。 Next, the image pickup apparatus according to the third embodiment of the present invention will be described. The image pickup device of this embodiment is a multi-eye image pickup device. FIG. 14 is a block diagram of the image pickup apparatus 400. FIG. 15 is an external view of the image pickup apparatus 400.

撮像装置400は撮像部401を有し、撮像部401は二つの結像光学系401a、401bを有する。二つの結像光学系401a、401bのそれぞれにより形成された像(被写体像、光学像)は、一つの撮像素子401cで受光される。この際、二つの像は撮像素子401cの異なる領域で受光される。本実施例では、結像光学系401a、401bのそれぞれを介して撮像された画像をそれぞれA画像、B画像とする。撮像素子401cは、A画像とB画像とを加算したA+B画像、および、A画像を出力する。この際、A+B画像に対応する瞳(第1の瞳)は、結像光学系401a、401bのそれぞれの瞳を合算した瞳である。なお、その他の部位に関する説明は、実施例1と同様である。また本実施例では、撮像素子401cは一つであるが、結像光学系401a、401bのそれぞれに対応する二つの撮像素子が配列されていてもよい。この場合、画像処理部402は、二つの撮像素子のそれぞれの出力信号を加算した加算信号を第1の撮像画像として取得する。なお、第3の画像(B画像の一部)の生成と係数データの学習は、実施例1と同様である。 The image pickup apparatus 400 has an image pickup unit 401, and the image pickup unit 401 has two imaging optical systems 401a and 401b. The images (subject image, optical image) formed by each of the two imaging optical systems 401a and 401b are received by one image sensor 401c. At this time, the two images are received in different regions of the image sensor 401c. In this embodiment, the images captured via the imaging optical systems 401a and 401b are referred to as an A image and a B image, respectively. The image sensor 401c outputs an A + B image obtained by adding an A image and a B image, and an A image. At this time, the pupil corresponding to the A + B image (first pupil) is the pupil obtained by adding the pupils of the imaging optical systems 401a and 401b. The description of other parts is the same as that of the first embodiment. Further, in this embodiment, the image sensor 401c is one, but two image pickup elements corresponding to each of the image pickup optical systems 401a and 401b may be arranged. In this case, the image processing unit 402 acquires an addition signal obtained by adding the output signals of the two image pickup elements as the first image pickup image. The generation of the third image (a part of the B image) and the learning of the coefficient data are the same as in the first embodiment.

撮像装置400は本実施例の画像処理方法を実行する画像処理部(画像処理装置)402を有し、画像処理部402は情報取得部(取得手段)402aおよび画像生成部(生成手段)402bを有する。また撮像装置400は、記憶部403、表示部404、記録媒体405、および、システムコントローラ406を有する。 The image pickup apparatus 400 has an image processing unit (image processing apparatus) 402 that executes the image processing method of the present embodiment, and the image processing unit 402 includes an information acquisition unit (acquisition means) 402a and an image generation unit (generation means) 402b. Have. Further, the image pickup apparatus 400 has a storage unit 403, a display unit 404, a recording medium 405, and a system controller 406.

本実施例によれば、輝度飽和が発生している場合でも高精度に瞳を分割した画像を推定することが可能な撮像装置を提供することができる。 According to this embodiment, it is possible to provide an image pickup apparatus capable of estimating an image in which the pupil is divided with high accuracy even when luminance saturation occurs.

(その他の実施例)
本発明は、上述の実施例の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

各実施例によれば、輝度飽和が発生している場合でも高精度に瞳を分割した画像を推定することが可能な画像処理方法、画像処理装置、撮像装置、画像処理プログラム、および、記憶媒体を提供することができる。 According to each embodiment, an image processing method, an image processing device, an image pickup device, an image processing program, and a storage medium capable of estimating an image in which the pupil is divided with high accuracy even when luminance saturation occurs. Can be provided.

以上、本発明の好ましい実施例について説明したが、本発明はこれらの実施例に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。 Although the preferred embodiments of the present invention have been described above, the present invention is not limited to these examples, and various modifications and modifications can be made within the scope of the gist thereof.

102 画像処理部
102a 情報取得部
102b 画像生成部
102 Image processing unit 102a Information acquisition unit 102b Image generation unit

Claims (16)

光学系の第1の瞳を介して被写体空間を撮像することで得られた第1の画像と、前記第1の瞳の一部である第2の瞳を介して前記被写体空間を撮像することで得られた第2の画像と、に基づく入力画像を取得する工程と、
入力層と出力層の間に複数の中間層を有するニューラルネットワークを用いて、前記光学系の第3の瞳を介して前記被写体空間を撮像することで得られる画像に相当する第3の画像を前記入力画像から生成する工程と、を有し、
前記第3の瞳は、前記第1の瞳の一部であって前記第2の瞳とは異なることを特徴とする画像処理方法。
To image the subject space through a first image obtained by imaging the subject space through the first pupil of the optical system and a second pupil which is a part of the first pupil. The process of acquiring the input image based on the second image obtained in
A third image corresponding to an image obtained by imaging the subject space through the third pupil of the optical system using a neural network having a plurality of intermediate layers between an input layer and an output layer is obtained. It has a step of generating from the input image and
An image processing method characterized in that the third pupil is a part of the first pupil and is different from the second pupil.
複数の係数データから前記ニューラルネットワークで用いられる係数データを選択する工程を更に有することを特徴とする請求項1に記載の画像処理方法。 The image processing method according to claim 1, further comprising a step of selecting coefficient data to be used in the neural network from a plurality of coefficient data. 前記第1の画像および前記第2の画像はそれぞれ、互いに異なる瞳を介して前記被写体空間を撮像することでえられた第1の撮像画像および第2の撮像画像の部分領域であり、
前記係数データを選択する工程において、前記第1の撮画像における前記第1の画像の位置および前記第2の撮像画像における前記第2の画像の位置に基づいて、前記係数データを選択することを特徴とする請求項2に記載の画像処理方法。
The first image and the second image are partial regions of the first captured image and the second captured image obtained by imaging the subject space through different pupils, respectively.
In the step of selecting the coefficient data, the coefficient data is selected based on the position of the first image in the first captured image and the position of the second image in the second captured image. 2. The image processing method according to claim 2.
前記第1の画像および前記第2の画像はそれぞれ、互いに異なる瞳を介して前記被写体空間を撮像して得られた第1の撮像画像および第2の撮像画像の部分領域であり、
前記係数データを選択する工程において、前記第1の撮像画像および前記第2の撮像画像のそれぞれに関する像高とアジムスとに基づいて、前記係数データを選択することを特徴とする請求項2または3に記載の画像処理方法。
The first image and the second image are partial regions of the first captured image and the second captured image obtained by imaging the subject space through different pupils, respectively.
2. The image processing method described in.
前記第1の画像および前記第2の画像の撮像に用いた前記光学系のヴィネッティングに関する情報を取得する工程を更に有し、
前記係数データを選択する工程において、前記ヴィネッティングに関する情報に基づいて、前記係数データを選択することを特徴とする請求項2乃至4のいずれか1項に記載の画像処理方法。
Further comprising a step of acquiring information regarding the vignetting of the optical system used for capturing the first image and the second image.
The image processing method according to any one of claims 2 to 4, wherein in the step of selecting the coefficient data, the coefficient data is selected based on the information regarding the vignetting.
前記第1の画像および前記第2の画像のそれぞれのノイズに関する情報を取得する工程を更に有し、
前記係数データを選択する工程において、前記ノイズに関する情報に基づいて、前記係数データを選択することを特徴とする請求項2乃至5のいずれか1項に記載の画像処理方法。
Further comprising a step of acquiring information regarding noise of each of the first image and the second image.
The image processing method according to any one of claims 2 to 5, wherein in the step of selecting the coefficient data, the coefficient data is selected based on the information regarding the noise.
前記第1の画像に含まれるノイズは、前記第2の画像に含まれるノイズよりも小さく、
前記第3の画像を生成する工程において、前記ニューラルネットワークを用いて、前記入力画像から前記第3の画像とデノイジングされた前記第2の画像とを生成することを特徴とする請求項1乃至6のいずれか1項に記載の画像処理方法。
The noise contained in the first image is smaller than the noise contained in the second image.
Claims 1 to 6 are characterized in that, in the step of generating the third image, the neural network is used to generate the third image and the denosized second image from the input image. The image processing method according to any one of the above items.
前記第1の瞳は、前記第2の瞳と前記第3の瞳との和であり、
前記入力画像は、前記第1の画像から第2の画像を減算した画像を含むことを特徴とする請求項1乃至7のいずれか1項に記載の画像処理方法。
The first pupil is the sum of the second pupil and the third pupil.
The image processing method according to any one of claims 1 to 7, wherein the input image includes an image obtained by subtracting a second image from the first image.
互いに異なる瞳を介して前記被写体空間を撮像して得られた第1の撮像画像および第2の撮像画像のそれぞれから前記第1の画像および前記第2の画像を抽出する工程と、
前記第1の撮像画像から第2の撮像画像を減算して第4の画像を生成する工程と、
前記第3の画像と前記第4の画像とを合成して第5の画像を生成する工程と、を更に有し、
前記第1の瞳は、前記第2の瞳と前記第3の瞳との和であり、
前記第1の画像および前記第2の画像を抽出する工程において、前記第1の画像は、前記第1の撮像画像において輝度飽和している領域を含むように抽出されることを特徴とする請求項1乃至7のいずれか1項に記載の画像処理方法。
A step of extracting the first image and the second image from each of the first captured image and the second captured image obtained by imaging the subject space through different pupils.
A step of subtracting a second captured image from the first captured image to generate a fourth image,
Further comprising a step of synthesizing the third image and the fourth image to generate a fifth image.
The first pupil is the sum of the second pupil and the third pupil.
A claim characterized in that, in the step of extracting the first image and the second image, the first image is extracted so as to include a region in which the luminance is saturated in the first captured image. Item 6. The image processing method according to any one of Items 1 to 7.
互いに異なる瞳で前記被写体空間を撮像した第1の撮像画像および第2の撮像画像のそれぞれから前記第1の画像および前記第2の画像を抽出する工程と、
前記第1の撮像画像および前記第2の撮像画像のそれぞれを分割直線で第1の分割領域と第2の分割領域とに分割する工程と、
前記第1の撮像画像および前記第2の撮像画像のそれぞれから、前記第1の画像および前記第2の画像を抽出する工程と、を更に有し、
前記分割直線は、前記光学系の光軸を通過し、かつ第1の撮像画像および第2の撮像画像のそれぞれの光軸上における瞳に対して共通する線対称の軸と平行であり、
前記入力画像を取得する工程において、前記第1の分割領域または前記第2の分割領域から抽出された前記第1の画像および前記第2の画像を反転して前記入力画像を取得することを特徴とする請求項1乃至9のいずれか1項に記載の画像処理方法。
A step of extracting the first image and the second image from each of the first captured image and the second captured image obtained by capturing the subject space with different pupils.
A step of dividing each of the first captured image and the second captured image into a first divided region and a second divided region by a dividing straight line.
It further comprises a step of extracting the first image and the second image from each of the first captured image and the second captured image.
The dividing straight line passes through the optical axis of the optical system and is parallel to the axis of line symmetry common to the pupils on the respective optical axes of the first captured image and the second captured image.
In the step of acquiring the input image, the first image extracted from the first divided region or the second divided region and the second image are inverted to acquire the input image. The image processing method according to any one of claims 1 to 9.
光学系の第1の瞳を介して被写体空間を撮像することで得られた第1の画像と、前記第1の瞳の一部である第2の瞳を介して前記被写体空間を撮像することで得られた第2の画像と、に基づく入力画像を取得する取得手段と、
入力層と出力層の間に複数の中間層を有するニューラルネットワークを用いて、前記光学系の第3の瞳を介して前記被写体空間を撮像することで得られる画像に相当する第3の画像を前記入力画像から生成する生成手段と、を有し、
前記第3の瞳は、前記第1の瞳の一部であって前記第2の瞳とは異なることを特徴とする画像処理装置。
To image the subject space through the first image obtained by imaging the subject space through the first pupil of the optical system and the second pupil which is a part of the first pupil. The acquisition means for acquiring the input image based on the second image obtained in
A third image corresponding to an image obtained by imaging the subject space through the third pupil of the optical system using a neural network having a plurality of intermediate layers between an input layer and an output layer is obtained. It has a generation means for generating from the input image, and has.
An image processing apparatus characterized in that the third pupil is a part of the first pupil and is different from the second pupil.
前記ニューラルネットワークに用いられる係数データを記憶する記憶手段を更に有することを特徴とする請求項11に記載の画像処理装置。 The image processing apparatus according to claim 11, further comprising a storage means for storing coefficient data used in the neural network. 光学系により形成された光学像を光電変換する撮像素子と、
請求項11または12に記載の画像処理装置と、を有することを特徴とする撮像装置。
An image pickup element that photoelectrically converts an optical image formed by an optical system,
An image pickup apparatus comprising the image processing apparatus according to claim 11 or 12.
前記撮像素子は複数の画素を有し、
該複数の画素のそれぞれは、互いに異なる入射角で入射する光を受光して第1及び第2の信号を生成する第1及び第2の光電変換部を含み、
前記撮像素子は、前記第1及び第2の信号を加算した加算信号に対応する第1の撮像画像と、前記第1及び第2の信号の一方の信号に対応する第2の撮像画像と、を出力し、
前記第1の画像は前記第1の撮像画像の部分領域であり、前記第2の画像は前記第2の撮像画像の部分領域であることを特徴とする請求項13に記載の撮像装置。
The image pickup device has a plurality of pixels and has a plurality of pixels.
Each of the plurality of pixels includes a first and second photoelectric conversion unit that receives light incident at different angles of incidence and generates first and second signals.
The image pickup device includes a first image pickup image corresponding to an addition signal obtained by adding the first and second signals, and a second image pickup image corresponding to one of the first and second signals. Is output,
13. The image pickup apparatus according to claim 13, wherein the first image is a partial region of the first captured image, and the second image is a partial region of the second captured image.
請求項1乃至10のいずれか1項に記載の画像処理方法をコンピュータに実行させることを特徴とする画像処理プログラム。 An image processing program comprising causing a computer to execute the image processing method according to any one of claims 1 to 10. 請求項15に記載の画像処理プログラムを記憶していることを特徴とする記憶媒体。
A storage medium for storing the image processing program according to claim 15.
JP2018001551A 2018-01-10 2018-01-10 Image processing method, image processing device, image pickup device, image processing program, and storage medium Active JP7009219B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018001551A JP7009219B2 (en) 2018-01-10 2018-01-10 Image processing method, image processing device, image pickup device, image processing program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018001551A JP7009219B2 (en) 2018-01-10 2018-01-10 Image processing method, image processing device, image pickup device, image processing program, and storage medium

Publications (2)

Publication Number Publication Date
JP2019121972A JP2019121972A (en) 2019-07-22
JP7009219B2 true JP7009219B2 (en) 2022-01-25

Family

ID=67308037

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018001551A Active JP7009219B2 (en) 2018-01-10 2018-01-10 Image processing method, image processing device, image pickup device, image processing program, and storage medium

Country Status (1)

Country Link
JP (1) JP7009219B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2022130662A1 (en) * 2020-12-17 2022-06-23

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013235054A (en) 2012-05-07 2013-11-21 Canon Inc Focus detection device and image capturing device
JP2014206564A (en) 2013-04-10 2014-10-30 キヤノン株式会社 Imaging apparatus and control method therefor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013235054A (en) 2012-05-07 2013-11-21 Canon Inc Focus detection device and image capturing device
JP2014206564A (en) 2013-04-10 2014-10-30 キヤノン株式会社 Imaging apparatus and control method therefor

Also Published As

Publication number Publication date
JP2019121972A (en) 2019-07-22

Similar Documents

Publication Publication Date Title
US11195257B2 (en) Image processing method, image processing apparatus, imaging apparatus, lens apparatus, storage medium, and image processing system
CN109644230B (en) Image processing method, image processing apparatus, image pickup apparatus, and storage medium
US10154216B2 (en) Image capturing apparatus, image capturing method, and storage medium using compressive sensing
JP5358039B1 (en) Imaging device
EP2268043B1 (en) Image processing device, imaging device, method, and program
JP2007304525A (en) Image input device, electronic equipment, and image input method
US20210392313A1 (en) Image processing apparatus, image processing method, storage medium, manufacturing method of learned model, and image processing system
JP7297470B2 (en) Image processing method, image processing apparatus, program, image processing system, and method for manufacturing trained model
CN103426147A (en) Image processing apparatus, image pickup apparatus, and image processing method
JP2016061609A (en) Distance measuring device, imaging apparatus, and distance measuring method
JP2020036310A (en) Image processing method, image processing apparatus, imaging apparatus, lens device, program, storage medium, and image processing system
KR20160000422A (en) Image pickup apparatus, control apparatus, control method, and storage medium
CN103516979A (en) Image pickup apparatus and control method of the same
CN111010504B (en) Image processing method, image processing apparatus, image processing system, image pickup apparatus, and storage medium
JP7009219B2 (en) Image processing method, image processing device, image pickup device, image processing program, and storage medium
US10084978B2 (en) Image capturing apparatus and image processing apparatus
US10122939B2 (en) Image processing device for processing image data and map data with regard to depth distribution of a subject, image processing system, imaging apparatus, image processing method, and recording medium
JP7191588B2 (en) Image processing method, image processing device, imaging device, lens device, program, and storage medium
JP7146461B2 (en) Image processing method, image processing device, imaging device, program, and storage medium
JP2017208642A (en) Imaging device using compression sensing, imaging method, and imaging program
JP2018133064A (en) Image processing apparatus, imaging apparatus, image processing method, and image processing program
JP2018081378A (en) Image processing apparatus, imaging device, image processing method, and image processing program
JP2020061129A (en) Method for processing image, image processor, imaging device, image processing system, program, and storage medium
WO2011076975A1 (en) Filter setup learning for binary sensor
CN110958382A (en) Image processing method, image processing apparatus, imaging apparatus, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201208

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210930

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211026

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211202

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: 20211214

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220112