JP2012150289A - Image processing device, imaging apparatus, and image processing method - Google Patents

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

Info

Publication number
JP2012150289A
JP2012150289A JP2011009159A JP2011009159A JP2012150289A JP 2012150289 A JP2012150289 A JP 2012150289A JP 2011009159 A JP2011009159 A JP 2011009159A JP 2011009159 A JP2011009159 A JP 2011009159A JP 2012150289 A JP2012150289 A JP 2012150289A
Authority
JP
Japan
Prior art keywords
pixel
focus detection
defocus amount
value
imaging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2011009159A
Other languages
Japanese (ja)
Other versions
JP2012150289A5 (en
Inventor
Rintaro Nishihara
林太郎 西原
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.)
Olympus Corp
Original Assignee
Olympus Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Corp filed Critical Olympus Corp
Priority to JP2011009159A priority Critical patent/JP2012150289A/en
Publication of JP2012150289A publication Critical patent/JP2012150289A/en
Publication of JP2012150289A5 publication Critical patent/JP2012150289A5/ja
Pending legal-status Critical Current

Links

Images

Landscapes

  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To more accurately estimate a pixel value in a position where a focus detection pixel is disposed, in an image signal obtained from an imaging element in which the focus detection signal is arranged in an image area.SOLUTION: The image signal which is produced by an imaging part 120 and made into a digital signal by an analog front-end 122 is temporarily stored in a RAM 164. A defocus amount derivation part 304 processes a signal output from the focus detection pixel, derives the defocus amount of an image formed by a photographic optical system 110, and outputs the defocus amount to a pixel value estimation part 302. The pixel value estimation part 302 produces an estimated pixel value by using the value of at least one of a focus detection signal output from the focus detection pixel and a signal output from an adjacently disposed pixel being an imaging pixel disposed in the vicinity of the focus detection pixel in the image area of the imaging element, according to the value of the defocus amount derived by the defocus amount derivation part 304.

Description

本発明は、イメージエリアに二次元配列された撮像画素を備えるカラー撮像素子であって、その撮像画素の配列内に焦点検出用の焦点検出画素が配置された、位相差センサ内蔵式の撮像素子から得られる画像信号を処理して画像データを生成する技術に関する。   The present invention relates to a color imaging device having imaging pixels arranged two-dimensionally in an image area, the imaging device incorporating a phase difference sensor, in which focus detection pixels for focus detection are arranged in the array of imaging pixels. The present invention relates to a technique for generating image data by processing an image signal obtained from the image data.

多くのデジタルスチルカメラ、デジタルムービーカメラ等の撮像装置には、自動焦点調節装置が備えられる。自動焦点調節を行う方式としてコントラストAFや位相差AFが知られている。位相差AFが可能な撮像装置では、撮像素子の受光面と共役な位置に位相差検出用のオートフォーカスモジュールが配置される。オートフォーカスモジュール内には、コンデンサレンズ、複数対のセパレータレンズ、ミラー、複数対のセパレータレンズに対応して設けられた複数対のラインセンサ等が配置される。そして、撮影レンズの異なる瞳位置を透過した被写体光がミラーによって反射され、オートフォーカスモジュールのセンサ内に導かれる。複数対のセパレータレンズにより、複数対のラインセンサ上のそれぞれに像が形成される。一対のラインセンサから出力される信号の相関をとることにより、一対のラインセンサ上での像のずれ量、すなわち位相差を求めることができる。   Many digital still cameras, digital movie cameras, and other imaging devices are equipped with an automatic focus adjustment device. Contrast AF and phase difference AF are known as methods for performing automatic focus adjustment. In an imaging apparatus capable of phase difference AF, an autofocus module for phase difference detection is disposed at a position conjugate with the light receiving surface of the imaging element. In the autofocus module, a condenser lens, a plurality of pairs of separator lenses, a mirror, a plurality of pairs of line sensors provided corresponding to the plurality of pairs of separator lenses, and the like are arranged. Then, the subject light transmitted through the different pupil positions of the photographing lens is reflected by the mirror and guided into the sensor of the autofocus module. An image is formed on each of the plurality of pairs of line sensors by the plurality of pairs of separator lenses. By taking the correlation of the signals output from the pair of line sensors, it is possible to obtain the image shift amount, that is, the phase difference on the pair of line sensors.

上記位相差に基づいて撮影レンズのデフォーカス量が導出され、そのデフォーカス量が減じられるように撮影レンズ内のフォーカシングレンズが駆動される。位相差AFの方式によれば、撮影レンズの焦点調節動作を行う前にデフォーカス量を導出することができるので、比較的高速に合焦動作を行うことが可能な反面、オートフォーカスモジュールを配設するためのスペースが撮像装置内に必要となるので撮像装置を小型化することが困難となる。また、オートフォーカスモジュールは構成が複雑で、調整にも工数を要するため、製造コストを増す要因となっている。   The defocus amount of the photographing lens is derived based on the phase difference, and the focusing lens in the photographing lens is driven so that the defocus amount is reduced. According to the phase difference AF method, it is possible to derive the defocus amount before performing the focus adjustment operation of the photographing lens. Therefore, although the focusing operation can be performed at a relatively high speed, an autofocus module is provided. Since a space for installation is required in the imaging apparatus, it is difficult to reduce the size of the imaging apparatus. In addition, since the autofocus module has a complicated configuration and requires man-hours for adjustment, it is a factor that increases the manufacturing cost.

位相差AFの上述した問題点を解決するため、撮像画素が二次元配列された撮像素子内に位相差を検出可能な画素(焦点検出画素)を配置したものを用いて、上述したオートフォーカスモジュールを用いることなく位相差AFを可能とする技術が提案されている。以下では、撮像画素の配列中に焦点検出画素が配置された撮像素子を本明細書中では位相差センサ内蔵式の撮像素子と称する。   In order to solve the above-described problems of phase difference AF, the above-described autofocus module is used by using a pixel (focus detection pixel) in which a phase difference can be detected in an image pickup device in which image pickup pixels are two-dimensionally arranged. There has been proposed a technique that enables phase difference AF without using. Hereinafter, an imaging device in which focus detection pixels are arranged in an array of imaging pixels is referred to as an imaging device with a built-in phase difference sensor in this specification.

特許文献1には、位相差センサ内蔵式の撮像素子を用いた撮像装置において、焦点検出用画素対の周辺にある、焦点検出用画素対以外の画素から出力された信号に基づいて、被写体が所定パターンに該当するかどうかを判定し、この判定結果に基づいてフォーカス制御を変える技術が開示される。   In Patent Document 1, in an imaging apparatus using a built-in phase difference sensor, an object is detected based on signals output from pixels other than the focus detection pixel pair around the focus detection pixel pair. A technique for determining whether or not a predetermined pattern is met and changing focus control based on the determination result is disclosed.

ところで、位相差センサ内蔵式の撮像素子から読み出した画像信号を単純に処理して画像データを生成した場合、撮像画素の配列内に焦点検出画素が配列されるため、焦点検出画素の配列される部分の画像情報が欠損する。したがって、位相差センサ内蔵式の撮像素子から得られる画像信号から生成される画像には、偽パターン等を生じる場合がある。この偽パターン等の生成を抑制するものとして、技術特許文献2には、焦点検出画素の周囲に配置される撮像画素の出力に基づいて焦点検出画素の位置における画像の出力構成を演算し、出力構成と焦点検出画素の出力とに基づいて焦点検出画素の位置における画像の出力を推定する技術が開示される。   By the way, when image data is generated by simply processing an image signal read from an image sensor with a built-in phase difference sensor, focus detection pixels are arranged in the arrangement of the imaging pixels, so that the focus detection pixels are arranged. The image information of the part is missing. Therefore, a false pattern or the like may be generated in an image generated from an image signal obtained from an image sensor with a built-in phase difference sensor. As a technique for suppressing the generation of a false pattern or the like, in Japanese Patent Application Laid-Open No. H11-260260, an output configuration of an image at the position of the focus detection pixel is calculated based on the output of the imaging pixel arranged around the focus detection pixel, and output A technique for estimating the output of an image at the position of a focus detection pixel based on the configuration and the output of the focus detection pixel is disclosed.

特開2009−217252号公報JP 2009-217252 A 特開2007−282107号公報JP 2007-282107 A

特許文献1には、位相差センサ内蔵撮像素子から得られる画像信号を処理して画像データを生成する際に、偽パターン等の生成を抑制することに関しては一切触れられていない。特許文献2には、上述したように焦点検出画素の位置における画像の出力を推定する技術が開示される。   Japanese Patent Application Laid-Open No. 2005-228561 does not mention anything about suppressing generation of a false pattern or the like when processing image signals obtained from an image sensor with a built-in phase difference sensor to generate image data. Patent Document 2 discloses a technique for estimating the output of an image at the position of a focus detection pixel as described above.

しかし、特許文献2に開示される技術では、焦点検出画素の周辺に位置する撮像画素の出力を単純平均するか、焦点検出画素からの出力と焦点検出画素の周辺に位置する撮像画素の出力とを単純平均するかして、焦点検出画素の位置における画像の出力を求めている。したがって、焦点検出画素の存在する位置にエッジパターンや細線パターンが重畳するような場合には、偽色や偽パターンが発生したり、パターンが消失したりすることがある。何故ならば、上述した単純平均によって生成された画素値は、焦点検出画素が存在する位置に撮像画素が仮に存在していた場合に得られるであろう画素値とは、焦点検出画素の存在する位置にエッジパターンや細線パターンが重畳するような場合に、大きくかけ離れる場合があるからである。   However, in the technique disclosed in Patent Literature 2, the output of the imaging pixels located around the focus detection pixels is simply averaged, or the output from the focus detection pixels and the output of the imaging pixels located around the focus detection pixels are Is simply averaged to obtain an image output at the position of the focus detection pixel. Therefore, when an edge pattern or a fine line pattern is superimposed on the position where the focus detection pixel exists, a false color or a false pattern may be generated or the pattern may be lost. This is because the pixel value generated by the above-described simple averaging is the pixel value that would be obtained if the imaging pixel was present at the position where the focus detection pixel was present. This is because when an edge pattern or a fine line pattern is superimposed on the position, the position may be far away.

この点、特許文献2には、焦点検出画像のコントラストパターンや、焦点検出画素の周辺に位置する撮像画素から得られる色情報から、焦点検出画素の存在する位置における画素値を推定する技術が開示される。しかし、コントラストパターンは被写体によって様々であるため、常に安定した画素値の推定を行うことは難しい。   In this regard, Patent Document 2 discloses a technique for estimating a pixel value at a position where a focus detection pixel exists from a contrast pattern of a focus detection image and color information obtained from imaging pixels located around the focus detection pixel. Is done. However, since the contrast pattern varies depending on the subject, it is difficult to always estimate the pixel value stably.

本発明は、上記の課題に鑑みてなされたものであり、焦点検出画素の存在する位置における画素値をより正確に推定可能とする技術を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a technique that can more accurately estimate a pixel value at a position where a focus detection pixel exists.

本発明のある態様によれば、イメージエリア内に二次元配列された複数の撮像画素と、前記複数の撮像画素の配列内に配置されて、撮影光学系の異なる瞳位置からの被写体光を受光可能に構成される複数組の焦点検出画素のペアとを備え、前記撮像画素で生成される画像信号と、前記焦点検出画素のペアで生成される焦点検出信号とを出力可能に構成される位相差センサ内蔵式の撮像素子から出力される前記画像信号および前記焦点検出信号を処理して前記焦点検出画素の配列される位置に対応する画素値を推定して生成する画像処理装置が、
前記焦点検出画素のペアのそれぞれから出力される前記焦点検出信号をもとに生成される第1および第2の焦点検出信号列の相関を求めて位相差を検出し、検出された位相差に基づいて前記撮影光学系のデフォーカス量を導出するデフォーカス量導出部と、
前記イメージエリア内における、前記焦点検出画素の配列される位置に対応する画素値を推定処理して推定画素値を生成する画素値推定部であって、当該位置の焦点検出画素から出力される焦点検出信号と、当該位置の焦点検出画素の近傍に配設される撮像画素である近傍配設画素からの信号とのうち、前記デフォーカス量導出部によって導出される前記デフォーカス量の値に応じて、少なくともいずれかの信号の値を用いて前記推定画素値を生成する画素値推定部と
を備える。
According to an aspect of the present invention, a plurality of imaging pixels that are two-dimensionally arranged in an image area and a subject light from a different pupil position of the imaging optical system that are arranged in the array of the plurality of imaging pixels are received. A plurality of focus detection pixel pairs configured to be capable of outputting an image signal generated by the imaging pixel and a focus detection signal generated by the focus detection pixel pair. An image processing apparatus that processes the image signal output from the phase difference sensor built-in image sensor and the focus detection signal to estimate and generate a pixel value corresponding to the position where the focus detection pixels are arranged,
A phase difference is detected by obtaining a correlation between the first and second focus detection signal sequences generated based on the focus detection signals output from each of the pair of focus detection pixels, and the detected phase difference is obtained. A defocus amount deriving unit for deriving the defocus amount of the photographing optical system based on
A pixel value estimation unit that generates an estimated pixel value by estimating a pixel value corresponding to a position where the focus detection pixel is arranged in the image area, and outputs a focus from the focus detection pixel at the position Depending on the value of the defocus amount derived by the defocus amount deriving unit among the detection signal and the signal from the nearby disposed pixel that is an imaging pixel disposed in the vicinity of the focus detection pixel at the position. A pixel value estimating unit that generates the estimated pixel value using at least one of the signal values.

本発明のある態様によれば、撮像装置が、
イメージエリア内に二次元配列された複数の撮像画素と、前記複数の撮像画素の配列内に配置されて、撮影光学系の異なる瞳位置からの被写体光を受光可能に構成される複数組の焦点検出画素のペアとを備え、前記撮像画素で生成される画像信号と、前記焦点検出画素のペアで生成される焦点検出信号とを出力可能に構成される位相差センサ内蔵式の撮像素子と、
前記焦点検出画素のペアのそれぞれから出力される前記焦点検出信号をもとに生成される第1および第2の焦点検出信号列の相関を求めて位相差を検出し、検出された位相差に基づいて前記撮影光学系のデフォーカス量を導出するデフォーカス量導出部と、
前記イメージエリア内における、前記焦点検出画素の配列される位置に対応する画素値を推定処理して推定画素値を生成する画素値推定部であって、当該位置の焦点検出画素から出力される焦点検出信号と、当該位置の焦点検出画素の近傍に配設される撮像画素である近傍配設画素からの信号とのうち、前記デフォーカス量導出部によって導出される前記デフォーカス量の値に応じて、少なくともいずれかの信号の値を用いて前記推定画素値を生成する画素値推定部と
を備える。
According to an aspect of the present invention, an imaging device includes:
A plurality of imaging pixels arranged two-dimensionally in the image area and a plurality of sets of focal points arranged in the array of the plurality of imaging pixels so as to be able to receive subject light from different pupil positions of the imaging optical system A pair of detection pixels, and an image sensor with a built-in phase difference sensor configured to output an image signal generated by the imaging pixel and a focus detection signal generated by the pair of focus detection pixels;
A phase difference is detected by obtaining a correlation between the first and second focus detection signal sequences generated based on the focus detection signals output from each of the pair of focus detection pixels, and the detected phase difference is obtained. A defocus amount deriving unit for deriving the defocus amount of the photographing optical system based on
A pixel value estimation unit that generates an estimated pixel value by estimating a pixel value corresponding to a position where the focus detection pixel is arranged in the image area, and outputs a focus from the focus detection pixel at the position Depending on the value of the defocus amount derived by the defocus amount deriving unit among the detection signal and the signal from the nearby disposed pixel that is an imaging pixel disposed in the vicinity of the focus detection pixel at the position. A pixel value estimating unit that generates the estimated pixel value using at least one of the signal values.

本発明のある態様によれば、イメージエリア内に二次元配列された複数の撮像画素と、前記複数の撮像画素の配列内に配置されて、撮影光学系の異なる瞳位置からの被写体光を受光可能に構成される複数組の焦点検出画素のペアとを備え、前記撮像画素で生成される画像信号と、前記焦点検出画素のペアで生成される焦点検出信号とを出力可能に構成される位相差センサ内蔵式の撮像素子から出力される前記画像信号および前記焦点検出信号を処理して前記焦点検出画素の配列される位置に対応する画素値を推定して生成する画像処理方法が、
前記焦点検出画素のペアのそれぞれから出力される前記焦点検出信号をもとに生成される第1および第2の焦点検出信号列の相関を求めて位相差を検出し、検出された位相差に基づいて前記撮影光学系のデフォーカス量を導出する、デフォーカス量導出処理を行うことと、
前記イメージエリア内における、前記焦点検出画素の配列される位置に対応する画素値を推定処理して推定画素値を生成する画素値推定処理であって、当該位置の焦点検出画素から出力される焦点検出信号と、当該位置の焦点検出画素の近傍に配設される撮像画素である近傍配設画素からの信号とのうち、前記デフォーカス量導出処理を行うことにより導出される前記デフォーカス量の値に応じて、少なくともいずれかの信号の値を用いて前記推定画素値を生成する画素値推定処理を行うことと
を備える。
According to an aspect of the present invention, a plurality of imaging pixels that are two-dimensionally arranged in an image area and a subject light from a different pupil position of the imaging optical system that are arranged in the array of the plurality of imaging pixels are received. A plurality of focus detection pixel pairs configured to be capable of outputting an image signal generated by the imaging pixel and a focus detection signal generated by the focus detection pixel pair. An image processing method for processing the image signal output from the phase difference sensor built-in imaging device and the focus detection signal to estimate and generate a pixel value corresponding to the position where the focus detection pixels are arranged,
A phase difference is detected by obtaining a correlation between the first and second focus detection signal sequences generated based on the focus detection signals output from each of the pair of focus detection pixels, and the detected phase difference is obtained. Performing a defocus amount derivation process for deriving a defocus amount of the photographing optical system based on;
A pixel value estimation process for generating an estimated pixel value by estimating a pixel value corresponding to a position where the focus detection pixels are arranged in the image area, and a focus output from the focus detection pixel at the position Of the detection signal and the signal from the neighboring pixel that is the imaging pixel arranged in the vicinity of the focus detection pixel at the position, the defocus amount derived by performing the defocus amount derivation process Performing a pixel value estimation process for generating the estimated pixel value using a value of at least one of the signals according to the value.

本発明によれば、位相差センサ内蔵式の撮像素子から出力される画像信号中、焦点検出画素の配置される部分の画素値をより正確に推定することが可能となる。   According to the present invention, it is possible to more accurately estimate a pixel value of a portion where a focus detection pixel is arranged in an image signal output from an image sensor with a built-in phase difference sensor.

デジタルカメラの概略的構成を説明するブロック図である。It is a block diagram explaining the schematic structure of a digital camera. 撮像素子のイメージエリア上における画素の配列を概念的に説明する図であり、(a)はイメージエリアの一部を拡大して示す図であり、(b)は(a)に示される図の一部をさらに拡大して示す図である。It is a figure which illustrates notionally the arrangement | sequence of the pixel on the image area of an image pick-up element, (a) is a figure which expands and shows a part of image area, (b) is a figure shown by (a). It is a figure which expands and shows a part further. 撮像画素および焦点検出画素の概略的構成を説明する図であり、(a)は撮像画素の構成を示す図であり、(b)および(c)は焦点検出画素の構成を、それぞれ示す図である。It is a figure explaining schematic structure of an image pick-up pixel and a focus detection pixel, (a) is a figure showing the composition of an image pick-up pixel, (b) and (c) are figures showing the composition of a focus detection pixel, respectively. is there. 撮像素子のイメージエリア上における画素の配列を概念的に説明する図である。It is a figure which illustrates notionally the arrangement | sequence of the pixel on the image area of an image pick-up element. 一連の焦点検出画素から読み出される第1および第2の焦点検出信号列を処理してデフォーカス量の検出が行われる様子を概念的に示す図である。It is a figure which shows notionally a mode that the detection of a defocus amount is performed by processing the 1st and 2nd focus detection signal sequence read from a series of focus detection pixels. 画像処理装置がコンピュータ上で実行されるプログラムにより実現される場合の構成を説明する図である。FIG. 3 is a diagram illustrating a configuration when an image processing apparatus is realized by a program executed on a computer. デジタルカメラが撮影モードに切り替えられたときにデジタルカメラ内で実行される処理手順を説明するフローチャートである。It is a flowchart explaining the process sequence performed within a digital camera when a digital camera is switched to imaging | photography mode. デジタルカメラ内で実行されるデフォーカス量導出および画素値推定の処理手順の一例を説明するフローチャートである。It is a flowchart explaining an example of the process sequence of defocus amount derivation | leading-out and pixel value estimation which are performed within a digital camera. デジタルカメラ内で実行されるデフォーカス量導出および画素値推定の処理手順のもう一つの例を説明するフローチャートである。It is a flowchart explaining another example of the process procedure of defocus amount derivation | leading-out and pixel value estimation which are performed within a digital camera. 図9のフローチャートに示される処理中で行われる画素値の混合処理を概念的に説明する図である。It is a figure which illustrates notionally the mixing process of the pixel value performed in the process shown by the flowchart of FIG.

図1は、デジタルカメラ100の概略的構成を説明するブロック図である。デジタルカメラ100は、スチルカメラであってもムービーカメラであってもよい。あるいは、携帯電話等に組み込まれるカメラであってもよい。デジタルカメラ100がスチルカメラまたはムービーカメラであるとき、撮影レンズが固定式のものであっても、交換可能に構成されていてもよい。   FIG. 1 is a block diagram illustrating a schematic configuration of the digital camera 100. The digital camera 100 may be a still camera or a movie camera. Alternatively, a camera incorporated in a mobile phone or the like may be used. When the digital camera 100 is a still camera or a movie camera, the photographing lens may be a fixed type or may be configured to be replaceable.

デジタルカメラ100は、撮影光学系110と、レンズ駆動部112と、撮像部120と、アナログ・フロントエンド(図1中では「AFE」と表記される)122と、画像記録媒体130と、操作部140と、表示部150と、記憶部160と、CPU170と、DSP(ディジタル・シグナル・プロセッサ)190と、システムバス180とを備える。記憶部160は、ROM162とRAM164とを備える。デジタルカメラ100はさらに、画素値推定部302と、デフォーカス量導出部304と、AF制御部114とを備える。画素値推定部302およびデフォーカス量導出部304は、DSP190に備えられるものであってもよいが、本実施の形態においてはCPU170がプログラムを実行することにより実現されるものとする。AF制御部114もまた、CPU170がプログラムを実行することにより実現されるものとする。上記の画素値推定部302およびデフォーカス量導出部304を含んで画像処理装置が構成される。   The digital camera 100 includes a photographing optical system 110, a lens driving unit 112, an imaging unit 120, an analog front end (indicated as “AFE” in FIG. 1) 122, an image recording medium 130, an operation unit. 140, a display unit 150, a storage unit 160, a CPU 170, a DSP (digital signal processor) 190, and a system bus 180. The storage unit 160 includes a ROM 162 and a RAM 164. The digital camera 100 further includes a pixel value estimating unit 302, a defocus amount deriving unit 304, and an AF control unit 114. The pixel value estimating unit 302 and the defocus amount deriving unit 304 may be provided in the DSP 190, but in the present embodiment, the pixel value estimating unit 302 and the defocus amount deriving unit 304 are realized by the CPU 170 executing a program. The AF control unit 114 is also realized by the CPU 170 executing a program. The image processing apparatus is configured including the pixel value estimation unit 302 and the defocus amount deriving unit 304 described above.

レンズ駆動部112、撮像部120、アナログ・フロントエンド122、画像記録媒体130、操作部140、表示部150、記憶部160、CPU170、DSP190は、システムバス180を介して電気的に接続される。RAM164は、CPU170およびDSP190の双方からアクセス可能に構成される。   The lens driving unit 112, the imaging unit 120, the analog front end 122, the image recording medium 130, the operation unit 140, the display unit 150, the storage unit 160, the CPU 170, and the DSP 190 are electrically connected via a system bus 180. The RAM 164 is configured to be accessible from both the CPU 170 and the DSP 190.

撮影光学系110は、被写体像を撮像部120のイメージエリア上に形成する。撮像部120は、シャッタと撮像素子とを含んで構成され、撮影光学系110を透過した被写体光は、シャッタが開いている間、撮像素子に入射する。撮像素子のイメージエリア上に形成される被写体像が光電変換され、アナログ画像信号が生成される。なお、撮像素子が電気的に露光時間(光電変換時間)の制御を行うことが可能な、電子シャッタの機能を有する場合、シャッタは必ずしも備えられていなくてもよい。アナログ画像信号はアナログ・フロントエンド122に入力される。アナログ・フロントエンド122は、撮像部120から入力した画像信号にノイズ低減、増幅、A/D変換等の処理をしてデジタル画像信号を生成する。このデジタル画像信号は、RAM164に一時的に記憶される。   The imaging optical system 110 forms a subject image on the image area of the imaging unit 120. The imaging unit 120 includes a shutter and an image sensor, and subject light transmitted through the photographing optical system 110 enters the image sensor while the shutter is open. A subject image formed on the image area of the image sensor is photoelectrically converted to generate an analog image signal. Note that in the case where the imaging element has an electronic shutter function that can electrically control the exposure time (photoelectric conversion time), the shutter is not necessarily provided. The analog image signal is input to the analog front end 122. The analog front end 122 performs processing such as noise reduction, amplification, and A / D conversion on the image signal input from the imaging unit 120 to generate a digital image signal. This digital image signal is temporarily stored in the RAM 164.

DSP190は画像処理部300を備える。この画像処理部300は、RAM164に一時的に記憶されたデジタル画像信号に対してデモザイク、階調変換、色バランス補正、シェーディング補正、ノイズ低減等のさまざまなデジタル信号処理を施し、記録用画像データ、表示用画像データ等を生成する。記録用画像データは、画像記録媒体130に記録される。表示用画像データは表示部150に出力される。画素値推定部302およびデフォーカス量導出部304がDSP190内に備えられる場合、画像処理部300が画素値推定部302およびデフォーカス量導出304を含んでいても良い。   The DSP 190 includes an image processing unit 300. The image processing unit 300 performs various digital signal processing such as demosaicing, gradation conversion, color balance correction, shading correction, noise reduction, etc., on the digital image signal temporarily stored in the RAM 164 to obtain image data for recording. Display image data and the like. The recording image data is recorded on the image recording medium 130. The display image data is output to the display unit 150. When the pixel value estimation unit 302 and the defocus amount derivation unit 304 are provided in the DSP 190, the image processing unit 300 may include the pixel value estimation unit 302 and the defocus amount derivation 304.

画像記録媒体130は、フラッシュメモリや磁気記録装置等で構成され、デジタルカメラ100に対して着脱可能に装着される。あるいは、画像記録媒体130がデジタルカメラ100に内蔵されていてもよい。その場合、ROM162内に画像データ記録のための領域が確保されて、それを画像記録媒体130とすることが可能である。   The image recording medium 130 includes a flash memory, a magnetic recording device, and the like, and is detachably attached to the digital camera 100. Alternatively, the image recording medium 130 may be built in the digital camera 100. In that case, an area for recording image data can be secured in the ROM 162 and used as the image recording medium 130.

操作部140は、プッシュスイッチ、スライドスイッチ、ダイヤルスイッチ、タッチパネル等のうちいずれか一種類または複数種類を備え、ユーザの操作を受け付け可能に構成される。操作部140にはレリーズスイッチが含まれる。このレリーズスイッチは、ユーザがレリーズ操作部材を押し下げる際のストロークに応じて動作するファーストレリーズスイッチとセカンドレリーズスイッチとを備える。   The operation unit 140 includes any one type or a plurality of types of push switches, slide switches, dial switches, touch panels, and the like, and is configured to be able to accept user operations. The operation unit 140 includes a release switch. The release switch includes a first release switch and a second release switch that operate according to a stroke when the user pushes down the release operation member.

表示部150は、TFT液晶表示パネルとバックライト装置、あるいは有機EL表示素子等の自発光式表示素子を備え、画像や文字等の情報を表示可能に構成される。なお、表示部150は表示インターフェースを備えていて、RAM164上に設けられるVRAM領域内に書き込まれる画像データを表示インターフェースが読み出して画像や文字等の情報が表示部150に表示されるものとする。   The display unit 150 includes a TFT liquid crystal display panel and a backlight device, or a self-luminous display element such as an organic EL display element, and is configured to display information such as images and characters. The display unit 150 includes a display interface. The display interface reads image data written in a VRAM area provided on the RAM 164 and displays information such as images and characters on the display unit 150.

ROM162は、フラッシュメモリ等で構成され、CPU170により実行される制御プログラム(ファームウェア)や、調整パラメータ、あるいはデジタルカメラ100の電源が入っていない状態でも保持する必要のある情報等が記憶される。RAM164は、SDRAM等で構成され、比較的高速のアクセス速度を有する。CPU170は、ROM162からRAM164に転送されたファームウェアを解釈・実行してデジタルカメラ100の動作を統括的に制御する。   The ROM 162 is configured by a flash memory or the like, and stores a control program (firmware) executed by the CPU 170, adjustment parameters, information necessary to be held even when the digital camera 100 is not turned on, and the like. The RAM 164 is configured by SDRAM or the like and has a relatively high access speed. The CPU 170 comprehensively controls the operation of the digital camera 100 by interpreting and executing the firmware transferred from the ROM 162 to the RAM 164.

ところで、撮像部120に含まれる撮像素子は、位相差センサ内蔵式の撮像素子である。すなわち、撮像素子のイメージエリアには、撮像画素が二次元配列されていて、そのイメージエリア中の適宜の位置における撮像素子が置き換えられるようにして複数の焦点検出画素のペアが配列される撮像素子である。デフォーカス量導出部304は、これら複数の焦点検出画素のペアから出力される一組の信号列(本明細書ではこの一組の信号列を第1および第2の焦点検出信号列と称する)の相関を求めて位相差を検出し、検出された位相差に基づいて撮影光学系110のデフォーカス量を導出する。デフォーカス量導出部304は、導出したデフォーカス量に関する情報を、AF制御部114および画素値推定部302に出力する。   By the way, the imaging device included in the imaging unit 120 is an imaging device with a built-in phase difference sensor. That is, an image pickup device in which image pickup pixels are two-dimensionally arranged in the image area of the image pickup device and a plurality of pairs of focus detection pixels are arranged so that the image pickup device at an appropriate position in the image area is replaced. It is. The defocus amount deriving unit 304 outputs a set of signal sequences output from these pairs of focus detection pixels (in this specification, this set of signal sequences is referred to as a first focus detection signal sequence and a second focus detection signal sequence). The phase difference is detected by obtaining the correlation, and the defocus amount of the photographing optical system 110 is derived based on the detected phase difference. The defocus amount deriving unit 304 outputs information regarding the derived defocus amount to the AF control unit 114 and the pixel value estimating unit 302.

画素値推定部302は、撮像素子のイメージエリア内における、焦点検出画素の配列される位置に対応する画素値を推定して推定画素値を生成する。そして、アナログ・フロントエンド122から出力されたデジタル画像信号中、焦点検出画素から読み出された画素値を上記の推定画素値で置き換える処理を行う。推定画素値を生成する際、画素値推定部302は、デフォーカス量導出部304から受け取ったデフォーカス量の値に応じて、画素値推定処理の方法を変える。この画素値推定部302における画素値推定処理の詳細については後でフローチャートを参照して説明する。   The pixel value estimation unit 302 generates an estimated pixel value by estimating a pixel value corresponding to a position where the focus detection pixels are arranged in the image area of the image sensor. Then, in the digital image signal output from the analog front end 122, the pixel value read from the focus detection pixel is replaced with the estimated pixel value. When generating the estimated pixel value, the pixel value estimating unit 302 changes the method of the pixel value estimating process according to the defocus amount value received from the defocus amount deriving unit 304. Details of the pixel value estimation processing in the pixel value estimation unit 302 will be described later with reference to a flowchart.

AF制御部114は、デフォーカス量導出部304から受け取ったデフォーカス量の値に基づいて撮影光学系110内の焦点調節レンズの駆動方向と駆動量とを決定し、レンズ駆動部112に焦点調節制御信号を出力する。レンズ駆動部112は、AF制御部114から受け取った焦点調節制御信号に基づき、撮影光学系110の焦点調節動作を行う。撮影光学系110が可変焦点距離光学系である場合には、撮影光学系110がレンズ駆動部112によって駆動されて焦点距離を変更することが可能に構成されていてもよい。   The AF control unit 114 determines the driving direction and the driving amount of the focus adjustment lens in the photographing optical system 110 based on the defocus amount value received from the defocus amount deriving unit 304 and adjusts the focus to the lens driving unit 112. Output a control signal. The lens driving unit 112 performs a focus adjustment operation of the photographing optical system 110 based on the focus adjustment control signal received from the AF control unit 114. When the photographing optical system 110 is a variable focal length optical system, the photographing optical system 110 may be configured to be driven by the lens driving unit 112 so as to change the focal length.

図2(a)は、撮像素子350のイメージエリア内に二次元配列される撮像画素352G、352B、352Rと、この撮像画素352G、352B、352Rの配列内に焦点検出画素364、366が配置される様子を概念的に示す図である。図2(b)は、図2(a)中の一部の画素を拡大して示す図である。図2(a)、図2(b)はいずれも、被写体の側から撮像素子350を見た様子が描かれている。撮像画素352G、352B、352Rはそれぞれ、緑色、青色、赤色の分光波長帯域の感度を有する。これらの撮像画素352G、352B、352Rは、縦に2画素、横に2画素の4画素を配列単位として、その配列単位内の対角位置(図2の例では左上および右下)に撮像画素352Gが二つ配列され、残る二カ所に撮像画素352Bおよび352Rが配列された、ベイヤ型の配列となっている。図2(a)においては、これらの撮像画素352G、352B、352Rのうち、それぞれ一つずつにのみ符号が付されている。同様に、焦点検出画素364、366についても一つずつにのみ符号が付されている。以下では、必要に応じて撮像画素352Gを緑色の撮像画素、撮像画素352Bを青色の撮像画素、撮像画素352Rを赤色の撮像画素と称する。また、焦点検出画素364、366の組み合わせを焦点検出画素のペア364、366と称する。   In FIG. 2A, imaging pixels 352G, 352B, and 352R that are two-dimensionally arranged in the image area of the imaging device 350, and focus detection pixels 364 and 366 are arranged in the array of the imaging pixels 352G, 352B, and 352R. FIG. FIG. 2B is an enlarged view showing a part of the pixels in FIG. FIG. 2A and FIG. 2B both depict a state where the image sensor 350 is viewed from the subject side. The imaging pixels 352G, 352B, and 352R have sensitivities in the spectral wavelength bands of green, blue, and red, respectively. These imaging pixels 352G, 352B, and 352R are arranged in diagonal units (upper left and lower right in the example of FIG. 2) in the arrangement unit with 4 pixels of 2 pixels vertically and 2 pixels horizontally. Two 352Gs are arranged, and the Bayer-type arrangement in which the imaging pixels 352B and 352R are arranged in the remaining two places. In FIG. 2A, only one of these imaging pixels 352G, 352B, and 352R is assigned with a reference numeral. Similarly, the focus detection pixels 364 and 366 are also provided with symbols one by one. Hereinafter, the imaging pixel 352G is referred to as a green imaging pixel, the imaging pixel 352B is referred to as a blue imaging pixel, and the imaging pixel 352R is referred to as a red imaging pixel as necessary. A combination of focus detection pixels 364 and 366 is referred to as a focus detection pixel pair 364 and 366.

本実施の形態において、焦点検出画素のペア364、366は、本来であれば緑色の撮像画素が配置される位置に配置されている。図2に示される例では、二次元配列された撮像画素中、本来であれば緑色の撮像画素、赤色の撮像画素が交互に配置される行内において、緑色の撮像画素が配置される位置に焦点検出画素364、366が交互に配列される。つまり、撮像画素352R、焦点検出画素364、撮像画素352R、焦点検出画素366、撮像画素352R、…という順で配列される。この行内における焦点検出画素364、366の配列によって焦点検出画素列360が形成される。焦点検出画素364、366も、撮像画素352Gと同様の分光感度特性を有する。   In the present embodiment, the focus detection pixel pairs 364 and 366 are arranged at positions where green image pickup pixels are originally arranged. In the example shown in FIG. 2, the focus is on the position where the green imaging pixel is arranged in the row where the green imaging pixel and the red imaging pixel are alternately arranged among the imaging pixels arranged two-dimensionally. The detection pixels 364 and 366 are alternately arranged. That is, the imaging pixels 352R, the focus detection pixels 364, the imaging pixels 352R, the focus detection pixels 366, the imaging pixels 352R,. A focus detection pixel column 360 is formed by the arrangement of the focus detection pixels 364 and 366 in this row. The focus detection pixels 364 and 366 also have the same spectral sensitivity characteristics as the imaging pixel 352G.

図2(b)を参照して焦点検出画素364、366の近傍に配設される撮像画素について説明する。焦点検出画素364の配設位置を中心として、その対角位置(4カ所)には緑色の撮像画素352Gが配設される。そして焦点検出画素364の配設位置に対して上下の位置には青色の撮像画素352Bが、左右の位置には赤色の撮像画素352Rが配設される。焦点検出画素366についても同様であり、焦点検出画素366の配設位置を中心として、その対角位置(4カ所)には緑色の撮像画素352Gが配設される。そして焦点検出画素366の配設位置に対して上下の位置には青色の撮像画素352Bが、左右の位置には赤色の撮像画素352Rが配設される。   An imaging pixel disposed in the vicinity of the focus detection pixels 364 and 366 will be described with reference to FIG. Centering on the position where the focus detection pixel 364 is disposed, green imaging pixels 352G are disposed at diagonal positions (four locations). A blue imaging pixel 352B is disposed at a position above and below the position where the focus detection pixel 364 is disposed, and a red imaging pixel 352R is disposed at a position on the left and right. The same applies to the focus detection pixels 366, and green imaging pixels 352G are disposed at diagonal positions (four locations) centering on the position where the focus detection pixels 366 are disposed. A blue imaging pixel 352B is disposed at a position above and below the position where the focus detection pixel 366 is disposed, and a red imaging pixel 352R is disposed at a position on the left and right.

本実施の形態においては、焦点検出画素列360中、焦点検出画素364から出力される焦点検出信号列、つまり、図2(a)の例で左から2番目、6番目、10番目、…の画素位置にある焦点検出画素364から出力される信号列を第1の焦点検出信号列と称する。同様に、左から4番目、8番目、12番目、…の画素位置にある焦点検出画素366から出力される信号列を第2の焦点検出信号列と称する。これら第1、第2の焦点検出信号列の相関をとり、検出された位相差に基づいてデフォーカス量が導出される。   In the present embodiment, in the focus detection pixel row 360, the focus detection signal sequence output from the focus detection pixel 364, that is, the second, sixth, tenth,... From the left in the example of FIG. A signal sequence output from the focus detection pixel 364 at the pixel position is referred to as a first focus detection signal sequence. Similarly, the signal sequence output from the focus detection pixels 366 at the fourth, eighth, twelfth,... Pixel positions from the left is referred to as a second focus detection signal sequence. The first and second focus detection signal trains are correlated, and the defocus amount is derived based on the detected phase difference.

図3は、撮像画素352G、352B、352Rおよび焦点検出画素364、366の概略的構成を説明する図であり、撮像素子350のイメージエリアに配列される各画素上に形成されるマイクロレンズの光軸を含む面で断面をとった様子が示されている。なお、図3に示される断面は、デジタルカメラ100内において撮像素子350が被写体と正対するような姿勢で配設されていて、デジタルカメラ100が横位置の姿勢となっている状態で水平断面をとり、それを上側から見たものとして描かれている。つまり、図3における左右は、デジタルカメラ100の背面側から見たときの左右に一致する。図3(a)には、撮像画素352G、352B、352Rの構成を、図3(b)には焦点検出画素364の構成を、そして図3(c)には焦点検出画素366の構成を示す。以下では撮像画素352G、352B、352Rを区別して説明する必要のない場合、単に撮像画素352と称する。   FIG. 3 is a diagram illustrating a schematic configuration of the imaging pixels 352G, 352B, 352R and the focus detection pixels 364, 366, and light of a microlens formed on each pixel arranged in the image area of the imaging element 350. The cross section is shown in the plane including the axis. The cross section shown in FIG. 3 is a horizontal cross section in a state where the image sensor 350 is disposed in the digital camera 100 so as to face the subject, and the digital camera 100 is in the horizontal position. It is drawn as seen from above. That is, the left and right in FIG. 3 coincide with the left and right when viewed from the back side of the digital camera 100. 3A shows the configuration of the imaging pixels 352G, 352B, and 352R, FIG. 3B shows the configuration of the focus detection pixel 364, and FIG. 3C shows the configuration of the focus detection pixel 366. . Hereinafter, the imaging pixels 352G, 352B, and 352R are simply referred to as the imaging pixels 352 when it is not necessary to distinguish between them.

図3(a)を参照して撮像画素352の構成を説明する。フォトダイオード378の上方にはトランジスタや配線の層(不図示)に加えてカラーフィルタ372の層が形成され、それらの層の間は透明材料で構成される層間絶縁膜376の層が形成される。そして、一番上の層にマイクロレンズ370が形成される。本実施の形態において、マイクロレンズ370および層間絶縁膜376を形成する透明材料は、略同一の光学的特性(屈折率、アッベ数、分光透過率等)を有するものとする。撮像画素352は、撮影光学系110の設定F値によらず、その射出瞳からの被写体光を、マイクロレンズ370によって効率よくフォトダイオード378に導くように構成されている。カラーフィルタ372は、撮像画素352G、352B、352Rに求められる分光感度特性に対応して分光透過特性が設定されている。なお、本実施の形態において撮像素子350はB(青)、G(緑)、R(赤)の分光感度を有する撮像画素が配列されたものとして説明するが、その分光感度の組み合わせや色数、配列に関しては用途に応じて様々に変更可能である。   The configuration of the imaging pixel 352 will be described with reference to FIG. Above the photodiode 378, a layer of a color filter 372 is formed in addition to a transistor and wiring layer (not shown), and an interlayer insulating film 376 made of a transparent material is formed between these layers. . A microlens 370 is formed on the uppermost layer. In the present embodiment, the transparent material forming the microlens 370 and the interlayer insulating film 376 has substantially the same optical characteristics (refractive index, Abbe number, spectral transmittance, etc.). The imaging pixel 352 is configured to efficiently guide subject light from the exit pupil to the photodiode 378 by the microlens 370 regardless of the setting F value of the imaging optical system 110. The color filter 372 has spectral transmission characteristics set corresponding to the spectral sensitivity characteristics required for the imaging pixels 352G, 352B, and 352R. Note that in this embodiment, the imaging element 350 is described as an array of imaging pixels having B (blue), G (green), and R (red) spectral sensitivities, but the combination of spectral sensitivities and the number of colors. The arrangement can be variously changed depending on the application.

図3(b)を参照して焦点検出画素364の構成を説明する。図3(a)に示される撮像画素352との違いは、フォトダイオード378の上方に遮光部374が設けられている点である。また、カラーフィルタ372は、焦点検出画素364の分光透過特性が緑色の撮像画素352Gの分光感度特性と略同一となるようにその分光透過率が定められる。図3(b)において、遮光部374は、フォトダイオード378の左側の領域に光が入射しないように上下方向の配設位置と横方向の寸法とが定められている。遮光部374は、図3(b)においてはフォトダイオード378から離れた位置に設けられるものとして描かれているが、フォトダイオード378と略隣接する位置に設けられていてもよい。このように構成される焦点検出画素364において、フォトダイオード378には、撮影光学系110の軸外の瞳位置からの被写体光が入射する。この瞳位置は、フォトダイオード378上で遮光部374により遮光されずに被写体光が入射する領域を、マイクロレンズ370を通して撮影光学系110の射出瞳位置に逆投影した位置となる。つまり、デジタルカメラ100の背面側より見て、左側に位置する瞳位置からの被写体光が焦点検出画素364のフォトダイオード378に入射する。   The configuration of the focus detection pixel 364 will be described with reference to FIG. A difference from the imaging pixel 352 shown in FIG. 3A is that a light shielding portion 374 is provided above the photodiode 378. Further, the spectral transmittance of the color filter 372 is determined so that the spectral transmission characteristic of the focus detection pixel 364 is substantially the same as the spectral sensitivity characteristic of the green imaging pixel 352G. In FIG. 3B, the light shielding portion 374 has a vertical arrangement position and a horizontal dimension so that light does not enter the left region of the photodiode 378. Although the light shielding portion 374 is illustrated as being provided at a position away from the photodiode 378 in FIG. 3B, it may be provided at a position substantially adjacent to the photodiode 378. In the focus detection pixel 364 configured in this manner, subject light from the off-axis pupil position of the imaging optical system 110 is incident on the photodiode 378. This pupil position is a position obtained by back projecting a region where subject light is incident on the photodiode 378 without being shielded by the light shielding unit 374, onto the exit pupil position of the photographing optical system 110 through the microlens 370. That is, the subject light from the pupil position located on the left side as viewed from the back side of the digital camera 100 enters the photodiode 378 of the focus detection pixel 364.

図3(c)に示される焦点検出画素366も、図3(b)に示される焦点検出画素364と同様に、遮光部374が設けられる点が撮像画素352と異なる。また、カラーフィルタ372は、焦点検出画素364の分光透過特性が緑色の撮像画素352Gの分光感度特性と略同一となるようにその分光透過率が定められる。焦点検出画素364との違いは、遮光部374によってフォトダイオード378が遮光される位置の違いにある。そして、デジタルカメラ100の背面側より見て、右側に位置する瞳位置からの被写体光が焦点検出画素366のフォトダイオード378に入射する。   Similarly to the focus detection pixel 364 shown in FIG. 3B, the focus detection pixel 366 shown in FIG. 3C is different from the imaging pixel 352 in that a light shielding portion 374 is provided. Further, the spectral transmittance of the color filter 372 is determined so that the spectral transmission characteristic of the focus detection pixel 364 is substantially the same as the spectral sensitivity characteristic of the green imaging pixel 352G. The difference from the focus detection pixel 364 is the difference in the position where the photodiode 378 is shielded from light by the light shielding part 374. Then, the subject light from the pupil position located on the right side as viewed from the back side of the digital camera 100 enters the photodiode 378 of the focus detection pixel 366.

以上に説明した構成が焦点検出画素364、366に備えられることにより、撮影光学系110の異なる瞳位置からの被写体光が焦点検出画素のペア364、366に入射する。従って、焦点検出画素列360から読み出される第1、第2の焦点検出信号列の位相差から撮影光学系110のデフォーカス量を導出することが可能となる。   By providing the configuration described above in the focus detection pixels 364 and 366, subject light from different pupil positions of the imaging optical system 110 enters the focus detection pixel pairs 364 and 366. Therefore, the defocus amount of the imaging optical system 110 can be derived from the phase difference between the first and second focus detection signal sequences read from the focus detection pixel sequence 360.

図2においては、一つの列上に焦点検出画素364、366が交互に配列される例について示したが、二つの列上の一方の列に焦点検出画素364が、他方の列に焦点検出画素366が、それぞれ配列されていてもよい。この場合、二つの列は、互いにできるだけ近い位置にあることが、被写体上の略同一の位置から出射される光がこれらの焦点検出画素364、366に導かれるようにする上で望ましい。また、以上では二次元配列される画素の列に沿うように焦点検出画素364、366が配列される例について説明したが、行に沿うように焦点検出画素364、366が配列されていてもよい。その場合、図2中において焦点検出画素364内のフォトダイオードの上側、または下側を覆うように遮光部374を構成する必要がある。また、撮像素子350のイメージエリア内の複数の位置において、列方向および行方向に沿うように焦点検出画素列360を設けることにより、画面内の様々な位置におけるデフォーカス量の導出および焦点調節を行うことが可能となる。   FIG. 2 shows an example in which the focus detection pixels 364 and 366 are alternately arranged on one column, but the focus detection pixel 364 is on one column on the two columns and the focus detection pixel is on the other column. 366 may be arranged respectively. In this case, it is desirable that the two columns be as close as possible to each other so that light emitted from substantially the same position on the subject is guided to these focus detection pixels 364 and 366. Further, the example in which the focus detection pixels 364 and 366 are arranged along the two-dimensionally arranged pixel row has been described above, but the focus detection pixels 364 and 366 may be arranged along the rows. . In that case, it is necessary to configure the light shielding portion 374 so as to cover the upper side or the lower side of the photodiode in the focus detection pixel 364 in FIG. Further, by providing focus detection pixel columns 360 along the column direction and the row direction at a plurality of positions in the image area of the image sensor 350, defocus amount derivation and focus adjustment at various positions in the screen can be performed. Can be done.

図4は、撮像素子350のイメージエリア内に二次元配列される撮像画素352G、352B、352Rおよび焦点検出画素364、366が配置される様子を概念的に示す図であり、イメージエリアの一部が描かれている。図4においては個別の画素を区別するために、緑色の撮像画素352GにはG1、G2、…の符号が付されている。同様に、青色の撮像画素352BにはB1、B2、…の符号が、赤色の撮像画素352RにはR1、R2、…の符号が付されている。また、焦点検出画素364にはAF1、AF3という奇数系列の数字を伴う符号が付されており、焦点検出画素366にはAF2、AF4という偶数系列の数字を伴う符号が付されている。   FIG. 4 is a diagram conceptually showing a state in which imaging pixels 352G, 352B, 352R and focus detection pixels 364, 366 that are two-dimensionally arranged in the image area of the imaging device 350 are arranged. Is drawn. In FIG. 4, in order to distinguish individual pixels, the green imaging pixel 352G is denoted by G1, G2,. Similarly, the blue imaging pixel 352B is labeled with B1, B2,..., And the red imaging pixel 352R is labeled with R1, R2,. Further, the focus detection pixel 364 is given a code with an odd series of numbers AF1 and AF3, and the focus detection pixel 366 is given a code with an even series of numbers AF2 and AF4.

図5は、焦点検出画素364、すなわち図4におけるAF1、AF3、…の画素から読み出される第1の焦点検出信号列のパターンと、焦点検出画素366、すなわち図4におけるAF2、AF4、…の画素から読み出される第2の焦点検出信号列のパターンの例を示す図である。図5中、R1、R2、…、あるいはL1、L2、…の符号が付された矩形の配列が示されている。このうち、L1、L2、…は、撮像素子350の後方から見て光軸よりも左側に位置する瞳位置からの被写体光を受光する焦点検出画素364(AF1、AF3、…)を仮想的に再配列した様子を示している。同様に、R1、R2、…は、撮影光学系110の光軸を含む水平面上において、撮像素子350の後方から見て光軸よりも右側に位置する瞳位置からの被写体光を受光する焦点検出画素366(AF2、AF4、…)を仮想的に再配列した様子を示している。つまり、上記左側に位置する瞳位置からの被写体光を受光する画素L1、L2、…からなる左側瞳用ラインセンサ(これを仮にラインセンサ360Lと称する)から得られる第1の焦点検出信号列と、上記右側に位置する瞳位置からの被写体光を受光する画素R1、R2、…からなる右側瞳用ラインセンサ(これを仮にラインセンサ360Rと称する)から得られる第2の焦点検出信号列とが図5に概念的に示されている。両ラインセンサ360L、360Rにおける1画素分のピッチに相当する長さを本明細書では1ELという単位で表す。図4にも示されるように、撮像素子350の4画素分のピッチが1ELに相当する。   5 shows the pattern of the first focus detection signal sequence read from the focus detection pixels 364, that is, the AF1, AF3,... Pixels in FIG. 4, and the focus detection pixels 366, that is, the AF2, AF4,. It is a figure which shows the example of the pattern of the 2nd focus detection signal sequence read from. In FIG. 5, a rectangular array to which R1, R2,... Or L1, L2,. Among these, L1, L2,... Virtually represent focus detection pixels 364 (AF1, AF3,...) That receive subject light from a pupil position located on the left side of the optical axis when viewed from the rear of the image sensor 350. The rearrangement is shown. Similarly, R1, R2,... Are focus detections that receive subject light from a pupil position located on the right side of the optical axis when viewed from the rear of the image sensor 350 on a horizontal plane including the optical axis of the imaging optical system 110. A state in which the pixels 366 (AF2, AF4,...) Are virtually rearranged is shown. That is, the first focus detection signal sequence obtained from the left pupil line sensor (referred to as the line sensor 360L) including the pixels L1, L2,... That receive the subject light from the left pupil position. A second focus detection signal sequence obtained from a right pupil line sensor (referred to as a line sensor 360R) including pixels R1, R2,... That receive subject light from the right pupil position. This is conceptually illustrated in FIG. In this specification, the length corresponding to the pitch of one pixel in both line sensors 360L and 360R is expressed in units of 1EL. As shown in FIG. 4, the pitch of four pixels of the image sensor 350 corresponds to 1EL.

図5を参照して説明すると、ラインセンサ360Lから得られる第1の焦点検出信号列と、ラインセンサ360Rから得られる第2の焦点検出信号列とは、デフォーカス量導出部304において、以下のようにして相関をとる処理が行われる。先ず、所定の画素数(図5では5画素の例が示される)のウインドウが定められ、第1の焦点検出信号列中、ウインドウ内の画素値(図5の例ではL6〜L10)が基準の信号パターンと定められる。この基準の信号パターンと一致する信号パターンを第2の焦点検出信号列中から探索する。図5の例では画素R8〜R12の信号パターンが該当するパターンであると判定され、像ずれの量(位相差)は2ELと導出され、この像ずれ量2ELに対応してデフォーカス量が導出される。なお、図4、図5を見て明かであるように、ラインセンサ360L、360Rの撮像素子350内における仮想的な配設位置は2画素分ずれている。そのため、図5の処理においてはこの2画素分のずれを考慮する必要がある。ここでは理解を容易にするため、この2画素分のずれを無視して説明する。   Referring to FIG. 5, the first focus detection signal sequence obtained from the line sensor 360L and the second focus detection signal sequence obtained from the line sensor 360R are as follows in the defocus amount deriving unit 304: In this way, the process of obtaining the correlation is performed. First, a window having a predetermined number of pixels (an example of 5 pixels is shown in FIG. 5) is determined, and the pixel values in the window (L6 to L10 in the example of FIG. 5) in the first focus detection signal train are used as a reference. Signal pattern. A signal pattern that matches the reference signal pattern is searched from the second focus detection signal sequence. In the example of FIG. 5, it is determined that the signal pattern of the pixels R8 to R12 is a corresponding pattern, and the amount of image shift (phase difference) is derived as 2EL, and the defocus amount is derived corresponding to this image shift amount 2EL. Is done. As is clear from FIGS. 4 and 5, the virtual arrangement positions of the line sensors 360 </ b> L and 360 </ b> R in the image sensor 350 are shifted by two pixels. Therefore, in the process of FIG. 5, it is necessary to consider the deviation of these two pixels. Here, in order to facilitate understanding, the difference between the two pixels will be ignored and described.

以降、第1の焦点検出信号列中でウインドウが5画素分右に移動され、L11〜L15の画素値が基準の信号パターンとされて、この信号パターンと一致する信号パターンが第2の焦点検出信号列中から探索される。ところで、ラインセンサ360L、360Rは所定の長さを有している。したがって、ラインセンサ360L、360R上には、様々な撮影距離に位置する被写体の像が形成される可能性がある。例えば、比較的近距離に位置する人物、中景に位置する木の枝、比較的遠距離に位置する建築物、などといった被写体の像の一部がラインセンサ360L、360R上に位置する可能性がある。   Thereafter, the window is moved to the right by 5 pixels in the first focus detection signal sequence, the pixel values of L11 to L15 are used as reference signal patterns, and a signal pattern that matches this signal pattern is the second focus detection. Search from the signal sequence. Incidentally, the line sensors 360L and 360R have a predetermined length. Therefore, there is a possibility that images of subjects located at various shooting distances are formed on the line sensors 360L and 360R. For example, there is a possibility that a part of the subject image such as a person located at a relatively short distance, a tree branch located in the middle scene, a building located at a relatively long distance, etc. is located on the line sensors 360L and 360R. There is.

その場合、ラインセンサ360L、360R上に形成される像のデフォーカス量は、どの被写体の像の一部であるかによって異なる可能性がある。したがって、ラインセンサ360L、360R上における像ずれの量(位相差)はラインセンサ360L、360R上の位置によって異なる可能性がある。この点、上述のように第1の焦点検出信号列の信号パターンが複数に分割され、分割されたパターンごとに第2の焦点検出信号列内において一致するパターンを探索する処理が行われる。したがって、ラインセンサ360L、360R(焦点検出画素364、366)上におけるデフォーカス量の分布を得ることが可能となる。以上ではウインドウの幅を5画素に固定して探索処理を行う例について説明したが、第1、第2の焦点検出信号列の相関度の高さ等に応じてウインドウの幅(画素数)を適応的に増減させながら探索処理を行うことも可能である。例えば、基準の信号パターンと合致するパターンが第2の焦点検出信号列中で複数探索された場合には、ウインドウの幅を拡げて再探索し、一致度のより高いものとの間で像ずれの量を導出することも可能である。   In that case, the defocus amount of the image formed on the line sensors 360L and 360R may be different depending on which subject image is part of. Therefore, the amount of image shift (phase difference) on the line sensors 360L and 360R may vary depending on the position on the line sensors 360L and 360R. In this regard, as described above, the signal pattern of the first focus detection signal sequence is divided into a plurality of pieces, and a process of searching for a matching pattern in the second focus detection signal sequence is performed for each divided pattern. Therefore, it is possible to obtain a distribution of defocus amounts on the line sensors 360L and 360R (focus detection pixels 364 and 366). The example in which the search processing is performed with the window width fixed to 5 pixels has been described above. However, the window width (number of pixels) is set according to the degree of correlation between the first and second focus detection signal sequences. It is also possible to perform search processing while adaptively increasing or decreasing. For example, when a plurality of patterns matching the reference signal pattern are searched in the second focus detection signal sequence, the window is widened and the search is performed again, and the image shifts from the one with a higher matching degree. It is also possible to derive the quantity of.

図6は、記録媒体に記録された画像処理プログラムがコンピュータのCPUにより読み出されて実行され、画像処理部300、デフォーカス量導出部304、画素値推定部302としての機能が実装される例を説明するブロック図である。コンピュータ600は、CPU610と、メモリ620と、補助記憶装置630と、インターフェース640と、メモリカードインターフェース650と、光ディスクドライブ660と、ネットワークインターフェース670と、表示部680とを備える。CPU610と、メモリカードインターフェース650と、光ディスクドライブ660と、ネットワークインターフェース670と、表示部680とは、インターフェース640を介して電気的に接続される。   FIG. 6 shows an example in which the image processing program recorded on the recording medium is read out and executed by the CPU of the computer, and functions as the image processing unit 300, the defocus amount deriving unit 304, and the pixel value estimating unit 302 are implemented. FIG. The computer 600 includes a CPU 610, a memory 620, an auxiliary storage device 630, an interface 640, a memory card interface 650, an optical disk drive 660, a network interface 670, and a display unit 680. The CPU 610, the memory card interface 650, the optical disk drive 660, the network interface 670, and the display unit 680 are electrically connected via the interface 640.

メモリ620は、DDR SDRAM等の、比較的高速のアクセス速度を有するメモリである。補助記憶装置630は、ハードディスクドライブ、あるいはソリッドステートドライブ(SSD)等で構成され、比較的大きな記憶容量を備える。   The memory 620 is a memory having a relatively high access speed, such as a DDR SDRAM. The auxiliary storage device 630 is configured by a hard disk drive, a solid state drive (SSD), or the like, and has a relatively large storage capacity.

メモリカードインターフェース650は、メモリカードMCを着脱自在に装着可能に構成される。デジタルカメラ等で撮影動作が行われて生成され、メモリカードMC内に記憶された画像データは、このメモリカードインターフェース650を介してコンピュータ600内に読み込むことができる。また、コンピュータ600内の画像データをメモリカードMCに書き込むこともできる。   The memory card interface 650 is configured so that the memory card MC can be detachably attached. Image data generated by performing a shooting operation with a digital camera or the like and stored in the memory card MC can be read into the computer 600 via the memory card interface 650. Also, the image data in the computer 600 can be written into the memory card MC.

光ディスクドライブ660は、光ディスクODからデータを読み取ることが可能に構成される。光ディスクドライブ660はまた、必要に応じて光ディスクODにデータを書き込むことが可能に構成されていてもよい。   The optical disc drive 660 is configured to be able to read data from the optical disc OD. The optical disk drive 660 may also be configured to write data to the optical disk OD as necessary.

ネットワークインターフェース670は、ネットワークNWを介して接続されるサーバ等の外部情報処理装置とコンピュータ600との間で情報を授受可能に構成される。   The network interface 670 is configured to be able to exchange information between the computer 600 and an external information processing apparatus such as a server connected via the network NW.

表示部680は、フラットパネルディスプレイ装置等で構成され、文字、アイコン、カラー画像等を表示可能に構成される。   The display unit 680 is configured by a flat panel display device or the like, and configured to display characters, icons, color images, and the like.

画像処理部300、デフォーカス量導出部304、および画素値推定部302は、メモリ620上にロードされた画像処理プログラムをCPU610が解釈・実行することにより実現される。図1に示されるデジタルカメラ100と同じく、デフォーカス量導出部304および画素値推定部302を含んで画像処理装置が構成される。画像処理部300、デフォーカス量導出部304、画素値推定部302は、図1で同じ符号が付されているものと同様の作用を有するものであるのでその説明を省略する。画像処理プログラムは、メモリカードMCや光ディスクOD等の記録媒体に記録されてコンピュータ600のユーザに頒布される。あるいは、ネットワークNWを介して、サーバ等の外部情報処理装置からダウンロードされた画像処理プログラムが補助記憶装置630に記憶されてもよい。また、他の有線や無線の形態のインターフェースを介して外部情報処理装置等から画像処理プログラムがダウンロードされて補助記憶装置630に記憶されてもよい。あるいは、サーバ上で上記画像処理プログラムが実行されて、ユーザからネットワークを介して送られた画像データに処理をして、処理後画像データをユーザに返送する、クラウドサービスが実施されてもよい。   The image processing unit 300, the defocus amount derivation unit 304, and the pixel value estimation unit 302 are realized by the CPU 610 interpreting and executing an image processing program loaded on the memory 620. Similar to the digital camera 100 shown in FIG. 1, an image processing apparatus is configured including a defocus amount deriving unit 304 and a pixel value estimating unit 302. The image processing unit 300, the defocus amount deriving unit 304, and the pixel value estimating unit 302 have the same functions as those denoted by the same reference numerals in FIG. The image processing program is recorded on a recording medium such as a memory card MC or an optical disc OD and distributed to users of the computer 600. Alternatively, an image processing program downloaded from an external information processing apparatus such as a server may be stored in the auxiliary storage device 630 via the network NW. In addition, an image processing program may be downloaded from an external information processing apparatus or the like via another wired or wireless interface and stored in the auxiliary storage device 630. Alternatively, a cloud service may be implemented in which the image processing program is executed on the server, the image data sent from the user via the network is processed, and the processed image data is returned to the user.

画像処理部300は、補助記憶装置630に記憶された画像データ、あるいはメモリカードMC、光ディスクOD、ネットワークNW等を介して入力した画像データに後述する画像処理を行う。   The image processing unit 300 performs image processing, which will be described later, on image data stored in the auxiliary storage device 630 or image data input via the memory card MC, the optical disk OD, the network NW, or the like.

以上のように、画素値推定部302およびデフォーカス量導出部304を含んで構成される画像処理装置は、デジタルカメラ100内に実装されるものであってもよいし、コンピュータ600上で実行されるプログラムにより実施されるものであってもよい。コンピュータ600上で実行されるプログラムにより実施されるものである場合、処理対象の画像データは、いわゆるロー(RAW)画像データであることが望ましい。このとき、ロー画像データに付加されるヘッダ情報中に、焦点検出画素の配設位置に関する情報等が含まれるようにすることが望ましい。あるいは、プログラム中に複数種類の撮像装置に対応して焦点検出画素の配設位置が収められたデータテーブルが含められていても良い。その場合、ロー画像データに付加されるヘッダ情報中に埋め込まれている撮影機材の情報をもとに、焦点検出画素の配設位置等を得ることが可能となる。   As described above, the image processing apparatus including the pixel value estimation unit 302 and the defocus amount deriving unit 304 may be implemented in the digital camera 100 or executed on the computer 600. It may be implemented by a program. When the image data is to be processed by a program executed on the computer 600, the image data to be processed is preferably so-called raw (RAW) image data. At this time, it is desirable that the header information added to the raw image data includes information related to the position of the focus detection pixel. Or the data table in which the arrangement | positioning position of the focus detection pixel was accommodated corresponding to multiple types of imaging device may be included in the program. In that case, it is possible to obtain the position and the like of the focus detection pixels based on the information of the photographing equipment embedded in the header information added to the raw image data.

図7は、図1に示されるデジタルカメラ100の電源が投入されて、動作モードが撮影モードに切り替えられたときに実行が開始される処理手順を説明するフローチャートである。図7に示される処理は、ROM162内に格納されたファームウェアがRAM164にロードされ、CPU170がそのファームウェアを解釈・実行することにより行われる。このときデジタルカメラ100では、ライブビュー表示動作が行われているものとする。また、AFモードは、コンティニュアスAFモードに設定されているものとして説明するが、ワンショットAFモードに設定されていてもよい。なお、図1中に示される画素値推定部302、デフォーカス量導出部304、およびAF制御部114が、先にも説明したように、本実施の形態においてはCPU170がファームウェアを実行することにより実現されるものとして以下の説明をする。   FIG. 7 is a flowchart for explaining a processing procedure to be executed when the digital camera 100 shown in FIG. 1 is turned on and the operation mode is switched to the photographing mode. The processing shown in FIG. 7 is performed by loading the firmware stored in the ROM 162 into the RAM 164 and interpreting and executing the firmware by the CPU 170. At this time, it is assumed that a live view display operation is performed in the digital camera 100. The AF mode is described as being set to the continuous AF mode, but may be set to the one-shot AF mode. As described above, the pixel value estimation unit 302, the defocus amount derivation unit 304, and the AF control unit 114 shown in FIG. 1 are executed by the CPU 170 executing firmware in this embodiment. The following will be described as being realized.

S700においてCPU170は、ファーストレリーズスイッチがオンされたか否かを判定する。この判定が否定されると処理は720に進み、撮影モードの終了、すなわちユーザがデジタルカメラ100の動作モードを再生モード等に切り替えるためのスイッチや電源スイッチなどが押されたか否かを判定する。S720での判定が否定されると再びS700が実行されてユーザ操作を待ち受ける状態が続く。   In S700, the CPU 170 determines whether or not the first release switch is turned on. If this determination is negative, the process proceeds to 720, and it is determined whether or not the shooting mode has ended, that is, whether the user has pressed a switch or a power switch for switching the operation mode of the digital camera 100 to the playback mode or the like. If the determination in S720 is negative, S700 is executed again and a state of waiting for a user operation continues.

S700の判定が肯定されるとCPU170はS702において、撮像素子350中の焦点検出画素364、366から出力される焦点検出信号を入力する処理を行う。つまり、撮像部120から読み出され、アナログ・フロントエンド122で処理されてRAM164上に一時的に記憶されているデジタル画像信号中で、焦点検出画素364、366から出力された焦点検出信号を読み出す処理をCPU170は行う。   If the determination in S700 is affirmed, the CPU 170 performs a process of inputting focus detection signals output from the focus detection pixels 364 and 366 in the image sensor 350 in S702. That is, the focus detection signals output from the focus detection pixels 364 and 366 are read out from the digital image signals read from the imaging unit 120, processed by the analog front end 122, and temporarily stored in the RAM 164. The CPU 170 performs processing.

S704においてCPU170は、デフォーカス量を導出する処理を行う。すなわち、S702の処理で得られた焦点検出信号から第1および第2の焦点検出信号列を生成して処理し、デフォーカス量を導出する処理をCPU170は行う。この処理の内容は、先に図4、図5を参照して説明したとおりである。S702およびS704の処理が、デフォーカス量導出部304で行われる処理に相当する。   In S704, the CPU 170 performs a process for deriving the defocus amount. That is, the CPU 170 performs processing for generating and processing the first and second focus detection signal sequences from the focus detection signal obtained in the processing of S702 and deriving the defocus amount. The contents of this process are as described above with reference to FIGS. The processing of S702 and S704 corresponds to the processing performed by the defocus amount deriving unit 304.

S706においてCPU170は、S704で導出されたデフォーカス量が減じられるようにするため、撮影光学系110内のフォーカシングレンズの駆動方向および駆動量を決定し、レンズ駆動部112に制御信号を出力する。S706の処理がAF制御部114での処理に相当する。   In step S <b> 706, the CPU 170 determines the driving direction and the driving amount of the focusing lens in the photographing optical system 110 in order to reduce the defocus amount derived in step S <b> 704, and outputs a control signal to the lens driving unit 112. The process in S706 corresponds to the process in the AF control unit 114.

S708においてCPU170は、合焦動作が完了したか否かを判定する。この判定が否定される間、S700からS708までの処理が繰り返し行われる。S708での判定が肯定されると処理はS710に進む。   In S708, the CPU 170 determines whether or not the focusing operation is completed. While this determination is denied, the processing from S700 to S708 is repeated. If the determination in S708 is affirmative, the process proceeds to S710.

S710においてCPU170は、セカンドレリーズスイッチがオンされたか否かを判定し、この判定が否定されるとS700に戻る一方、肯定されるとS712に進む。上述した処理により、合焦完了(S708:はい)後、ユーザがセカンドレリーズスイッチを押さずにいると(S710:いいえ)、デフォーカス量の導出および合焦動作が繰り返し行われる。   In S710, the CPU 170 determines whether or not the second release switch has been turned on. If this determination is negative, the process returns to S700, whereas if the determination is positive, the process proceeds to S712. If the user does not press the second release switch after completion of focusing (S708: Yes) by the above-described processing (S710: No), the defocus amount derivation and focusing operation are repeated.

S712においてCPU170は、露光動作を行うための制御を行う。すなわち、CPU170は、ライブビュー動作中に決定された露光量に基づき、撮影光学系110の絞りの設定値と、メカニカルシャッタまたは電子シャッタによる露光時間とを決定する。そして、決定された絞り設定値と露光時間とで露光が行われるように、レンズ駆動部112および撮像部120に制御信号を出力する。   In S712, the CPU 170 performs control for performing an exposure operation. That is, the CPU 170 determines the aperture setting value of the photographing optical system 110 and the exposure time by the mechanical shutter or the electronic shutter based on the exposure amount determined during the live view operation. Then, a control signal is output to the lens driving unit 112 and the imaging unit 120 so that exposure is performed with the determined aperture setting value and exposure time.

S714においてCPU170は、S712で行われた露光動作の結果得られた画像信号を撮像部120から読み出して処理するように撮像部120およびアナログ・フロントエンド122に制御信号を出力する。その結果、アナログ・フロントエンド122から出力されたデジタル画像信号がRAM164に一時的に記憶される。   In S714, the CPU 170 outputs a control signal to the image capturing unit 120 and the analog front end 122 so that the image signal obtained as a result of the exposure operation performed in S712 is read from the image capturing unit 120 and processed. As a result, the digital image signal output from the analog front end 122 is temporarily stored in the RAM 164.

S716においてCPU170は、デフォーカス量導出および画素値推定の処理を行う。この処理は、撮像素子350のイメージエリア内において焦点検出画素364、366の存在する位置における画素値を推定する処理である。本明細書において、画素値を推定する対象の画素を推定対象画素と称する。CPU170は、RAM164に一時的に記憶されるデジタル画像信号中、推定対象画素の画素値を、画素値推定の処理で導出された画素値に置き換える。S716における処理の詳細については後で説明する。   In S716, the CPU 170 performs defocus amount derivation and pixel value estimation processing. This process is a process of estimating a pixel value at a position where the focus detection pixels 364 and 366 exist in the image area of the image sensor 350. In this specification, a pixel for which a pixel value is estimated is referred to as an estimation target pixel. The CPU 170 replaces the pixel value of the estimation target pixel in the digital image signal temporarily stored in the RAM 164 with the pixel value derived by the pixel value estimation process. Details of the processing in S716 will be described later.

S718においてCPU170は、S716の処理を経たデジタル画像信号を処理して画像データを生成するよう、画像処理部300に制御信号を出力する。画像処理部300は、デモザイク、階調変換、色バランス補正、シェーディング補正、ノイズ低減等のデジタル信号処理を施して画像データを生成し、必要に応じて圧縮処理等を施して画像記録媒体130に保存する。   In S718, the CPU 170 outputs a control signal to the image processing unit 300 so as to generate the image data by processing the digital image signal that has undergone the processing in S716. The image processing unit 300 generates image data by performing digital signal processing such as demosaicing, gradation conversion, color balance correction, shading correction, and noise reduction, and performs compression processing and the like on the image recording medium 130 as necessary. save.

S720においてCPU170は、ユーザが操作部140を操作して撮影モードを終了させる操作をしたか否かを判定する。この判定が肯定されると、図7に示される一連の処理を完了する。S720の判定が否定されると処理はS700に戻り、引き続きユーザ操作を待ち受ける状態となる。   In S720, the CPU 170 determines whether or not the user has operated the operation unit 140 to end the shooting mode. If this determination is affirmed, the series of processes shown in FIG. 7 is completed. If the determination in S720 is negative, the process returns to S700 and continues to wait for a user operation.

図8は、上述したS716での処理をより詳細に説明するフローチャートであり、S716でコールされるサブプログラムとして示されている。   FIG. 8 is a flowchart for explaining in more detail the processing in S716 described above, and is shown as a subprogram called in S716.

S800においてCPU170は、撮像素子350のイメージエリア中に複数存在する焦点検出画素364、366中、一つの画素を推定対象画素として選択する。S802においてCPU170は、S800で選択された推定対象画素に対するデフォーカス量を導出する。デフォーカス量の導出方法については、図4、図5を参照して先に説明したとおりである。   In S <b> 800, the CPU 170 selects one pixel as an estimation target pixel from among a plurality of focus detection pixels 364 and 366 existing in the image area of the image sensor 350. In S802, the CPU 170 derives a defocus amount for the estimation target pixel selected in S800. The defocus amount derivation method is as described above with reference to FIGS. 4 and 5.

ところで、デジタルカメラ100のAFモードがコンティニュアスAFモードで作動しているものとして図7のフローチャートの説明をした。この場合、S704で導出されたデフォーカス量と、S712の露光動作で得られた画像のデフォーカス量とはほぼ一致しているものと考えることができる。しかし、AFモードがシングルAFモードの場合、合焦動作が完了してから露光動作が行われるまでの間の時間は必ずしも短時間ではなく、また、構図が変化している場合もある。例えば、ユーザはフォーカスフレーム内にピントを合わせたい被写体を収め、ファーストレリーズスイッチをオンしてフォーカシング動作をデジタルカメラ100に行わせる。そして、合焦が完了した後、所望の構図が得られるようにカメラの向きを微調整してセカンドレリーズスイッチをオンする。この場合、S712において露光動作をして得られた画像中のデフォーカス量と、S704の処理で得られたデフォーカス量とは大きく異なる可能性が高い。このような場合、S802では、S712での露光動作によって得られたデジタル画像信号を処理してデフォーカス量を導出しなおすことが望ましい。一方、デジタルカメラ100がコンティニュアスAFモードで作動しているときには、露光動作の直前にS802で導出されたデフォーカス量を参照することも可能である。その訳は、上述のように、コンティニュアスAFモードでは露光動作直前まで合焦動作が行われているので、S702で導出されたデフォーカス量と、S712の露光動作によって得られたデジタル画像信号から導出されるデフォーカス量とは略同じとみなすことができるからである。   Incidentally, the flowchart of FIG. 7 has been described on the assumption that the AF mode of the digital camera 100 is operating in the continuous AF mode. In this case, it can be considered that the defocus amount derived in step S704 and the defocus amount of the image obtained by the exposure operation in step S712 substantially coincide with each other. However, when the AF mode is the single AF mode, the time from when the focusing operation is completed to when the exposure operation is performed is not necessarily short, and the composition may be changed. For example, the user places a subject to be focused in the focus frame, turns on the first release switch, and causes the digital camera 100 to perform a focusing operation. Then, after the focusing is completed, the direction of the camera is finely adjusted so that a desired composition is obtained, and the second release switch is turned on. In this case, there is a high possibility that the defocus amount in the image obtained by performing the exposure operation in S712 and the defocus amount obtained in S704 are greatly different. In such a case, in S802, it is desirable to process the digital image signal obtained by the exposure operation in S712 and derive the defocus amount again. On the other hand, when the digital camera 100 is operating in the continuous AF mode, it is possible to refer to the defocus amount derived in S802 immediately before the exposure operation. This is because, as described above, in the continuous AF mode, the focusing operation is performed until immediately before the exposure operation. Therefore, the defocus amount derived in S702 and the digital image signal obtained by the exposure operation in S712 are used. This is because it can be considered that the defocus amount derived from is substantially the same.

S804においてCPU170は、推定対象画素の存在する位置におけるデフォーカス量が、閾値よりも小さいか否かを判定する。S804の判定が肯定されると処理はS806に進む一方、否定されるとS808に進む。この閾値は、撮影光学系110の焦点距離、設定F値、撮像素子350の画素の配列ピッチ等を考慮して定められる値である。一例として以下の式(1)によって閾値Thを定めることができる。以下の式(1)において、fは撮影光学系110の焦点距離(撮影光学系110が変倍光学系である場合、撮影動作時に設定されていた焦点距離)、δは許容錯乱円径(直径)、Dは撮影光学系110の撮影動作時における射出瞳径(直径)、Fは撮影動作時に設定されていた撮影光学系110の絞り値である。式(1)を見て明らかなように、本例では片側焦点深度がデフォーカス量の閾値として設定されている。

Th=f×δ/D=δ×F … 式(1)

デフォーカス量の閾値は、デジタルカメラ100の内部で自動的に設定されるものであってもよいし、ユーザが適宜設定変更することが可能に構成されていてもよい。なお、デフォーカス状態としては、いわゆる前ピン状態と後ピン状態とが存在するが、本明細書においてデフォーカス量はその絶対値をとって扱われるものとする。もちろん、デフォーカス状態が前ピン状態であるか後ピン状態であるかに応じて閾値を変化させることも可能である。
In S804, the CPU 170 determines whether or not the defocus amount at the position where the estimation target pixel exists is smaller than the threshold value. If the determination in S804 is affirmed, the process proceeds to S806, whereas if the determination is negative, the process proceeds to S808. This threshold is a value determined in consideration of the focal length of the photographing optical system 110, the set F value, the arrangement pitch of the pixels of the image sensor 350, and the like. As an example, the threshold Th can be determined by the following equation (1). In the following formula (1), f is a focal length of the photographing optical system 110 (a focal length set at the time of photographing operation when the photographing optical system 110 is a variable magnification optical system), and δ is a permissible circle of confusion (diameter). ), D is the exit pupil diameter (diameter) during the photographing operation of the photographing optical system 110, and F is the aperture value of the photographing optical system 110 set during the photographing operation. As is apparent from Equation (1), in this example, the one-side focal depth is set as the defocus amount threshold value.

Th = f × δ / D = δ × F (1)

The threshold value for the defocus amount may be automatically set inside the digital camera 100, or may be configured so that the user can change the setting as appropriate. Note that, as the defocus state, there are a so-called front pin state and a rear pin state. In this specification, the defocus amount is assumed to take its absolute value. Of course, it is also possible to change the threshold depending on whether the defocus state is the front pin state or the rear pin state.

S806においてCPU170は、推定対象画素の存在する位置にある焦点検出画素364または366からの出力信号(焦点検出信号)を補正(ゲイン調整)し、推定対象画素の画素値を導出する。このとき、焦点検出画素364または366からの出力信号の値をSAF、補正係数をα、導出する画素値をS1とすると、以下の式(2)から画素値S1を導出することが可能となる。

S1=α×SAF … 式(2)

S804での判定が肯定される、ということは、推定対象画素の画素位置においては比較的鮮鋭な像が形成されている、ということである。これは、被写体上のある微小領域からの光が大きく拡がることなく推定対象画素に入射している、ということである。逆に云うと、被写体上の上記微小領域以外の領域からの光が推定対象画素に多くは入射しない、ということである。したがって、推定対象画素の画素位置にある焦点検出画素からの信号を用いて画素値を導出することにより、より正確な画素値を推定して得ることが可能となる。また、図2および図3を参照して先にも説明したように、焦点検出画素364、366には緑色のカラーフィルタ372が設けられている。つまり、緑色の分光帯域に感度を有している。加えて、ベイヤ配列される撮像画素中で、本来緑色の撮像画素が配置される位置に焦点検出画素364、366が配置されているため、遮光部374によって減光される分を式(2)によって補正(ゲイン調整)することにより推定対象画素の画素値を得ることが可能となる。
In S806, the CPU 170 corrects (gain adjustment) the output signal (focus detection signal) from the focus detection pixel 364 or 366 at the position where the estimation target pixel exists, and derives the pixel value of the estimation target pixel. At this time, assuming that the value of the output signal from the focus detection pixel 364 or 366 is S AF , the correction coefficient is α, and the derived pixel value is S 1, the pixel value S 1 can be derived from the following equation (2). Become.

S1 = α × S AF Formula (2)

If the determination in S804 is affirmed, it means that a relatively sharp image is formed at the pixel position of the estimation target pixel. This means that light from a certain small area on the subject is incident on the estimation target pixel without greatly spreading. In other words, a large amount of light from a region other than the minute region on the subject does not enter the estimation target pixel. Therefore, it is possible to estimate and obtain a more accurate pixel value by deriving the pixel value using a signal from the focus detection pixel at the pixel position of the estimation target pixel. As described above with reference to FIGS. 2 and 3, the focus detection pixels 364 and 366 are provided with a green color filter 372. That is, it has sensitivity in the green spectral band. In addition, since the focus detection pixels 364 and 366 are arranged at the positions where the green imaging pixels are originally arranged in the Bayer-arrayed imaging pixels, the amount of light that is reduced by the light shielding unit 374 is expressed by Expression (2). Thus, it is possible to obtain the pixel value of the estimation target pixel by correcting (gain adjustment).

S804での判定が否定された場合の分岐先であるS808においてCPU170は、推定対象画素の近傍に位置する画素(本明細書においてはこれを近傍配設画素と称する)の画素値をもとに推定対象画素の画素値を導出する。S804での判定が否定される、ということは、当該の画素位置においてはぼけた像(錯乱円)が形成されている、ということである。これはすなわち、被写体上の微小領域からの光に加えて、当該微小領域以外の領域からの光も混ざり合って推定対象画素に入射している、ということである。その場合には、例えば図4において焦点検出画素364(AF1)の存在する位置が推定対象画素の画素位置であるとして、その近傍に焦点検出画素364を囲うように存在する四つの撮像画素352G(G5、G6、G9、G10)の画素値をもとに推定する。このとき、四つの近傍配設画素それぞれの画素値をSG1、SG2、SG3、SG4とし、導出する画素値をS2とすると、以下の式(3)から画素値S2を導出することが可能となる。

S2=(SG1+SG2+SG3+SG4)/4 … 式(3)

上述したように、焦点検出画素364、366には緑色のカラーフィルタ372が設けられて緑色の分光帯域の感度を有している。そして、ベイヤ配列される撮像画素中で、本来緑色の撮像画素が配置される位置に焦点検出画素364、366が配置されているため、上記のように推定対象画素の近傍に位置する四つの緑色の撮像画素の画素値の平均値から画素値S2を導出することが可能となる。
In S808, which is a branch destination when the determination in S804 is negative, the CPU 170 determines the pixel value of a pixel located in the vicinity of the estimation target pixel (this pixel is referred to as a neighboring pixel in this specification). The pixel value of the estimation target pixel is derived. The negative determination in S804 means that a blurred image (circle of confusion) is formed at the pixel position. That is, in addition to light from a minute area on the subject, light from areas other than the minute area is mixed and incident on the estimation target pixel. In that case, for example, in FIG. 4, assuming that the position where the focus detection pixel 364 (AF1) exists is the pixel position of the estimation target pixel, four imaging pixels 352G ( G5, G6, G9, and G10) are estimated based on the pixel values. At this time, assuming that the pixel values of the four neighboring pixels are S G1 , S G2 , S G3 , S G4 and the derived pixel value is S2, the pixel value S2 is derived from the following equation (3). Is possible.

S2 = (S G1 + S G2 + S G3 + S G4 ) / 4 Formula (3)

As described above, the focus detection pixels 364 and 366 are provided with the green color filter 372 and have the sensitivity in the green spectral band. Since the focus detection pixels 364 and 366 are arranged at positions where the green imaging pixels are originally arranged in the Bayer-arrayed imaging pixels, the four green colors located in the vicinity of the estimation target pixel as described above. It is possible to derive the pixel value S2 from the average value of the pixel values of the imaging pixels.

S806またはS808における推定対象画素の画素値を導出する処理により、一つの推定対象画素の画素値が導出される。S810では全ての推定対象画素の画素値を導出する処理が完了したか否かが判定される。S810での判定が否定される間、上述したS800からS808までの処理が繰り返し行われる。S810での判定が肯定されると、イメージエリア内のすべての推定対象画素の画素値を導出する処理が完了し、リターンする。   By the process of deriving the pixel value of the estimation target pixel in S806 or S808, the pixel value of one estimation target pixel is derived. In S810, it is determined whether or not the process for deriving the pixel values of all the estimation target pixels has been completed. While the determination in S810 is negative, the processes from S800 to S808 described above are repeated. If the determination in S810 is affirmed, the process of deriving the pixel values of all the estimation target pixels in the image area is completed, and the process returns.

以上の図8のフローチャートを参照しての説明では、推定対象画素の画素位置におけるデフォーカス量が閾値よりも小さいか否かによって推定対象画素の画素値の導出方法を変える例について説明した。これに関して、以下で図9を参照して説明する方法により推定対象画素の画素値を導出することも可能である。   In the above description with reference to the flowchart of FIG. 8, the example in which the method for deriving the pixel value of the estimation target pixel is changed depending on whether or not the defocus amount at the pixel position of the estimation target pixel is smaller than the threshold value has been described. In this regard, it is also possible to derive the pixel value of the estimation target pixel by the method described below with reference to FIG.

図9は、図8のフローチャートを参照して説明した、S716での処理の別例を説明するフローチャートであり、S716でコールされるサブプログラムとして示されている。   FIG. 9 is a flowchart for explaining another example of the process in S716 described with reference to the flowchart of FIG. 8, and is shown as a subprogram called in S716.

S900においてCPU170は、撮像素子350のイメージエリア中に複数存在する焦点検出画素364、366中、一つの画素を推定対象画素として選択する。S902においてCPU170は、S900で選択された推定対象画素に対するデフォーカス量を導出する。以上のS900、S902での処理は、図8のフローチャートに示されるS800、S802での処理と同様である。   In S900, the CPU 170 selects one pixel as an estimation target pixel from among a plurality of focus detection pixels 364 and 366 existing in the image area of the image sensor 350. In S902, the CPU 170 derives a defocus amount for the estimation target pixel selected in S900. The processes in S900 and S902 are the same as the processes in S800 and S802 shown in the flowchart of FIG.

S904においてCPU170は、推定対象画素の存在する位置にある焦点検出画素364または366からの出力信号(焦点検出信号)SAFから、式(2)を用いて推定対象画素の画素値S1を導出する。 In S904 CPU 170 from the output signal (the focus detection signal) S AF from the focus detection pixels 364 or 366 which is positioned to present the estimation target pixel, to derive the pixel value S1 of the estimated target pixel using Equation (2) .

S906においてCPU170は、推定対象画素の近傍に位置する画素、すなわち近傍配設画素の画素値SG1、SG2、SG3、SG4から、式(3)を用いて推定対象画素の画素値S2を導出する。 In S906, the CPU 170 determines the pixel value S2 of the estimation target pixel using Expression (3) from the pixel values S G1 , S G2 , S G3 , and S G4 of the pixels located in the vicinity of the estimation target pixel. Is derived.

S908においてCPU170は、推定対象画素の画素位置におけるデフォーカス量の大きさに応じた混合比で上記画素値S1およびS2を混合する処理を行い、推定対象画素の画素値を導出する。   In S908, the CPU 170 performs a process of mixing the pixel values S1 and S2 at a mixing ratio corresponding to the magnitude of the defocus amount at the pixel position of the estimation target pixel, and derives the pixel value of the estimation target pixel.

図10には、デフォーカス量に応じて混合比率を変化させる際の変化特性の二つの例が概念的に示されている。図10に示されるグラフの横軸にはデフォーカス量が、縦軸には画素値S1の画素値S2に対する混合比率(S1:S2)が、それぞれ取られている。二つの混合比立変化特性の例のうち、一方の特性は符号C1を付した実線で示され、他方の特性は符号C2を付した破線で示されている。以下では単に特性C1、特性C2と称する。ところで、先にも説明したように、デフォーカス状態としてはいわゆる前ピン状態と後ピン状態とが存在するが、図10に示されるグラフの横軸は、デフォーカス量の絶対値がとられて示されているものとする。無論、デフォーカス状態が前ピン状態であるか後ピン状態であるかに応じて異なる特性が付与されてもよい。   FIG. 10 conceptually shows two examples of change characteristics when the mixing ratio is changed according to the defocus amount. In the graph shown in FIG. 10, the horizontal axis represents the defocus amount, and the vertical axis represents the mixing ratio (S1: S2) of the pixel value S1 to the pixel value S2. Of the two examples of the mixing ratio change characteristic, one characteristic is indicated by a solid line with a reference C1, and the other characteristic is indicated by a broken line with a reference C2. Hereinafter, they are simply referred to as a characteristic C1 and a characteristic C2. By the way, as described above, there are so-called front pin state and rear pin state as the defocus state, but the horizontal axis of the graph shown in FIG. 10 shows the absolute value of the defocus amount. It shall be indicated. Of course, different characteristics may be given depending on whether the defocus state is the front pin state or the rear pin state.

特性C1は、デフォーカス量が片側焦点深度に達するまではS1:S2=1:0となっている。そしてデフォーカス量が片側焦点深度を超して所定の値D1に近づくにつれて混合比率は画素値S2に重きが置かれるようになり、S1:S2=0:1に近づく。そして、デフォーカス量が所定の値D1を越すとS1:S2=0:1に固定される。特性C1の変曲点、傾き等についてはユーザが変更することが可能に構成されていてもよい。また、デフォーカス量と上記混合比率との関係は直線的であっても非直線的であってもよい。   The characteristic C1 is S1: S2 = 1: 0 until the defocus amount reaches the one-side focal depth. As the defocus amount exceeds the one-side focal depth and approaches the predetermined value D1, the mixing ratio becomes more weighted on the pixel value S2, and approaches S1: S2 = 0: 1. When the defocus amount exceeds a predetermined value D1, S1: S2 = 0: 1. The user may be able to change the inflection point, inclination, etc. of the characteristic C1. Further, the relationship between the defocus amount and the mixing ratio may be linear or non-linear.

特性C1は、デフォーカス量が片側焦点深度を超して所定の値D1に近づくまでの間、画素値S1の画素値S2に対する混合比率(S1:S2)が徐々に変化するものであったが、特性C2では段階的に混合比率が変化する。特性C2の屈曲点等についても、ユーザが変更することが可能に構成されていてもよい。   The characteristic C1 is that the mixing ratio (S1: S2) of the pixel value S1 to the pixel value S2 gradually changes until the defocus amount exceeds the one-side focal depth and approaches the predetermined value D1. In the characteristic C2, the mixing ratio changes stepwise. The bending point or the like of the characteristic C2 may also be configured to be changeable by the user.

特性C1、C2に関しては、デフォーカス量に対応する混合比率をCPU170が導き出すためのルックアップテーブルとして実現されていてもよいし、入力変数に対して所定の演算処理を施して出力値を得るプログラムによって実現されていてもよい。   With respect to the characteristics C1 and C2, it may be realized as a look-up table for the CPU 170 to derive a mixing ratio corresponding to the defocus amount, or a program that obtains an output value by performing predetermined arithmetic processing on an input variable It may be realized by.

再び図9のフローチャートを参照して説明する。上述した推定対象画素の画素値を導出する処理がS908で行われた後、S910では全ての推定対象画素の画素値を導出する処理が完了したか否かの判定が行われる。S910での判定が否定される間、上述したS900からS908までの処理が繰り返し行われる。S910での判定が肯定されると、イメージエリア内のすべての推定対象画素の画素値を導出する処理が完了し、リターンする。   Description will be made with reference to the flowchart of FIG. 9 again. After the process for deriving the pixel values of the estimation target pixels described above is performed in S908, it is determined in S910 whether or not the processes for deriving the pixel values of all the estimation target pixels have been completed. While the determination in S910 is negative, the above-described processes from S900 to S908 are repeated. If the determination in S910 is affirmed, the process of deriving the pixel values of all the estimation target pixels in the image area is completed, and the process returns.

以上の実施の形態で説明した画素推定処理を行うことにより、次のような効果を得ることが可能となる。すなわち、推定対象画素のデフォーカス量が小さい(合焦状態に近い)場合、撮像画素から得られる信号と焦点検出画素から得られる信号との相似性が高いので、遮光部374による光量低下の影響を補正することで推定対象画素の画素値を導出することが可能となる。一方、推定対象画素のデフォーカス量が大きい(ピントが大きく外れている)と、撮像画素から得られる信号と焦点検出画素から得られる信号との相似性は低くなる。このときには推定対象画素の近傍に配設されている撮像画素である近傍配設画素の画素値から画素値を推定する。デフォーカス量の大きい領域では像がぼけているので焦点検出画素の近傍には細い線状の像や急峻なエッジ等は存在しない。したがって、近傍配設画素の画素値から推定対象画素の画素値を推定しても、画像の破綻等を生じにくい。このように、推定対象画素の位置に配設された焦点検出画素からの信号と、推定対象画素の周囲の近傍配設画素からの信号とのうち、当該の画素位置におけるデフォーカス量の値に応じて少なくともいずれかの信号を用いて画素値の推定を行うことにより、いわゆるアーティファクトの目立たない、自然な画像を得ることが可能となる。   By performing the pixel estimation process described in the above embodiment, the following effects can be obtained. That is, when the defocus amount of the estimation target pixel is small (close to the in-focus state), the similarity between the signal obtained from the imaging pixel and the signal obtained from the focus detection pixel is high. It is possible to derive the pixel value of the estimation target pixel by correcting. On the other hand, when the defocus amount of the estimation target pixel is large (out of focus), the similarity between the signal obtained from the imaging pixel and the signal obtained from the focus detection pixel is low. At this time, the pixel value is estimated from the pixel value of the neighboring pixel that is the imaging pixel arranged in the vicinity of the estimation target pixel. Since the image is blurred in the region where the defocus amount is large, there is no thin linear image or steep edge in the vicinity of the focus detection pixel. Therefore, even if the pixel value of the estimation target pixel is estimated from the pixel values of the neighboring pixels, the image is unlikely to fail. As described above, the defocus amount value at the pixel position of the signal from the focus detection pixel arranged at the position of the estimation target pixel and the signal from the neighboring arrangement pixels around the estimation target pixel is obtained. Accordingly, by estimating the pixel value using at least one of the signals, it is possible to obtain a natural image in which so-called artifacts are not noticeable.

以上に説明した画素値推定部302およびデフォーカス量導出部304を含む画像処理装置は、デジタルスチルカメラ、デジタルムービーカメラ、カメラ付きの携帯電話や携帯型の情報処理装置に内蔵可能である。また、図6を参照して説明したように、コンピュータ上で画像処理プログラムが実行されて画素値推定部302およびデフォーカス量導出部304を含む画像処理装置が実現されてもよい。   The image processing device including the pixel value estimating unit 302 and the defocus amount deriving unit 304 described above can be incorporated in a digital still camera, a digital movie camera, a mobile phone with a camera, or a portable information processing device. Further, as described with reference to FIG. 6, an image processing apparatus including the pixel value estimating unit 302 and the defocus amount deriving unit 304 may be realized by executing an image processing program on a computer.

以上では撮像素子350が単板式であるものとして説明をしたが、多板式であってもよい。   In the above description, the imaging element 350 is described as a single plate type, but it may be a multi-plate type.

100 … デジタルカメラ
110 … 撮影光学系
112 … レンズ駆動部
114 … AF制御部
120 … 撮像部
122 … アナログ・フロントエンド
150、680 … 表示部
160 … 記憶部
170 … CPU
190 … DSP(ディジタル・シグナル・プロセッサ)
600 … コンピュータ
610 … CPU
620 … メモリ
630 … 補助記憶装置
650 … メモリカードインターフェース
660 … 光ディスクドライブ
670 … ネットワークインターフェース
300 … 画像処理部
302 … 画素値推定処理部
304 … デフォーカス量導出部
350 … 撮像素子
352、352B、352G、352R … 撮像画素
360 … 焦点検出画素列
364、366 … 焦点検出画素
370 … マイクロレンズ
372 … カラーフィルタ
374 … 遮光部
378 … フォトダイオード
DESCRIPTION OF SYMBOLS 100 ... Digital camera 110 ... Shooting optical system 112 ... Lens drive part 114 ... AF control part 120 ... Imaging part 122 ... Analog front end 150,680 ... Display part 160 ... Memory | storage part 170 ... CPU
190 ... DSP (Digital Signal Processor)
600 ... Computer 610 ... CPU
620 ... Memory 630 ... Auxiliary storage device 650 ... Memory card interface 660 ... Optical disk drive 670 ... Network interface 300 ... Image processing unit 302 ... Pixel value estimation processing unit 304 ... Defocus amount deriving unit 350 ... Imaging elements 352, 352B, 352G, 352R ... Imaging pixel 360 ... Focus detection pixel row 364, 366 ... Focus detection pixel 370 ... Micro lens 372 ... Color filter 374 ... Light-shielding part 378 ... Photodiode

Claims (7)

イメージエリア内に二次元配列された複数の撮像画素と、前記複数の撮像画素の配列内に配置されて、撮影光学系の異なる瞳位置からの被写体光を受光可能に構成される複数組の焦点検出画素のペアとを備え、前記撮像画素で生成される画像信号と、前記焦点検出画素のペアで生成される焦点検出信号とを出力可能に構成される位相差センサ内蔵式の撮像素子から出力される前記画像信号および前記焦点検出信号を処理して前記焦点検出画素の配列される位置に対応する画素値を推定して生成する画像処理装置であって、
前記焦点検出画素のペアのそれぞれから出力される前記焦点検出信号をもとに生成される第1および第2の焦点検出信号列の相関を求めて位相差を検出し、検出された位相差に基づいて前記撮影光学系のデフォーカス量を導出するデフォーカス量導出部と、
前記イメージエリア内における、前記焦点検出画素の配列される位置に対応する画素値を推定処理して推定画素値を生成する画素値推定部であって、当該位置の焦点検出画素から出力される焦点検出信号と、当該位置の焦点検出画素の近傍に配設される撮像画素である近傍配設画素からの信号とのうち、前記デフォーカス量導出部によって導出される前記デフォーカス量の値に応じて、少なくともいずれかの信号の値を用いて前記推定画素値を生成する画素値推定部と
を備えることを特徴とする画像処理装置。
A plurality of imaging pixels arranged two-dimensionally in the image area and a plurality of sets of focal points arranged in the array of the plurality of imaging pixels so as to be able to receive subject light from different pupil positions of the imaging optical system A detection pixel pair, and output from an image sensor with a built-in phase difference sensor configured to output an image signal generated by the imaging pixel and a focus detection signal generated by the focus detection pixel pair An image processing apparatus that processes the image signal and the focus detection signal to generate a pixel value corresponding to a position where the focus detection pixels are arranged;
A phase difference is detected by obtaining a correlation between the first and second focus detection signal sequences generated based on the focus detection signals output from each of the pair of focus detection pixels, and the detected phase difference is obtained. A defocus amount deriving unit for deriving the defocus amount of the photographing optical system based on
A pixel value estimation unit that generates an estimated pixel value by estimating a pixel value corresponding to a position where the focus detection pixel is arranged in the image area, and outputs a focus from the focus detection pixel at the position Depending on the value of the defocus amount derived by the defocus amount deriving unit among the detection signal and the signal from the nearby disposed pixel that is an imaging pixel disposed in the vicinity of the focus detection pixel at the position. An image processing apparatus comprising: a pixel value estimating unit that generates the estimated pixel value using at least one of the signal values.
前記画素値推定部は、前記デフォーカス量の値が所定の閾値よりも小さい場合には前記焦点検出信号を補正する処理をして前記推定画素値を生成する一方、前記デフォーカス量の値が前記閾値以上である場合には前記近傍配設画素からの信号を処理して前記推定画素値を生成することを特徴とする請求項1に記載の画像処理装置。   The pixel value estimator generates the estimated pixel value by correcting the focus detection signal when the defocus amount value is smaller than a predetermined threshold, while the defocus amount value is The image processing apparatus according to claim 1, wherein when the threshold value is equal to or greater than the threshold value, the estimated pixel value is generated by processing a signal from the neighboring pixel. 前記画素値推定部は、前記近傍配設画素からの信号を処理して得られた値と、前記焦点検出信号を補正する処理をして得られた値とを、前記デフォーカス量の値に応じた合成比率で合成して前記推定画素値を生成する
ことを特徴とする請求項1に記載の画像処理装置。
The pixel value estimation unit converts a value obtained by processing a signal from the neighboring pixel and a value obtained by correcting the focus detection signal into the defocus amount value. The image processing apparatus according to claim 1, wherein the estimated pixel value is generated by combining at a corresponding combining ratio.
イメージエリア内に二次元配列された複数の撮像画素と、前記複数の撮像画素の配列内に配置されて、撮影光学系の異なる瞳位置からの被写体光を受光可能に構成される複数組の焦点検出画素のペアとを備え、前記撮像画素で生成される画像信号と、前記焦点検出画素のペアで生成される焦点検出信号とを出力可能に構成される位相差センサ内蔵式の撮像素子と、
前記焦点検出画素のペアのそれぞれから出力される前記焦点検出信号をもとに生成される第1および第2の焦点検出信号列の相関を求めて位相差を検出し、検出された位相差に基づいて前記撮影光学系のデフォーカス量を導出するデフォーカス量導出部と、
前記イメージエリア内における、前記焦点検出画素の配列される位置に対応する画素値を推定処理して推定画素値を生成する画素値推定部であって、当該位置の焦点検出画素から出力される焦点検出信号と、当該位置の焦点検出画素の近傍に配設される撮像画素である近傍配設画素からの信号とのうち、前記デフォーカス量導出部によって導出される前記デフォーカス量の値に応じて、少なくともいずれかの信号の値を用いて前記推定画素値を生成する画素値推定部と
を備えることを特徴とする撮像装置。
A plurality of imaging pixels arranged two-dimensionally in the image area and a plurality of sets of focal points arranged in the array of the plurality of imaging pixels so as to be able to receive subject light from different pupil positions of the imaging optical system A pair of detection pixels, and an image sensor with a built-in phase difference sensor configured to output an image signal generated by the imaging pixel and a focus detection signal generated by the pair of focus detection pixels;
A phase difference is detected by obtaining a correlation between the first and second focus detection signal sequences generated based on the focus detection signals output from each of the pair of focus detection pixels, and the detected phase difference is obtained. A defocus amount deriving unit for deriving the defocus amount of the photographing optical system based on
A pixel value estimation unit that generates an estimated pixel value by estimating a pixel value corresponding to a position where the focus detection pixel is arranged in the image area, and outputs a focus from the focus detection pixel at the position Depending on the value of the defocus amount derived by the defocus amount deriving unit among the detection signal and the signal from the nearby disposed pixel that is an imaging pixel disposed in the vicinity of the focus detection pixel at the position. And a pixel value estimation unit that generates the estimated pixel value using at least one of the signal values.
前記画素値推定部は、前記デフォーカス量の値が所定の閾値よりも小さい場合には前記焦点検出信号を補正する処理をして前記推定画素値を生成する一方、前記デフォーカス量の値が前記閾値以上である場合には前記近傍配設画素からの信号を処理して前記推定画素値を生成することを特徴とする請求項4に記載の撮像装置。   The pixel value estimator generates the estimated pixel value by correcting the focus detection signal when the defocus amount value is smaller than a predetermined threshold, while the defocus amount value is The imaging apparatus according to claim 4, wherein when the threshold value is equal to or greater than the threshold value, the estimated pixel value is generated by processing a signal from the neighboring pixel. 前記画素値推定部は、前記近傍配設画素からの信号を処理して得られた値と、前記焦点検出信号を補正する処理をして得られた値とを、前記デフォーカス量の値に応じた合成比率で合成して前記推定画素値を生成する
ことを特徴とする請求項4に記載の撮像装置。
The pixel value estimation unit converts a value obtained by processing a signal from the neighboring pixel and a value obtained by correcting the focus detection signal into the defocus amount value. The imaging apparatus according to claim 4, wherein the estimated pixel value is generated by combining at a corresponding combining ratio.
イメージエリア内に二次元配列された複数の撮像画素と、前記複数の撮像画素の配列内に配置されて、撮影光学系の異なる瞳位置からの被写体光を受光可能に構成される複数組の焦点検出画素のペアとを備え、前記撮像画素で生成される画像信号と、前記焦点検出画素のペアで生成される焦点検出信号とを出力可能に構成される位相差センサ内蔵式の撮像素子から出力される前記画像信号および前記焦点検出信号を処理して前記焦点検出画素の配列される位置に対応する画素値を推定して生成する画像処理方法であって、
前記焦点検出画素のペアのそれぞれから出力される前記焦点検出信号をもとに生成される第1および第2の焦点検出信号列の相関を求めて位相差を検出し、検出された位相差に基づいて前記撮影光学系のデフォーカス量を導出する、デフォーカス量導出処理を行うことと、
前記イメージエリア内における、前記焦点検出画素の配列される位置に対応する画素値を推定処理して推定画素値を生成する画素値推定処理であって、当該位置の焦点検出画素から出力される焦点検出信号と、当該位置の焦点検出画素の近傍に配設される撮像画素である近傍配設画素からの信号とのうち、前記デフォーカス量導出処理を行うことにより導出される前記デフォーカス量の値に応じて、少なくともいずれかの信号の値を用いて前記推定画素値を生成する画素値推定処理を行うことと
を備えることを特徴とする画像処理方法。
A plurality of imaging pixels arranged two-dimensionally in the image area and a plurality of sets of focal points arranged in the array of the plurality of imaging pixels so as to be able to receive subject light from different pupil positions of the imaging optical system A detection pixel pair, and output from an image sensor with a built-in phase difference sensor configured to output an image signal generated by the imaging pixel and a focus detection signal generated by the focus detection pixel pair An image processing method for processing the image signal and the focus detection signal to be estimated and generating a pixel value corresponding to a position where the focus detection pixels are arranged,
A phase difference is detected by obtaining a correlation between the first and second focus detection signal sequences generated based on the focus detection signals output from each of the pair of focus detection pixels, and the detected phase difference is obtained. Performing a defocus amount derivation process for deriving a defocus amount of the photographing optical system based on;
A pixel value estimation process for generating an estimated pixel value by estimating a pixel value corresponding to a position where the focus detection pixels are arranged in the image area, and a focus output from the focus detection pixel at the position Of the detection signal and the signal from the neighboring pixel that is the imaging pixel arranged in the vicinity of the focus detection pixel at the position, the defocus amount derived by performing the defocus amount derivation process An image processing method comprising: performing a pixel value estimation process for generating the estimated pixel value using a value of at least one of the signals according to the value.
JP2011009159A 2011-01-19 2011-01-19 Image processing device, imaging apparatus, and image processing method Pending JP2012150289A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011009159A JP2012150289A (en) 2011-01-19 2011-01-19 Image processing device, imaging apparatus, and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011009159A JP2012150289A (en) 2011-01-19 2011-01-19 Image processing device, imaging apparatus, and image processing method

Publications (2)

Publication Number Publication Date
JP2012150289A true JP2012150289A (en) 2012-08-09
JP2012150289A5 JP2012150289A5 (en) 2014-02-27

Family

ID=46792589

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011009159A Pending JP2012150289A (en) 2011-01-19 2011-01-19 Image processing device, imaging apparatus, and image processing method

Country Status (1)

Country Link
JP (1) JP2012150289A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014203844A1 (en) * 2013-06-17 2014-12-24 コニカミノルタ株式会社 Image input apparatus
JP5657184B2 (en) * 2012-09-12 2015-01-21 富士フイルム株式会社 Imaging apparatus and signal processing method
JP2015159432A (en) * 2014-02-24 2015-09-03 リコーイメージング株式会社 Imaging apparatus and imaging method
US20160267666A1 (en) * 2015-03-09 2016-09-15 Samsung Electronics Co., Ltd. Image signal processor for generating depth map from phase detection pixels and device having the same
US10225501B2 (en) 2016-07-01 2019-03-05 Olympus Corporation Focus adjustment device and focus adjustment method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009044637A (en) * 2007-08-10 2009-02-26 Canon Inc Imaging apparatus
JP2009069577A (en) * 2007-09-14 2009-04-02 Canon Inc Imaging apparatus
JP2009094881A (en) * 2007-10-10 2009-04-30 Nikon Corp Imaging apparatus and imaging method
JP2012129804A (en) * 2010-12-15 2012-07-05 Canon Inc Imaging apparatus and control method of imaging apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009044637A (en) * 2007-08-10 2009-02-26 Canon Inc Imaging apparatus
JP2009069577A (en) * 2007-09-14 2009-04-02 Canon Inc Imaging apparatus
JP2009094881A (en) * 2007-10-10 2009-04-30 Nikon Corp Imaging apparatus and imaging method
JP2012129804A (en) * 2010-12-15 2012-07-05 Canon Inc Imaging apparatus and control method of imaging apparatus

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5657184B2 (en) * 2012-09-12 2015-01-21 富士フイルム株式会社 Imaging apparatus and signal processing method
WO2014203844A1 (en) * 2013-06-17 2014-12-24 コニカミノルタ株式会社 Image input apparatus
JP2015159432A (en) * 2014-02-24 2015-09-03 リコーイメージング株式会社 Imaging apparatus and imaging method
US20160267666A1 (en) * 2015-03-09 2016-09-15 Samsung Electronics Co., Ltd. Image signal processor for generating depth map from phase detection pixels and device having the same
KR20160108955A (en) * 2015-03-09 2016-09-21 삼성전자주식회사 Image signal processor for generating depth map from phase detection pixels, and device having same
US9824417B2 (en) 2015-03-09 2017-11-21 Samsung Electronics Co., Ltd. Image signal processor for generating depth map from phase detection pixels and device having the same
KR102299575B1 (en) * 2015-03-09 2021-09-07 삼성전자주식회사 Image signal processor for generating depth map from phase detection pixels, and device having same
US10225501B2 (en) 2016-07-01 2019-03-05 Olympus Corporation Focus adjustment device and focus adjustment method

Similar Documents

Publication Publication Date Title
US8593509B2 (en) Three-dimensional imaging device and viewpoint image restoration method
JP6362060B2 (en) Imaging apparatus, control method thereof, and program
US8902349B2 (en) Image pickup apparatus
CN103039066B (en) Imaging device, image processing apparatus and image processing method
EP2747410B1 (en) Imaging apparatus
US9521312B2 (en) Focus detection apparatus, control method for the same, and image capture apparatus
CN103782586A (en) Imaging device
CN103918249B (en) Imaging device and imaging method
JP2012027390A (en) Imaging apparatus
JP2012004729A (en) Imaging device and image processing method
JP2011075675A (en) Compound-eye imaging apparatus
CN104335578B (en) Camera head, image processing apparatus and image processing method
JP6436816B2 (en) Imaging apparatus and driving method thereof
JP2016133674A (en) Focus control device, and method, program and storage medium therefor
WO2016140066A1 (en) Signal processing device, signal processing method, program, electronic device, and imaging element
JP6530593B2 (en) Imaging device, control method therefor, storage medium
JP2017215578A (en) Focus detection device and control method of the same
JP2012150289A (en) Image processing device, imaging apparatus, and image processing method
JP5507761B2 (en) Imaging device
US10602050B2 (en) Image pickup apparatus and control method therefor
US9749520B2 (en) Imaging device and image processing method
CN106993110B (en) Image pickup apparatus and control method thereof
JP6017641B1 (en) Imaging apparatus, signal processing method, signal processing program
JP2017219782A (en) Control device, imaging device, control method, program, and storage medium
US11057560B2 (en) Image pickup apparatus, image pickup method, and recording medium

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140115

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140115

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141118

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150331