JP6750867B2 - Image processing apparatus, control method thereof, imaging apparatus, and program - Google Patents

Image processing apparatus, control method thereof, imaging apparatus, and program Download PDF

Info

Publication number
JP6750867B2
JP6750867B2 JP2016149145A JP2016149145A JP6750867B2 JP 6750867 B2 JP6750867 B2 JP 6750867B2 JP 2016149145 A JP2016149145 A JP 2016149145A JP 2016149145 A JP2016149145 A JP 2016149145A JP 6750867 B2 JP6750867 B2 JP 6750867B2
Authority
JP
Japan
Prior art keywords
image
image data
value
shaping
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016149145A
Other languages
Japanese (ja)
Other versions
JP2018018358A (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 JP2016149145A priority Critical patent/JP6750867B2/en
Publication of JP2018018358A publication Critical patent/JP2018018358A/en
Application granted granted Critical
Publication of JP6750867B2 publication Critical patent/JP6750867B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Description

本発明は、被写体の深度情報を取得して整形する画像処理技術に関する。 The present invention relates to an image processing technique for acquiring depth information of a subject and shaping the depth information.

被写体の奥行き情報を表す距離マップの整形処理では、距離マップにおける被写体輪郭を、撮像画像を用いて正しい輪郭に合わせる処理が行われる。特許文献1では、高解像度奥行き画像を生成する目的で、低解像度奥行き画像に対し測地的ジョイントアップサンプリングを実行する方法が開示されている。高解像度の光学画像における測地線距離に基づいて補間画素位置を算出することで、被写体境界の輪郭が正しく合った高解像度奥行き画像を生成することができる。また特許文献2には、測距用の左目画像と右目画像を加算した基本画像データにおける被写体の特徴を参照することで、被写体と対応するようにデフォーカス属性を補正する方法が開示されている。さらに整形後の距離マップを参照して距離に応じたボカシ処理やエッジ強調等の効果(以下、画像処理効果と称す)が撮像画像に施されている。 In the shaping process of the distance map that represents the depth information of the subject, the subject contour in the distance map is adjusted to the correct contour using the captured image. Patent Document 1 discloses a method of performing geodesic joint upsampling on a low resolution depth image for the purpose of generating a high resolution depth image. By calculating the interpolated pixel position based on the geodesic distance in the high-resolution optical image, it is possible to generate a high-resolution depth image in which the contour of the subject boundary is correct. Patent Document 2 discloses a method of correcting a defocus attribute so as to correspond to a subject by referring to the feature of the subject in basic image data obtained by adding the left-eye image and the right-eye image for distance measurement. .. Further, effects such as blurring processing and edge enhancement according to the distance (hereinafter, referred to as image processing effect) are applied to the captured image by referring to the distance map after shaping.

特開2014−150521号公報JP, 2014-150521, A 特開2008−15754号公報JP, 2008-15754, A 特開2014−44408号公報JP, 2014-44408, A

しかしながら、特許文献2に開示された従来技術では、被写体の距離分布に関連する情報を取得したときに参照した画像と異なる撮像画像に対応する距離分布を生成することが考慮されていない。
上記課題に鑑み、本発明は、複数の画像データおよび画像データに関連する深度情報を取得して画像処理を行う場合に、深度情報に対する整形処理の精度を高める画像処理装置の提供を目的とする。
However, the conventional technique disclosed in Patent Document 2 does not consider generating a distance distribution corresponding to a captured image different from the image referred to when the information related to the distance distribution of the subject is acquired.
In view of the above problem, the present invention has an object of providing an image processing apparatus that improves the accuracy of shaping processing for depth information when performing image processing by acquiring depth information related to a plurality of image data and image data. ..

本発明の一実施形態の画像処理装置は、撮像光学系の第1の瞳部分領域を通過する光線群から得られた対となる第1の画像データを取得する第1の取得手段と、前記第1の瞳部分領域とは大きさが異なる前記撮像光学系の第2の瞳部分領域を通過する光線群から得られた第2の画像データを取得する第2の取得手段と、前記対となる第1の画像データから画像内の被写体の奥行き方向の深さに対応する深度情報を生成する生成手段と、前記第2の画像データ、または前記第2の画像データが取得されたときのF値との差分が予め定められた範囲内で撮像された画像のデータを用いて、前記深度情報を平滑化する整形処理を施す整形手段と、を有する。 An image processing apparatus according to an embodiment of the present invention includes a first acquisition unit that acquires a pair of first image data obtained from a light ray group that passes through a first pupil partial region of an imaging optical system; Second acquisition means for acquiring second image data obtained from a light ray group passing through the second pupil partial area of the imaging optical system having a size different from that of the first pupil partial area; Generating means for generating depth information corresponding to the depthwise depth of the subject in the image from the first image data, and F when the second image data or the second image data is acquired. A shaping unit that performs shaping processing for smoothing the depth information by using data of an image captured with a difference from the value within a predetermined range.

本発明の画像処理装置によれば、複数の画像データおよび画像データに関連する深度情報を取得して画像処理を行う場合に、深度情報に対する整形処理の精度を高めることができる。 According to the image processing device of the present invention, when a plurality of image data and depth information related to the image data are acquired and image processing is performed, the accuracy of the shaping process for the depth information can be improved.

実施例1から3に係るデジタルカメラの機能構成を示すブロック図である。4 is a block diagram showing a functional configuration of a digital camera according to Embodiments 1 to 3. FIG. 実施例1に係るデジタルカメラの撮像部を説明する図である。FIG. 3 is a diagram illustrating an image pickup unit of the digital camera according to the first embodiment. 実施例1に係る分割画素の加算数と焦点深度との関係を説明する図である。FIG. 6 is a diagram illustrating the relationship between the number of additions of divided pixels and the depth of focus according to the first embodiment. 実施例1に係る画像処理部の機能構成を示すブロック図である。3 is a block diagram illustrating a functional configuration of an image processing unit according to the first embodiment. FIG. 実施例1の処理を説明するフローチャートである。6 is a flowchart illustrating a process of the first embodiment. 実施例1に係る視点画像を説明する図である。FIG. 3 is a diagram illustrating a viewpoint image according to the first embodiment. 実施例1に係る画像処理効果を施す対象画像の説明図である。FIG. 7 is an explanatory diagram of a target image to which the image processing effect according to the first embodiment is applied. 実施例1に係る距離マップの整形処理の説明図である。FIG. 6 is an explanatory diagram of a distance map shaping process according to the first embodiment. 比較例に係る距離マップの整形処理の説明図である。It is explanatory drawing of the shaping process of the distance map which concerns on a comparative example. 実施例2に係るデジタルカメラの撮像部の説明図である。FIG. 7 is an explanatory diagram of an image pickup unit of the digital camera according to the second embodiment. 実施例2および3に係る画像処理部の機能構成を示すブロック図である。9 is a block diagram showing a functional configuration of an image processing unit according to Examples 2 and 3. FIG. 実施例2の処理を説明するフローチャートである。9 is a flowchart illustrating a process of the second embodiment. 実施例3の処理を説明するフローチャートである。9 is a flowchart illustrating a process of the third embodiment. 実施例4に係るデジタルカメラの機能構成を示すブロック図である。FIG. 9 is a block diagram showing a functional configuration of a digital camera according to a fourth embodiment. 実施例4に係る画像処理部の機能構成を示すブロック図である。FIG. 9 is a block diagram showing a functional configuration of an image processing unit according to a fourth embodiment. 実施例4の処理を説明するフローチャートである。9 is a flowchart illustrating a process of the fourth embodiment.

以下、本発明の好適な実施形態について、図面を参照して詳細に説明する。実施形態の画像処理装置として、デジタルカメラ等の撮像装置への適用例を説明する。例えば、光線の強度情報および方向情報を取得可能なライトフィールドカメラの構成において、撮像部による視点画像から距離マップが取得される。さらに距離マップの取得時とは画像を構成する光線群が異なる大きさの瞳領域を通過する状態で取得された撮像画像における被写体像の輪郭に沿うように、距離マップを整形する処理が行われる。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. As an image processing apparatus of the embodiment, an application example to an image pickup apparatus such as a digital camera will be described. For example, in the configuration of a light field camera capable of acquiring light intensity information and direction information, a distance map is acquired from a viewpoint image by the image capturing unit. Further, a process of shaping the distance map is performed so that it follows the contour of the subject image in the captured image acquired in a state where the light ray group forming the image passes through the pupil region having a different size from that at the time of acquiring the distance map. ..

[実施例1]
図1は、本実施例に係るデジタルカメラ100の機能構成を示すブロック図である。システム制御部101はCPU(中央演算処理装置)を備える。CPUは、デジタルカメラ100が備える各構成部の動作プログラムをROM(Read Only Memory)102より読み出し、RAM(Random Access Memory)103に展開して実行する。これによりシステム制御部101は、デジタルカメラ100全体を制御する。ROM102は、書き換え可能な不揮発性メモリであり、デジタルカメラ100が備える各構成部の動作プログラムに加え、各部の動作に必要なパラメータ等を記憶する。例えば焦点検出等で必要なレンズ情報として、射出瞳距離のデータがROM102に記憶されている。RAM103は、書き換え可能な揮発性メモリであり、デジタルカメラ100が備える各構成部の動作において出力されたデータの一時的な記憶領域として用いられる。
[Example 1]
FIG. 1 is a block diagram showing the functional arrangement of the digital camera 100 according to this embodiment. The system control unit 101 includes a CPU (central processing unit). The CPU reads an operation program of each component included in the digital camera 100 from a ROM (Read Only Memory) 102, expands it in a RAM (Random Access Memory) 103, and executes it. Thereby, the system control unit 101 controls the entire digital camera 100. The ROM 102 is a rewritable non-volatile memory, and stores parameters necessary for the operation of each unit, in addition to the operation programs of the respective units included in the digital camera 100. For example, data of the exit pupil distance is stored in the ROM 102 as lens information necessary for focus detection and the like. The RAM 103 is a rewritable volatile memory and is used as a temporary storage area for data output in the operation of each component included in the digital camera 100.

撮像光学系104は、被写体からの光を撮像部105に結像させる。撮像部105は、CCD(電荷結合素子)センサやCMOS(相補型金属酸化膜半導体)センサ等の撮像素子を備える。撮像素子は撮像光学系104により結像された光学像を光電変換し、アナログ画像信号をA(アナログ)/D(デジタル)変換部106に出力する。A/D変換部106は、入力されたアナログ画像信号をA/D変換してデジタル画像データをRAM103に出力して記憶させる。 The image pickup optical system 104 forms light from a subject on the image pickup unit 105. The image capturing unit 105 includes an image capturing element such as a CCD (charge coupled device) sensor or a CMOS (complementary metal oxide semiconductor) sensor. The image pickup device photoelectrically converts the optical image formed by the image pickup optical system 104, and outputs an analog image signal to the A (analog)/D (digital) conversion unit 106. The A/D conversion unit 106 performs A/D conversion on the input analog image signal and outputs digital image data to the RAM 103 for storage.

画像処理部107は、RAM103に記憶されている画像データに対して、ホワイトバランス調整、色補間、縮小/拡大等の処理や、さらに距離マップの生成、距離マップの整形処理等の、各種画像処理を行う。 The image processing unit 107 performs various kinds of image processing such as white balance adjustment, color interpolation, reduction/enlargement processing on the image data stored in the RAM 103, further distance map generation, and distance map shaping processing. I do.

記録媒体108は着脱可能なメモリカード等であり、画像データや各種データが記録される。例えば、RAM103から読み出された後、画像処理部107が処理した画像データや、A/D変換部106がA/D変換を行った画像データ等は、記録画像データとして記録媒体108に記録される。バス109は、各構成部の間で信号の送受を行うために用いられる。 The recording medium 108 is a removable memory card or the like, and image data and various data are recorded therein. For example, image data processed by the image processing unit 107 after being read from the RAM 103, image data subjected to A/D conversion by the A/D conversion unit 106, and the like are recorded as recording image data on the recording medium 108. It The bus 109 is used to send and receive signals between each component.

図2を参照して、図1の撮像部105について説明する。図2(A)は撮像部105の画素配列を例示する。これはプレノプティク方式でライトフィールド情報を取得する撮像素子の画素配列である。図2(B)は画素部200を拡大して示す模式図である。図2の紙面に垂直な方向(Z方向)を光軸方向とし、Z方向と直交する左右方向をX方向とし、Z方向と直交する上下方向をY方向と定義する。プレノプティク方式では、図2(A)のように撮像素子の前面にて、複数の光電変換部(以下、各部を分割画素ともいう)に対して1つの割合で並ぶマイクロレンズが二次元的に規則的に配列されている。よって、光の2次元強度分布だけではなく撮像素子に入射する光線の入射方向の情報を取得し、被写界空間の3次元的な情報を取得することが可能である。 The imaging unit 105 in FIG. 1 will be described with reference to FIG. FIG. 2A illustrates a pixel array of the imaging unit 105. This is the pixel array of the image sensor that acquires the light field information by the plenoptic method. FIG. 2B is a schematic diagram showing the pixel portion 200 in an enlarged manner. The direction perpendicular to the paper surface of FIG. 2 (Z direction) is defined as the optical axis direction, the horizontal direction orthogonal to the Z direction is defined as the X direction, and the vertical direction orthogonal to the Z direction is defined as the Y direction. In the plenoptic method, as shown in FIG. 2A, microlenses arranged at a ratio of one to a plurality of photoelectric conversion units (hereinafter, each unit is also referred to as divided pixels) are two-dimensionally arranged on the front surface of the image sensor. Are arranged in an array. Therefore, it is possible to acquire not only the two-dimensional intensity distribution of light but also the information of the incident direction of the light ray that is incident on the image sensor, and the three-dimensional information of the object space.

図2(B)は、1つのマイクロレンズ210に対して、6行6列の分割画素を有する構成例を示す。この例では、行方向(Y方向)の位置座標をAからFの記号で表現し、列方向(X方向)の位置座標を1から6の数字で表現している。例えば、左上隅の位置は「1A」と表現され、右下隅の位置は「6F」と表現される。 FIG. 2B shows a structural example in which one microlens 210 has divided pixels in 6 rows and 6 columns. In this example, the position coordinates in the row direction (Y direction) are represented by the symbols A to F, and the position coordinates in the column direction (X direction) are represented by the numbers 1 to 6. For example, the position of the upper left corner is expressed as "1A", and the position of the lower right corner is expressed as "6F".

各マイクロレンズ210の同一画素位置(第1の位置)の分割画素のみで構成された二次元画像は、他の同一画素位置(第2の位置)の分割画素のみで構成された二次元画像に対して視差を有する。例えば、1Aの位置に対応する分割画素のみで構成された第1の画像と、2Aの位置に対応する分割画素のみで構成された第2の画像とは視差を有する。6行6列の分割画素から、合計36(視点数)の異なる画像(視点画像)を得ることができる。 A two-dimensional image composed only of divided pixels at the same pixel position (first position) of each microlens 210 becomes a two-dimensional image composed only of divided pixels at another same pixel position (second position). It has parallax. For example, there is a parallax between the first image composed only of the divided pixels corresponding to the position 1A and the second image composed only of the divided pixels corresponding to the position 2A. A total of 36 (viewpoints) different images (viewpoint images) can be obtained from the divided pixels of 6 rows and 6 columns.

次に図3を参照して、分割画素の加算と焦点深度との関係について説明する。図3(A)、図3(B)、図3(C)は図2の画素部200を示している。図中に太線で囲んで示す分割画素に対する加算処理が行われて、加算画像(合成画像)が生成されるものとする。図3(A)は各マイクロレンズの下に存在する全ての分割画素を加算することにより、加算画像が生成される例を示す。図3(B)は、4つに区分された領域ごとに分割画素を加算することにより、加算画像が生成される例を示す。各領域は以下のとおりである。
・第1の領域(1A、2A、3A、1B、2B、3B、1C、2C、3C)
・第2の領域(4A、5A、6A、4B、5B、6B、4C、5C、6C)
・第3の領域(1D、2D、3D、1E、2E、3E、1F、2F、3F)
・第4の領域(4D、5D、6D、4E、5E、6E、4F、5F、6F)
第1から第4の領域を単位として、それぞれの領域内の分割画素を加算して加算画像を生成する処理が行われる。
Next, the relationship between the addition of divided pixels and the depth of focus will be described with reference to FIG. 3A, 3B, and 3C show the pixel portion 200 in FIG. It is assumed that an addition image (composite image) is generated by performing addition processing on the divided pixels surrounded by a thick line in the figure. FIG. 3A shows an example in which an addition image is generated by adding all the divided pixels existing under each microlens. FIG. 3B shows an example in which a divided image is generated by adding divided pixels for each of four areas. Each area is as follows.
First area (1A, 2A, 3A, 1B, 2B, 3B, 1C, 2C, 3C)
-Second area (4A, 5A, 6A, 4B, 5B, 6B, 4C, 5C, 6C)
・Third area (1D, 2D, 3D, 1E, 2E, 3E, 1F, 2F, 3F)
・Fourth area (4D, 5D, 6D, 4E, 5E, 6E, 4F, 5F, 6F)
With the first to fourth regions as a unit, a process of adding divided pixels in each region to generate an added image is performed.

図3(C)は分割画像の加算を行わない場合を示す。つまり、36個の各分割画像のみで構成された個別の画像が生成される。
次に、図3(D)、図3(E)、図3(F)を参照して、焦点深度について説明する。図3(D)、図3(E)、図3(F)は、それぞれ図3(A)、図3(B)、図3(C)に対応する図である。
FIG. 3C shows a case where addition of divided images is not performed. That is, an individual image composed of only 36 divided images is generated.
Next, the depth of focus will be described with reference to FIGS. 3D, 3E, and 3F. 3(D), 3(E), and 3(F) are diagrams corresponding to FIG. 3(A), FIG. 3(B), and FIG. 3(C), respectively.

図3(D)では、ひとつのマイクロレンズに対応する全ての分割画素の加算処理が行われる。この場合、分割されていない撮像光学系の瞳領域300を光線群が通過することになる。許容錯乱円径をδと表記し、撮像光学系の絞り値をFと表記すると、焦点深度は、±Fδとなる。分割画素の信号が全て加算されるので互いに視差を有する対の視点画像を得ることはできないが、明るくS/N(信号対ノイズ)比の高い画像を得ることができる。以下では全ての分割画素の信号を加算して得られる画像を、全開口画像と呼ぶこととする。ここで、許容錯乱円径δは、δ=2・ΔX(ΔX:画素周期)、つまりナイキスト周波数「1/(2・ΔX)」の逆数で規定される。 In FIG. 3D, the addition processing of all the divided pixels corresponding to one microlens is performed. In this case, the light ray group passes through the pupil area 300 of the imaging optical system which is not divided. When the permissible circle of confusion diameter is expressed as δ and the aperture value of the imaging optical system is expressed as F, the depth of focus is ±Fδ. Since all the signals of the divided pixels are added, it is not possible to obtain a pair of viewpoint images having parallax with each other, but a bright image having a high S/N (signal to noise) ratio can be obtained. Hereinafter, an image obtained by adding the signals of all the divided pixels will be referred to as a full aperture image. Here, the permissible circle of confusion diameter δ is defined by δ=2·ΔX (ΔX: pixel period), that is, the reciprocal of the Nyquist frequency “1/(2·ΔX)”.

図3(E)では、2×2に分割されて狭くなった分割瞳領域301を光線群が通過する。このため、実効絞り値は2Fとなって、全開口時よりも暗くなる。各視点画像の実効的な焦点深度は±2Fδであり、全開口画像よりも被写界深度の2倍深くなった視点画像を得ることができる。2×2の分割によって、合計4種類の視点画像が得られる。なお、図3(E)は便宜上、垂直方向に分割された瞳部分領域のみを図示している。 In FIG. 3E, the light ray group passes through the divided pupil region 301 which is divided into 2×2 and becomes narrow. Therefore, the effective aperture value is 2F, which is darker than that at the full aperture. The effective depth of focus of each viewpoint image is ±2Fδ, and it is possible to obtain a viewpoint image that is twice as deep as the depth of field compared to the full aperture image. A total of four types of viewpoint images are obtained by the 2×2 division. Note that FIG. 3E illustrates only a pupil partial region divided in the vertical direction for convenience.

図3(F)では、6×6に分割されてさらに狭くなった分割瞳領域302を光線群が通過する。このため、実効絞り値は6Fとなって、各視点画像の実効的な焦点深度は±6Fδとなる。6×6の分割によって、合計36種類の視点画像が得られる。なお、図3(F)は便宜上、垂直方向に分割された瞳部分領域のみを図示している。 In FIG. 3F, the light ray group passes through the divided pupil region 302 which is divided into 6×6 and is further narrowed. Therefore, the effective aperture value is 6F, and the effective depth of focus of each viewpoint image is ±6Fδ. A total of 36 types of viewpoint images are obtained by the 6×6 division. Note that FIG. 3F shows only the pupil partial regions divided in the vertical direction for convenience.

このように分割画素の加算処理を行うことで、異なる大きさの瞳部分領域を通過した光線群から成る画像を生成可能である。分割された瞳部分領域が大きいほど被写界深度の浅い画像を得ることができ、瞳部分領域が小さいほど被写界深度の深い画像を得ることができる。 By performing the addition processing of the divided pixels in this way, it is possible to generate an image including a group of light rays that have passed through pupil partial regions of different sizes. An image with a shallow depth of field can be obtained as the divided pupil partial region is large, and an image with a deep depth of field can be obtained as the pupil partial region is small.

図4は図1の画像処理部107の具体的な構成例を示すブロック図である。画素加算部400は、図3(A)および(B)で説明した画素加算処理を行う。距離マップ生成部401は対の視点画像を取得し、被写体の距離分布に関連する距離マップの情報を生成する。距離マップ整形部402は、距離マップ生成部401が生成した距離マップの整形処理を行う。整形処理が施された距離マップ情報は、取得された対象画像の画像データと関連付けられてシステム制御部101が行う記録制御により記録媒体108へ記録される。エッジ強調部403は、整形後の距離マップを参照し、対象画像のエッジ強調処理を行う。 FIG. 4 is a block diagram showing a specific configuration example of the image processing unit 107 in FIG. The pixel addition unit 400 performs the pixel addition processing described in FIGS. 3A and 3B. The distance map generation unit 401 acquires a pair of viewpoint images and generates information on a distance map related to the distance distribution of the subject. The distance map shaping unit 402 performs shaping processing of the distance map generated by the distance map generation unit 401. The distance map information that has undergone the shaping process is recorded in the recording medium 108 under the recording control performed by the system control unit 101 in association with the acquired image data of the target image. The edge enhancement unit 403 refers to the shaped distance map and performs edge enhancement processing on the target image.

図5を参照して、各部が実行する処理について詳説する。図5は画像処理部107の処理内容を説明するためのフローチャートである。以下の処理は、システム制御部101のCPUがメモリからプログラムを読み出して実行することにより実現される。 The processing executed by each unit will be described in detail with reference to FIG. FIG. 5 is a flowchart for explaining the processing content of the image processing unit 107. The following processing is realized by the CPU of the system control unit 101 reading the program from the memory and executing the program.

S500にてユーザはデジタルカメラ100で被写体を撮影し、分割画素の情報が取得される。あるいは、分割画素の情報が予め記録媒体108に記録されている場合に、記録媒体108から分割画素の情報を読み出す処理が行われる。 In step S500, the user shoots a subject with the digital camera 100, and information about divided pixels is acquired. Alternatively, when the information of the divided pixels is recorded in the recording medium 108 in advance, the process of reading the information of the divided pixels from the recording medium 108 is performed.

S501にて、距離マップを生成するための対の視点画像が生成される。画素加算部400は、S500で取得された分割画素の情報の加算処理を行い、対の視点画像を生成する。分割画素の加算については図3で説明した通りである。本実施例では図3(B)において、第1の領域(1A、2A、3A、1B、2B、3B、1C、2C、3C)内の分割画素を加算した第1の加算画像が取得される。また第2の領域(4A、5A、6A、4B、5B、6B、4C、5C、6C)内の分割画素を加算した第2の加算画像が取得される。第1および第2の加算画像から得られた対の視点画像の例を図6に示す。 At S501, a pair of viewpoint images for generating a distance map is generated. The pixel addition unit 400 performs addition processing on the information of the divided pixels acquired in S500, and generates a pair of viewpoint images. The addition of divided pixels is as described in FIG. In the present embodiment, in FIG. 3B, the first added image obtained by adding the divided pixels in the first region (1A, 2A, 3A, 1B, 2B, 3B, 1C, 2C, 3C) is acquired. .. Further, the second added image obtained by adding the divided pixels in the second regions (4A, 5A, 6A, 4B, 5B, 6B, 4C, 5C, 6C) is acquired. An example of a pair of viewpoint images obtained from the first and second added images is shown in FIG.

図6(A)の画像は第1の加算画像に相当し、合焦している人物600と、それよりも背景側に人物601が存在するシーンを示す。背景側の人物601の画像にはボケが発生していて輪郭が不鮮明である。図6(B)の画像は第2の加算画像に相当し、図6(A)の画像に対して視差を有する画像である。つまり図6(B)の人物602の画像は図6(A)における人物601の画像に対して視差を有している。 The image in FIG. 6A corresponds to the first added image and shows a scene in which a person 600 is in focus and a person 601 is on the background side of the person 600. Blurring occurs in the image of the person 601 on the background side, and the outline is unclear. The image in FIG. 6B corresponds to the second added image, and has an parallax with respect to the image in FIG. 6A. That is, the image of the person 602 in FIG. 6B has a parallax with respect to the image of the person 601 in FIG. 6A.

図5のS502で距離マップ生成部401は、S501で取得された対の視点画像を用いて距離マップ(深度情報)を生成する。深度情報に関して、撮像画像内の各被写体の奥行き方向の深さ(深度)に対応する情報としてさまざまな実施形態がある。つまり、被写体の深さに対応するデータが示す情報(深さ情報)は、画像内における撮像装置から被写体までの被写体距離を直接的に表すか、または画像内の被写体の距離(被写体距離)や深さの相対関係を表す情報であればよい。例えば、撮像部105から取得される対をなす画像データ間の相関演算によって各領域の像ずれ量が算出され、像ずれ量の分布を表す像ずれマップが算出される。あるいはさらに像ずれ量がデフォーカス量に換算され、デフォーカス量の分布(撮像画像の2次元平面上の分布)を表すデフォーカスマップが生成される。このデフォーカス量を撮像光学系や撮像素子の条件に基づいて被写体距離に換算すると、被写体距離の分布を表す距離マップデータが得られる。像ずれマップデータ、デフォーカスマップデータ、あるいはデフォーカス量から変換される被写体距離の距離マップデータを取得可能である。本実施形態では、被写体の距離分布に関連する情報として着目画素位置におけるデフォーカス量を算出する処理例を説明する。対の視点画像からデフォーカス量を計算する方法は、下記のとおりである。 In step S502 of FIG. 5, the distance map generation unit 401 generates a distance map (depth information) using the pair of viewpoint images acquired in step S501. Regarding the depth information, there are various embodiments as information corresponding to the depth (depth) of each subject in the captured image in the depth direction. That is, the information (depth information) indicated by the data corresponding to the depth of the subject directly represents the subject distance from the imaging device to the subject in the image, or the distance of the subject in the image (subject distance) or Any information can be used as long as it represents the relative depth relationship. For example, the image shift amount of each area is calculated by the correlation calculation between the pair of image data acquired from the image capturing unit 105, and the image shift map indicating the distribution of the image shift amount is calculated. Alternatively, the image shift amount is further converted into a defocus amount, and a defocus map representing the distribution of the defocus amount (distribution on the two-dimensional plane of the captured image) is generated. If this defocus amount is converted into a subject distance based on the conditions of the image pickup optical system and the image pickup device, distance map data representing the distribution of the subject distance can be obtained. It is possible to acquire image shift map data, defocus map data, or distance map data of a subject distance converted from the defocus amount. In this embodiment, a processing example of calculating a defocus amount at a pixel position of interest as information related to the distance distribution of a subject will be described. The method of calculating the defocus amount from the pair of viewpoint images is as follows.

対をなす視点画像のうちの、第1の視点画像における信号列をE(1)〜E(m)と表記し、第2の視点画像における信号列をF(1)〜F(m)と表記する。mは画素位置に対応する自然数の変数を表わす。信号列E(1)〜E(m)に対して、信号列F(1)〜F(m)を相対的にずらしながら、下記式(1)により2つの信号列の間のずらし量(kと記す)における相関量(C(k)と記す)の演算が行われる。
C(k)=Σ|E(n)―F(n+k)| ・・・(1)
Of the viewpoint images forming a pair, the signal sequences in the first viewpoint image are denoted by E(1) to E(m), and the signal sequences in the second viewpoint image are denoted by F(1) to F(m). write. m represents a natural number variable corresponding to the pixel position. While shifting the signal trains F(1) to F(m) relative to the signal trains E(1) to E(m), the shift amount (k) between the two signal trains is calculated by the following equation (1). The calculation of the correlation amount (denoted as C(k)) is performed.
C(k)=Σ|E(n)-F(n+k)| (1)

式(1)におけるΣ演算は、変数nについての総和として計算される。Σ演算においてn、n+kの取る範囲は1〜mの範囲に限定される。また、ずらし量kは整数値であり、一対のデータの検出ピッチを単位とした相対的シフト量である。2つの信号列の間のシフト減算が行われ、差分絶対値の総和が、ずらし量kの相関量C(k)として算出される。 The Σ operation in equation (1) is calculated as the sum total for the variable n. In the Σ operation, the range of n and n+k is limited to the range of 1 to m. Further, the shift amount k is an integer value and is a relative shift amount in units of the detection pitch of a pair of data. Shift subtraction between the two signal sequences is performed, and the sum of absolute difference values is calculated as the correlation amount C(k) of the shift amount k.

式(1)の演算結果については、一対の信号列の相関が高いシフト量において相関量C(k)が最小になる。C(k)の値が最小となるkを、kjと表記する。下記式(2)から式(4)に示す3点内挿法を用いて、連続的な相関量に対する最小値C(x)を与えるシフト量xが算出される。
x=kj+D/SLOP ・・・(2)
D={C(kj−1)−C(kj+1)}/2 ・・・(3)
SLOP=MAX{C(kj+1)−C(kj),C(kj−1)−C(kj)}・・・(4)
Regarding the calculation result of the equation (1), the correlation amount C(k) becomes the minimum in the shift amount in which the pair of signal sequences has a high correlation. The value of k that minimizes the value of C(k) is expressed as kj. The shift amount x that gives the minimum value C(x) for the continuous correlation amount is calculated using the three-point interpolation method shown in the following formulas (2) to (4).
x=kj+D/SLOP (2)
D={C(kj-1)-C(kj+1)}/2 (3)
SLOP=MAX{C(kj+1)-C(kj), C(kj-1)-C(kj)}... (4)

式(2)で求めたシフト量xは実数値であり、これを用いてデフォーカス量(DEFと記す)を下記式(5)から算出することができる。
DEF=KX・PY・x ・・・(5)
式(5)において、PYは検出ピッチを表わす。KXは一対の瞳部分領域を通過する光束の重心の開き角の大きさによって決まる変換係数である。距離マップ生成部401は算出したデフォーカス量の空間的な分布を表わす距離マップのデータを出力する。
The shift amount x obtained by the equation (2) is a real value, and the defocus amount (denoted as DEF) can be calculated from the equation (5) using this.
DEF=KX/PY/x (5)
In Expression (5), PY represents the detected pitch. KX is a conversion coefficient determined by the size of the opening angle of the center of gravity of the light flux passing through the pair of pupil partial regions. The distance map generation unit 401 outputs distance map data representing the spatial distribution of the calculated defocus amount.

S503にて画像処理部107は、S500で取得した分割画素情報から画像処理効果を施す対象画像を生成する。本実施例では図3(C)において、2Bの位置に対応する分割画素の情報のみで構成された画像を対象画像とする。図7に対象画像の例を示す。対象画像は、S501にて対の視点画像を生成したときよりも、小さい瞳部分領域を通過した光線群から生成される画像であるため、実効F値が大きく、被写界深度の深い画像である。そのため、背景側の人物700の位置は被写界深度内となり、人物700の画像の輪郭が鮮明である。 In step S503, the image processing unit 107 generates a target image to which the image processing effect is applied, from the divided pixel information acquired in step S500. In the present embodiment, in FIG. 3C, an image configured only by information of divided pixels corresponding to the position 2B is set as the target image. FIG. 7 shows an example of the target image. Since the target image is an image generated from a group of rays that have passed through a small pupil partial region as compared with the case where the pair of viewpoint images was generated in S501, it is an image with a large effective F value and a deep depth of field. is there. Therefore, the position of the person 700 on the background side is within the depth of field, and the contour of the image of the person 700 is clear.

S504にて距離マップ整形部402は、S502で生成された距離マップを整形する。整形処理では、整形用画像を参照しながら距離マップにバイラテラルフィルタ処理が施される。バイラテラルフィルタ処理について、具体的には、着目画素位置pのフィルタ結果をJpと表記すると、下記式(6)で表される。
Jp=(1/Kp)ΣI1q・f(|p−q|)・g(|I2p−I2q|) ・・・(6)
In step S504, the distance map shaping unit 402 shapes the distance map generated in step S502. In the shaping process, the bilateral filter process is performed on the distance map while referring to the shaping image. Regarding the bilateral filter processing, specifically, when the filter result at the pixel position of interest p is denoted by Jp, it is expressed by the following equation (6).
Jp=(1/Kp)ΣI1q·f(|p−q|)·g(|I2p−I2q|) (6)

式(6)中の各記号の意味は以下のとおりである。
q :周辺画素位置
Ω :着目画素位置pを中心とする積算対象領域
Σ :q∈Ω範囲の積算
I1q:周辺画素位置qにおける距離マップ画素値
f(|p−q|):着目画素位置pを中心とするガウシアン関数
I2p :着目画素位置pでの整形用画像信号値
I2q :周辺画素位置qでの整形用画像信号値
g(|I2p−I2q|):整形用画像信号値I2pを中心とするガウシアン関数
Kp :正規化係数であり、f・g重みの積算値。
The meaning of each symbol in formula (6) is as follows.
q: Peripheral pixel position Ω: Integration target area centered on the target pixel position p Σ: Integration of qεΩ range I1q: Distance map pixel value at the peripheral pixel position q f(|p−q|): Target pixel position p Gaussian function centered at I2p: Shaping image signal value at target pixel position p I2q: Shaping image signal value at peripheral pixel position q g(|I2p-I2q|): Shaping image signal value I2p Gaussian function Kp: Normalized coefficient, which is an integrated value of f·g weights.

着目画素位置pでの信号値I2pと周辺画素位置qでの信号値I2qとの差が小さい場合、つまり整形用画像において着目画素の画素値と周辺画素の画素値が近いと、その周辺画素のf・g重み(平滑化の重み)は大きくなる。 When the difference between the signal value I2p at the target pixel position p and the signal value I2q at the peripheral pixel position q is small, that is, when the pixel value of the target pixel and the pixel value of the peripheral pixel in the shaping image are close, The f·g weight (smoothing weight) becomes large.

本実施例では整形用画像として、S503で生成された画像処理効果を施す対象画像を用いることとする。以下、整形用画像にS501で生成した対の視点画像のいずれかを用いた場合と比較して、図8を参照して本実施例の有効性について説明する。 In the present embodiment, the target image generated in S503 and subjected to the image processing effect is used as the shaping image. Hereinafter, the effectiveness of the present embodiment will be described with reference to FIG. 8 in comparison with the case where any one of the pair of viewpoint images generated in S501 is used as the shaping image.

図8は、本実施例の整形処理の結果を説明するための図である。図8(A−1)は、S503で生成された画像処理効果を施す対象画像800の例を示す。図8(A−1)および図8(B−1)では、紙面内において左右方向をX方向とし、右方向を+X方向と定義する。また紙面内においてX方向に直交する上下方向をY方向とし、上方向を+Y方向と定義する。図8(A−2)は、図8(A−1)にて一点鎖線801に示す位置での断面における画素値プロファイル802を表している。横軸はX座標を表わし、縦軸は画素値を表わす。画素値プロファイル802の形状は、X座標の増加方向においてXsの位置で大きく変化(低下)するステップ形状である。 FIG. 8 is a diagram for explaining the result of the shaping process of this embodiment. FIG. 8A-1 shows an example of the target image 800 to which the image processing effect generated in S503 is applied. In FIGS. 8A-1 and 8B-1, the left-right direction is defined as the X direction and the right direction is defined as the +X direction on the paper surface. In addition, the vertical direction orthogonal to the X direction in the plane of the drawing is defined as the Y direction and the upward direction is defined as the +Y direction. FIG. 8A-2 shows the pixel value profile 802 in the cross section at the position indicated by the alternate long and short dash line 801 in FIG. 8A-1. The horizontal axis represents the X coordinate, and the vertical axis represents the pixel value. The shape of the pixel value profile 802 is a step shape that greatly changes (decreases) at the position of Xs in the increasing direction of the X coordinate.

図8(B−1)は距離マップ803の例を示す。図8(B−2)は、図8(B−1)にて一点鎖線804で示す位置(図8(A−1)に一点鎖線801で示す位置に対応する)での断面における信号値プロファイル805を実線で表わしている。横軸はX座標を表し、縦軸は距離の信号値を表す。距離の信号値については、カメラの位置から遠くにある背景の信号値が小さく(距離マップ803において黒色)、近い位置の被写体人物の信号値が大きい(距離マップ803において白色)ものとする。図8の例では、距離マップの人物輪郭が、正解である整形用画像の人物輪郭(点線)より外側にはみ出している。 FIG. 8B-1 shows an example of the distance map 803. 8B-2 is a signal value profile in a cross section at a position indicated by a dashed-dotted line 804 in FIG. 8B-1 (corresponding to a position indicated by a dashed-dotted line 801 in FIG. 8A-1). 805 is represented by a solid line. The horizontal axis represents the X coordinate, and the vertical axis represents the distance signal value. Regarding the signal value of the distance, the signal value of the background far from the position of the camera is small (black in the distance map 803), and the signal value of the subject person at the close position is large (white in the distance map 803). In the example of FIG. 8, the person outline of the distance map extends outside the person outline (dotted line) of the corrective shaping image.

図8(B−2)に示す信号値プロファイル805の形状は、X座標の増加方向においてXsよりも小さいXaの位置で大きく変化(増加)するステップ形状である。式(6)における着目画素位置pを、黒点807、808、809、810にそれぞれ示す。式(6)のg値が大きい領域、つまり平滑化の範囲を線分811、812、813、814にそれぞれ示している。図8(A−2)に示す整形用画像の画素値プロファイル802では人物の輪郭に対応する位置Xsで信号値が急峻に変化している。このため、人物の輪郭近傍の着目画素位置を示す黒点808および809の位置では、平滑化の範囲がそれぞれ線分812および813で示すようになり、正解である整形用画像の人物輪郭に沿うようになる。その結果、式(6)に示すフィルタ結果Jpの値をプロットすると点線で示すグラフ線806となる。グラフ線806の形状は、X座標の増加方向においてXsの位置で大きく変化(増加)するステップ形状である。つまり、距離マップ整形処理によって距離マップの人物の輪郭が正しい輪郭(整形用画像の人物輪郭)に合うことになる。 The shape of the signal value profile 805 shown in FIG. 8B-2 is a step shape that greatly changes (increases) at a position of Xa smaller than Xs in the increasing direction of the X coordinate. The target pixel position p in the equation (6) is shown by black dots 807, 808, 809, and 810, respectively. Areas where the g value of Expression (6) is large, that is, smoothing ranges are shown in line segments 811, 812, 813, and 814, respectively. In the pixel value profile 802 of the shaping image shown in FIG. 8A-2, the signal value sharply changes at the position Xs corresponding to the contour of the person. For this reason, at the positions of the black dots 808 and 809 indicating the pixel position of interest in the vicinity of the contour of the person, the smoothing ranges are indicated by the line segments 812 and 813, respectively, and follow the person contour of the shaping image which is the correct answer. become. As a result, when the value of the filter result Jp shown in Expression (6) is plotted, a graph line 806 shown by a dotted line is obtained. The shape of the graph line 806 is a step shape that greatly changes (increases) at the position of Xs in the increasing direction of the X coordinate. That is, the contour map of the person in the distance map matches the correct contour (the person contour in the shaping image) by the distance map shaping process.

次に図9を参照して、整形用画像に対の視点画像のいずれかを用いた場合を比較例として説明する。図9(A−1)および(A−2)、(B−1)および(B−2)はそれぞれ、図8(A−1)および(A−2)、(B−1)および(B−2)に対応する図であるため、以下では相違点のみ説明する。 Next, with reference to FIG. 9, a case where either one of the pair of viewpoint images is used as the shaping image will be described as a comparative example. 9(A-1) and (A-2), (B-1) and (B-2) are shown in FIGS. 8(A-1) and (A-2), (B-1) and (B), respectively. Since it is a diagram corresponding to (2), only different points will be described below.

図9(A−1)は、図5のS501で生成された対の視点画像のうちの1つの画像900を示す。図9(A−2)は、図9(A−1)の一点鎖線901で示す位置の断面における画素値プロファイル902を表す。画像900の奥側の人物画像には、ボケが生じているため輪郭が不鮮明である。このため、画素値プロファイル902にて画素値がなだらかに変化している(位置XbからXcの範囲を参照)。比較のため、画像処理効果を施す対象画像の画素値プロファイル802を点線で示している。 FIG. 9A-1 shows one image 900 of the pair of viewpoint images generated in S501 of FIG. 9A-2 shows a pixel value profile 902 in a cross section at a position indicated by a dashed-dotted line 901 in FIG. 9A-1. The outline of the person image on the back side of the image 900 is unclear because of blurring. Therefore, the pixel value changes gently in the pixel value profile 902 (see the range from positions Xb to Xc). For comparison, the pixel value profile 802 of the target image to which the image processing effect is applied is shown by a dotted line.

図9(B−1)は、距離マップ903の例を示す。図9(B−2)は、図9(B−1)に一点鎖線904で示す位置(図9(A−1)に一点鎖線901で示す位置に対応する)の断面における信号値プロファイル905を表わしている。黒点907、908、909、910は着目画素位置pをそれぞれ示す。線分911、912、913、914は、式(6)における平滑化の範囲をそれぞれ示す。整形用画像の画素値プロファイル902の画素値がなだらかに変化しているため、人物輪郭近傍の着目画素位置(黒点908および909参照)では平滑化の範囲がそれぞれ、線分912および913のように狭くなる。よってフィルタ結果Jpをプロットすると、点線で示すグラフ線906のようになる。このグラフ線906を、画像処理効果を施す対象画像の画素値プロファイル802(図9(A−2)参照)を比較すると、距離マップの人物輪郭が正しく合っていないことが分かる。そのため、距離マップを参照して画像処理効果を施しても正しい処理を行うことができない。 FIG. 9B-1 shows an example of the distance map 903. 9B-2 shows a signal value profile 905 in a cross section at a position indicated by a dashed line 904 in FIG. 9B-1 (corresponding to a position indicated by a dashed line 901 in FIG. 9A-1). It represents. Black dots 907, 908, 909, and 910 indicate the target pixel position p, respectively. Line segments 911, 912, 913, and 914 indicate the smoothing range in Expression (6), respectively. Since the pixel value of the pixel value profile 902 of the shaping image changes gently, the smoothing ranges at the target pixel positions (see black dots 908 and 909) near the human contour are as shown by line segments 912 and 913, respectively. Narrows. Therefore, when the filter result Jp is plotted, a graph line 906 indicated by a dotted line is obtained. Comparing this graph line 906 with the pixel value profile 802 (see FIG. 9A-2) of the target image to which the image processing effect is applied, it can be seen that the person contours of the distance map do not match properly. Therefore, even if the image processing effect is applied with reference to the distance map, the correct processing cannot be performed.

本実施例では、整形用画像に画像処理効果を施す対象画像を用いる例を説明した。画像処理効果を施す対象画像を取得する際のF値と視点画像を取得する際のF値との差分が所定の範囲内である条件が満たされる場合には、整形用画像に視点画像を用いることができる。 In this embodiment, the example in which the target image to which the image processing effect is applied is applied to the shaping image has been described. When the condition that the difference between the F value when acquiring the target image to which the image processing effect is applied and the F value when acquiring the viewpoint image is within a predetermined range is satisfied, the viewpoint image is used as the shaping image. be able to.

整形処理後、図5のS505でエッジ強調部403は、S504で生成された整形後の距離マップを参照し、S503で生成された対象画像に対して、距離情報に応じたエッジ強調処理を行う。例えば、撮像装置からの距離が近い被写体ほど、エッジの強度が強くなるように補正が行われる。距離マップにおける人物輪郭が撮像画像の人物輪郭に沿うように精度良く整形されているので、距離に応じて正しいエッジ強調処理を施した画像を得ることができる。 After the shaping process, in S505 of FIG. 5, the edge enhancement unit 403 refers to the shaped distance map generated in S504, and performs edge enhancement processing according to the distance information on the target image generated in S503. .. For example, the correction is performed so that the edge strength becomes stronger as the subject is closer to the imaging device. Since the person contour in the distance map is accurately shaped so as to follow the person contour in the captured image, it is possible to obtain an image that has been subjected to the correct edge enhancement processing according to the distance.

本実施例では、距離マップを生成するための視点画像を取得したときとは、異なる大きさの瞳部分領域を通過した光線群から得られる撮像画像に対して、距離に応じた画像処理効果を精度良く施すことができるように正しく距離マップを整形できる。 In the present embodiment, when a viewpoint image for generating a distance map is acquired, an image processing effect corresponding to the distance is applied to a captured image obtained from a ray group that has passed through a pupil partial region having a different size. Correctly shape the distance map so that it can be applied accurately.

[実施例2]
次に本発明の実施例2を説明する。実施例1では分割画素の加算数を変更することで、距離マップを生成するための視点画像を取得したときとは、異なる大きさの瞳部分領域を通過した光線群から撮像画像が生成された。本実施例では、視点画像とは異なる時刻であって、異なるF値で撮像画像を取得する場合について説明する。本実施形態にて実施例1と同様の構成部については既に使用した符号を用いることで、それらの詳細な説明を省略し、主に相違点を説明する。このような説明の省略の仕方については後述の実施形態でも同じである。
[Example 2]
Next, a second embodiment of the present invention will be described. In the first embodiment, by changing the number of additions of the divided pixels, the captured image is generated from the light ray group that has passed through the pupil partial region having a different size from that when the viewpoint image for generating the distance map is acquired. .. In the present embodiment, a case will be described in which a captured image is acquired at a different F value at a different time from the viewpoint image. In the present embodiment, the same reference numerals as those used in the first embodiment are used to omit the detailed description thereof and mainly describe the differences. The method of omitting such description is the same in the embodiments described later.

図1にて、本実施例のデジタルカメラが実施例1の場合と異なる部分は、撮像部1001および画像処理部1002である。図10(A)は、撮像部1001の画素配列を示す。撮像部1001は画素部1100が二次元的に規則的に配列された構造をもつ。図10(B)はひとつの画素部1100を拡大した模式図である。画素部1100は、マイクロレンズ1101と、一対の光電変換部1102A、1102Bから構成されている。本実施例では、瞳分割型撮像素子にて一対の光電変換部1102A、1102Bによりそれぞれ取得される信号から、一対の視点画像が取得される。 In FIG. 1, the parts of the digital camera of the present embodiment different from those of the first embodiment are an image pickup unit 1001 and an image processing unit 1002. FIG. 10A shows a pixel array of the image pickup unit 1001. The image pickup unit 1001 has a structure in which the pixel units 1100 are regularly arranged in a two-dimensional manner. FIG. 10B is an enlarged schematic view of one pixel portion 1100. The pixel portion 1100 includes a microlens 1101 and a pair of photoelectric conversion portions 1102A and 1102B. In the present embodiment, a pair of viewpoint images is acquired from the signals acquired by the pair of photoelectric conversion units 1102A and 1102B in the pupil division type image sensor.

図11は、画像処理部1002の具体的な構成例を示すブロック図である。図4との相違点は位置合わせ部1200である。また、図12は、画像処理部1002の処理内容を説明するためのフローチャートである。 FIG. 11 is a block diagram showing a specific configuration example of the image processing unit 1002. The difference from FIG. 4 is the alignment unit 1200. Further, FIG. 12 is a flowchart for explaining the processing content of the image processing unit 1002.

図12のS1300において、ユーザはデジタルカメラで被写体を撮像し、視点画像データが取得される。あるいは、視点画像データが予め記録媒体108に記録されている場合に、視点画像データを記録媒体108から読み出す処理が行われる。S1301にて距離マップ生成部401は、距離マップのデータを生成する。 In S1300 of FIG. 12, the user images a subject with a digital camera, and viewpoint image data is acquired. Alternatively, when the viewpoint image data is recorded in the recording medium 108 in advance, a process of reading the viewpoint image data from the recording medium 108 is performed. In step S1301, the distance map generation unit 401 generates distance map data.

S1302では、S1300の処理とは異なる時刻および異なるF値で撮影された画像が、画像処理効果を施す対象画像として取得される。本実施例では視点画像を撮影したときよりも小絞りのF値で撮影した場合を説明する。この場合、被写体のボケ感が、実施例1の図7で説明した画像と同じ画像が得られたとする。撮像光学系104のF値を変更することで、異なる大きさの瞳部分領域を通過した光線群により対象画像を取得できる。 In S1302, an image captured at a different time and different F-number from the process of S1300 is acquired as a target image to which the image processing effect is applied. In the present embodiment, a case will be described in which a viewpoint image is captured with an F value that is smaller than that when the viewpoint image is captured. In this case, it is assumed that the same image as the image described with reference to FIG. 7 of the first embodiment is obtained. By changing the F value of the imaging optical system 104, the target image can be acquired by the light ray group that has passed through the pupil partial regions having different sizes.

S1303で位置合わせ部1200は、S1300で取得された視点画像と、S1302で取得された対象画像との、位置ずれ量を算出する。位置ずれ量の算出方法としてはテンプレートマッチング処理等を用いる。位置合わせ部1200は、距離マップを位置ずれ量分だけシフトさせることにより、画像処理効果を施す対象画像と位置が合うように調整する。本実施例は、距離マップを位置ずれ量分だけシフトさせる例である。画像処理効果を施す対象画像と距離マップとの間の相対的な位置ずれがキャンセルできればよいので、対象画像の方を位置ずれ量分だけシフトさせることにより、距離マップとの間で位置を合せてもよい。 In S1303, the alignment unit 1200 calculates the amount of misalignment between the viewpoint image acquired in S1300 and the target image acquired in S1302. A template matching process or the like is used as a method of calculating the amount of displacement. The alignment unit 1200 shifts the distance map by the amount of misalignment to adjust the position of the target image on which the image processing effect is applied. The present embodiment is an example in which the distance map is shifted by the amount of displacement. Since it suffices to cancel the relative positional deviation between the target image to which the image processing effect is applied and the distance map, it is possible to align the position with the distance map by shifting the target image by the positional deviation amount. Good.

S1304にて距離マップ整形部402は、整形用画像として画像処理効果を施す対象画像を用いて距離マップを整形する。対象画像の被写体の輪郭に沿った距離マップが得られる。なお、画像処理効果を施す対象画像を取得する際のF値と視点画像を取得する際のF値との差分が所定の範囲内であれば、整形用画像に視点画像を用いてもよい。S1305にてエッジ強調部403は、画像処理効果を施す対象画像に対して、整形後の距離マップを参照してエッジ強調処理を実行する。 In step S1304, the distance map shaping unit 402 shapes the distance map using the target image to which the image processing effect is applied as the shaping image. A distance map along the contour of the subject in the target image is obtained. The viewpoint image may be used as the shaping image as long as the difference between the F value when acquiring the target image to which the image processing effect is applied and the F value when acquiring the viewpoint image is within a predetermined range. In step S1305, the edge enhancement unit 403 executes edge enhancement processing on the target image to which the image processing effect is applied with reference to the shaped distance map.

本実施例によれば、距離マップを生成するための視点画像を取得したときとは、異なる撮影時刻、異なるF値で取得した撮像画像に対して、距離に応じた画像処理効果を精度良く画像に施すことができるように正しく距離マップを整形できる。 According to the present embodiment, the image processing effect according to the distance is accurately performed on the captured images acquired at different shooting times and different F-numbers from when the viewpoint image for generating the distance map is acquired. Correctly shape the distance map so that it can be applied to.

[実施例3]
次に本発明の実施例3を説明する。本実施例では、異なるフォーカス位置で取得した一対の画像から距離マップを生成し、さらに異なる時刻、異なるF値で撮像画像を取得する場合について説明する。
[Example 3]
Next, a third embodiment of the present invention will be described. In the present embodiment, a case will be described in which a distance map is generated from a pair of images acquired at different focus positions, and a captured image is acquired at different times and different F values.

図1にて、本実施例のデジタルカメラが実施例1の場合と異なる部分は、撮像部1401および画像処理部1402である。撮像部1401は、ひとつのマイクロレンズに対して、ひとつの光電変換部で構成された画素が二次元的に規則的に配列されている。つまり、図2(B)にて画素が1つの場合(分割されていない場合)である。また図11にて実施例2との相違点は距離マップ生成部1500である。 In FIG. 1, the parts of the digital camera of this embodiment different from those of the first embodiment are an image pickup unit 1401 and an image processing unit 1402. In the image pickup unit 1401, pixels formed by one photoelectric conversion unit are regularly arranged two-dimensionally with respect to one microlens. That is, this is the case where there is one pixel in FIG. 2B (when it is not divided). Further, the difference from the second embodiment in FIG. 11 is the distance map generation unit 1500.

図13は画像処理部1402の処理内容を説明するためのフローチャートである。S1600でシステム制御部101は、フォーカスレンズの駆動制御により、フォーカス位置の異なる一対の画像を取得する。あるいは、フォーカス位置の異なる一対の画像データが予め記録媒体108に記録されている場合に、当該画像データを記録媒体108から読み出す処理が行われる。 FIG. 13 is a flowchart for explaining the processing content of the image processing unit 1402. In step S1600, the system control unit 101 acquires a pair of images with different focus positions by controlling the drive of the focus lens. Alternatively, when a pair of image data having different focus positions is recorded in the recording medium 108 in advance, a process of reading the image data from the recording medium 108 is performed.

S1601で距離マップ生成部1500は距離マップを生成する。フォーカス位置の異なる一対の画像から距離マップを生成する方法については、特許文献3に開示されているDFD(Depth From Defocus)法を適用する。DFD法では、被写体に合焦しているフォーカス画像と、フォーカス画像とは被写体像の暈け方が異なるデフォーカス画像とを用いて距離情報が算出される。 In step S1601, the distance map generation unit 1500 generates a distance map. As a method of generating a distance map from a pair of images having different focus positions, the DFD (Depth From Defocus) method disclosed in Patent Document 3 is applied. In the DFD method, distance information is calculated using a focus image focused on the subject and a defocus image in which the subject image has a different blurring of the subject image.

S1602では、S1600とは異なる時刻、異なるF値で画像処理効果を施す対象画像が取得される。本実施例では、フォーカス位置の異なる一対の画像を撮影したときよりも、開放側のF値で撮像された画像が取得される。撮像光学系104のF値を変更することで、異なる大きさの瞳部分領域を通過した光線群により対象画像を取得できる。 In S1602, a target image to which the image processing effect is applied is acquired at a different time and a different F value than in S1600. In the present embodiment, the image captured with the F value on the open side is acquired as compared with the case of capturing a pair of images with different focus positions. By changing the F value of the imaging optical system 104, the target image can be acquired by the light ray group that has passed through the pupil partial regions having different sizes.

S1603で位置合わせ部1200は、フォーカス位置の異なる一対の画像のうち一方の画像と、画像処理効果を施す対象画像との位置ずれ量を算出し、距離マップを位置ずれ量分だけシフトさせる処理を行う。S1604では、整形用画像に対象画像を用いて距離マップの整形処理が行われ、対象画像の被写体の輪郭に沿った距離マップが得られる。なお、画像処理効果を施す対象画像を取得する際のF値とフォーカス位置の異なる一対の画像を取得する際のF値との差分が所定の範囲内であれば、整形用画像として、フォーカス位置の異なる一対の画像を用いることができる。この際、フォーカス位置の異なる一対の画像のうちで、合焦している被写体像が画像処理効果を施す対象画像にて合焦している被写体像と同一である画像を、整形用画像として選択する処理が行われる。 In step S1603, the alignment unit 1200 calculates the amount of misalignment between one of the pair of images with different focus positions and the target image to which the image processing effect is applied, and shifts the distance map by the amount of misalignment. To do. In step S1604, the distance map is shaped using the target image as the shaping image, and the distance map along the contour of the subject of the target image is obtained. If the difference between the F value when acquiring the target image to which the image processing effect is applied and the F value when acquiring the pair of images having different focus positions is within a predetermined range, the focus position is determined as the shaping image. A pair of different images can be used. At this time, of the pair of images with different focus positions, the image in which the focused subject image is the same as the focused subject image in the target image to which the image processing effect is applied is selected as the shaping image. Processing is performed.

S1605でエッジ強調部403は、画像処理効果を施す対象画像に対して、整形後の距離マップを参照してエッジ強調を施す。 In step S1605, the edge enhancement unit 403 applies edge enhancement to the target image to which the image processing effect is applied with reference to the shaped distance map.

本実施形態では、異なるフォーカス位置で取得した一対の画像から距離マップを生成する。一対の画像とは異なる時刻、異なるF値で取得した撮像画像に対して、距離に応じた画像処理効果を精度良く施すことができるように正しく距離マップを整形できる。 In this embodiment, a distance map is generated from a pair of images acquired at different focus positions. A distance map can be correctly shaped so that an image processing effect corresponding to a distance can be accurately applied to a captured image acquired at a different time and different F value from those of a pair of images.

[実施例4]
次に本発明の実施例4を説明する。本実施例では複数の撮像光学系を有する撮像装置で取得した視点画像から距離マップを生成する。さらに視点画像を取得した撮像光学系とは異なる撮像光学系を介して取得した撮像画像内の被写体画像の輪郭に沿うように、距離マップが整形される。
[Example 4]
Next, a fourth embodiment of the present invention will be described. In this embodiment, a distance map is generated from viewpoint images acquired by an image pickup apparatus having a plurality of image pickup optical systems. Further, the distance map is shaped so as to follow the contour of the subject image in the captured image acquired via the imaging optical system different from the imaging optical system that acquired the viewpoint image.

図14は、本実施例のデジタルカメラ1700の機能構成を示すブロック図である。デジタルカメラ1700は、それぞれ独立した撮像光学系104および撮像部1401を3組有する構成である。水平方向に並設した3組の撮像光学系および撮像部のうち、中央に位置する第1の組CM1は、プライマリカメラとして機能する。第1の組の両側にそれぞれ配置される第2の組CM2および第3の組CM3は、セカンダリカメラとして機能する。また、画像処理部1701の実行する処理内容が、実施例1から3と相違する。 FIG. 14 is a block diagram showing the functional arrangement of the digital camera 1700 of this embodiment. The digital camera 1700 has a configuration including three sets of the imaging optical system 104 and the imaging unit 1401 which are independent of each other. Of the three sets of the image pickup optical system and the image pickup section arranged side by side in the horizontal direction, the first set CM1 located at the center functions as a primary camera. The second set CM2 and the third set CM3 respectively arranged on both sides of the first set function as a secondary camera. Further, the processing contents executed by the image processing unit 1701 are different from those in the first to third embodiments.

図15は、画像処理部1701の具体的な構成例を示すブロック図である。図4との相違点はモーフィング処理部1800である。また、図16は画像処理部1701の処理内容を説明するためのフローチャートである。 FIG. 15 is a block diagram showing a specific configuration example of the image processing unit 1701. The difference from FIG. 4 is the morphing processing unit 1800. 16 is a flowchart for explaining the processing content of the image processing unit 1701.

図16のS1900でシステム制御部101は、第2の組CM2および第3の組CM3の駆動制御により、視点画像データを取得する。あるいは、視点画像データが予め記録媒体108に記録されている場合に、当該画像データを記録媒体108から読み出す処理が行われる。S1901で距離マップ生成部401は、図5のS502と同様の方法を用いて、右視点画像から左視点画像に対して画像を相対的にずらし、左視点画像から右視点画像に対して画像を相対的にずらすことでデフォーカス量をそれぞれ算出する。これにより、各セカンダリカメラ(CM2,CM3)における距離マップが生成される。 In S1900 of FIG. 16, the system control unit 101 acquires viewpoint image data by controlling the driving of the second set CM2 and the third set CM3. Alternatively, when the viewpoint image data is recorded in the recording medium 108 in advance, a process of reading the image data from the recording medium 108 is performed. In step S1901, the distance map generation unit 401 relatively shifts the image from the right-viewpoint image to the left-viewpoint image by using the same method as in step S502 in FIG. By deviating relatively, the defocus amount is calculated respectively. Thereby, the distance map in each secondary camera (CM2, CM3) is generated.

S1902でシステム制御部101は、第1の組CM1の駆動制御により、画像処理効果を施す対象画像を取得する。つまりプライマリカメラにより取得される画像が対象画像である。本実施例ではセカンダリカメラで撮影したときよりも開放側のF値で撮影動作が行われるものとする。 In step S1902, the system control unit 101 acquires the target image to which the image processing effect is applied by controlling the drive of the first set CM1. That is, the image acquired by the primary camera is the target image. In the present embodiment, it is assumed that the shooting operation is performed with the F value on the open side as compared with the case of shooting with the secondary camera.

S1903でモーフィング処理部1800は、S1901で生成された各セカンダリカメラにおける距離マップに対しモーフィング処理を施すことによって、プライマリカメラにおける距離マップを生成する。モーフィング処理としては、二次元画像上の特徴点を抽出しそれぞれの二次元画像と関連付けて行う手段や、二次元画像上の物体を三次元モデルの集合とみなして推定する技術が広く知られている。これらのモーフィング処理は公知技術であるので、ここでは詳細を割愛する。 In S1903, the morphing processing unit 1800 generates a distance map in the primary camera by performing morphing processing on the distance map in each secondary camera generated in S1901. As the morphing process, a means for extracting feature points on a two-dimensional image and associating with each two-dimensional image, and a technique for estimating an object on the two-dimensional image as a set of three-dimensional models are widely known. There is. Since these morphing processes are well known in the art, the details are omitted here.

S1904で距離マップ整形部402は、整形用画像に画像処理効果を施す対象画像を用いてプライマリカメラにおける距離マップを整形する。これにより、プライマリカメラで取得した画像処理効果を施す対象画像内の被写体画像の輪郭に沿った距離マップを得ることができる。なお、プライマリカメラとセカンダリカメラの各撮影時のF値の差分が所定の範囲内であれば、セカンダリカメラによる画像にモーフィング処理を施した画像を、整形用画像として用いてもよい。S1905でエッジ強調部403は、画像処理効果を施す対象画像に対して、整形後の距離マップを参照してエッジ強調を施す。 In step S1904, the distance map shaping unit 402 shapes the distance map in the primary camera using the target image to which the shaping image is subjected to the image processing effect. This makes it possible to obtain a distance map along the contour of the subject image in the target image to which the image processing effect acquired by the primary camera is applied. If the difference in F value between the primary camera and the secondary camera during shooting is within a predetermined range, an image obtained by performing morphing processing on the image captured by the secondary camera may be used as the shaping image. In step S1905, the edge enhancement unit 403 applies edge enhancement to the target image to which the image processing effect is applied by referring to the shaped distance map.

本実施例では、撮像光学系および撮像部を有する複数の撮像手段を備え、第1および第2の撮像手段で取得した視点画像から距離マップが生成される。視点画像を取得した撮像手段とは異なる第3の撮像手段で取得した撮像画像に対して、距離に応じた画像処理効果を精度良く施すことができるように正しく距離マップを整形できる。
以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。
In the present embodiment, a plurality of image pickup units having an image pickup optical system and an image pickup unit are provided, and a distance map is generated from the viewpoint images acquired by the first and second image pickup units. The distance map can be correctly shaped so that the image processing effect corresponding to the distance can be accurately applied to the imaged image acquired by the third imager different from the imager that acquired the viewpoint image.
Although the preferred embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and various modifications and changes can be made within the scope of the gist thereof.

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

100:デジタルカメラ
101:システム制御部
104:撮像光学系
105,1001,1401:撮像部
107,1002,1402:画像処理部
108:記録媒体
100: Digital camera 101: System control unit 104: Imaging optical system 105, 1001, 1401: Imaging unit 107, 1002, 1402: Image processing unit 108: Recording medium

Claims (15)

撮像光学系の第1の瞳部分領域を通過する光線群から得られた対となる第1の画像データを取得する第1の取得手段と、
前記第1の瞳部分領域とは大きさが異なる前記撮像光学系の第2の瞳部分領域を通過する光線群から得られた第2の画像データを取得する第2の取得手段と、
前記対となる第1の画像データから画像内の被写体の奥行き方向の深さに対応する深度情報を生成する生成手段と、
前記第2の画像データ、または前記第2の画像データが取得されたときのF値との差分が予め定められた範囲内で撮像された画像のデータを用いて、前記深度情報を平滑化する整形処理を施す整形手段と、を有する
ことを特徴とする画像処理装置。
A first acquisition unit that acquires a pair of first image data obtained from a light ray group that passes through the first pupil partial region of the imaging optical system;
Second acquisition means for acquiring second image data obtained from a light ray group passing through the second pupil partial area of the imaging optical system, the size of which is different from that of the first pupil partial area;
Generating means for generating depth information corresponding to the depth of the object in the image in the depth direction from the pair of first image data;
The depth information is smoothed using the second image data or data of an image captured within a range in which the difference between the F value when the second image data is acquired and the F value when the second image data is acquired. An image processing apparatus comprising: a shaping unit that performs shaping processing.
撮像手段は、複数のマイクロレンズと、各マイクロレンズに対応する複数の光電変換部を有する撮像素子を備え、
前記第1の取得手段は、分割された第1の領域内の前記光電変換部および第2の領域内の前記光電変換部から視差を有する複数の画像データを取得する
ことを特徴とする請求項1に記載の画像処理装置。
The image pickup means includes a plurality of microlenses and an image pickup device having a plurality of photoelectric conversion units corresponding to the respective microlenses,
The first acquisition unit acquires a plurality of image data having parallax from the photoelectric conversion unit in the divided first area and the photoelectric conversion unit in the second area. 1. The image processing device according to 1.
前記対となる第1の画像データは、前記第1の領域内の前記光電変換部の出力を加算して取得される画像データおよび前記第2の領域内の前記光電変換部の出力を加算して取得される画像データである
ことを特徴とする請求項2に記載の画像処理装置。
The pair of first image data is obtained by adding the image data obtained by adding the outputs of the photoelectric conversion units in the first region and the output of the photoelectric conversion units in the second region. The image processing apparatus according to claim 2, wherein the image processing apparatus acquires the image data.
前記第2の取得手段は、各マイクロレンズに対応する前記複数の光電変換部のうち、予め定められた位置の光電変換部から前記第2の画像データを取得する
ことを特徴とする請求項2または請求項3に記載の画像処理装置。
The second acquisition unit acquires the second image data from a photoelectric conversion unit at a predetermined position among the plurality of photoelectric conversion units corresponding to each microlens. Alternatively, the image processing apparatus according to claim 3.
前記第2の取得手段は、前記対となる第1の画像データを取得したときとは異なる時刻および異なるF値で撮像された前記第2の画像データを取得する
ことを特徴とする請求項1に記載の画像処理装置。
The second acquisition unit acquires the second image data captured at a different time and a different F value than when the first image data forming the pair is acquired. The image processing device according to.
前記第1の取得手段は、異なるフォーカス位置にて前記対となる第1の画像データをそれぞれ取得し、
前記第2の取得手段は、前記第1の画像データが取得されたときとは異なる時刻および異なるF値で撮像された前記第2の画像データを取得する
ことを特徴とする請求項1に記載の画像処理装置。
The first acquisition means respectively acquires the pair of first image data at different focus positions,
The second acquisition unit acquires the second image data imaged at a different time and different F value than when the first image data was acquired. Image processing device.
前記第1の瞳部分領域は前記第2の瞳部分領域よりも大きい
ことを特徴とする請求項1に記載の画像処理装置。
The image processing device according to claim 1, wherein the first pupil partial region is larger than the second pupil partial region.
複数の撮像手段によりそれぞれ撮像された複数の画像データと、撮像された画像内の被写体の奥行き方向の深さに対応する深度情報を取得して画像処理を行う画像処理装置であって、
第1および第2の撮像手段によりそれぞれ撮像された複数の第1の画像データを取得する第1の取得手段と、
前記第1の画像データよりも開放側のF値で第3の撮像手段により撮像された第2の画像データを取得する第2の取得手段と、
前記複数の第1の画像データから前記深度情報を生成する生成手段と、
前記第2の画像データ、または前記第2の画像データが取得されたときのF値との差分が予め定められた範囲内の画像データを用いて、前記深度情報を平滑化する整形処理を施す整形手段と、を有する
ことを特徴とする画像処理装置。
An image processing apparatus that performs image processing by acquiring a plurality of image data captured by a plurality of image capturing means and depth information corresponding to a depth of a subject in the captured image in a depth direction,
A first acquisition means for acquiring a plurality of first image data respectively imaged by the first and second imaging means;
Second acquisition means for acquiring the second image data imaged by the third imaging means with an F value on the open side of the first image data ;
Generating means for generating the depth information from the plurality of first image data;
A shaping process for smoothing the depth information is performed using the second image data or image data in which a difference from the F value when the second image data is acquired is within a predetermined range. An image processing device comprising: a shaping unit.
前記第1乃至第3の撮像手段はそれぞれ撮像光学系および撮像部を備え、
前記第3の撮像手段が備える撮像光学系の瞳領域は、前記第1および第2の撮像手段が備える撮像光学系の瞳領域よりも大きい
ことを特徴とする請求項8に記載の画像処理装置。
The first to third image pickup means each include an image pickup optical system and an image pickup unit,
The image processing apparatus according to claim 8, wherein a pupil region of the image pickup optical system included in the third image pickup unit is larger than a pupil region of the image pickup optical system included in the first and second image pickup units. ..
前記整形手段により前記整形処理が施された深度情報と、前記第2の画像データとを関連付けて記録する記録手段を有する
ことを特徴とする請求項1乃至9のいずれか1項に記載の画像処理装置。
The image according to any one of claims 1 to 9, further comprising a recording unit that records the depth information that has been subjected to the shaping processing by the shaping unit and the second image data in association with each other. Processing equipment.
前記整形手段は、前記深度情報の着目画素に対して当該着目画素とその周辺画素の信号値を平滑化することで整形後の信号値を生成する際、参照する画像において着目画素の画素値とその周辺画素の画素値が近いほど、当該周辺画素の平滑化の重みを大きくする
ことを特徴とする請求項1乃至10のいずれか1項に記載の画像処理装置。
When the shaping unit generates a signal value after shaping by smoothing the signal value of the pixel of interest and its peripheral pixels with respect to the pixel of interest of the depth information, the pixel value of the pixel of interest in the image to be referred to The image processing device according to claim 1, wherein the closer the pixel value of the peripheral pixel is, the larger the weight of the smoothing of the peripheral pixel is.
請求項1乃至11のいずれか1項に記載の画像処理装置と、
撮像手段を備える
ことを特徴とする撮像装置。
An image processing apparatus according to any one of claims 1 to 11,
An imaging device comprising an imaging means.
撮像光学系の第1の瞳部分領域を通過する光線群から得られた対となる第1の画像データを取得する第1の取得工程と、
前記第1の瞳部分領域とは大きさが異なる前記撮像光学系の第2の瞳部分領域を通過する光線群から得られた第2の画像データを取得する第2の取得工程と、
前記対となる第1の画像データから画像内の被写体の奥行き方向の深さに対応する深度情報を生成する生成工程と、
前記第2の画像データ、または前記第2の画像データが取得されたときのF値との差分が予め定められた範囲内で撮像された画像のデータを用いて、前記深度情報を平滑化する整形処理を施す整形工程と、を有する
ことを特徴とする画像処理装置の制御方法。
A first acquisition step of acquiring a pair of first image data obtained from a light ray group passing through the first pupil partial region of the imaging optical system;
A second acquisition step of acquiring second image data obtained from a light ray group passing through the second pupil partial area of the imaging optical system having a size different from that of the first pupil partial area;
A generation step of generating depth information corresponding to the depth of the subject in the image in the depth direction from the pair of first image data;
The depth information is smoothed using the second image data or data of an image captured within a range in which the difference between the F value when the second image data is acquired and the F value when the second image data is acquired. A method of controlling an image processing device, comprising: a shaping step of performing a shaping process.
第1および第2の撮像手段によりそれぞれ撮像された複数の第1の画像データを取得する第1の取得工程と、
前記第1の画像データよりも開放側のF値で第3の撮像手段により撮像された第2の画像データを取得する第2の取得工程と、
前記複数の第1の画像データから画像内の被写体の奥行き方向の深さに対応する深度情報を生成する生成工程と、
前記第2の画像データ、または前記第2の画像データが取得されたときのF値との差分が予め定められた範囲内の画像データを用いて、前記深度情報を平滑化する整形処理を施す整形工程と、を有する
ことを特徴とする画像処理装置の制御方法。
A first acquisition step of acquiring a plurality of first image data respectively imaged by the first and second imaging means,
A second acquisition step of acquiring the second image data imaged by the third imaging means with an F value on the open side of the first image data ;
A generation step of generating depth information corresponding to the depth of the subject in the image in the depth direction from the plurality of first image data;
A shaping process for smoothing the depth information is performed using the second image data or image data in which a difference from the F value when the second image data is acquired is within a predetermined range. A shaping method, and a method for controlling an image processing device.
請求項13または請求項14に記載の各工程をコンピュータに実行させる
ことを特徴とするプログラム。
A computer program that causes a computer to execute the steps according to claim 13 or 14.
JP2016149145A 2016-07-29 2016-07-29 Image processing apparatus, control method thereof, imaging apparatus, and program Active JP6750867B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016149145A JP6750867B2 (en) 2016-07-29 2016-07-29 Image processing apparatus, control method thereof, imaging apparatus, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016149145A JP6750867B2 (en) 2016-07-29 2016-07-29 Image processing apparatus, control method thereof, imaging apparatus, and program

Publications (2)

Publication Number Publication Date
JP2018018358A JP2018018358A (en) 2018-02-01
JP6750867B2 true JP6750867B2 (en) 2020-09-02

Family

ID=61081897

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016149145A Active JP6750867B2 (en) 2016-07-29 2016-07-29 Image processing apparatus, control method thereof, imaging apparatus, and program

Country Status (1)

Country Link
JP (1) JP6750867B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3450792B2 (en) * 1999-03-25 2003-09-29 キヤノン株式会社 Depth image measurement device and method, and mixed reality presentation system
JP5633181B2 (en) * 2010-05-07 2014-12-03 株式会社ニコン Depth map output device
JP5533529B2 (en) * 2010-10-06 2014-06-25 コニカミノルタ株式会社 Image processing apparatus and image processing system

Also Published As

Publication number Publication date
JP2018018358A (en) 2018-02-01

Similar Documents

Publication Publication Date Title
TWI510086B (en) Digital refocusing method
JP4915859B2 (en) Object distance deriving device
CN105791801B (en) Image processing apparatus, image pick-up device and image processing method
CN105391932B (en) Image processing apparatus and its control method and photographic device and its control method
JP6489932B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
CN102227746A (en) Stereoscopic image processing device, method, recording medium and stereoscopic imaging apparatus
US20130272600A1 (en) Range image pixel matching method
JP7234057B2 (en) Image processing method, image processing device, imaging device, lens device, program, storage medium, and image processing system
JP5370606B2 (en) Imaging apparatus, image display method, and program
JP7378219B2 (en) Imaging device, image processing device, control method, and program
JP6529360B2 (en) Image processing apparatus, imaging apparatus, image processing method and program
US10621694B2 (en) Image processing apparatus, system, image processing method, calibration method, and computer-readable recording medium
JP6039301B2 (en) IMAGING DEVICE, IMAGING SYSTEM, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
CN111127379B (en) Rendering method of light field camera 2.0 and electronic equipment
JP7300895B2 (en) Image processing device, image processing method, program, and storage medium
JP2018018425A (en) Image processing device and image processing method
JP6750867B2 (en) Image processing apparatus, control method thereof, imaging apparatus, and program
JP6362070B2 (en) Image processing apparatus, imaging apparatus, image processing method, program, and storage medium
JP2009211254A (en) Image processing unit, compound eye imaging device, image processing method, and image processing program
JP2016156702A (en) Imaging device and imaging method
JP7009219B2 (en) Image processing method, image processing device, image pickup device, image processing program, and storage medium
JP6236664B2 (en) Image correction apparatus and computer program
JP2020181400A (en) Image processing system, imaging device, control method, program and recording medium
JP5916199B2 (en) Image processing apparatus, imaging apparatus, display apparatus, image processing method, and image processing program
JP7437915B2 (en) Image processing device, imaging device, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190626

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200507

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200629

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200807

R151 Written notification of patent or utility model registration

Ref document number: 6750867

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151