JP2014175777A - Imaging apparatus and image processing method - Google Patents

Imaging apparatus and image processing method Download PDF

Info

Publication number
JP2014175777A
JP2014175777A JP2013045493A JP2013045493A JP2014175777A JP 2014175777 A JP2014175777 A JP 2014175777A JP 2013045493 A JP2013045493 A JP 2013045493A JP 2013045493 A JP2013045493 A JP 2013045493A JP 2014175777 A JP2014175777 A JP 2014175777A
Authority
JP
Japan
Prior art keywords
pixel
correction
phase difference
pixels
adjacent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2013045493A
Other languages
Japanese (ja)
Other versions
JP2014175777A5 (en
JP6184132B2 (en
Inventor
Atsuro Okazawa
淳郎 岡澤
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 Imaging Corp
Original Assignee
Olympus Imaging 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 Imaging Corp filed Critical Olympus Imaging Corp
Priority to JP2013045493A priority Critical patent/JP6184132B2/en
Publication of JP2014175777A publication Critical patent/JP2014175777A/en
Publication of JP2014175777A5 publication Critical patent/JP2014175777A5/ja
Application granted granted Critical
Publication of JP6184132B2 publication Critical patent/JP6184132B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Automatic Focus Adjustment (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)
  • Studio Devices (AREA)
  • Focusing (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an imaging apparatus and an image processing method capable of easily reducing influence of crosstalk in a phase difference measure even in various systems.SOLUTION: The imaging apparatus includes an imaging device 21 in which phase difference detection pixels for detecting a focus are included in a part of the pixels, a correction pixel determination part 53 for determining target pixels to be corrected by using arrangement density of the phase difference detection pixels in the imaging device 21 and a pixel correction part 55 for correcting pixels in accordance with an output result from the correction pixel determination part 53.

Description

本発明は、画素の一部に焦点検出を行うための位相差画素が設けられた撮像素子を有する撮像装置および撮像素子からの撮像データの画像処理を行う画像処理方法に関する。   The present invention relates to an image pickup apparatus having an image pickup element provided with a phase difference pixel for performing focus detection on a part of the pixel, and an image processing method for performing image processing of image pickup data from the image pickup element.

光学系により結像された光学像を電気信号に変換する撮像素子を有する撮像装置において、撮像面の一部に位相差検出方式による焦点検出用の位相差画素を配置した撮像素子(位相差イメージャともいう)を設けることが提案されている(特許文献1参照)。   In an imaging apparatus having an imaging device that converts an optical image formed by an optical system into an electrical signal, an imaging device (phase difference imager) in which phase detection pixels for focus detection by a phase difference detection method are arranged on a part of the imaging surface. (Also referred to as Patent Document 1).

前述したような位相差検出方式による位相差画素に強い入射光があると、クロストークによるレベル段差が生ずる。この点について、図13および図14を用いて説明する。図13(a)は通常画素の例を示し、図13(b)は位相差画素の例を示す。図13(a)において、強い入射光LAが入射部LI1aを介してフォトダイオードPD1aに入射すると光電荷PCaが発生する。また入射部LI2aを介してフォトダイオードPD1aには殆ど光が入射しないとすると、ここには殆ど光電荷は発生しない。しかし、フォトダイオードPD1aで発生した光電荷がフォトダイオードPD2aに流れ込みクロストークCTaを発生する。   If strong incident light is present in the phase difference pixel based on the phase difference detection method as described above, a level difference due to crosstalk occurs. This point will be described with reference to FIGS. FIG. 13A shows an example of a normal pixel, and FIG. 13B shows an example of a phase difference pixel. In FIG. 13A, when a strong incident light LA is incident on the photodiode PD1a via the incident portion LI1a, a photoelectric charge PCa is generated. If almost no light is incident on the photodiode PD1a via the incident portion LI2a, almost no photocharge is generated here. However, the photocharge generated in the photodiode PD1a flows into the photodiode PD2a and generates crosstalk CTa.

図13(b)において、強い入射光LAが入射部LI1bを介してフォトダイオードPD1bに入射すると、光電荷PCbが発生する。しかし、位相差画素においては、遮光板Sが設けられていることから、遮光板によって入射光LAが遮られない開口部を介して入射した光のみによって光電荷PCbが発生するため、光電荷PCbは、通常画素の場合の光電荷PCaよりも少ない。この結果、フォトダイオードPD2b付近に生ずるクロストークCTbはCTaよりも小さくなる。   In FIG. 13B, when a strong incident light LA is incident on the photodiode PD1b via the incident portion LI1b, a photoelectric charge PCb is generated. However, in the phase difference pixel, since the light shielding plate S is provided, the photoelectric charge PCb is generated only by the light incident through the opening portion where the incident light LA is not blocked by the light shielding plate. Is less than the photocharge PCa in the case of a normal pixel. As a result, the crosstalk CTb generated near the photodiode PD2b is smaller than CTa.

このようにクロストークが発生すると、位相差画素の出力が、図14に示すように、中心位置がずれてしまう。すなわち、図14において、点線は、位相差画素が無い場合における像高に応じた位相差画素出力傾向を示す。一方、実線は、位相差画素が在る場合における像高に応じた位相差画素出力傾向を示す。なお、R開口は右側に開口部を有する位相差画素出力を意味し、L開口は左側に開口部を有する位相差画素出力を意味する。   When crosstalk occurs in this way, the center position of the output of the phase difference pixel is shifted as shown in FIG. That is, in FIG. 14, the dotted line shows the phase difference pixel output tendency according to the image height when there is no phase difference pixel. On the other hand, the solid line indicates the phase difference pixel output tendency according to the image height when there are phase difference pixels. The R opening means a phase difference pixel output having an opening on the right side, and the L opening means a phase difference pixel output having an opening on the left side.

このように、位相差検出方式による焦点検出用の位相差画素は、画素の一部に遮光部材が設けてられているため、通常画素に生ずるクロストークの量とは異なり、そのままでは絵柄に段差が生じてしまう。これを解決するために、位相差画素の出力値からクロストーク量を推定する方法が提案されている(特許文献2参照)。   As described above, since the phase difference pixel for focus detection by the phase difference detection method is provided with a light shielding member in a part of the pixel, the amount of crosstalk generated in the normal pixel is different from that of the normal pixel. Will occur. In order to solve this, a method of estimating the amount of crosstalk from the output value of the phase difference pixel has been proposed (see Patent Document 2).

特許第3592147号公報Japanese Patent No. 3592147 特開2009−124573号公報JP 2009-124573 A

前述の特許文献2によれば、位相差画素によって生ずるクロストークによる影響をある程度は除去できる。しかし、位相差画素の出力は、光学系の入射特性や開口の向きによって異なるため、光学系毎の特性を勘案した上でクロストーク量を推定する必要があり、システム設計が煩雑となる。その上、動画記録中などリアルタイムに光学系に情報を取得する必要があり、対応できないシステムとなってしまうおそれがある。   According to Patent Document 2 described above, the influence of crosstalk caused by the phase difference pixels can be removed to some extent. However, since the output of the phase difference pixel varies depending on the incident characteristics of the optical system and the direction of the aperture, it is necessary to estimate the crosstalk amount in consideration of the characteristics of each optical system, which complicates the system design. In addition, it is necessary to acquire information in the optical system in real time such as during moving image recording, which may result in an incompatible system.

本発明は、このような事情を鑑みてなされたものであり、位相差メジャーにおいて、クロストークの影響を種々のシステムにおいても容易に軽減することが可能な撮像装置および画像処理方法を提供することを目的とする。   The present invention has been made in view of such circumstances, and provides an imaging apparatus and an image processing method capable of easily reducing the influence of crosstalk in various systems in a phase difference measure. With the goal.

上記目的を達成するため第1の発明に係る撮像装置は、画素の一部に焦点検出を行うための位相差検出画素が設けられた撮像素子と、上記撮像素子の内の位相差検出画素同士の配置密度を用いて、補正する対象画素を判断する補正画素判断部と、上記補正画素判断部の出力結果に応じて、画素を補正する画素補正部と、を有する。   In order to achieve the above object, an image pickup apparatus according to a first aspect of the present invention includes an image pickup element provided with a phase difference detection pixel for performing focus detection on a part of the pixels, and phase difference detection pixels among the image pickup elements. A correction pixel determination unit that determines a target pixel to be corrected using the arrangement density of the pixel, and a pixel correction unit that corrects the pixel according to the output result of the correction pixel determination unit.

第2の発明に係る撮像装置は、上記第1の発明において、上記補正画素判断部は、上記位相差検出画素に隣接する隣接画素もしくは位相差検出画素に隣接しない非隣接画素を補正対象画素とするか否かを判断する補正基準画素判断部を有する。   In the imaging device according to a second invention, in the first invention, the correction pixel determination unit sets an adjacent pixel adjacent to the phase difference detection pixel or a non-adjacent pixel not adjacent to the phase difference detection pixel as a correction target pixel. A correction reference pixel determining unit that determines whether or not to perform the correction.

第3の発明に係る撮像装置は、上記第1または第2の発明において、上記補正画素判断部は、補正対象画素周辺の位相差検出画素および非位相差検出画素の個数に基づいて、上記補正する対象画素を判断する段差レベル判断部を有する。   In the imaging device according to a third aspect, in the first or second aspect, the correction pixel determination unit performs the correction based on the number of phase difference detection pixels and non-phase difference detection pixels around the correction target pixel. A level difference determination unit that determines a target pixel to be processed.

第4の発明に係る撮像装置は、上記第1の発明において、上記補正画素判断部は、上記補正基準画素判断部における判断結果に応じて、画素の出力を補正するか否かを判断する補正可否判断部を有する。   According to a fourth aspect of the present invention, in the image pickup apparatus according to the first aspect, the correction pixel determination unit determines whether or not to correct the output of the pixel according to the determination result in the correction reference pixel determination unit. A determination unit is provided.

第5の発明に係る撮像装置は、上記第2の発明において、上記画素補正部は、上記補正画素判断部が上記位相差検出画素に隣接する上記隣接画素を補正対象とした場合に、補正対象画素を他の位相差検出画素に隣接しない上記非隣接画素に基づいて補正を行い、上記補正画素判断部が上記位相差検出画素に隣接しない上記非隣接画素を補正対象とした場合に、補正対象画素を他の位相差検出画素に隣接する上記隣接画素に基づいて補正を行う。   The imaging device according to a fifth invention is the imaging device according to the second invention, wherein the pixel correction unit is a correction target when the correction pixel determination unit sets the adjacent pixel adjacent to the phase difference detection pixel as a correction target. When the pixel is corrected based on the non-adjacent pixel that is not adjacent to another phase difference detection pixel, and the correction pixel determination unit sets the non-adjacent pixel that is not adjacent to the phase difference detection pixel as a correction target, The pixel is corrected based on the adjacent pixel adjacent to another phase difference detection pixel.

第6の発明に係る撮像装置は、上記第1または第2の発明において、上記補正画素判断部は、撮像の駆動モードに基づいて、上記補正する対象画素を判断する。   In the imaging device according to a sixth aspect of the present invention, in the first or second aspect, the correction pixel determination unit determines the target pixel to be corrected based on an imaging drive mode.

第7の発明に係る画像処理方法は、画素の一部に画像生成以外のための多目的画素からの画像データを取得し、上記画像データの内の上記多目的画素の配置密度に基づいて、補正する対象画素を判断し、上記補正する対象画素の判断結果に基づいて、上記画素を補正する。   An image processing method according to a seventh aspect of the present invention acquires image data from a multi-purpose pixel other than image generation for a part of the pixel, and corrects based on the arrangement density of the multi-purpose pixel in the image data. The target pixel is determined, and the pixel is corrected based on the determination result of the target pixel to be corrected.

本発明によれば、位相差メジャーにおいて、クロストークの影響を種々のシステムにおいても容易に軽減することが可能な撮像装置および画像処理方法を提供することができる。   According to the present invention, it is possible to provide an imaging apparatus and an image processing method capable of easily reducing the influence of crosstalk in various systems in a phase difference measure.

本発明の一実施形態に係るカメラの主として電気的構成を示すブロック図である。1 is a block diagram mainly showing an electrical configuration of a camera according to an embodiment of the present invention. 本発明の一実施形態に係るカメラの画像処理部の詳細を示すブロック図である。It is a block diagram which shows the detail of the image process part of the camera which concerns on one Embodiment of this invention. 本発明の一実施形態に係るカメラの補正画素判断部の詳細を示すブロック図である。It is a block diagram which shows the detail of the correction pixel judgment part of the camera which concerns on one Embodiment of this invention. 本発明の一実施形態に係るカメラの撮像素子の画素の配置を示す平面図である。It is a top view which shows arrangement | positioning of the pixel of the image pick-up element of the camera which concerns on one Embodiment of this invention. 本発明の一実施形態におけるカメラにおいて、位相差画素の非隣接画素を補正する場合の補正画素部における判断を説明する図である。It is a figure explaining the judgment in the correction pixel part in the case of correct | amending the non-adjacent pixel of a phase difference pixel in the camera in one Embodiment of this invention. 本発明の一実施形態におけるカメラにおいて、位相差画素の隣接画素を補正する場合の補正画素部における判断を説明する図である。It is a figure explaining the judgment in the correction pixel part in the case of correct | amending the adjacent pixel of a phase difference pixel in the camera in one Embodiment of this invention. 本発明の一実施形態におけるカメラにおいて、位相差画素の非隣接画素を補正する場合の段差レベル判断部における判断を説明する図である。It is a figure explaining the judgment in the level | step difference judgment part in the case of correct | amending the non-adjacent pixel of a phase difference pixel in the camera in one Embodiment of this invention. 本発明の一実施形態におけるカメラにおいて、位相差画素の隣接画素または非隣接画素を用いて補正を行う画素補正部の補正を説明する図である。It is a figure explaining correction | amendment of the pixel correction | amendment part which correct | amends using the adjacent pixel of a phase difference pixel, or a non-adjacent pixel in the camera in one Embodiment of this invention. 本発明の一実施形態のカメラにおいて、全体処理の動作を示すフローチャートである。5 is a flowchart showing the overall processing operation in the camera of one embodiment of the present invention. 本発明の一実施形態のカメラにおいて、補正対象決定までの動作を示すフローチャートである。6 is a flowchart showing operations up to determination of a correction target in the camera of one embodiment of the present invention. 本発明の一実施形態のカメラにおいて、補正対象決定までの動作を示すフローチャートである。6 is a flowchart showing operations up to determination of a correction target in the camera of one embodiment of the present invention. 本発明の一実施形態のカメラにおいて、補正対象決定までの動作を示すフローチャートである。6 is a flowchart showing operations up to determination of a correction target in the camera of one embodiment of the present invention. 従来の撮像素子の構成とクロストークを説明する図である。It is a figure explaining the structure and crosstalk of the conventional image pick-up element. 従来の撮像素子における像高と位相差画素の出力を示すグラフである。It is a graph which shows the image height and the output of a phase difference pixel in the conventional image sensor.

以下、図面に従って本発明を適用したカメラを用いて好ましい実施形態について説明する。本発明の好ましい一実施形態に係わるカメラは、デジタルカメラであり、一部に位相差検出方式による焦点検出用の位相差画素を備えた撮像素子を有する撮像部を設け、この撮像部によって被写体像を撮像データに変換し、また位相差画素からの出力に基づいて公知の位相差検出方式によってデフォーカス方向とデフォーカス量を算出し、撮影レンズのピント合わせを行う。   Hereinafter, a preferred embodiment will be described using a camera to which the present invention is applied according to the drawings. A camera according to a preferred embodiment of the present invention is a digital camera, and an image pickup unit having an image pickup element having a phase difference pixel for focus detection by a phase difference detection method is provided in part, and an object image is provided by the image pickup unit. Is converted into imaging data, the defocus direction and the defocus amount are calculated by a known phase difference detection method based on the output from the phase difference pixel, and the photographing lens is focused.

また、撮像部によって生成された撮像データに基づいてライブビュー表示を行ったり、静止画撮影を行ったり、動画撮影を行う。このとき位相差画素によって生ずるクロストークの影響を軽減するように、位相差画素の隣接画素または非隣接画素に対して、他の位相差画素の隣接画素または非隣接画素の撮像データを用いて補正する。   In addition, live view display is performed based on the imaging data generated by the imaging unit, still image shooting is performed, and moving image shooting is performed. At this time, in order to reduce the influence of crosstalk caused by the phase difference pixel, the adjacent pixel or non-adjacent pixel of the phase difference pixel is corrected using the imaging data of the adjacent pixel or non-adjacent pixel of the other phase difference pixel. To do.

図1は、本発明の一実施形態に係わるカメラの主として電気的構成を示すブロック図である。図1において、矢印付き実線はデータの流れを示し、矢印付き破線は制御信号の流れを示す。カメラ内には、撮影レンズ11、絞り13、メカシャッタ15、駆動部17、操作部19、撮像素子21、A−AMP23、アナログデジタル変換器(ADC)25、撮像制御回路26、CPU(Central Processing Unit)27、画像処理部29、焦点検出回路31、ビデオエンコーダ33、バス35、DRAM(Dynamic Random Access Memory)37、ROM(Read Only Memory)39、フラッシュメモリ41を有する。   FIG. 1 is a block diagram mainly showing an electrical configuration of a camera according to an embodiment of the present invention. In FIG. 1, a solid line with an arrow indicates a data flow, and a broken line with an arrow indicates a control signal flow. In the camera, there are a photographing lens 11, a diaphragm 13, a mechanical shutter 15, a drive unit 17, an operation unit 19, an image sensor 21, an A-AMP 23, an analog-digital converter (ADC) 25, an image control circuit 26, a CPU (Central Processing Unit). 27, an image processing unit 29, a focus detection circuit 31, a video encoder 33, a bus 35, a DRAM (Dynamic Random Access Memory) 37, a ROM (Read Only Memory) 39, and a flash memory 41.

撮影レンズ11は、被写体像を形成するための複数の光学レンズから構成され、単焦点レンズまたはズームレンズである。この撮影レンズ11の光軸の後方には、絞り13が配置されており、この絞り13は開口径が可変であり、撮影レンズ11を通過した被写体光束の光量を制限する。絞り13の後方には、メカシャッタ15が配置されており、撮影レンズを通過した被写体光束の通過時間の制御を行う。メカシャッタ15としては、公知のフォーカルプレーンシャッタ、レンズシャッタ等が採用される。   The photographing lens 11 is composed of a plurality of optical lenses for forming a subject image, and is a single focus lens or a zoom lens. A diaphragm 13 is disposed behind the optical axis of the photographic lens 11. The diaphragm 13 has a variable aperture diameter and limits the amount of light of the subject light beam that has passed through the photographic lens 11. A mechanical shutter 15 is disposed behind the diaphragm 13 and controls the passage time of the subject luminous flux that has passed through the photographing lens. As the mechanical shutter 15, a known focal plane shutter, lens shutter, or the like is employed.

駆動部17は、CPU27から出力される制御信号に基づいて、撮影レンズ11のピント調節、絞り13の開口径制御、およびメカシャッタ15の開閉制御(シャッタ制御)を行う。   Based on a control signal output from the CPU 27, the drive unit 17 performs focus adjustment of the photographing lens 11, aperture diameter control of the diaphragm 13, and opening / closing control (shutter control) of the mechanical shutter 15.

操作部19は、電源釦、レリーズ釦、再生釦、メニュー釦等、各種入力釦や各種入力キー等の操作部材を含み、これらの操作部材の操作状態を検知し、検知結果をCPU27に出力する。撮影モードダイヤルやメニュー画面等において、静止画撮影モードと動画撮影モードを選択することができる。動画撮影モードが選択されている際に、レリーズ釦を操作すると、動画撮影が開始され、再度、レリーズ釦が操作されると動画撮影が終了する。なお、操作部19に動画釦を設け、動画釦が操作された際に、動画撮影を開始する等、撮影選択部として、他の方法に置き換えても勿論かまわない。   The operation unit 19 includes operation members such as various input buttons and various input keys such as a power button, a release button, a playback button, and a menu button, detects operation states of these operation members, and outputs the detection results to the CPU 27. . A still image shooting mode and a moving image shooting mode can be selected on a shooting mode dial, a menu screen, or the like. When the release button is operated while the movie shooting mode is selected, movie shooting starts, and when the release button is operated again, movie shooting ends. It should be noted that a moving image button may be provided in the operation unit 19 and the shooting selection unit may be replaced with another method such as starting moving image shooting when the moving image button is operated.

撮影レンズ11の光軸上であって、メカシャッタ15の後方で、かつ撮影レンズ11によって被写体像が結像される位置付近には、撮像素子21が配置されている。撮像素子21には、画素の一部に焦点検出をするための位相差画素が設けられている。また、撮像素子21は、各画素を構成するフォトダイオードが二次元的にマトリックス状に配置されており、各フォトダイオードは受光量に応じた光電変換電流を発生し、この光電変換電流は各フォトダイオードに接続するキャパシタによって電荷蓄積される。   An image sensor 21 is disposed on the optical axis of the photographic lens 11, behind the mechanical shutter 15 and in the vicinity of the position where the subject image is formed by the photographic lens 11. The image sensor 21 is provided with a phase difference pixel for focus detection on a part of the pixel. In the image pickup device 21, photodiodes constituting each pixel are two-dimensionally arranged in a matrix, and each photodiode generates a photoelectric conversion current corresponding to the amount of received light. Charges are accumulated by a capacitor connected to the diode.

各画素の前面には、ベイヤー配列のカラーフィルタが配置されている。ベイヤー配列は、水平方向にR画素とG画素が交互に配置されたラインと、G画素とB画素が交互に配置されたラインを有している。G画素の一部は、焦点検出用の位相差画素に置き換えられている。本実施形態では、ベイヤー配列を前提としているが、本発明はこれに限定するものではない。ハニカム配列の撮像装置やカラーフィルタの配置周期が不規則なものでもよい。また位相差画素もG画素の一部でなく、配置周期や配置箇所、カラーフィルタの種別およびカラーフィルタの有無もこれに限定するものではない。この撮像素子21の詳しい構成について、図4を用いて後述する。なお、本明細書においては、撮像素子21の画素から出力されるアナログの画像信号に基づく信号であれば、後述するADC25によってA/D変換された信号のみならず画像信号も含めて撮像データ(画像データ)と称する。   A Bayer color filter is arranged in front of each pixel. The Bayer array has lines in which R pixels and G pixels are alternately arranged in the horizontal direction and lines in which G pixels and B pixels are alternately arranged. A part of the G pixel is replaced with a phase detection pixel for focus detection. In the present embodiment, a Bayer array is assumed, but the present invention is not limited to this. The arrangement period of the honeycomb array imaging device and the color filter may be irregular. Further, the phase difference pixel is not a part of the G pixel, and the arrangement period, the arrangement place, the type of the color filter, and the presence or absence of the color filter are not limited to this. A detailed configuration of the image sensor 21 will be described later with reference to FIG. In this specification, as long as the signal is based on an analog image signal output from the pixel of the image sensor 21, image data including not only the signal A / D converted by the ADC 25 described later but also the image signal ( Image data).

撮像素子21の出力は、A−AMP23に接続されている。A−AMP23は、撮像素子21から出力された画像信号のアナログゲイン調整を行う。A−AMP23の出力は、ADC25に接続されている。   The output of the image sensor 21 is connected to the A-AMP 23. The A-AMP 23 performs analog gain adjustment of the image signal output from the image sensor 21. The output of the A-AMP 23 is connected to the ADC 25.

ADC25は、アナログデジタル変換器であり、A−AMP23によってアナログゲイン調整された画像信号をデジタル形式の撮像データ(画像データ)に変換する。この撮像データには、非焦点検出用であって通常の画素からのデータと、焦点検出用の位相差画素からのデータの両方のデータが含まれている。ADC25の出力はバス35に出力され、撮像データは後述するDRAM37に一時記憶される。   The ADC 25 is an analog-digital converter, and converts the image signal whose analog gain has been adjusted by the A-AMP 23 into imaging data (image data) in a digital format. The imaging data includes both data from a normal pixel for non-focus detection and data from a phase difference pixel for focus detection. The output of the ADC 25 is output to the bus 35, and the imaging data is temporarily stored in a DRAM 37 described later.

撮像制御回路26は、CPU27の制御命令に従って、撮像素子21の露光開始や読み出し等の制御を行う。撮像制御回路26は、静止画撮影時、ライブビュー表示時、動画撮影時等における駆動モードに応じて、その読み出し制御を変更する。例えば、ライブビュー表示や動画撮影時には、静止画よりも画素数を必要としないが1秒間に多数のフレーム画像を取得することから、画素加算を行うようにしている。   The imaging control circuit 26 controls the start of exposure and reading of the imaging element 21 in accordance with a control command from the CPU 27. The imaging control circuit 26 changes the readout control according to the drive mode during still image shooting, live view display, moving image shooting, and the like. For example, during live view display or moving image shooting, the number of pixels is less than that of a still image, but a large number of frame images are acquired per second, so that pixel addition is performed.

バス35に接続されたCPU27は、後述するROM39に記憶されているプログラムに従って、カメラの全体制御を行う。   A CPU 27 connected to the bus 35 performs overall control of the camera according to a program stored in a ROM 39 described later.

画像処理部29は、バス35を介してDRAM37から撮像データを入力し、各種画像処理を行い、静止画または動画の記録用画像データを生成し、この生成された記録用画像データは、一旦、DRAM37に一時記憶する。また、DRAM37から読み出した動画の画像データを用いて、表示用画像データを生成し、一旦、DRAM37に一時記憶する。さらに、撮像素子21内の焦点検出用画素位置にある位相差画素のデータを周囲の画素データを用いて補間処理等を行い、クロストークによる段差の影響を除去する。画像処理部29の詳しい構成については、図2を用いて後述する。   The image processing unit 29 inputs imaging data from the DRAM 37 via the bus 35, performs various image processing, generates still image or moving image recording image data, and the generated recording image data is temporarily Temporarily stored in the DRAM 37. Further, display image data is generated using the moving image data read from the DRAM 37 and temporarily stored in the DRAM 37. Further, the phase difference pixel data at the focus detection pixel position in the image sensor 21 is subjected to interpolation processing or the like using surrounding pixel data, and the effect of the step due to crosstalk is removed. A detailed configuration of the image processing unit 29 will be described later with reference to FIG.

焦点検出回路31は、DRAM37に一時記憶された位相検出画素からのデータを取得し、このデータに基づいて、公知の位相差AFによるデフォーカス方向およびデフォーカス量を算出する。なお、焦点検出回路31によって算出されたデフォーカス方向およびデフォーカス量に基づいて、CPU27は駆動部17によって撮影レンズ11のピント合わせを行う。   The focus detection circuit 31 acquires data from the phase detection pixels temporarily stored in the DRAM 37, and calculates a defocus direction and a defocus amount by a known phase difference AF based on this data. Note that, based on the defocus direction and the defocus amount calculated by the focus detection circuit 31, the CPU 27 focuses the photographing lens 11 by the driving unit 17.

ビデオエンコーダ33は、画像処理部29によって生成されDRAM37に一時記憶された表示用画像データを読出し、LCD/TV43に出力する。LCDは液晶表示部であり、カメラの背面等にライブビュー表示や記録済み画像の再生表示等に使用される。またTVは外部のテレビ装置であり、記録済み画像の再生表示等に使用される。   The video encoder 33 reads the display image data generated by the image processing unit 29 and temporarily stored in the DRAM 37 and outputs it to the LCD / TV 43. The LCD is a liquid crystal display unit, and is used for live view display, recorded image reproduction display, and the like on the back of the camera. The TV is an external television device and is used for reproducing and displaying recorded images.

DRAM37は、電気的に書き換え可能なメモリであり、前述したように、画像データ、記録用画像データ、表示用画像データ等の一時記憶を行う。また、CPU27がカメラの制御を行う際の各種データの一時記憶も行う。画像データの一時記憶用としては、SDRAM(Synchronous Dynamic Random Access Memory)を用いてもよい。   The DRAM 37 is an electrically rewritable memory, and temporarily stores image data, recording image data, display image data, and the like as described above. The CPU 27 also temporarily stores various data when the camera is controlled. An SDRAM (Synchronous Dynamic Random Access Memory) may be used for temporary storage of image data.

ROM39は、マスクROMやフラッシュメモリ等の不揮発性メモリである。ROM39には、前述したCPU27で使用するプログラムの他、カメラの調整値等の各種データも記憶されている。フラッシュメモリ41は、カメラに内蔵もしくは装填可能であり、画像データ記録用の記憶媒体である。   The ROM 39 is a nonvolatile memory such as a mask ROM or a flash memory. In addition to the program used by the CPU 27 described above, the ROM 39 also stores various data such as camera adjustment values. The flash memory 41 can be built in or loaded in the camera, and is a storage medium for recording image data.

次に、図2および図3を用いて、画像処理部29について説明する。画像処理部29は、ホワイトバランス(WB)補正処理部51、補正画素判断部53、画素補正部55、同時化処理部57、輝度特定変換部59、エッジ強調処理部61、ノイズ(NR)処理部63、色再現処理部65、歪補正部67、色収差補正部69を有する。このうち、補正画素判断部53および画素補正部55以外は、公知の画像処理を行うための処理部であることから、詳しい説明を省略する   Next, the image processing unit 29 will be described with reference to FIGS. 2 and 3. The image processing unit 29 includes a white balance (WB) correction processing unit 51, a correction pixel determination unit 53, a pixel correction unit 55, a synchronization processing unit 57, a luminance specifying conversion unit 59, an edge enhancement processing unit 61, and noise (NR) processing. A unit 63, a color reproduction processing unit 65, a distortion correction unit 67, and a chromatic aberration correction unit 69. Among these, the components other than the correction pixel determination unit 53 and the pixel correction unit 55 are processing units for performing known image processing, and thus detailed description thereof is omitted.

補正画素判断部53は、図3に示すように、補正基準画素判断部53a、補正可否判断部53b、および段差レベル判断部53cを有する。補正基準画素判断部53aは、位相差画素と通常画素(R画素やB画素)の割合を検出し、この割合によって補正対象を位相差画素の隣接画素か非隣接画素のいずれにするかを判断する。非位相差画素隣接画素の割合は、一定区間内における非位相差画素の隣接画素の個数および個数/区間内の全画素数等を意味する。補正基準画素判断部53aにおける判断方法の一例については、図5および図6を用いて後述する。   As shown in FIG. 3, the correction pixel determination unit 53 includes a correction reference pixel determination unit 53a, a correction availability determination unit 53b, and a step level determination unit 53c. The correction reference pixel determination unit 53a detects the ratio between the phase difference pixel and the normal pixel (R pixel or B pixel), and determines whether the correction target is an adjacent pixel or a non-adjacent pixel based on this ratio. To do. The ratio of the non-phase difference pixel adjacent pixels means the number of adjacent pixels of the non-phase difference pixel within a certain interval and the number / the total number of pixels within the interval. An example of a determination method in the correction reference pixel determination unit 53a will be described later with reference to FIGS.

補正可否判断部53bは、補正基準画素判断部53aにおける判断結果に応じて、補正するか否かを判断する。すなわち、位相差画素の隣接画素と非隣接画素のいずれかが、極端の割合に偏っていない場合には補正を行うが、極端の割合に偏っている場合には補正を行わないと判断する。補正可否判断部53bにおける判断方法の一例については、図10のS45、S49、図11のS61、S65等において後述する。   The correctability determination unit 53b determines whether to correct according to the determination result in the correction reference pixel determination unit 53a. That is, when any of the adjacent pixels and non-adjacent pixels of the phase difference pixel is not biased to an extreme ratio, correction is performed, but when it is biased to an extreme ratio, it is determined that correction is not performed. An example of a determination method in the correction availability determination unit 53b will be described later in S45 and S49 in FIG. 10, S61 and S65 in FIG.

段差レベル判断部53cは、補正基準画素判断部53aにおける判断結果と、補正対象画素周辺の位相差画素および非位相差画素の個数によって、段差レベルを判断し、段差が生ずる画素は補正画素として追加する。すなわち、複数の位相差画素が上下左右方向に在る場合には、クロストークの影響が強くなることから、補正対象としている。この段差レベル判断部53cの判断方法の一例については、図7を用いて後述する。   The step level determination unit 53c determines the step level based on the determination result in the correction reference pixel determination unit 53a and the number of phase difference pixels and non-phase difference pixels around the correction target pixel, and a pixel in which a step occurs is added as a correction pixel. To do. That is, when there are a plurality of phase difference pixels in the up / down / left / right directions, the influence of crosstalk becomes strong, and therefore, it is a correction target. An example of the determination method of the level difference determination unit 53c will be described later with reference to FIG.

画素補正部55は、補正画素判断部53の判断結果に応じて、位相差画素の非隣接画素から補正するか、または補正対象画素を位相差画素の隣接画素から補正するか、いずれかの方法によって補正を行う。この画素補正部55における補正方法の一例については、図8を用いて後述する。   The pixel correction unit 55 corrects the non-adjacent pixel of the phase difference pixel or corrects the correction target pixel from the adjacent pixel of the phase difference pixel according to the determination result of the correction pixel determination unit 53. To correct. An example of a correction method in the pixel correction unit 55 will be described later with reference to FIG.

次に、図4を用いて、撮像素子21における画像を得るための通常素子(R画素、B画素、G画素)と焦点検出用の位相差画素の配置について説明する。図4(a)は撮像素子21の一部分であり、撮像素子21の各画素の前面には、前述したように、ベイヤー配列のカラーフィルタが配置されている。ベイヤー配列は、水平方向に赤色カラーフィルタが配置されたR画素と緑色のカラーフィルタが配置されたG画素が交互に配置されたラインと、G画素と青色のカラーフィルタが配置されたB画素が交互に配置されたラインを有している。   Next, the arrangement of normal elements (R pixels, B pixels, G pixels) for obtaining an image on the image sensor 21 and phase detection pixels for focus detection will be described with reference to FIG. FIG. 4A shows a part of the image sensor 21, and as described above, a Bayer array color filter is arranged in front of each pixel of the image sensor 21. In the Bayer array, R pixels in which a red color filter is arranged in the horizontal direction and G pixels in which a green color filter is arranged are alternately arranged, and B pixels in which a G pixel and a blue color filter are arranged are arranged. It has alternating lines.

G画素の一部は、焦点検出用の位相差画素に置き換えられている。図4(a)に示す例では、遮光板によって右側に開口部を設けたR位相差画素(図4(a)では、(x1、y1)、(x5、y1)、(x13、y1)等)、遮光板によって左側に開口部を設けたL位相差画素(図4(a)では、(x1、y9)、(x5、y9)、(x13、y9)等)、遮光板によって上側に開口部を設けたT位相差画素(図4(a)では、(x1、y3)、(x9、y3)等)、遮光板によって下側に開口部を設けたB位相差画素(図4(a)では、(x5、y3)、(x13、y3)等)が設けられている。(x3、y5)に位置する位相差画素の拡大図を図4(b)に示す。   A part of the G pixel is replaced with a phase detection pixel for focus detection. In the example shown in FIG. 4A, an R phase difference pixel having an opening on the right side by a light shielding plate (in FIG. 4A, (x1, y1), (x5, y1), (x13, y1), etc. ), L phase difference pixel provided with an opening on the left side by a light shielding plate (in FIG. 4A, (x1, y9), (x5, y9), (x13, y9), etc.), and an opening on the upper side by the light shielding plate T phase difference pixel (in FIG. 4A, (x1, y3), (x9, y3), etc.) provided with a portion, and B phase difference pixel (FIG. ), (X5, y3), (x13, y3), etc.) are provided. FIG. 4B shows an enlarged view of the phase difference pixel located at (x3, y5).

位相差検出方式による焦点検出では、R位相差画素とL位相差画素の対(図4(a)に示す例では、(x1、y1)と(x1、y9)等の組合せ)によってX方向(画面横方向)に沿っての被写体のデフォーカス方向とデフォーカス量を検出する。また、T位相差画素とB位相差画素の対(図4(a)に示す例では、(x1、y3)と(x5、y3)等の組合せ)によってY方向(画面縦方向)に沿っての被写体のデフォーカス方向とデフォーカス量を検出する。   In focus detection by the phase difference detection method, a pair of R phase difference pixels and L phase difference pixels (in the example shown in FIG. 4A, a combination of (x1, y1) and (x1, y9), etc.) is used in the X direction ( The defocus direction and defocus amount of the subject along the horizontal direction of the screen are detected. In addition, a pair of T phase difference pixels and B phase difference pixels (in the example shown in FIG. 4A, a combination of (x1, y3) and (x5, y3), etc.) along the Y direction (vertical direction of the screen). The defocus direction and the defocus amount of the subject are detected.

次に、図5および図6を用いて、補正画素判断部53中の補正基準画素判断部53aと補正可否判断部53bにおける判断の例について説明する。   Next, an example of determination in the correction reference pixel determination unit 53a and the correction possibility determination unit 53b in the correction pixel determination unit 53 will be described with reference to FIGS.

図5は、位相差画素の非隣接画素を補正する場合を示す。図5(a)は、図4に示したと同様の画素配置の撮像素子である。R、L、T、B位相差画素の上下左右の画素は、クロストークの影響を受ける画素である。図5(b)に示す例では、クロストークの影響を受ける画素が多い。R画素とB画素の内、クロストークの影響を受けないB画素は、(x3、y2)、(x7、y2)、(x1、y6)、(x5、y6)のみである。他のB画素およびR画素は、いずれもクロストークの影響を受けている。そこで、このような場合には、クロストークの影響を受けていない画素の撮像データを、クロストークの影響を受けた同色の画素の撮像データを用いて補正する。   FIG. 5 shows a case where non-adjacent pixels of phase difference pixels are corrected. FIG. 5A shows an image sensor having a pixel arrangement similar to that shown in FIG. The top, bottom, left, and right pixels of the R, L, T, and B phase difference pixels are pixels that are affected by crosstalk. In the example shown in FIG. 5B, many pixels are affected by crosstalk. Of the R and B pixels, the only B pixels that are not affected by crosstalk are (x3, y2), (x7, y2), (x1, y6), and (x5, y6). The other B pixels and R pixels are all affected by crosstalk. Therefore, in such a case, the imaging data of the pixels not affected by the crosstalk is corrected using the imaging data of the same color pixels affected by the crosstalk.

また、図6は、位相差画素の隣接画素を補正する場合を示す。図6(a)は、図4に示した画素配置に比較し、位相差画素が少ない。図6(b)に、クロストークの影響を受けた画素を示すが、図5(b)に比較し、クロストークの影響を受けた画素が少ない。そこで、このような場合には、クロストークの影響を受けている画素の撮像データを、クロストークの影響を受けていない同色の画素の撮像データを用いて補正する。   FIG. 6 shows a case where a pixel adjacent to the phase difference pixel is corrected. 6A has fewer phase difference pixels than the pixel arrangement shown in FIG. FIG. 6B shows the pixels affected by the crosstalk. Compared with FIG. 5B, the number of pixels affected by the crosstalk is small. Therefore, in such a case, the imaging data of the pixel affected by the crosstalk is corrected using the imaging data of the same color pixel not affected by the crosstalk.

したがって、補正画素判断部53中の補正基準画素判断部53aは、位相差画素の隣接画素と、非隣接画素の割合を求め、この割合に応じて、補正対象を位相差画素の隣接画素にするか、非隣接画素にするかを判断する。なお、位相差画素の隣接画素と非隣接画素の割合は、静止画を撮影するか、ライブビューを表示するか、動画を撮影するかに応じて、通常画素の加算の仕方に応じて異なる。例えば、静止画において、位相差画素の配置周期が4画素間隔であっても、動画撮影時に、水平/垂直4画素の同色画素を加算平均してデータを出力するケースなどを考える。その場合、位相差画素が混入された画素の周期は、1画素間隔となる。その場合、ROM39に、撮像素子21の位相差画素や通常画素の配置等を記憶しておき、駆動モードと記憶された配置に基づいてカウントしてもよい。また、ROM39に、駆動モード(静止画、動画、ライブビュー表示等)に応じた位相差画素の隣接画素と非隣接画素の割合を予め記憶しておき、補正基準画素判断部53aは、駆動モードに応じて割合を読み出して判断するようにしてもよい。   Therefore, the correction reference pixel determination unit 53a in the correction pixel determination unit 53 obtains the ratio between the adjacent pixels and the non-adjacent pixels of the phase difference pixel, and sets the correction target as the adjacent pixel of the phase difference pixel according to this ratio. Or a non-adjacent pixel. Note that the ratio of adjacent pixels to non-adjacent pixels of the phase difference pixel varies depending on how to add the normal pixels depending on whether a still image is captured, a live view is displayed, or a moving image is captured. For example, in a still image, even when the arrangement period of phase difference pixels is an interval of 4 pixels, a case is considered in which data is output by averaging the same color pixels of 4 horizontal / vertical pixels during moving image shooting. In that case, the cycle of the pixels in which the phase difference pixels are mixed is one pixel interval. In that case, the arrangement of the phase difference pixels and the normal pixels of the image sensor 21 may be stored in the ROM 39 and counted based on the drive mode and the stored arrangement. Further, the ratio of the adjacent pixels and non-adjacent pixels of the phase difference pixel corresponding to the driving mode (still image, moving image, live view display, etc.) is stored in the ROM 39 in advance, and the correction reference pixel determining unit 53a The ratio may be read and determined according to the above.

次に、図7を用いて、補正画素判断部53中の段差レベル判断部53cにおける判断の例について説明する。図7(a)は、補正基準画素判断部53aおよび補正可否判断部53bによって補正対象が判断された画素を示し、図5(b)と同様である。補正基準画素判断部53aおよび補正可否判断部53bにおける判断結果では、画素(x1、y2)、(x5、y2)、(x3、y6)、(x7、y6)は、クロストークの影響を受けているが、補正対象となっていない。しかし、これらの画素は、上下を位相差画素R、T、または位相差画素R、Bに隣接しており、上下左右の1箇所のみ位相差画素と隣接する他のクロストークの影響を受けた画素に比較し、クロストークの影響が大きく、補正の必要がある。   Next, an example of determination in the step level determination unit 53c in the correction pixel determination unit 53 will be described with reference to FIG. FIG. 7A shows a pixel whose correction target is determined by the correction reference pixel determination unit 53a and the correction availability determination unit 53b, and is the same as FIG. 5B. In the determination results in the correction reference pixel determination unit 53a and the correction availability determination unit 53b, the pixels (x1, y2), (x5, y2), (x3, y6), (x7, y6) are affected by crosstalk. Is not subject to correction. However, these pixels are vertically adjacent to the phase difference pixels R and T or the phase difference pixels R and B, and are affected by other crosstalk that is adjacent to the phase difference pixel only at one place in the vertical and horizontal directions. Compared to pixels, the influence of crosstalk is large, and correction is necessary.

そこで、段差レベル判断部53cは、複数の位相差画素と隣接している場合には、クロストークの影響度が大きいため、補正対象としている。図7(b)に示す例では、上下に位相差画素と隣接する画素(x1、y2)、(x5、y2)、(x3、y6)、(x7、y6)を、補正対象と判断する。   Accordingly, the step level determination unit 53c is set as a correction target because the influence level of crosstalk is large when adjacent to a plurality of phase difference pixels. In the example shown in FIG. 7B, the pixels (x1, y2), (x5, y2), (x3, y6), and (x7, y6) adjacent to the phase difference pixels in the vertical direction are determined as correction targets.

次に、図8を用いて、画素補正部55における補正動作の例について説明する。図8(a)は、位相差画素の隣接画素を用いて補正する例を示し、図8(b)は、位相差画素の非隣接画素を用いて補正する例を示す。   Next, an example of the correction operation in the pixel correction unit 55 will be described with reference to FIG. FIG. 8A illustrates an example in which correction is performed using pixels adjacent to the phase difference pixel, and FIG. 8B illustrates an example in which correction is performed using non-adjacent pixels of the phase difference pixel.

前述の図5に示した例は、位相差画素の配置密度が比較的高い場合であり、このような場合には、位相差画素と隣接しない非隣接画素が少ないことから、この非隣接画素を補正対象画素として選択した。この場合の画素補正は、位相差画素と隣接しクロストークの影響を受けた同色の画素の撮像データを用いて補間演算により画素補正を行う。   The example shown in FIG. 5 is a case where the arrangement density of the phase difference pixels is relatively high. In such a case, since there are few non-adjacent pixels not adjacent to the phase difference pixels, Selected as a correction target pixel. In this case, pixel correction is performed by interpolation calculation using imaging data of pixels of the same color that are adjacent to the phase difference pixels and are affected by crosstalk.

図8(a)に示した例では、クロストークの影響を受けていない(x5、y6)にある青色画素の撮像データを、クロストークの影響を受けている(x3、y6)と(x7、y6)の青色画素の撮像データを用いて、補間演算による画素補正を行う。図示しないが、(x3、y2)、(x7、y2)、(x1、y6)の青色画素の撮像データも同様に画素補正を行う。   In the example shown in FIG. 8A, the imaging data of the blue pixel in (x5, y6) that is not affected by crosstalk is converted into (x3, y6) and (x7, Pixel correction by interpolation calculation is performed using the imaging data of the blue pixel of y6). Although not shown in the drawing, pixel correction is similarly performed on imaging data of blue pixels (x3, y2), (x7, y2), and (x1, y6).

前述の図6に示した例は、位相差画素の配置密度が比較的低い場合であり、このような場合には、位相差画素と隣接する隣接画素が少ないことから、この隣接画素を補正対象画素として選択した。この場合の画素補正は、位相差画素と隣接しておらずクロストークの影響を受けていない同色の画素の撮像データを用いて補間演算により画素補正を行う。   The example shown in FIG. 6 is a case where the arrangement density of the phase difference pixels is relatively low. In such a case, since there are few adjacent pixels adjacent to the phase difference pixels, the adjacent pixels are corrected. Selected as a pixel. In this case, pixel correction is performed by interpolation calculation using imaging data of pixels of the same color that are not adjacent to the phase difference pixel and are not affected by crosstalk.

図8(b)に示した例では、クロストークの影響を受けている(x5、y2)にある青色画素の撮像データを、クロストークの影響を受けていない(x3、y2)と(x7、y2)の青色画素の撮像データを用いて、補間演算による画素補正を行う。(x5、y2)の画素以外にも、クロストークの影響を受けている青色画素および赤色画素の撮像データも同様に画素補正を行う。   In the example shown in FIG. 8B, the imaging data of the blue pixel in (x5, y2) that is affected by crosstalk is converted into (x3, y2) and (x7, Pixel correction by interpolation calculation is performed using the imaging data of the blue pixel of y2). In addition to the pixel of (x5, y2), the pixel correction is similarly performed on the imaging data of the blue pixel and the red pixel which are affected by the crosstalk.

次に、本実施形態における画素補正について、図9ないし図12に示すフローチャートを用いて説明する。本実施形態における画素補正は、カメラ全体の制御に係る部分は、ROM39に記憶されたプログラムに従ってCPU27が各部を制御することにより、実行し、画像処理部29内における制御は、画像処理部29がハードウエア的に実行する。   Next, pixel correction according to the present embodiment will be described with reference to flowcharts shown in FIGS. The pixel correction in the present embodiment is executed by the CPU 27 controlling each part in accordance with a program stored in the ROM 39, and the image processing part 29 performs control in the image processing part 29. Run in hardware.

図9に示す全体処理フローに入ると、まず、動画記録を開始する(S1)。ここでは、撮像素子21から出力される撮像データを用いて、動画の画像データをフラッシュメモリ41に記録することを開始する。なお、動画記録以外にも静止画記録、ライブビュー表示、テレビ等外部機器表示であってもよい。   When the entire processing flow shown in FIG. 9 is entered, first, moving image recording is started (S1). Here, recording of moving image data in the flash memory 41 is started using the imaging data output from the imaging element 21. In addition to moving image recording, still image recording, live view display, and external device display such as a television may be used.

動画記録を開始すると、次に、撮像取り込みを行う(S3)。ここでは、撮像素子21から出力される撮像データをADC25によってAD変換し、このデジタル化した撮像データをDRAM37に一時記憶する。   When moving image recording is started, next, image capturing is performed (S3). Here, the imaging data output from the imaging device 21 is AD converted by the ADC 25, and the digitized imaging data is temporarily stored in the DRAM 37.

撮像取り込みを行うと、焦点検出処理を行う(S5)。ここでは、DRAMに一時記憶された撮像データの内から、位相差画素の撮像データを抽出し、この撮像データを用いて、位相差検出方式による焦点検出処理を行う。   When image capturing is performed, focus detection processing is performed (S5). Here, the imaging data of the phase difference pixels is extracted from the imaging data temporarily stored in the DRAM, and focus detection processing by the phase difference detection method is performed using the imaging data.

焦点検出処理を行うと、次に、位相差画素の配置情報を取得する(S7)。前述したように、静止画、ライブビュー表示、動画等の駆動モードに応じて、画素加算等を行うことから、位相差画素の配置は変化する。そこで、このステップでは、駆動モード毎に画素配置に関する情報を取得する。   Once the focus detection process has been performed, next, phase difference pixel arrangement information is acquired (S7). As described above, the pixel addition is performed according to the drive mode such as a still image, live view display, and moving image, so that the arrangement of the phase difference pixels changes. Therefore, in this step, information regarding pixel arrangement is acquired for each drive mode.

位相差画素の配置情報を取得すると、次に、補正基準画素判断を行う(S9)。ここでは、補正基準画素判断部53aが、図5および図6を用いて説明したように、位相差画素に隣接する隣接画素と、隣接しない非隣接画素の割合から補正対象を判断する。この補正基準画素判断は、図10および図11に示すフローチャートを用いて後述する。   When the arrangement information of the phase difference pixels is acquired, a correction reference pixel determination is performed (S9). Here, as described with reference to FIGS. 5 and 6, the correction reference pixel determination unit 53 a determines the correction target from the ratio of the adjacent pixels adjacent to the phase difference pixels and the non-adjacent pixels that are not adjacent. This correction reference pixel determination will be described later using the flowcharts shown in FIGS.

補正基準画素判断処理を行うと、次に、補正可否判断処理を行う(S11)。ここでは、補正可否判断部53bが、位相差画素に隣接する隣接画素と、隣接しない非隣接画素が、どちらか一方に偏っている場合には補正を行わないと判断する。この補正可否判断は、後述する図10のS39Yes、S41Yes、図11のS39Yes、S41Yesが対応する。   Once the correction reference pixel determination process is performed, a correction propriety determination process is then performed (S11). Here, the correction possibility determination unit 53b determines that the correction is not performed when the adjacent pixel adjacent to the phase difference pixel and the non-adjacent non-adjacent pixel are biased to either one. This determination as to whether or not correction is possible corresponds to S39 Yes and S41 Yes in FIG. 10 described later and S39 Yes and S41 Yes in FIG.

補正可否判断処理を行うと、次に、段差レベル判断処理を行う(S13)。ここでは、段差レベル判断処理部53cが、図7を用いて説明したように、画素補正する際に、位相差画素に隣接する隣接画素の中でクロストークの影響の大きい画素の判断処理を行う。この段差レベル判断処理は、図12のフローチャートを用いて後述する。   Once the correction availability determination process is performed, a level difference determination process is then performed (S13). Here, as described with reference to FIG. 7, the step level determination processing unit 53 c performs determination processing of pixels having a large influence of crosstalk among adjacent pixels adjacent to the phase difference pixels when performing pixel correction. . This step level determination process will be described later with reference to the flowchart of FIG.

段差レベル判断処理を行うと、次に、画素補正処理を行う(S15)。ここでは、画素補正処理部55が、図8を用いて説明したように、補正対象画素について、所定の画素の撮像データを用いて補間処理を行うことにより画素補正処理を行う。   Once the level difference determination process is performed, a pixel correction process is then performed (S15). Here, as described with reference to FIG. 8, the pixel correction processing unit 55 performs pixel correction processing by performing interpolation processing on the correction target pixel using imaging data of a predetermined pixel.

画素補正処理を行うと、次に、DRAM上の撮像データを記録用に画像処理を行う(S17)。ここでは、ステップS3において取り込み、DRAM37に一時記憶した撮像データを、画像処理部29によって、記録用に画像処理を行う。   Once the pixel correction processing is performed, next, image processing for recording the imaged data on the DRAM is performed (S17). Here, the image processing unit 29 performs image processing for recording the image data captured in step S3 and temporarily stored in the DRAM 37.

記録用に画像処理を行うと、次に、撮像データをフラッシュメモリに記録する(S19)。ここでは、ステップS17において画像処理された撮像データをフラッシュメモリ41に記録する。   Once image processing is performed for recording, the imaged data is then recorded in the flash memory (S19). Here, the imaging data subjected to image processing in step S17 is recorded in the flash memory 41.

撮像データをフラッシュメモリに記録すると、次に、動画記録停止か否かの判定を行う(S21)。ここでは、ユーザが操作部19を操作して動画記録停止の指示を行ったか否かを判定する。   Once the imaging data is recorded in the flash memory, it is next determined whether or not to stop moving image recording (S21). Here, it is determined whether or not the user has operated the operation unit 19 to give an instruction to stop moving image recording.

ステップS21における判定の結果、動画記録停止の指示がなされていない場合には、ステップS3に戻り、前述の処理を繰り返す。一方、動画記録停止の指示がなされていた場合には、動画記録を終了する。   If the result of determination in step S <b> 21 is that there has been no instruction to stop moving image recording, processing returns to step S <b> 3 and the above processing is repeated. On the other hand, when an instruction to stop moving image recording has been given, the moving image recording ends.

次に、図10および図11に示すフローチャートを用いて、図9のステップS9およびS11における補正対象決定についての詳細な処理について説明する。   Next, detailed processing for determining the correction target in steps S9 and S11 of FIG. 9 will be described using the flowcharts shown in FIGS.

図10に示すフローが開始すると、まず、一定区間内の位相画素隣接のR画素数とB画素数をカウントする(S31)。ここでは、一定区間内において、位相差画素に隣接する画素の数を同色毎にカウントする。一定区間としては、ピント合わせのためのエリア単位や焦点検出素子が配置される間隔の周期単位等、所定の範囲を決めれば良い。隣接画素のカウント方法としては、ROM39に、撮像素子21の位相差画素や通常画素(R画素およびB画素)の配置等を記憶しておき、駆動モードと記憶された配置に基づいてカウントしてもよい。また、ROM39に、撮像素子21の駆動モード(静止画、動画、ライブビュー表示等)に応じた位相差画素の隣接画素の数を記憶しておき、この記憶値を読み出してもよい。   When the flow shown in FIG. 10 starts, first, the number of R pixels and the number of B pixels adjacent to the phase pixel in a certain section are counted (S31). Here, the number of pixels adjacent to the phase difference pixel is counted for each same color within a certain interval. As the fixed section, a predetermined range such as an area unit for focusing or a period unit of an interval at which the focus detection elements are arranged may be determined. As a method for counting adjacent pixels, the ROM 39 stores the arrangement of phase difference pixels and normal pixels (R pixels and B pixels) of the image sensor 21, and counts them based on the drive mode and the stored arrangement. Also good. In addition, the ROM 39 may store the number of adjacent pixels of the phase difference pixel corresponding to the drive mode (still image, moving image, live view display, etc.) of the image sensor 21 and read the stored value.

続いて、一定区間内のR画素数とB画素数をカウントする(S33)。ここでは、一定区間内において、位相差画素に隣接するか否かに関わらず、一定区間内におけるR画素とB画素をそれぞれカウントする。カウント方法としては、ROM39に、ROM39に記憶した通常画素(R画素およびB画素)の配置等に基づいてカウントしてもよく、また、駆動モードに応じたR画素とB画素の数を記憶しておき、この記憶値を読み出してもよい。   Subsequently, the number of R pixels and the number of B pixels in a certain section are counted (S33). Here, R pixels and B pixels in the fixed interval are counted regardless of whether or not they are adjacent to the phase difference pixel in the fixed interval. As a counting method, the ROM 39 may count based on the arrangement of normal pixels (R pixels and B pixels) stored in the ROM 39, and the number of R pixels and B pixels corresponding to the drive mode is stored. The stored value may be read out.

続いて、位相差画素隣接B画素/B画素総数を求める(S35)。ここでは、ステップS31において求めた位相差画素に隣接する隣接B画素数を、ステップS33において求めた一定区間内におけるB画素総数で除算を行う。   Subsequently, the phase difference pixel adjacent B pixel / B pixel total number is obtained (S35). Here, the number of adjacent B pixels adjacent to the phase difference pixel obtained in step S31 is divided by the total number of B pixels in the fixed section obtained in step S33.

次に、割合が50%以上か否かを判定する(S37)。ここでは、ステップS35において求めた隣接B画素数/B画素総数の値が50%以上か否かを判定する。   Next, it is determined whether the ratio is 50% or more (S37). Here, it is determined whether the value of the number of adjacent B pixels / the total number of B pixels obtained in step S35 is 50% or more.

ステップS37における判定の結果、割合が50%以上の場合には、次に、割合が90%以上か否かを判定する(S39)。ここでは、ステップS35において求めた割合が90%以上か否かを判定する。   If the result of determination in step S37 is 50% or higher, it is next determined whether or not the ratio is 90% or higher (S39). Here, it is determined whether or not the ratio obtained in step S35 is 90% or more.

ステップS39における判定の結果、割合が90%以上でなかった場合には、位相差画素非隣接画素B画素を補正対象とする(S43)。この場合には、位相差画素隣接B画素/B画素総数が、50%以上90%未満の場合である。この状態は、位相差画素に隣接するB画素が多く、図5(b)を用いて説明したように、位相差画素に隣接していない非隣接画素を補正対象とする。すなわち、図13等を用いて前述したように、位相差画素に隣接する隣接画素はクロストークの影響を受けやすいため、同じ被写体輝度であっても隣接画素と非隣接画素の間に出力に段差が生じてしまう。このステップでは、非隣接画素の方が隣接画素よりも少ないことから、非隣接画素に対して補正を行うようにしている。   As a result of the determination in step S39, if the ratio is not 90% or more, the phase difference pixel non-adjacent pixel B pixel is set as a correction target (S43). In this case, the phase difference pixel adjacent B pixel / B pixel total number is 50% or more and less than 90%. In this state, there are many B pixels adjacent to the phase difference pixels, and as described with reference to FIG. 5B, non-adjacent pixels that are not adjacent to the phase difference pixels are targeted for correction. That is, as described above with reference to FIG. 13 and the like, adjacent pixels adjacent to the phase difference pixel are easily affected by crosstalk, so even if the subject brightness is the same, there is a step difference in output between the adjacent pixel and the non-adjacent pixel. Will occur. In this step, since there are fewer non-adjacent pixels than adjacent pixels, the non-adjacent pixels are corrected.

ステップS39における判定の結果、割合が90%以上の場合には、補正対象画素を設けない(S45)。この場合は、B画素の殆どが位相差画素に隣接しており、隣接画素が圧倒的に多く、そのため、隣接画素と非隣接画素の段差が目立たない。非隣接画素に対する補正を施さなくても、画像として違和感が生じないことから、敢えて補正を行わない。   If the result of determination in step S39 is 90% or more, no correction target pixel is provided (S45). In this case, most of the B pixels are adjacent to the phase difference pixels, and the adjacent pixels are overwhelmingly large. Therefore, the step between the adjacent pixels and the non-adjacent pixels is not conspicuous. Even if correction for non-adjacent pixels is not performed, the image does not feel uncomfortable, so correction is not performed.

ステップS37における判定の結果、割合が50%以上でない場合には、次に、割合が5%以下か否かを判定する(S41)。ここでは、ステップS35において求めた割合が5%以下か否かを判定する。   If the result of determination in step S37 is that the ratio is not 50% or more, it is next determined whether or not the ratio is 5% or less (S41). Here, it is determined whether or not the ratio obtained in step S35 is 5% or less.

ステップS41における判定の結果、割合が5%以下でなかった場合には、位相差画素隣接画素B画素を補正対象とする(S47)。この場合には、位相差画素隣接B画素/B画素総数が、5%以上50%未満の場合である。この状態は、位相差画素に隣接しないB画素が多く、図6(b)を用いて説明したように、位相差画素に隣接する隣接画素を補正対象とする。すなわち、位相差画素に隣接する隣接画素はクロストークの影響を受けやすいため、同じ被写体輝度であっても隣接画素と非隣接画素の間に出力に段差が生じてしまう。このステップでは、隣接画素の方が非隣接画素よりも少ないことから、隣接画素に対して補正を行うようにしている。   If the result of determination in step S41 is that the ratio is not less than 5%, the phase difference pixel adjacent pixel B pixel is set as the correction target (S47). In this case, the total number of adjacent B pixels / B pixels of the phase difference pixels is 5% or more and less than 50%. In this state, there are many B pixels that are not adjacent to the phase difference pixels, and as described with reference to FIG. 6B, the adjacent pixels adjacent to the phase difference pixels are targeted for correction. That is, since adjacent pixels adjacent to the phase difference pixel are easily affected by crosstalk, a step is generated between the adjacent pixel and the non-adjacent pixel even if the subject brightness is the same. In this step, since there are fewer adjacent pixels than non-adjacent pixels, correction is performed on adjacent pixels.

ステップS41における判定の結果、割合が5%以下の場合には、補正対象画素を設けない(S49)。この場合は、B画素の殆どが位相差画素に隣接しておらず、非隣接画素が圧倒的に多く、そのため、隣接画素と非隣接画素の段差が目立たない。隣接画素に対する補正を施さなくても、画像として違和感が生じないことから、敢えて補正を行わない。   If the result of determination in step S41 is 5% or less, no correction target pixel is provided (S49). In this case, most of the B pixels are not adjacent to the phase difference pixels, and the non-adjacent pixels are overwhelmingly large. Therefore, the step between the adjacent pixels and the non-adjacent pixels is not conspicuous. Even if no correction is performed on the adjacent pixels, the image does not feel uncomfortable, so no correction is made.

ステップS43〜S49において、補正対象画素について処理を決めると、図11に示すステップS51〜S65において、R画素について、ステップS35〜S49と同様の処理を施す。B画素をR画素に置き換えるだけであることから、詳しい説明を省略する。   When the process is determined for the correction target pixel in steps S43 to S49, the same process as steps S35 to S49 is performed for the R pixel in steps S51 to S65 shown in FIG. Since only the B pixel is replaced with the R pixel, detailed description is omitted.

まず、位相差画素に隣接する隣接画素/R画素総数を求める(S51)。続いて、ステップS51において求めた割合が50%以上か否かを判定する(S53)。この判定の結果、50%以上であった場合には、さらに割合が90%以上か否かを判定する(S55)。この判定の結果、割合が90%以上でなかった場合には、位相差画素に隣接しない非隣接R画素を補正対象とする(S59)。一方、ステップS55における判定の結果、割合が90%以上であった場合には、補正対象を設けない(S61)。   First, the total number of adjacent pixels / R pixels adjacent to the phase difference pixels is obtained (S51). Subsequently, it is determined whether or not the ratio obtained in step S51 is 50% or more (S53). As a result of this determination, if it is 50% or more, it is further determined whether or not the ratio is 90% or more (S55). If the ratio is not 90% or more as a result of this determination, non-adjacent R pixels that are not adjacent to the phase difference pixels are set as correction targets (S59). On the other hand, if the result of determination in step S55 is 90% or more, no correction target is provided (S61).

ステップS53における判定の結果、割合が50%以上でなかった場合には、さらに割合が5%以下か否かを判定する(S57)。この判定の結果、割合が5%以上でなかった場合には、位相差画素に隣接する隣接R画素を補正対象とする(S63)。一方、ステップS57における判定の結果、割合が5%以下であった場合には、補正対象を設けない(S65)。ステップS43〜S49において、補正対象画素について処理を決めると、補正対象決定のためのフローを終了し、図9に示すフローのステップS13に戻る。   If the result of determination in step S53 is that the ratio is not 50% or more, it is further determined whether or not the ratio is 5% or less (S57). As a result of this determination, if the ratio is not 5% or more, the adjacent R pixel adjacent to the phase difference pixel is set as a correction target (S63). On the other hand, if the result of determination in step S57 is 5% or less, no correction target is provided (S65). When the process is determined for the correction target pixel in steps S43 to S49, the flow for determining the correction target is terminated, and the process returns to step S13 of the flow shown in FIG.

このように、図10および図11に示すフローチャートにおいては、位相差画素の配置密度に応じて、位相差画素の隣接画素を補正するか非隣接画素を補正するかを判断している(例えば、S37、S39、S41等参照)。したがって、位相差画素の配置密度に応じてクロストークの影響を軽減することができる。   As described above, in the flowcharts shown in FIGS. 10 and 11, it is determined whether to correct adjacent pixels or non-adjacent pixels according to the arrangement density of the phase difference pixels (for example, (See S37, S39, S41, etc.). Therefore, the influence of crosstalk can be reduced according to the arrangement density of the phase difference pixels.

また、補正対象となる画素が極端に少ないか多い場合には補正を行わないようにしている(例えば、S45、S49等参照)。したがって、効率的にクロストークの影響を軽減することができる。   Further, when the number of pixels to be corrected is extremely small or large, correction is not performed (for example, see S45, S49, etc.). Therefore, the influence of crosstalk can be reduced efficiently.

なお、本フローチャートにおいては、ステップS37、S53において50%以上か否か、またステップS39、S41、S55、S57において90%以上または5%以下か否かの判定を行っている。このパーセンテージ(%)の数値は例示であり、これ以外の数値を用いても勿論かまわない。   In this flowchart, it is determined whether or not it is 50% or more in steps S37 and S53, and whether or not it is 90% or more or 5% or less in steps S39, S41, S55, and S57. The numerical value of this percentage (%) is an example, and other numerical values may of course be used.

次に、図12に示すフローチャートを用いて、図9のステップS13における段差レベル判断処理の詳細な処理について説明する。このフローは、図7に示した段差レベル判断部53cにおいて行う段差レベル判断を実行する。前述したように、非隣接画素が補正の対象とならない場合であっても、上下左右で複数の位相差画素と隣接すると、クロストークの影響を強く受け、同色の他の画素との段差レベルが大きくなってしまう。そこで、このような場合には、補正対象としている。このフローは、上下左右で複数の位相差画素と隣接画素を補正対象とする。   Next, detailed processing of the level difference determination processing in step S13 of FIG. 9 will be described using the flowchart shown in FIG. In this flow, the level difference determination performed in the level difference determination unit 53c shown in FIG. 7 is executed. As described above, even when a non-adjacent pixel is not subject to correction, if it is adjacent to a plurality of phase difference pixels vertically and horizontally, it is strongly affected by crosstalk, and the level difference from other pixels of the same color is It gets bigger. Therefore, in such a case, it is a correction target. In this flow, a plurality of phase difference pixels and adjacent pixels are subject to correction in the vertical and horizontal directions.

図12に示すフローに入ると、まず、次の位相差画素の隣接画素を判断対象とする(S71)。例えば、図7に示す例では、位相差R画素(x1、y1)を開始点とすると、(x2、y1)、(x4、y1)、(x6、y1)、(x1、y2)、(x5、y2)・・・の順に順番に位相差画素の隣接画素を判断対象として選択する。なお、x方向に順次選択したが、これに限らず、y方向に順次選択してもよく、また位相差画素の周辺を順次選択するようにしてもよい。   In the flow shown in FIG. 12, first, the adjacent pixel of the next phase difference pixel is set as a determination target (S71). For example, in the example illustrated in FIG. 7, assuming that the phase difference R pixel (x1, y1) is a starting point, (x2, y1), (x4, y1), (x6, y1), (x1, y2), (x5 , Y2)..., Adjacent pixels of the phase difference pixel are selected in order of the order. Although the selection is sequentially performed in the x direction, the present invention is not limited to this, and the selection may be performed sequentially in the y direction, or the periphery of the phase difference pixels may be sequentially selected.

位相差画素の隣接画素を選択すると、次に、上下左右の隣接画素のうち、2画素以上が位相差画素か否かを判定する(S73)。例えば、図7に示す例では、画素(x1、y2)は、上で隣接する画素が位相差R画素であり、下で隣接する画素が位相差T画素であることから、2画素以上の位相差画素と隣接するので、判断結果がYesとなる。   If the adjacent pixel of the phase difference pixel is selected, it is next determined whether or not two or more of the upper, lower, left and right adjacent pixels are phase difference pixels (S73). For example, in the example shown in FIG. 7, the pixel (x1, y2) has a phase difference R pixel in the upper adjacent pixel and a phase difference T pixel in the lower adjacent pixel. Since the pixel is adjacent to the phase difference pixel, the determination result is Yes.

ステップS73における判定の結果、上下左右の隣接画素のうち、2画素以上が位相差画素であった場合には、補正対象とする(S75)。   As a result of the determination in step S73, if two or more pixels among the upper, lower, left and right adjacent pixels are phase difference pixels, they are subject to correction (S75).

ステップS75において、補正対象とすると、または、ステップS73における判定の結果、上下左右の隣接画素のうち、2画素以上が位相差画素でなかった場合には、次の位相差画素の隣接画素を判断対象画素とし(S77)、ステップS71に戻る。   If it is determined in step S75 that correction is to be performed, or if the result of determination in step S73 is that two or more pixels are not phase difference pixels, the adjacent pixels of the next phase difference pixel are determined. The target pixel is selected (S77), and the process returns to step S71.

このように、図12に示す段差レベル判断では、複数の位相差画素が上下左右に2画素以上ある場合には、補正対象画像としている。この場合には、クロストークの影響が強く出るために、同色の他の画素との段差レベルが大きくなり、画像に違和感が生じるからである。   As described above, in the level difference determination shown in FIG. 12, when there are two or more phase difference pixels in the vertical and horizontal directions, the correction target image is set. In this case, since the influence of crosstalk is strong, the level difference level with other pixels of the same color is increased, and the image is uncomfortable.

以上説明したように、本発明の一実施形態においては、撮像素子21の画素の一部に焦点検出を行うための位相差画素が設けられている。また、補正画素判断部53は、撮像素子21の内の位相差画素同士の配置密度を用いて、補正する対象画素を判断している(例えば、図5、6、7、図9のS7〜S13参照)。また、画素補正部55は、補正画素判断部53の出力結果に応じて、画素を補正している(例えば、図8、図9のS15参照)。このため、種々のシステムにおいても、クロストークの影響を容易に軽減することが可能となる。例えば、静止画撮影、ライブビュー表示、動画撮影等、撮像素子21の駆動モードが切り替えられ、位相差画素の配置密度が変化した場合であっても、画素補正を適切に行い、クロストークの影響を軽減することができる。   As described above, in one embodiment of the present invention, a phase difference pixel for performing focus detection is provided in a part of the pixels of the image sensor 21. Further, the correction pixel determination unit 53 determines a target pixel to be corrected using the arrangement density of the phase difference pixels in the image sensor 21 (for example, S7 to S7 in FIGS. 5, 6, and 7, FIG. 9). (See S13). In addition, the pixel correction unit 55 corrects the pixels according to the output result of the correction pixel determination unit 53 (see, for example, S15 in FIGS. 8 and 9). For this reason, even in various systems, it is possible to easily reduce the influence of crosstalk. For example, even when the drive mode of the image sensor 21 is switched such as still image shooting, live view display, and moving image shooting, and the arrangement density of the phase difference pixels changes, the pixel correction is appropriately performed and the influence of crosstalk Can be reduced.

また、本発明の一実施形態においては、補正画素判断部53は、位相差画素に隣接する隣接画素もしくは位相差画素に隣接しない非隣接画素を補正対象画素とするか否かを判断する補正基準画素判断部53aを有している(例えば、図5、図6、図9のS9等参照)。位相差画素の隣接画素がクロストークの影響を受けるが、本実施形態によれば、隣接画素に対して補正するか、非隣接画素に対して補正するかを判断しているので、クロストークの影響を効率的に軽減することができる。   In one embodiment of the present invention, the correction pixel determination unit 53 determines whether or not the adjacent pixel adjacent to the phase difference pixel or the non-adjacent pixel not adjacent to the phase difference pixel is set as the correction target pixel. The pixel determination unit 53a is included (see, for example, S9 in FIGS. 5, 6, and 9). Although adjacent pixels of the phase difference pixel are affected by crosstalk, according to the present embodiment, it is determined whether to correct for adjacent pixels or non-adjacent pixels. The impact can be effectively reduced.

また、本発明の一実施形態においては、補正画素判断部53は、補正対象画素周辺の位相差画素および非位相差画素の個数に基づいて判断する段差レベル判断部53cを有している(例えば、図7、図9のS13、図12等参照)。複数の位相差画素が上下左右に隣接している場合には、クロストークの影響が強くでてしまい、他の同色画素との段差が目立ってしまうが、本実施形態によれば、このような段差を目立なくし、違和感のない画像とすることができる。   In one embodiment of the present invention, the correction pixel determination unit 53 includes a step level determination unit 53c that makes a determination based on the number of phase difference pixels and non-phase difference pixels around the correction target pixel (for example, , See S13 of FIG. 7 and FIG. 9, FIG. 12, etc.). When a plurality of phase difference pixels are adjacent to each other in the vertical and horizontal directions, the influence of crosstalk becomes strong, and a difference in level from other pixels of the same color is conspicuous. The level difference is inconspicuous, and an image without a sense of discomfort can be obtained.

また、本発明の一実施形態においては、補正画素判断部53は、画素の出力を補正しないことを判断する補正可否判断部53bを有している(例えば、図9のS11、図10のS45、S49、S61、S65等参照)。補正対象が、隣接画素または非隣接画素となる場合であっても、補正対象が圧倒的に少ない場合には、他の同色画素との段差が気にならないことから、敢えて補正を行っていない。これによって、クロストークの影響を効率的に除去できる。   In one embodiment of the present invention, the correction pixel determination unit 53 includes a correction availability determination unit 53b that determines not to correct the pixel output (for example, S11 in FIG. 9 and S45 in FIG. 10). , S49, S61, S65 etc.). Even when the correction target is an adjacent pixel or a non-adjacent pixel, if the correction target is overwhelmingly small, the level difference from other pixels of the same color is not concerned, so no correction is performed. Thereby, the influence of crosstalk can be efficiently removed.

また、本発明の一実施形態においては、画素補正部55は、補正画素判断部53が位相差画素に隣接する隣接画素を補正対象とした場合に、補正対象画素を他の位相差画素に隣接しない非隣接画素に基づいて補正を行い(例えば、図8(b)参照)、補正画素判断部53が位相差画素に隣接しない非隣接画素を補正対象とした場合に、補正対象画素を他の位相差画素に隣接する隣接画素に基づいて補正を行うようにしている(例えば、図8(a)参照)。このように、補正対象の画素を、隣接画素または非隣接画素によって補正するようにしているので、クロストークの影響による段差を軽減することができる。   In one embodiment of the present invention, when the correction pixel determination unit 53 sets an adjacent pixel adjacent to the phase difference pixel as a correction target, the pixel correction unit 55 sets the correction target pixel adjacent to another phase difference pixel. Correction is performed based on the non-adjacent pixels that are not to be corrected (see, for example, FIG. 8B), and when the correction pixel determination unit 53 sets the non-adjacent pixels that are not adjacent to the phase difference pixels as correction targets, Correction is performed based on adjacent pixels adjacent to the phase difference pixels (see, for example, FIG. 8A). As described above, since the correction target pixel is corrected by the adjacent pixel or the non-adjacent pixel, a step due to the influence of crosstalk can be reduced.

また、本発明の一実施形態においては、補正画素判断部は、撮像の駆動モードに応じて、判断を切り替えるようにしている。静止画撮影、ライブビュー表示、動画撮影等、撮像素子21の駆動モードは切り替わり、位相画素の配置密度が変わり、クロストークの影響が変化する。本実施形態によれば、撮像の駆動モードに応じてクロストークの影響を軽減することができる。   In one embodiment of the present invention, the correction pixel determination unit switches determination according to the imaging drive mode. The drive mode of the image sensor 21, such as still image shooting, live view display, and moving image shooting, is switched, the phase pixel arrangement density changes, and the influence of crosstalk changes. According to the present embodiment, the influence of crosstalk can be reduced according to the imaging drive mode.

なお、本発明の一実施形態においては、位相差画素の隣接画素として、位相差画素の上下左右の4画素を対象としたが、位相差画素の斜め右上、斜め右下、斜め左上、斜め左下を加えてもよく、更にその外側まで広げてもよい。撮像素子21が受けるクロストークの影響に応じて、適宜、決めればよい。   In the embodiment of the present invention, four pixels on the top, bottom, left, and right of the phase difference pixel are targeted as the adjacent pixels of the phase difference pixel, but the upper right, the lower right, the upper left, and the lower left of the phase difference pixel. May be added to the outside. What is necessary is just to determine suitably according to the influence of the crosstalk which the image pick-up element 21 receives.

また、本発明の一実施形態においては、位相差画素の配置密度として、B画素総数と位相差画素隣接B画素の比、R画素総数と位相差画素隣接R画素の比を用いた(図10のS35、図11のS51等参照)。しかし、これに限らず、例えば、位相差画素とB画素やR画素との平均距離等、他の評価値を用いてもよい。   In one embodiment of the present invention, the ratio of the total number of B pixels and the phase difference pixel adjacent B pixels and the ratio of the total number of R pixels and the phase difference pixel adjacent R pixels are used as the arrangement density of the phase difference pixels (FIG. 10). S35, S51 of FIG. 11, etc.). However, the present invention is not limited to this, and other evaluation values such as an average distance between the phase difference pixel and the B pixel or the R pixel may be used.

また、本発明の一実施形態においては、撮影のための機器として、デジタルカメラを用いて説明したが、カメラとしては、デジタル一眼レフカメラでもコンパクトデジタルカメラでもよく、ビデオカメラ、ムービーカメラのような動画用のカメラでもよく、さらに、携帯電話、スマートフォーンや携帯情報端末(PDA:Personal Digital Assist)、ゲーム機器等に内蔵されるカメラでも構わない。いずれにしても、撮像面に焦点検出用画素を有し、位相差方式による焦点検出を行う機器であれば、本発明を適用することができる。   In the embodiment of the present invention, the digital camera is used as the photographing device. However, the camera may be a digital single lens reflex camera or a compact digital camera, such as a video camera or a movie camera. It may be a camera for moving images, or may be a camera built in a mobile phone, a smart phone, a personal digital assistant (PDA), a game machine, or the like. In any case, the present invention can be applied to any device that has focus detection pixels on the imaging surface and performs focus detection by the phase difference method.

また、特許請求の範囲、明細書、および図面中の動作フローに関して、便宜上「まず」、「次に」等の順番を表現する言葉を用いて説明したとしても、特に説明していない箇所では、この順で実施することが必須であることを意味するものではない。   In addition, regarding the operation flow in the claims, the specification, and the drawings, even if it is described using words expressing the order such as “first”, “next”, etc. It does not mean that it is essential to implement in this order.

本発明は、上記実施形態にそのまま限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素の幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。   The present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, you may delete some components of all the components shown by embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.

10・・・被写体、11・・・撮影レンズ、13・・・絞り、15・・・メカシャッタ、17・・・駆動部、19・・・操作部、21・・・撮像素子、23・・・A−AMP、25・・・アナログデジタル変換器(ADC)、26・・・撮像制御回路、27・・・CPU、29・・・画像処理部、31・・・焦点検出回路、33・・・ビデオエンコーダ、35・・・バス、37・・・DRAM、39・・・ROM、41・・・フラッシュメモリ、43・・・LCD/TV、51・・・ホワイトバランス(WB)処理部、53・・・補正画素判断部、53a・・・補正基準画素判断部、53b・・・補正可否判断部、53c・・・段差レベル判断部、55・・・画素補正部、57・・・同時化処理部、59・・・輝度特性変換部、61・・・エッジ強調処理部、63・・・ノイズリダクション(NR)処理部、65・・・色再現処理部、67・・・歪補正部、69・・・色収差補正部 DESCRIPTION OF SYMBOLS 10 ... Subject, 11 ... Shooting lens, 13 ... Aperture, 15 ... Mechanical shutter, 17 ... Drive part, 19 ... Operation part, 21 ... Imaging element, 23 ... A-AMP, 25 ... analog-digital converter (ADC), 26 ... imaging control circuit, 27 ... CPU, 29 ... image processing unit, 31 ... focus detection circuit, 33 ... Video encoder 35 ... Bus 37 ... DRAM 39 ... ROM 41 ... Flash memory 43 ... LCD / TV 51 ... White balance (WB) processing unit 53 ..Correction pixel determination unit, 53a... Correction reference pixel determination unit, 53b... Correction possibility determination unit, 53c .. step level determination unit, 55... Pixel correction unit, 57. Unit, 59... Luminance characteristic conversion unit, 61. Di enhancement processing unit, 63 ... Noise Reduction (NR) processing unit, 65 ... color reproduction processing unit, 67 ... distortion correction unit, 69 ... color aberration corrector

Claims (7)

画素の一部に焦点検出を行うための位相差検出画素が設けられた撮像素子と、
上記撮像素子の内の位相差検出画素同士の配置密度を用いて、補正する対象画素を判断する補正画素判断部と、
上記補正画素判断部の出力結果に応じて、画素を補正する画素補正部と、
を有することを特徴とする撮像装置。
An image sensor provided with a phase difference detection pixel for performing focus detection on a part of the pixel;
A correction pixel determination unit that determines a target pixel to be corrected using the arrangement density of the phase difference detection pixels in the image sensor;
A pixel correction unit that corrects a pixel in accordance with an output result of the correction pixel determination unit;
An imaging device comprising:
上記補正画素判断部は、上記位相差検出画素に隣接する隣接画素もしくは位相差検出画素に隣接しない非隣接画素を補正対象画素とするか否かを判断する補正基準画素判断部を有することを特徴とする請求項1に記載の撮像装置。   The correction pixel determination unit includes a correction reference pixel determination unit that determines whether an adjacent pixel adjacent to the phase difference detection pixel or a non-adjacent pixel not adjacent to the phase difference detection pixel is a correction target pixel. The imaging apparatus according to claim 1. 上記補正画素判断部は、補正対象画素周辺の位相差検出画素および非位相差検出画素の個数に基づいて、上記補正する対象画素を判断する段差レベル判断部を有することを特徴とする請求項1又は2に記載の撮像装置。   2. The correction pixel determination unit includes a step level determination unit that determines the correction target pixel based on the number of phase difference detection pixels and non-phase difference detection pixels around the correction target pixel. Or the imaging device of 2. 上記補正画素判断部は、上記補正基準画素判断部における判断結果に応じて、画素の出力を補正するか否かを判断する補正可否判断部を有することを特徴とする請求項2に記載の撮像装置。   The imaging according to claim 2, wherein the correction pixel determination unit includes a correction availability determination unit that determines whether or not to correct the output of the pixel according to a determination result in the correction reference pixel determination unit. apparatus. 上記画素補正部は、
上記補正画素判断部が上記位相差検出画素に隣接する上記隣接画素を補正対象とした場合に、補正対象画素を他の位相差検出画素に隣接しない上記非隣接画素に基づいて補正を行い、
上記補正画素判断部が上記位相差検出画素に隣接しない上記非隣接画素を補正対象とした場合に、補正対象画素を他の位相差検出画素に隣接する上記隣接画素に基づいて補正を行う、
ことを特徴とする請求項2に記載の撮像装置。
The pixel correction unit
When the correction pixel determination unit sets the adjacent pixel adjacent to the phase difference detection pixel as a correction target, the correction target pixel is corrected based on the non-adjacent pixel that is not adjacent to another phase difference detection pixel.
When the correction pixel determination unit sets the non-adjacent pixel that is not adjacent to the phase difference detection pixel as a correction target, the correction target pixel is corrected based on the adjacent pixel adjacent to another phase difference detection pixel.
The imaging apparatus according to claim 2.
上記補正画素判断部は、撮像の駆動モードに基づいて、上記補正する対象画素を判断することを特徴とする請求項1又は2に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the correction pixel determination unit determines the target pixel to be corrected based on an imaging drive mode. 画素の一部に画像生成以外のための多目的画素からの画像データを取得し、
上記画像データの内の上記多目的画素の配置密度に基づいて、補正する対象画素を判断し、
上記補正する対象画素の判断結果に基づいて、上記画素を補正する、
ことを特徴とする画像処理方法。
Obtain image data from a multi-purpose pixel for non-image generation in a part of the pixel,
Based on the arrangement density of the multipurpose pixels in the image data, determine the target pixel to be corrected,
Correcting the pixel based on the determination result of the target pixel to be corrected;
An image processing method.
JP2013045493A 2013-03-07 2013-03-07 Imaging apparatus and image processing method Active JP6184132B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013045493A JP6184132B2 (en) 2013-03-07 2013-03-07 Imaging apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013045493A JP6184132B2 (en) 2013-03-07 2013-03-07 Imaging apparatus and image processing method

Publications (3)

Publication Number Publication Date
JP2014175777A true JP2014175777A (en) 2014-09-22
JP2014175777A5 JP2014175777A5 (en) 2016-04-14
JP6184132B2 JP6184132B2 (en) 2017-08-23

Family

ID=51696632

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013045493A Active JP6184132B2 (en) 2013-03-07 2013-03-07 Imaging apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP6184132B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11647302B2 (en) 2020-02-21 2023-05-09 Samsung Electronics Co., Ltd. Method of calibrating image sensor and device for calibrating image sensor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012042544A (en) * 2010-08-16 2012-03-01 Sony Corp Imaging element and imaging device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012042544A (en) * 2010-08-16 2012-03-01 Sony Corp Imaging element and imaging device

Also Published As

Publication number Publication date
JP6184132B2 (en) 2017-08-23

Similar Documents

Publication Publication Date Title
JP5888940B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM
JP5853594B2 (en) Information processing apparatus, information processing method, and program
JP5744263B2 (en) Imaging apparatus and focus control method thereof
JP6104049B2 (en) Image processing apparatus, image processing method, and image processing program
JP5424679B2 (en) Imaging apparatus and signal processing apparatus
JP5468177B2 (en) Imaging apparatus and focus control method thereof
JP5529928B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP6944846B2 (en) Imaging device, control method of imaging device
US10044957B2 (en) Imaging device and imaging method
JP5620196B2 (en) Imaging device
JP2019106634A (en) Imaging element and imaging device
US8902294B2 (en) Image capturing device and image capturing method
JP2017194558A (en) Imaging device and imaging method
JP2020098968A (en) Imaging element, imaging apparatus, and imaging method
WO2021241014A1 (en) Imaging device and imaging method
JP6184132B2 (en) Imaging apparatus and image processing method
JP2018132748A (en) Imaging device and focus adjusting method
JP5862073B2 (en) Imaging device
JP5792349B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
US20230199342A1 (en) Imaging device and imaging method
WO2015182021A1 (en) Image pickup control apparatus, image pickup apparatus, and image pickup control method
JP2023121622A (en) Detection apparatus and detection method
JP2014164231A (en) Imaging device and focus detection method
JP2020048135A (en) Imaging apparatus and control method of the same
JP2015052662A (en) Image-capturing device and method for controlling image-capturing device

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20150423

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160223

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170414

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170605

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170630

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170725

R151 Written notification of patent or utility model registration

Ref document number: 6184132

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250